浏览代码

错误提示

seimin 3 年之前
父节点
当前提交
ce7b4a5102
共有 1 个文件被更改,包括 52 次插入40 次删除
  1. 52 40
      pages/scanning_B/scanning_B.vue

+ 52 - 40
pages/scanning_B/scanning_B.vue

@@ -1,6 +1,6 @@
1
 <template>
1
 <template>
2
   <view class="Scanning_B">
2
   <view class="Scanning_B">
3
-    <view class="Scanning_top" v-if="res.status==200">
3
+    <view class="Scanning_top" v-if="res.status == 200">
4
       <view class="Scanning_top_icon">
4
       <view class="Scanning_top_icon">
5
         <text class="cubeic-ok icon_transport transport-duigou"></text>
5
         <text class="cubeic-ok icon_transport transport-duigou"></text>
6
       </view>
6
       </view>
@@ -8,7 +8,7 @@
8
         <view class="text1">扫描成功</view>
8
         <view class="text1">扫描成功</view>
9
       </view>
9
       </view>
10
     </view>
10
     </view>
11
-    <view class="Scanning_top" v-if="res.status!=200">
11
+    <view class="Scanning_top" v-if="res.status != 200">
12
       <view class="Scanning_top_icon">
12
       <view class="Scanning_top_icon">
13
         <text class="cubeic-close icon_transport transport-shibai"></text>
13
         <text class="cubeic-close icon_transport transport-shibai"></text>
14
       </view>
14
       </view>
@@ -17,19 +17,19 @@
17
       </view>
17
       </view>
18
     </view>
18
     </view>
19
 
19
 
20
-    <view class="Scanning_cont" v-if="res.status==200">
21
-      <view>标本类型 : {{infoDATA.stype.name||'-'}}</view>
22
-      <view>标本编码 : {{infoDATA.scode||'-'}}</view>
23
-      <view>患者床号 : {{infoDATA.bedNum||'-'}}</view>
24
-      <view>申请科室 : {{infoDATA.sickRoom||'-'}}</view>
25
-      <view>检查科室 : {{infoDATA.checkDept||'-'}}</view>
20
+    <view class="Scanning_cont" v-if="res.status == 200">
21
+      <view>标本类型 : {{ infoDATA.stype.name || "-" }}</view>
22
+      <view>标本编码 : {{ infoDATA.scode || "-" }}</view>
23
+      <view>患者床号 : {{ infoDATA.bedNum || "-" }}</view>
24
+      <view>申请科室 : {{ infoDATA.sickRoom || "-" }}</view>
25
+      <view>检查科室 : {{ infoDATA.checkDept || "-" }}</view>
26
     </view>
26
     </view>
27
-    <view class="Scanning_cont" v-if="res.status!=200">
28
-      <view>{{res.msg}}</view>
27
+    <view class="Scanning_cont" v-if="res.status != 200">
28
+      <view>{{ res.msg }}</view>
29
     </view>
29
     </view>
30
     <view class="foot_btn">
30
     <view class="foot_btn">
31
       <view class="btn3" @click="showAlert()">知道了</view>
31
       <view class="btn3" @click="showAlert()">知道了</view>
32
-      <block v-if="res.scanCodeSpecimenOrderSign==1">
32
+      <block v-if="res.scanCodeSpecimenOrderSign == 1">
33
         <view class="btn3" @click="orderSign(res.workOrder)" v-if="res.workOrder">执行工单</view>
33
         <view class="btn3" @click="orderSign(res.workOrder)" v-if="res.workOrder">执行工单</view>
34
         <view class="btn3" @click="buildAndOrderSign(res.data.id)" v-if="!res.workOrder && res.data">建单并签到</view>
34
         <view class="btn3" @click="buildAndOrderSign(res.data.id)" v-if="!res.workOrder && res.data">建单并签到</view>
35
       </block>
35
       </block>
@@ -44,7 +44,7 @@
44
   import {
44
   import {
45
     post,
45
     post,
46
     webHandle
46
     webHandle
47
-  } from '../../http/http.js'
47
+  } from "../../http/http.js";
48
   export default {
48
   export default {
49
     data() {
49
     data() {
50
       return {
50
       return {
@@ -54,20 +54,20 @@
54
         hosModels: {
54
         hosModels: {
55
           disjunctor: false,
55
           disjunctor: false,
56
         },
56
         },
57
-        currentCode: ''
57
+        currentCode: "",
58
       };
58
       };
59
     },
59
     },
60
     methods: {
60
     methods: {
61
       // 如果不是患者陪检或患者转运或其他
61
       // 如果不是患者陪检或患者转运或其他
62
       // 科室签到
62
       // 科室签到
63
       nextDeptOrder_s(data, accountObj) {
63
       nextDeptOrder_s(data, accountObj) {
64
-        console.log(data, accountObj)
64
+        console.log(data, accountObj);
65
         let ids = [];
65
         let ids = [];
66
         let id = data.id;
66
         let id = data.id;
67
         ids.push(id);
67
         ids.push(id);
68
         let code = "";
68
         let code = "";
69
         let postData = {
69
         let postData = {
70
-          ids
70
+          ids,
71
         };
71
         };
72
         if (accountObj) {
72
         if (accountObj) {
73
           postData.handover = [accountObj.accountId];
73
           postData.handover = [accountObj.accountId];
@@ -84,7 +84,13 @@
84
               // deptCode: code, //二维码
84
               // deptCode: code, //二维码
85
               // dept: res.dept //科室名称
85
               // dept: res.dept //科室名称
86
               uni.navigateTo({
86
               uni.navigateTo({
87
-                url: `/pages/scanning_code/scanning_code?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}&deptId=${res.deptId}`,
87
+                url: `/pages/scanning_code/scanning_code?type=${
88
+                data.taskType.associationType.value
89
+              }&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${
90
+                res.dept
91
+              }&accountObj=${encodeURIComponent(
92
+                JSON.stringify(accountObj)
93
+              )}&deptId=${res.deptId}`,
88
               });
94
               });
89
             } else {
95
             } else {
90
               uni.navigateTo({
96
               uni.navigateTo({
@@ -118,7 +124,7 @@
118
             } else {
124
             } else {
119
               this.nextDeptOrder_s(workOrder);
125
               this.nextDeptOrder_s(workOrder);
120
             }
126
             }
121
-          } else if (result.state == '0000') {
127
+          } else if (result.state == "0000") {
122
             uni.hideLoading();
128
             uni.hideLoading();
123
             this.showSelectAccount();
129
             this.showSelectAccount();
124
           } else {
130
           } else {
@@ -137,7 +143,7 @@
137
           mask: true,
143
           mask: true,
138
         });
144
         });
139
         post("/workerOrder/specimenCreateAndSign", {
145
         post("/workerOrder/specimenCreateAndSign", {
140
-          speId
146
+          speId,
141
         }).then((res) => {
147
         }).then((res) => {
142
           if (res.state == 200 || res.state == 201) {
148
           if (res.state == 200 || res.state == 201) {
143
             uni.hideLoading();
149
             uni.hideLoading();
@@ -148,14 +154,20 @@
148
               // deptCode: code, //二维码
154
               // deptCode: code, //二维码
149
               // dept: res.dept //科室名称
155
               // dept: res.dept //科室名称
150
               uni.navigateTo({
156
               uni.navigateTo({
151
-                url: `/pages/scanning_code/scanning_code?type=${res.workOrder.taskType.associationType.value}&type1=${res.type}&id=${res.workOrder.id}&deptCode=${this.currentCode}&dept=${res.dept}&accountObj=${encodeURIComponent(JSON.stringify(undefined))}&deptId=${res.deptId}`,
157
+                url: `/pages/scanning_code/scanning_code?type=${
158
+                res.workOrder.taskType.associationType.value
159
+              }&type1=${res.type}&id=${res.workOrder.id}&deptCode=${
160
+                this.currentCode
161
+              }&dept=${res.dept}&accountObj=${encodeURIComponent(
162
+                JSON.stringify(undefined)
163
+              )}&deptId=${res.deptId}`,
152
               });
164
               });
153
             } else {
165
             } else {
154
               uni.navigateTo({
166
               uni.navigateTo({
155
                 url: `/pages/scanning_Result/scanning_Result?type=${res.workOrder.taskType.associationType.value}&type1=${res.type}&id=${res.workOrder.id}&status=600&msg=${res.msg}&isKs=1`,
167
                 url: `/pages/scanning_Result/scanning_Result?type=${res.workOrder.taskType.associationType.value}&type1=${res.type}&id=${res.workOrder.id}&status=600&msg=${res.msg}&isKs=1`,
156
               });
168
               });
157
             }
169
             }
158
-          } else if (res.state == '0000') {
170
+          } else if (res.state == "0000") {
159
             uni.hideLoading();
171
             uni.hideLoading();
160
             this.currentCode = res.code;
172
             this.currentCode = res.code;
161
             this.res.workOrder = res.workOrder;
173
             this.res.workOrder = res.workOrder;
@@ -164,10 +176,10 @@
164
             uni.hideLoading();
176
             uni.hideLoading();
165
             uni.showToast({
177
             uni.showToast({
166
               icon: "none",
178
               icon: "none",
167
-              title: "请求失败!",
179
+              title: res.msg || "请求失败!",
168
             });
180
             });
169
           }
181
           }
170
-        })
182
+        });
171
       },
183
       },
172
       // 填写交接人账号-确认
184
       // 填写交接人账号-确认
173
       hosOk(data) {
185
       hosOk(data) {
@@ -180,31 +192,31 @@
180
         if (!accountName && !account) {
192
         if (!accountName && !account) {
181
           //没有填写交接人
193
           //没有填写交接人
182
           uni.showModal({
194
           uni.showModal({
183
-            title: '提示',
195
+            title: "提示",
184
             content: "请填写交接人账号!",
196
             content: "请填写交接人账号!",
185
             showCancel: false,
197
             showCancel: false,
186
             success: function(res) {
198
             success: function(res) {
187
               if (res.confirm) {
199
               if (res.confirm) {
188
-                console.log('用户点击确定');
200
+                console.log("用户点击确定");
189
               } else if (res.cancel) {
201
               } else if (res.cancel) {
190
-                console.log('用户点击取消');
202
+                console.log("用户点击取消");
191
               }
203
               }
192
-            }
204
+            },
193
           });
205
           });
194
           return;
206
           return;
195
-        } else if (!accountName && account || accountName && !account) {
207
+        } else if ((!accountName && account) || (accountName && !account)) {
196
           //没有填写交接人
208
           //没有填写交接人
197
           uni.showModal({
209
           uni.showModal({
198
-            title: '提示',
210
+            title: "提示",
199
             content: "请填写正确的交接人账号!",
211
             content: "请填写正确的交接人账号!",
200
             showCancel: false,
212
             showCancel: false,
201
             success: function(res) {
213
             success: function(res) {
202
               if (res.confirm) {
214
               if (res.confirm) {
203
-                console.log('用户点击确定');
215
+                console.log("用户点击确定");
204
               } else if (res.cancel) {
216
               } else if (res.cancel) {
205
-                console.log('用户点击取消');
217
+                console.log("用户点击取消");
206
               }
218
               }
207
-            }
219
+            },
208
           });
220
           });
209
           return;
221
           return;
210
         }
222
         }
@@ -222,28 +234,28 @@
222
       // 填写交接人账号弹窗
234
       // 填写交接人账号弹窗
223
       showSelectAccount() {
235
       showSelectAccount() {
224
         this.hosModels = {
236
         this.hosModels = {
225
-          title: '填写交接人账号',
237
+          title: "填写交接人账号",
226
           disjunctor: true,
238
           disjunctor: true,
227
-        }
239
+        };
228
       },
240
       },
229
       // 知道了
241
       // 知道了
230
       showAlert() {
242
       showAlert() {
231
         uni.navigateTo({
243
         uni.navigateTo({
232
-          url: '../receiptpage/receiptpage'
244
+          url: "../receiptpage/receiptpage",
233
         });
245
         });
234
-      }
246
+      },
235
     },
247
     },
236
     onLoad(options) {
248
     onLoad(options) {
237
       this.res = JSON.parse(options.res);
249
       this.res = JSON.parse(options.res);
238
       this.infoDATA = JSON.parse(options.infoDATA); //详细信息
250
       this.infoDATA = JSON.parse(options.infoDATA); //详细信息
239
-      console.log(this.infoDATA)
251
+      console.log(this.infoDATA);
240
       // #ifdef APP-PLUS
252
       // #ifdef APP-PLUS
241
-      webHandle('no', 'app')
253
+      webHandle("no", "app");
242
       // #endif
254
       // #endif
243
       // #ifdef H5
255
       // #ifdef H5
244
-      webHandle('no', 'wx')
256
+      webHandle("no", "wx");
245
       // #endif
257
       // #endif
246
-    }
258
+    },
247
   };
259
   };
248
 </script>
260
 </script>
249
 <style lang="less">
261
 <style lang="less">
@@ -264,7 +276,7 @@
264
 
276
 
265
         .cubeic-ok {
277
         .cubeic-ok {
266
           font-size: 140rpx;
278
           font-size: 140rpx;
267
-          color: #35b34a
279
+          color: #35b34a;
268
         }
280
         }
269
 
281
 
270
         .cubeic-close {
282
         .cubeic-close {