| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <template>
- <view>
- <cu-custom bgColor="bg-luohu" :isBack="true">
- <block slot="backText">返回</block>
- <block slot="content">样品查询</block>
- </cu-custom>
- <view class="box" v-if="specimen.length > 0">
- <view class="sinList" v-for="(item,index) in specimen" :key="index">
- <view class="title">样品编号:{{item.yang_pin_bian_hao}}</view>
- <view class="title">样品名称:{{item.yang_pin_ming_che}}</view>
- <view class="title">收养日期:{{item.shou_yang_ri_qi_}}</view>
- <view class="title">收养数量:{{item.shou_yang_shu_lia}}</view>
- <view class="title">是否留样:{{item.shi_fou_liu_yang_}}</view>
- <view class="title">留样期限至:{{item.liu_yang_qi_xian_}}</view>
- <view class="title">联系人:{{item.lian_xi_ren_}}</view>
- <view class="title">
- 电话:{{item.dian_hua_}}
- <image src="../../static/dianhua.png"
- style="width: 30rpx;height: 30rpx;margin-left: 15rpx;position: relative;top: 5rpx;"
- @click="makePhoneCall(item.dian_hua_)">
- </image>
- </view>
- <view class="title">报告状态:<text style="color: #7349ff;">{{item.liu_zhuan_zhuang_}}</text></view>
- </view>
- </view>
- <view v-else>
- <uni-card is-full :is-shadow="false">
- <text class="">暂无报告</text>
- </uni-card>
- </view>
- </view>
- </template>
- <script>
- import md5 from "@/common/util/md5.js"
- export default {
- data() {
- return {
- specimen: []
- }
- },
- onLoad(option) {
- if (option.id) {
- this.getList(option.id)
- }
- },
- methods: {
- /**
- * @param {Object} id
- * 根据委托单的id查询样品列表
- */
- getList(id) {
- uni.showLoading({
- mask: true,
- title: 'loading'
- });
- let sql =
- `{"sql":"select * from t_mjypdjb where wei_tuo_bian_hao_= '${id}' ORDER BY CREATE_TIME_ desc"}`
- let md5 = this.sig(sql) //加密, 获取md5密文
- let requestData = sql.slice(0, 1) + '"sig":"' + md5 + '",' + sql.slice(1) //结果拼接
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- const data = res.data.variables.data
- this.specimen = data
- uni.hideLoading()
- }
- })
- },
- /**
- * @param {Object} item
- * 调用手机的电话
- */
- makePhoneCall(item) {
- uni.makePhoneCall({
- phoneNumber: item
- })
- },
- sig(sql) {
- let rul = (sql.length + 9) * 12 * 3 + 168
- let salt = "JinYuanXinTong"
- return md5(rul + '' + salt)
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .box {
- padding: 20rpx;
- .sinList {
- padding: 20rpx;
- margin-bottom: 20rpx;
- width: 100%;
- background: #fff;
- border-radius: 8rpx;
- .title {
- line-height: 48rpx;
- }
- .btn {
- display: flex;
- justify-content: flex-end;
- }
- }
- }
- </style>
|