Browse Source

标本,药品修改

seimin 3 years ago
parent
commit
c862dcc907

+ 21 - 1
components/bigScreen/bigScreen.vue

@@ -8,9 +8,18 @@
8
 <script>
8
 <script>
9
 import { post, SM } from "../../http/http.js";
9
 import { post, SM } from "../../http/http.js";
10
 export default {
10
 export default {
11
+  data(){
12
+    return {
13
+      SMFlag:true,
14
+    }
15
+  },
11
   methods: {
16
   methods: {
12
     // 底部扫描
17
     // 底部扫描
13
     Scanning() {
18
     Scanning() {
19
+      if (!this.SMFlag) {
20
+        return;
21
+      }
22
+      this.SMFlag = false;
14
       SM().then((content) => {
23
       SM().then((content) => {
15
         uni.showLoading({
24
         uni.showLoading({
16
           title: "加载中",
25
           title: "加载中",
@@ -21,12 +30,13 @@ export default {
21
           content,
30
           content,
22
         })
31
         })
23
           .then((result) => {
32
           .then((result) => {
33
+            this.SMFlag = true;
24
             // 200检测通过,201没有有效期也通过。
34
             // 200检测通过,201没有有效期也通过。
25
             if (result.state == 200 || result.state == 201) {
35
             if (result.state == 200 || result.state == 201) {
26
               let data = {
36
               let data = {
27
                 code: result.code, //二维码
37
                 code: result.code, //二维码
28
               };
38
               };
29
-              //微信—大扫描(科室码,患者码,标本码,快捷建单码)
39
+              //微信—大扫描(科室码,患者码,标本码,快捷建单码,药包码
30
               post("/workerOrder/scanCode", data)
40
               post("/workerOrder/scanCode", data)
31
                 .then((res) => {
41
                 .then((res) => {
32
                   uni.hideLoading();
42
                   uni.hideLoading();
@@ -83,6 +93,11 @@ export default {
83
                           JSON.stringify(infoDATA)
93
                           JSON.stringify(infoDATA)
84
                         )}&code=${data.code}`,
94
                         )}&code=${data.code}`,
85
                       });
95
                       });
96
+                    }else if(res.type == 'drugsBag'){
97
+                      //扫药包码
98
+                      uni.navigateTo({
99
+                        url: `/pages/scanning_drug/scanning_drug?drugsBagId=${res.drugsBagId}`,
100
+                      });
86
                     }
101
                     }
87
                   } else {
102
                   } else {
88
                     uni.navigateTo({
103
                     uni.navigateTo({
@@ -98,9 +113,14 @@ export default {
98
               });
113
               });
99
             }
114
             }
100
           })
115
           })
116
+      }).catch(err=>{
117
+        this.SMFlag = true;
101
       });
118
       });
102
     },
119
     },
103
   },
120
   },
121
+  onShow(){
122
+    this.SMFlag = true;
123
+  }
104
 };
124
 };
105
 </script>
125
 </script>
106
 
126
 

+ 7 - 3
components/selectAccount/selectAccount.vue

@@ -7,15 +7,15 @@
7
       <view class="changeHospital__article">
7
       <view class="changeHospital__article">
8
         <view class="uni-list-cell">
8
         <view class="uni-list-cell">
9
           <view class="uni-list-cell-left">
9
           <view class="uni-list-cell-left">
10
-            交接人账号:
10
+            {{name}}账号:
11
           </view>
11
           </view>
12
           <view class="uni-list-cell-db">
12
           <view class="uni-list-cell-db">
13
-            <input class="uni-input" auto-focus="true" placeholder="请填写交接人信息" v-model="account" @input="bindPickerChange($event)" />
13
+            <input class="uni-input" auto-focus="true" :placeholder="'请填写'+name+'账号'" v-model="account" @input="bindPickerChange($event)" />
14
           </view>
14
           </view>
15
         </view>
15
         </view>
16
         <view class="uni-list-cell">
16
         <view class="uni-list-cell">
17
           <view class="uni-list-cell-left">
17
           <view class="uni-list-cell-left">
18
-            交接人姓名:
18
+            {{name}}姓名:
19
           </view>
19
           </view>
20
           <view class="uni-list-cell-db-text">
20
           <view class="uni-list-cell-db-text">
21
             <text>{{accountName}}</text>
21
             <text>{{accountName}}</text>
@@ -84,6 +84,10 @@
84
           };
84
           };
85
         },
85
         },
86
       },
86
       },
87
+      name:{
88
+        type:String,
89
+        default:'交接人'
90
+      }
87
     },
91
     },
88
     methods: {
92
     methods: {
89
       //修改picker的值
93
       //修改picker的值

+ 11 - 0
components/smallScreen/smallScreen.vue

@@ -25,6 +25,7 @@
25
         hosModels: {
25
         hosModels: {
26
           disjunctor: false,
26
           disjunctor: false,
27
         },
27
         },
28
+        SMFlag:true,
28
       }
29
       }
29
     },
30
     },
30
     props: {
31
     props: {
@@ -219,6 +220,10 @@
219
       // type==2  如果不是患者陪检,患者转运,其他
220
       // type==2  如果不是患者陪检,患者转运,其他
220
       // 扫码(小扫描)
221
       // 扫码(小扫描)
221
       Scan_ss(data, type) {
222
       Scan_ss(data, type) {
223
+        if (!this.SMFlag) {
224
+          return;
225
+        }
226
+        this.SMFlag = false;
222
         this.currentData = data;
227
         this.currentData = data;
223
         console.log(data, 'data');
228
         console.log(data, 'data');
224
         SM().then((ress1) => {
229
         SM().then((ress1) => {
@@ -232,6 +237,7 @@
232
             taskTypeId: data.taskType.id,
237
             taskTypeId: data.taskType.id,
233
             gdState: data.gdState.id,
238
             gdState: data.gdState.id,
234
           }).then((result) => {
239
           }).then((result) => {
240
+            this.SMFlag = true;
235
             this.currentCode = result.code;
241
             this.currentCode = result.code;
236
             if (result.state == 200 || result.state == 201) {
242
             if (result.state == 200 || result.state == 201) {
237
               if (result.account) {
243
               if (result.account) {
@@ -266,6 +272,8 @@
266
               });
272
               });
267
             }
273
             }
268
           });
274
           });
275
+        }).catch(err=>{
276
+          this.SMFlag = true;
269
         });
277
         });
270
       },
278
       },
271
       // 填写交接人账号-确认
279
       // 填写交接人账号-确认
@@ -340,6 +348,9 @@
340
     },
348
     },
341
     components: {
349
     components: {
342
       selectAccount
350
       selectAccount
351
+    },
352
+    onShow(){
353
+      this.SMFlag = true;
343
     }
354
     }
344
   };
355
   };
345
 </script>
356
 </script>

+ 1 - 1
http/http.js

@@ -91,7 +91,7 @@ export function SM() {
91
         resolve(str);
91
         resolve(str);
92
       },
92
       },
93
       fail(err) {
93
       fail(err) {
94
-        console.error(err)
94
+        reject(err)
95
       }
95
       }
96
     });
96
     });
97
   });
97
   });

+ 2 - 1
main.js

@@ -2,7 +2,8 @@ import Vue from 'vue'
2
 import App from './App'
2
 import App from './App'
3
 // #ifdef H5
3
 // #ifdef H5
4
 import wx from 'weixin-jsapi'
4
 import wx from 'weixin-jsapi'
5
-
5
+// import VConsole from 'vconsole';
6
+// new VConsole();
6
 Vue.prototype.wx = wx //声明扫码
7
 Vue.prototype.wx = wx //声明扫码
7
 Vue.prototype.audios = [] //待播放的语音集合
8
 Vue.prototype.audios = [] //待播放的语音集合
8
 // #endif
9
 // #endif

+ 55 - 0
package-lock.json

@@ -10,6 +10,7 @@
10
       "license": "ISC",
10
       "license": "ISC",
11
       "dependencies": {
11
       "dependencies": {
12
         "crypto-js": "^4.1.1",
12
         "crypto-js": "^4.1.1",
13
+        "vconsole": "^3.12.1",
13
         "weixin-jsapi": "^1.1.0"
14
         "weixin-jsapi": "^1.1.0"
14
       },
15
       },
15
       "devDependencies": {
16
       "devDependencies": {
@@ -79,6 +80,20 @@
79
         "typedarray": "^0.0.6"
80
         "typedarray": "^0.0.6"
80
       }
81
       }
81
     },
82
     },
83
+    "node_modules/copy-text-to-clipboard": {
84
+      "version": "3.0.1",
85
+      "resolved": "https://registry.npmmirror.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz",
86
+      "integrity": "sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q==",
87
+      "engines": {
88
+        "node": ">=12"
89
+      }
90
+    },
91
+    "node_modules/core-js": {
92
+      "version": "3.21.1",
93
+      "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.21.1.tgz",
94
+      "integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==",
95
+      "hasInstallScript": true
96
+    },
82
     "node_modules/cpu-features": {
97
     "node_modules/cpu-features": {
83
       "version": "0.0.2",
98
       "version": "0.0.2",
84
       "resolved": "https://registry.npmmirror.com/cpu-features/download/cpu-features-0.0.2.tgz",
99
       "resolved": "https://registry.npmmirror.com/cpu-features/download/cpu-features-0.0.2.tgz",
@@ -191,6 +206,11 @@
191
         "node": "*"
206
         "node": "*"
192
       }
207
       }
193
     },
208
     },
209
+    "node_modules/mutation-observer": {
210
+      "version": "1.0.3",
211
+      "resolved": "https://registry.npmmirror.com/mutation-observer/-/mutation-observer-1.0.3.tgz",
212
+      "integrity": "sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA=="
213
+    },
194
     "node_modules/nan": {
214
     "node_modules/nan": {
195
       "version": "2.15.0",
215
       "version": "2.15.0",
196
       "resolved": "https://registry.npmmirror.com/nan/download/nan-2.15.0.tgz",
216
       "resolved": "https://registry.npmmirror.com/nan/download/nan-2.15.0.tgz",
@@ -381,6 +401,16 @@
381
       "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
401
       "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
382
       "dev": true
402
       "dev": true
383
     },
403
     },
404
+    "node_modules/vconsole": {
405
+      "version": "3.12.1",
406
+      "resolved": "https://registry.npmmirror.com/vconsole/-/vconsole-3.12.1.tgz",
407
+      "integrity": "sha512-L4lN8rRBz8+O56k6FNE0qQ89fE3T3VwoehpcwpbQcmOKTqREJi+d8V6gfyes4TZS0K2dbCZsModcssriaL0ALQ==",
408
+      "dependencies": {
409
+        "copy-text-to-clipboard": "^3.0.1",
410
+        "core-js": "^3.11.0",
411
+        "mutation-observer": "^1.0.3"
412
+      }
413
+    },
384
     "node_modules/weixin-jsapi": {
414
     "node_modules/weixin-jsapi": {
385
       "version": "1.1.0",
415
       "version": "1.1.0",
386
       "resolved": "https://registry.npm.taobao.org/weixin-jsapi/download/weixin-jsapi-1.1.0.tgz",
416
       "resolved": "https://registry.npm.taobao.org/weixin-jsapi/download/weixin-jsapi-1.1.0.tgz",
@@ -452,6 +482,16 @@
452
         "typedarray": "^0.0.6"
482
         "typedarray": "^0.0.6"
453
       }
483
       }
454
     },
484
     },
485
+    "copy-text-to-clipboard": {
486
+      "version": "3.0.1",
487
+      "resolved": "https://registry.npmmirror.com/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz",
488
+      "integrity": "sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q=="
489
+    },
490
+    "core-js": {
491
+      "version": "3.21.1",
492
+      "resolved": "https://registry.npmmirror.com/core-js/-/core-js-3.21.1.tgz",
493
+      "integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig=="
494
+    },
455
     "cpu-features": {
495
     "cpu-features": {
456
       "version": "0.0.2",
496
       "version": "0.0.2",
457
       "resolved": "https://registry.npmmirror.com/cpu-features/download/cpu-features-0.0.2.tgz",
497
       "resolved": "https://registry.npmmirror.com/cpu-features/download/cpu-features-0.0.2.tgz",
@@ -548,6 +588,11 @@
548
         "brace-expansion": "^1.1.7"
588
         "brace-expansion": "^1.1.7"
549
       }
589
       }
550
     },
590
     },
591
+    "mutation-observer": {
592
+      "version": "1.0.3",
593
+      "resolved": "https://registry.npmmirror.com/mutation-observer/-/mutation-observer-1.0.3.tgz",
594
+      "integrity": "sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA=="
595
+    },
551
     "nan": {
596
     "nan": {
552
       "version": "2.15.0",
597
       "version": "2.15.0",
553
       "resolved": "https://registry.npmmirror.com/nan/download/nan-2.15.0.tgz",
598
       "resolved": "https://registry.npmmirror.com/nan/download/nan-2.15.0.tgz",
@@ -702,6 +747,16 @@
702
       "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
747
       "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
703
       "dev": true
748
       "dev": true
704
     },
749
     },
750
+    "vconsole": {
751
+      "version": "3.12.1",
752
+      "resolved": "https://registry.npmmirror.com/vconsole/-/vconsole-3.12.1.tgz",
753
+      "integrity": "sha512-L4lN8rRBz8+O56k6FNE0qQ89fE3T3VwoehpcwpbQcmOKTqREJi+d8V6gfyes4TZS0K2dbCZsModcssriaL0ALQ==",
754
+      "requires": {
755
+        "copy-text-to-clipboard": "^3.0.1",
756
+        "core-js": "^3.11.0",
757
+        "mutation-observer": "^1.0.3"
758
+      }
759
+    },
705
     "weixin-jsapi": {
760
     "weixin-jsapi": {
706
       "version": "1.1.0",
761
       "version": "1.1.0",
707
       "resolved": "https://registry.npm.taobao.org/weixin-jsapi/download/weixin-jsapi-1.1.0.tgz",
762
       "resolved": "https://registry.npm.taobao.org/weixin-jsapi/download/weixin-jsapi-1.1.0.tgz",

+ 1 - 0
package.json

@@ -15,6 +15,7 @@
15
   "license": "ISC",
15
   "license": "ISC",
16
   "dependencies": {
16
   "dependencies": {
17
     "crypto-js": "^4.1.1",
17
     "crypto-js": "^4.1.1",
18
+    "vconsole": "^3.12.1",
18
     "weixin-jsapi": "^1.1.0"
19
     "weixin-jsapi": "^1.1.0"
19
   },
20
   },
20
   "devDependencies": {
21
   "devDependencies": {

+ 9 - 3
pages.json

@@ -7,7 +7,7 @@
7
           "titleNView": false
7
           "titleNView": false
8
         }
8
         }
9
       }
9
       }
10
-    },{
10
+    }, {
11
       "path": "pages/bindUser/bindUser", //绑定账号页面
11
       "path": "pages/bindUser/bindUser", //绑定账号页面
12
       "style": {
12
       "style": {
13
         "h5": {
13
         "h5": {
@@ -176,14 +176,20 @@
176
         }
176
         }
177
       }
177
       }
178
 
178
 
179
-    },{
179
+    }, {
180
       "path": "pages/noScanSpecimen/noScanSpecimen",
180
       "path": "pages/noScanSpecimen/noScanSpecimen",
181
       "style": {
181
       "style": {
182
         "h5": {
182
         "h5": {
183
           "titleNView": false
183
           "titleNView": false
184
         }
184
         }
185
       }
185
       }
186
-
186
+    }, {
187
+      "path": "pages/scanning_drug/scanning_drug",
188
+      "style": {
189
+        "h5": {
190
+          "titleNView": false
191
+        }
192
+      }
187
     }, {
193
     }, {
188
       "path": "components/footTool/footTool",
194
       "path": "components/footTool/footTool",
189
       "style": {
195
       "style": {

+ 3 - 0
pages/noScanSpecimen/noScanSpecimen.vue

@@ -61,6 +61,7 @@
61
     data() {
61
     data() {
62
       return {
62
       return {
63
         workOrderId: -1,
63
         workOrderId: -1,
64
+        deptCode: '',
64
         specimens: [],
65
         specimens: [],
65
       };
66
       };
66
     },
67
     },
@@ -75,6 +76,7 @@
75
           workOrderId: this.workOrderId,
76
           workOrderId: this.workOrderId,
76
           currentPage: 0,
77
           currentPage: 0,
77
           pageSize: 999,
78
           pageSize: 999,
79
+          deptQrCode:this.deptCode
78
         };
80
         };
79
         uni.showLoading({
81
         uni.showLoading({
80
           title: "加载中",
82
           title: "加载中",
@@ -90,6 +92,7 @@
90
     },
92
     },
91
     onLoad(options) {
93
     onLoad(options) {
92
       this.workOrderId = options.workOrderId;
94
       this.workOrderId = options.workOrderId;
95
+      this.deptCode = options.deptCode;
93
       this.getNoScanSpecimen();
96
       this.getNoScanSpecimen();
94
       // #ifdef APP-PLUS
97
       // #ifdef APP-PLUS
95
       webHandle("no", "app");
98
       webHandle("no", "app");

+ 9 - 0
pages/patientInformationList/patientInformationList.vue

@@ -87,6 +87,7 @@
87
   export default {
87
   export default {
88
     data() {
88
     data() {
89
       return {
89
       return {
90
+        SMFlag:true,
90
         hosId: uni.getStorageSync("userData").user.currentHospital.id,
91
         hosId: uni.getStorageSync("userData").user.currentHospital.id,
91
         // 选中的患者项
92
         // 选中的患者项
92
         currentItem: {},
93
         currentItem: {},
@@ -227,6 +228,10 @@
227
       },
228
       },
228
       // 送回病房-扫描科室
229
       // 送回病房-扫描科室
229
       scanDept(item) {
230
       scanDept(item) {
231
+        if (!this.SMFlag) {
232
+          return;
233
+        }
234
+        this.SMFlag = false;
230
         this.currentItem = item;
235
         this.currentItem = item;
231
         let code = "";
236
         let code = "";
232
         SM().then((ress1) => {
237
         SM().then((ress1) => {
@@ -238,6 +243,7 @@
238
           post("/dept/scanning", {
243
           post("/dept/scanning", {
239
             content: ress1,
244
             content: ress1,
240
           }).then((result) => {
245
           }).then((result) => {
246
+            this.SMFlag = true;
241
             if (result.state == 200 || result.state == 201) {
247
             if (result.state == 200 || result.state == 201) {
242
               let ress = result.code;
248
               let ress = result.code;
243
               if (ress) {
249
               if (ress) {
@@ -292,6 +298,8 @@
292
               });
298
               });
293
             }
299
             }
294
           });
300
           });
301
+        }).catch(err=>{
302
+          this.SMFlag = true;
295
         });
303
         });
296
       },
304
       },
297
       // 送回病房-选择起点科室
305
       // 送回病房-选择起点科室
@@ -477,6 +485,7 @@
477
       // #endif
485
       // #endif
478
     },
486
     },
479
     onShow() {
487
     onShow() {
488
+      this.SMFlag = true;
480
       // #ifdef H5
489
       // #ifdef H5
481
       document.body.addEventListener("touchmove", this.stop, {
490
       document.body.addEventListener("touchmove", this.stop, {
482
         passive: false,
491
         passive: false,

+ 8 - 0
pages/pharmacy/pharmacy.vue

@@ -107,6 +107,7 @@ import { get, post, SM, webHandle } from "../../http/http.js";
107
 export default {
107
 export default {
108
   data() {
108
   data() {
109
     return {
109
     return {
110
+      SMFlag:true,
110
       triggered: false, //下拉刷新状态
111
       triggered: false, //下拉刷新状态
111
       freshing: false, //上拉加载开关
112
       freshing: false, //上拉加载开关
112
       scroll_top: 0, //距离顶部的距离
113
       scroll_top: 0, //距离顶部的距离
@@ -187,10 +188,16 @@ export default {
187
     },
188
     },
188
     // 扫一扫
189
     // 扫一扫
189
     drugsScanning() {
190
     drugsScanning() {
191
+      if (!this.SMFlag) {
192
+        return;
193
+      }
194
+      this.SMFlag = false;
190
       SM().then((ress) => {
195
       SM().then((ress) => {
191
         uni.navigateTo({
196
         uni.navigateTo({
192
           url: "../pharmacyDetails/pharmacyDetails?qrcode=" + ress,
197
           url: "../pharmacyDetails/pharmacyDetails?qrcode=" + ress,
193
         });
198
         });
199
+      }).catch(err=>{
200
+        this.SMFlag = true;
194
       });
201
       });
195
     },
202
     },
196
     //刷新
203
     //刷新
@@ -302,6 +309,7 @@ export default {
302
     // #endif
309
     // #endif
303
   },
310
   },
304
   onShow() {
311
   onShow() {
312
+    this.SMFlag = true;
305
     // #ifdef H5
313
     // #ifdef H5
306
     document.body.addEventListener("touchmove", this.stop, { passive: false });
314
     document.body.addEventListener("touchmove", this.stop, { passive: false });
307
     // #endif
315
     // #endif

+ 301 - 116
pages/pharmacyDetails/pharmacyDetails.vue

@@ -45,11 +45,26 @@
45
       <view class="L-l"></view>
45
       <view class="L-l"></view>
46
       <view class="R-l"></view>
46
       <view class="R-l"></view>
47
     </view>
47
     </view>
48
+    <view v-if="infoDATA.drugsState && infoDATA.drugsState.value == 4&&infoDATA.launch.id==loginUser.dept.id"
49
+      class="btn-wrap">
50
+      <button class="cube-toolbar-item1" :loading="isLoading" :disabled="isLoading" @click="dispensing(4)"
51
+        v-if="infoDATA.drugsState && infoDATA.drugsState.value == 4&&infoDATA.launch.id==loginUser.dept.id">
52
+        核对完成
53
+      </button>
54
+      <button class="cube-toolbar-item1" :loading="isOLoading" :disabled="isOLoading" @click="nursetake()">
55
+        护士自取
56
+      </button>
57
+    </view>
58
+    <button class="cube-toolbar-item" :loading="isOLoading" :disabled="isOLoading" @click="nursetake()"
59
+      v-if="infoDATA.drugsState && infoDATA.drugsState.value == 8&&infoDATA.launch.id==loginUser.dept.id">
60
+      护士自取
61
+    </button>
48
     <button class="cube-toolbar-item" :loading="isLoading" :disabled="isLoading" @click="dispensing(1)"
62
     <button class="cube-toolbar-item" :loading="isLoading" :disabled="isLoading" @click="dispensing(1)"
49
-      v-if="infoDATA.drugsState && infoDATA.drugsState.name == '待配药'&&infoDATA.launch.id==loginUser.dept.id">
63
+      v-if="infoDATA.drugsState && infoDATA.drugsState.value == 1&&infoDATA.launch.id==loginUser.dept.id">
50
       开始配药
64
       开始配药
51
     </button>
65
     </button>
52
-    <view v-if="infoDATA.drugsState && infoDATA.drugsState.name == '配药中'&&infoDATA.launch.id==loginUser.dept.id" class="btn-wrap">
66
+    <view v-if="infoDATA.drugsState && infoDATA.drugsState.value == 2&&infoDATA.launch.id==loginUser.dept.id"
67
+      class="btn-wrap">
53
       <button class="cube-toolbar-item1" :loading="isLoading" :disabled="isLoading" @click="dispensing(2)">
68
       <button class="cube-toolbar-item1" :loading="isLoading" :disabled="isLoading" @click="dispensing(2)">
54
         进行核对
69
         进行核对
55
       </button>
70
       </button>
@@ -57,9 +72,14 @@
57
         替换配药人
72
         替换配药人
58
       </button>
73
       </button>
59
     </view>
74
     </view>
75
+    <!-- 护士自取账号弹窗 -->
76
+    <selectAccount v-if="hosModels.disjunctor" :title="hosModels.title" :disjunctor="hosModels.disjunctor" @ok="hosOk"
77
+      @cancel="hosCancel">
78
+    </selectAccount>
60
   </view>
79
   </view>
61
 </template>
80
 </template>
62
 <script>
81
 <script>
82
+  import selectAccount from "@/components/selectAccount/selectAccount.vue";
63
   import {
83
   import {
64
     get,
84
     get,
65
     post,
85
     post,
@@ -72,10 +92,116 @@
72
         infoDATA: [],
92
         infoDATA: [],
73
         isLoading: false,
93
         isLoading: false,
74
         isTLoading: false,
94
         isTLoading: false,
75
-        loginUser: {} //当前登录用户
95
+        isOLoading: false,
96
+        loginUser: {}, //当前登录用户
97
+        // 护士自取弹窗model
98
+        hosModels: {
99
+          disjunctor: false,
100
+        },
76
       };
101
       };
77
     },
102
     },
103
+    components: {
104
+      selectAccount
105
+    },
78
     methods: {
106
     methods: {
107
+      // 确认
108
+      hosOk(data) {
109
+        console.log(data);
110
+        const {
111
+          accountName,
112
+          account,
113
+          accountId
114
+        } = data;
115
+        if (!accountName && !account) {
116
+          //没有填写交接人
117
+          uni.showModal({
118
+            title: '提示',
119
+            content: "请填写账号!",
120
+            showCancel: false,
121
+            success: function(res) {
122
+              if (res.confirm) {
123
+                console.log('用户点击确定');
124
+              } else if (res.cancel) {
125
+                console.log('用户点击取消');
126
+              }
127
+            }
128
+          });
129
+          return;
130
+        } else if (!accountName && account || accountName && !account) {
131
+          //没有填写
132
+          uni.showModal({
133
+            title: '提示',
134
+            content: "请填写正确的账号!",
135
+            showCancel: false,
136
+            success: function(res) {
137
+              if (res.confirm) {
138
+                console.log('用户点击确定');
139
+              } else if (res.cancel) {
140
+                console.log('用户点击取消');
141
+              }
142
+            }
143
+          });
144
+          return;
145
+        }
146
+        this.hosModels.disjunctor = false;
147
+        //请求接口
148
+        uni.showLoading({
149
+          title: "加载中",
150
+          mask: true,
151
+        });
152
+        let postData = {
153
+          id: this.infoDATA.id,
154
+          packId: this.infoDATA.packid,
155
+          recipient: accountId,
156
+          recipientName:accountName
157
+        };
158
+        if (this.infoDATA.gdId) {
159
+          postData.gdId = this.infoDATA.gdId;
160
+        }
161
+        post('/drugsBag/nurseByHerself', postData).then(result => {
162
+          uni.hideLoading();
163
+          if (result.state == 200) {
164
+            uni.showModal({
165
+              title: '提示',
166
+              content: result.info || "护士自取成功!",
167
+              showCancel: false,
168
+              success: function(res) {
169
+                if (res.confirm) {
170
+                  uni.navigateTo({
171
+                    url: "../pharmacy/pharmacy",
172
+                  });
173
+                } else if (res.cancel) {
174
+                  console.log('用户点击取消');
175
+                }
176
+              }
177
+            });
178
+          } else {
179
+            uni.showModal({
180
+              title: '提示',
181
+              content: "请求失败!",
182
+              showCancel: false,
183
+              success: function(res) {
184
+                if (res.confirm) {
185
+                  console.log('用户点击确定');
186
+                } else if (res.cancel) {
187
+                  console.log('用户点击取消');
188
+                }
189
+              }
190
+            });
191
+          }
192
+        })
193
+      },
194
+      // 取消
195
+      hosCancel() {
196
+        this.hosModels.disjunctor = false;
197
+      },
198
+      // 护士自取
199
+      nursetake() {
200
+        this.hosModels = {
201
+          title: '填写账号',
202
+          disjunctor: true,
203
+        }
204
+      },
79
       // 替换配药人
205
       // 替换配药人
80
       replaceOperator() {
206
       replaceOperator() {
81
         this.isTLoading = true;
207
         this.isTLoading = true;
@@ -117,124 +243,180 @@
117
           }
243
           }
118
         })
244
         })
119
       },
245
       },
120
-      // 开始配药,进行核对,,,1是待配药,2是配药中
246
+      // 开始配药,进行核对,1是待配药,2是配药中,4是核对中
121
       dispensing(type) {
247
       dispensing(type) {
122
-        this.isLoading = true;
123
-        uni.showLoading({
124
-          title: "加载中",
125
-          mask: true,
126
-        });
248
+        let msg = '';
127
         if (type == 1) {
249
         if (type == 1) {
128
-          post("/drugsBag/changeToIng", {
129
-            id: this.infoDATA.id,
130
-          }).then((result) => {
131
-            this.isLoading = false;
132
-            uni.hideLoading();
133
-            if (result.state == 200) {
134
-              uni.showModal({
135
-                title: '提示',
136
-                content: result.info || "开始配药成功!",
137
-                showCancel: false,
138
-                success: function(res) {
139
-                  if (res.confirm) {
140
-                    uni.navigateTo({
141
-                      url: "../pharmacy/pharmacy",
142
-                    });
143
-                  } else if (res.cancel) {
144
-                    console.log('用户点击取消');
145
-                  }
146
-                }
250
+          msg = '是否开始配药?'
251
+        } else if (type == 2) {
252
+          msg = '是否进行核对?'
253
+        } else if (type == 4) {
254
+          msg = '是否核对完成?'
255
+        }
256
+        uni.showModal({
257
+          title: '提示',
258
+          content: msg,
259
+          success: res => {
260
+            if (res.confirm) {
261
+              console.log('用户点击确定');
262
+              this.isLoading = true;
263
+              uni.showLoading({
264
+                title: "加载中",
265
+                mask: true,
147
               });
266
               });
148
-              // let data = {
149
-              //   launchId: this.infoDATA.launch.id,
150
-              //   drugsBagId: this.infoDATA.id,
151
-              // };
152
-              // post("/drugsBag/autoDrugsBags", data).then((result1) => {
153
-              //   this.isLoading = false;
154
-              //   if (result1.status == 200) {
155
-              //     uni.showToast({
156
-              //       title: "操作成功!",
157
-              //       success() {
158
-              //         uni.navigateTo({
159
-              //           url: "../pharmacy/pharmacy",
160
-              //         });
161
-              //       },
162
-              //     });
163
-              //   }else if(result1.status == 501){
164
-              //     uni.showToast({
165
-              //       icon: "none",
166
-              //       title: result1.error,
167
-              //     });
168
-              //   }else {
169
-              //     uni.showToast({
170
-              //       icon: "none",
171
-              //       title: "请求失败!",
172
-              //     });
173
-              //   }
174
-              // });
175
-              // } else if(result.state == 503){//未建单
176
-              //   uni.showToast({
177
-              //     icon: "none",
178
-              //     title: result.error,
179
-              //   });
180
-            } else {
181
-              // this.isLoading = false;
182
-              uni.showModal({
183
-                title: '提示',
184
-                content: "请求失败!",
185
-                showCancel: false,
186
-                success: function(res) {
187
-                  if (res.confirm) {
188
-                    console.log('用户点击确定');
189
-                  } else if (res.cancel) {
190
-                    console.log('用户点击取消');
267
+              if (type == 1) {
268
+                post("/drugsBag/changeToIng", {
269
+                  id: this.infoDATA.id,
270
+                }).then((result) => {
271
+                  this.isLoading = false;
272
+                  uni.hideLoading();
273
+                  if (result.state == 200) {
274
+                    uni.showModal({
275
+                      title: '提示',
276
+                      content: result.info || "开始配药成功!",
277
+                      showCancel: false,
278
+                      success: function(res) {
279
+                        if (res.confirm) {
280
+                          uni.navigateTo({
281
+                            url: "../pharmacy/pharmacy",
282
+                          });
283
+                        } else if (res.cancel) {
284
+                          console.log('用户点击取消');
285
+                        }
286
+                      }
287
+                    });
288
+                    // let data = {
289
+                    //   launchId: this.infoDATA.launch.id,
290
+                    //   drugsBagId: this.infoDATA.id,
291
+                    // };
292
+                    // post("/drugsBag/autoDrugsBags", data).then((result1) => {
293
+                    //   this.isLoading = false;
294
+                    //   if (result1.status == 200) {
295
+                    //     uni.showToast({
296
+                    //       title: "操作成功!",
297
+                    //       success() {
298
+                    //         uni.navigateTo({
299
+                    //           url: "../pharmacy/pharmacy",
300
+                    //         });
301
+                    //       },
302
+                    //     });
303
+                    //   }else if(result1.status == 501){
304
+                    //     uni.showToast({
305
+                    //       icon: "none",
306
+                    //       title: result1.error,
307
+                    //     });
308
+                    //   }else {
309
+                    //     uni.showToast({
310
+                    //       icon: "none",
311
+                    //       title: "请求失败!",
312
+                    //     });
313
+                    //   }
314
+                    // });
315
+                    // } else if(result.state == 503){//未建单
316
+                    //   uni.showToast({
317
+                    //     icon: "none",
318
+                    //     title: result.error,
319
+                    //   });
320
+                  } else {
321
+                    // this.isLoading = false;
322
+                    uni.showModal({
323
+                      title: '提示',
324
+                      content: "请求失败!",
325
+                      showCancel: false,
326
+                      success: function(res) {
327
+                        if (res.confirm) {
328
+                          console.log('用户点击确定');
329
+                        } else if (res.cancel) {
330
+                          console.log('用户点击取消');
331
+                        }
332
+                      }
333
+                    });
191
                   }
334
                   }
192
-                }
193
-              });
194
-            }
195
-          });
196
-        } else if (type == 2) {
197
-          post("/drugsBag/changeToCheck", {
198
-            id: this.infoDATA.id,
199
-          }).then((result) => {
200
-            this.isLoading = false;
201
-            uni.hideLoading();
202
-            if (result.state == 200) {
203
-              uni.showModal({
204
-                title: '提示',
205
-                content: result.info || "进行核对成功!",
206
-                showCancel: false,
207
-                success: function(res) {
208
-                  if (res.confirm) {
209
-                    uni.navigateTo({
210
-                      url: "../pharmacy/pharmacy",
335
+                });
336
+              } else if (type == 2) {
337
+                post("/drugsBag/changeToCheck", {
338
+                  id: this.infoDATA.id,
339
+                }).then((result) => {
340
+                  this.isLoading = false;
341
+                  uni.hideLoading();
342
+                  if (result.state == 200) {
343
+                    uni.showModal({
344
+                      title: '提示',
345
+                      content: result.info || "进行核对成功!",
346
+                      showCancel: false,
347
+                      success: function(res) {
348
+                        if (res.confirm) {
349
+                          uni.navigateTo({
350
+                            url: "../pharmacy/pharmacy",
351
+                          });
352
+                        } else if (res.cancel) {
353
+                          console.log('用户点击取消');
354
+                        }
355
+                      }
356
+                    });
357
+                  } else {
358
+                    uni.showModal({
359
+                      title: '提示',
360
+                      content: "请求失败!",
361
+                      showCancel: false,
362
+                      success: function(res) {
363
+                        if (res.confirm) {
364
+                          console.log('用户点击确定');
365
+                        } else if (res.cancel) {
366
+                          console.log('用户点击取消');
367
+                        }
368
+                      }
211
                     });
369
                     });
212
-                  } else if (res.cancel) {
213
-                    console.log('用户点击取消');
214
                   }
370
                   }
215
-                }
216
-              });
217
-            } else {
218
-              uni.showModal({
219
-                title: '提示',
220
-                content: "请求失败!",
221
-                showCancel: false,
222
-                success: function(res) {
223
-                  if (res.confirm) {
224
-                    console.log('用户点击确定');
225
-                  } else if (res.cancel) {
226
-                    console.log('用户点击取消');
371
+                });
372
+              } else if (type == 4) {
373
+                post("/drugsBag/checkComplete", {
374
+                  id: this.infoDATA.id,
375
+                  packId: this.infoDATA.packid
376
+                }).then((result) => {
377
+                  this.isLoading = false;
378
+                  uni.hideLoading();
379
+                  if (result.state == 200) {
380
+                    uni.showModal({
381
+                      title: '提示',
382
+                      content: result.info || "核对完成成功!",
383
+                      showCancel: false,
384
+                      success: function(res) {
385
+                        if (res.confirm) {
386
+                          uni.navigateTo({
387
+                            url: "../pharmacy/pharmacy",
388
+                          });
389
+                        } else if (res.cancel) {
390
+                          console.log('用户点击取消');
391
+                        }
392
+                      }
393
+                    });
394
+                  } else {
395
+                    uni.showModal({
396
+                      title: '提示',
397
+                      content: "请求失败!",
398
+                      showCancel: false,
399
+                      success: function(res) {
400
+                        if (res.confirm) {
401
+                          console.log('用户点击确定');
402
+                        } else if (res.cancel) {
403
+                          console.log('用户点击取消');
404
+                        }
405
+                      }
406
+                    });
227
                   }
407
                   }
228
-                }
229
-              });
408
+                });
409
+              }
410
+            } else if (res.cancel) {
411
+              console.log('用户点击取消');
230
             }
412
             }
231
-          });
232
-        }
413
+          }
414
+        });
233
       },
415
       },
234
     },
416
     },
235
     onLoad(options) {
417
     onLoad(options) {
236
       this.loginUser = uni.getStorageSync("userData").user;
418
       this.loginUser = uni.getStorageSync("userData").user;
237
-      console.log(this.loginUser,'loginUserloginUser')
419
+      console.log(this.loginUser, 'loginUserloginUser')
238
       // #ifdef APP-PLUS
420
       // #ifdef APP-PLUS
239
       webHandle("no", "app");
421
       webHandle("no", "app");
240
       // #endif
422
       // #endif
@@ -254,10 +436,11 @@
254
           uni.hideLoading();
436
           uni.hideLoading();
255
           if (result.state == 200) {
437
           if (result.state == 200) {
256
             this.infoDATA = result.result;
438
             this.infoDATA = result.result;
257
-            if(this.loginUser.dept.id != this.infoDATA.launch.id){
439
+            if (this.loginUser.dept.id != this.infoDATA.launch.id) {
258
               uni.showModal({
440
               uni.showModal({
259
                 title: '提示',
441
                 title: '提示',
260
-                content: "您现在所在的科室是【"+this.loginUser.dept.dept+"】,药包所在的科室是【"+this.infoDATA.launch.dept+"】,您不能进行操作",
442
+                content: "您现在所在的科室是【" + this.loginUser.dept.dept + "】,药包所在的科室是【" + this.infoDATA.launch.dept +
443
+                  "】,您不能进行操作",
261
                 showCancel: false,
444
                 showCancel: false,
262
                 success: function(res) {
445
                 success: function(res) {
263
                   if (res.confirm) {
446
                   if (res.confirm) {
@@ -287,10 +470,11 @@
287
           uni.hideLoading();
470
           uni.hideLoading();
288
           if (res.status == 200) {
471
           if (res.status == 200) {
289
             this.infoDATA = res.data;
472
             this.infoDATA = res.data;
290
-            if(this.loginUser.dept.id != this.infoDATA.launch.id){
473
+            if (this.loginUser.dept.id != this.infoDATA.launch.id) {
291
               uni.showModal({
474
               uni.showModal({
292
                 title: '提示',
475
                 title: '提示',
293
-                content: "您现在所在的科室是【"+this.loginUser.dept.dept+"】,药包所在的科室是【"+this.infoDATA.launch.dept+"】,您不能进行操作",
476
+                content: "您现在所在的科室是【" + this.loginUser.dept.dept + "】,药包所在的科室是【" + this.infoDATA.launch.dept +
477
+                  "】,您不能进行操作",
294
                 showCancel: false,
478
                 showCancel: false,
295
                 success: function(res) {
479
                 success: function(res) {
296
                   if (res.confirm) {
480
                   if (res.confirm) {
@@ -492,19 +676,20 @@
492
     }
676
     }
493
 
677
 
494
     .btn-wrap {
678
     .btn-wrap {
679
+      width: 100%;
495
       display: flex;
680
       display: flex;
496
       justify-content: space-between;
681
       justify-content: space-between;
497
       position: fixed;
682
       position: fixed;
498
-      left: 20rpx;
683
+      left: 0;
499
       bottom: 160rpx;
684
       bottom: 160rpx;
500
     }
685
     }
501
 
686
 
502
     .cube-toolbar-item1 {
687
     .cube-toolbar-item1 {
503
-      width: 350rpx;
688
+      flex: 1;
504
       height: 68rpx;
689
       height: 68rpx;
505
       line-height: 68rpx;
690
       line-height: 68rpx;
506
       border-radius: 8rpx;
691
       border-radius: 8rpx;
507
-      margin: 0 5rpx;
692
+      margin: 0 1%;
508
       background: linear-gradient(to right, #72c172, #3bb197);
693
       background: linear-gradient(to right, #72c172, #3bb197);
509
       font-size: 36rpx;
694
       font-size: 36rpx;
510
       color: #fff;
695
       color: #fff;

+ 1 - 0
pages/scanning/scanning.vue

@@ -222,6 +222,7 @@ export default {
222
     },
222
     },
223
   },
223
   },
224
   onLoad(options) {
224
   onLoad(options) {
225
+    console.log(options,'options')
225
     this.queryObj = options;
226
     this.queryObj = options;
226
     let id = JSON.parse(options.id);
227
     let id = JSON.parse(options.id);
227
     this.dataId = id;
228
     this.dataId = id;

+ 80 - 25
pages/scanning_Result/scanning_Result.vue

@@ -213,7 +213,7 @@
213
     </showModel>
213
     </showModel>
214
     <!-- 弹窗 -->
214
     <!-- 弹窗 -->
215
     <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
215
     <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
216
-      @ok="ok2" @cancel="cancel2" :operate="models2.operate">
216
+      @ok="ok2" @know="know2" @cancel="cancel2" :operate="models2.operate">
217
     </showModel>
217
     </showModel>
218
   </view>
218
   </view>
219
 </template>
219
 </template>
@@ -231,10 +231,12 @@
231
   export default {
231
   export default {
232
     data() {
232
     data() {
233
       return {
233
       return {
234
+        SMFlag:true,
234
         // 交接人信息
235
         // 交接人信息
235
         accountObj: undefined,
236
         accountObj: undefined,
236
         // 完成扫描的id
237
         // 完成扫描的id
237
         wcId: "",
238
         wcId: "",
239
+        wcFlag:false,
238
         // 弹窗model
240
         // 弹窗model
239
         models: {
241
         models: {
240
           disjunctor: false,
242
           disjunctor: false,
@@ -271,7 +273,7 @@
271
         }
273
         }
272
         this.gotoFlag = false;
274
         this.gotoFlag = false;
273
         uni.navigateTo({
275
         uni.navigateTo({
274
-          url: `../noScanSpecimen/noScanSpecimen?workOrderId=${this.queryObj.id}`,
276
+          url: `../noScanSpecimen/noScanSpecimen?workOrderId=${this.queryObj.id}&deptCode=${this.queryObj.deptCode}`,
275
         });
277
         });
276
       },
278
       },
277
       // 拍照
279
       // 拍照
@@ -280,6 +282,10 @@
280
       },
282
       },
281
       // 继续扫描
283
       // 继续扫描
282
       Scanning_again() {
284
       Scanning_again() {
285
+        if (!this.SMFlag) {
286
+          return;
287
+        }
288
+        this.SMFlag = false;
283
         SM().then((ress1) => {
289
         SM().then((ress1) => {
284
           // ----------------
290
           // ----------------
285
           uni.showLoading({
291
           uni.showLoading({
@@ -290,6 +296,7 @@
290
           post("/dept/scanning", {
296
           post("/dept/scanning", {
291
             content: ress1,
297
             content: ress1,
292
           }).then((result) => {
298
           }).then((result) => {
299
+            this.SMFlag = true;
293
             if (result.state == 200 || result.state == 201) {
300
             if (result.state == 200 || result.state == 201) {
294
               let codes = result.code;
301
               let codes = result.code;
295
               if (codes) {
302
               if (codes) {
@@ -326,7 +333,8 @@
326
                   if (ress.status == 200) {
333
                   if (ress.status == 200) {
327
                     if (this.type == "specimenPlan" || this.type == "specimen") {
334
                     if (this.type == "specimenPlan" || this.type == "specimen") {
328
                       this.infoDATA = ress.data;
335
                       this.infoDATA = ress.data;
329
-                      uni.navigateTo({
336
+                      this.speNum = ress.specimenCount;
337
+                      uni.redirectTo({
330
                         url: `../scanning_Result/scanning_Result?type=${
338
                         url: `../scanning_Result/scanning_Result?type=${
331
                         this.queryObj.type
339
                         this.queryObj.type
332
                       }&type1=${
340
                       }&type1=${
@@ -335,7 +343,7 @@
335
                         JSON.stringify(ress.data)
343
                         JSON.stringify(ress.data)
336
                       )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
344
                       )}&status=${ress.status}&msg=${ress.msg}&deptCode=${
337
                         this.queryObj.deptCode
345
                         this.queryObj.deptCode
338
-                      }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}`,
346
+                      }&dept=${this.queryObj.dept}&id=${this.dataId}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}`,
339
                       });
347
                       });
340
                     } else if (
348
                     } else if (
341
                       this.type == "inspect" ||
349
                       this.type == "inspect" ||
@@ -395,15 +403,16 @@
395
             }
403
             }
396
           });
404
           });
397
           // ------------------------------
405
           // ------------------------------
406
+        }).catch(err=>{
407
+          this.SMFlag = true;
398
         });
408
         });
399
       },
409
       },
400
       // 正常完成扫描
410
       // 正常完成扫描
401
       overFinish() {
411
       overFinish() {
402
         let data = {
412
         let data = {
403
           type: this.queryObj.type1,
413
           type: this.queryObj.type1,
404
-          ids: [],
414
+          ids: [this.wcId],
405
         };
415
         };
406
-        data.ids.push(this.wcId);
407
         //只要是标本轮巡1对多或者多对多
416
         //只要是标本轮巡1对多或者多对多
408
         // plan-spe-dsd-2  1对多
417
         // plan-spe-dsd-2  1对多
409
         // plan-spe-dsd-3  多对多
418
         // plan-spe-dsd-3  多对多
@@ -415,9 +424,15 @@
415
           post("/workerOrder/finishPlanSpes", data).then((res) => {
424
           post("/workerOrder/finishPlanSpes", data).then((res) => {
416
             // uni.hideLoading()
425
             // uni.hideLoading()
417
             if (res.status == 200) {
426
             if (res.status == 200) {
418
-              uni.navigateTo({
419
-                url: "../receiptpage/receiptpage",
420
-              });
427
+              this.models2 = {
428
+                disjunctor: true,
429
+                title: "提示",
430
+                content: `完成扫描成功`,
431
+                icon: "success",
432
+                operate: {
433
+                  know: "知道了",
434
+                },
435
+              };
421
             } else {
436
             } else {
422
               uni.showToast({
437
               uni.showToast({
423
                 icon: "none",
438
                 icon: "none",
@@ -446,7 +461,8 @@
446
         this.models.disjunctor = false;
461
         this.models.disjunctor = false;
447
         let postData = {
462
         let postData = {
448
           ids: [this.queryObj.id],
463
           ids: [this.queryObj.id],
449
-          sign: true
464
+          sign: true,
465
+          deptQrCode:this.queryObj.deptCode
450
         };
466
         };
451
         uni.showLoading({
467
         uni.showLoading({
452
           title: '加载中',
468
           title: '加载中',
@@ -456,13 +472,25 @@
456
           uni.hideLoading();
472
           uni.hideLoading();
457
           if (ress.status == 200) {
473
           if (ress.status == 200) {
458
             if (ress.actualReceiveNum === undefined) {
474
             if (ress.actualReceiveNum === undefined) {
459
-              //正常完成扫描
460
-              this.overFinish()
475
+              if(this.wcFlag){
476
+                //正常完成扫描
477
+                this.overFinish()
478
+              }else{
479
+                this.gotoOver();
480
+              }
461
             } else {
481
             } else {
482
+              let content = '';
483
+              if(this.queryObj.type1 === 'spe-ddd-2'||this.queryObj.type1 === 'plan-spe-ddd-2'){
484
+                //待到达
485
+                content = `系统内预计标本<strong class="red">${ress.expectReceiveNum}</strong>只,您扫描收取标本<strong class="red">${ress.actualReceiveNum}</strong>只,其中<strong class="red">${ress.notReceiveNum}</strong>只未扫描;`;
486
+              }else{
487
+                //待送达
488
+                content = `本工单已签到${ress.scanSet?ress.scanSet.join('、'):''},剩余需签到科室${ress.notScanSet?ress.notScanSet.join('、'):''},总签收${ress.totalAcceptance}只,剩余${ress.notAcceptance}只未签收,您确定完成工单吗?`;
489
+              }
462
               this.models2 = {
490
               this.models2 = {
463
                 disjunctor: true,
491
                 disjunctor: true,
464
                 title: "提示",
492
                 title: "提示",
465
-                content: `您扫描的标本<strong class="red">${ress.actualReceiveNum}</strong>个,与系统预计标本${ress.expectReceiveNum}个标本不一致,您确认要完成扫描码?`,
493
+                content,
466
                 icon: "warn",
494
                 icon: "warn",
467
                 operate: {
495
                 operate: {
468
                   ok: "确定",
496
                   ok: "确定",
@@ -487,6 +515,7 @@
487
         this.models2.disjunctor = false;
515
         this.models2.disjunctor = false;
488
         let postData = {
516
         let postData = {
489
           ids: [this.queryObj.id],
517
           ids: [this.queryObj.id],
518
+          deptQrCode:this.queryObj.deptCode
490
         };
519
         };
491
         uni.showLoading({
520
         uni.showLoading({
492
           title: '加载中',
521
           title: '加载中',
@@ -495,9 +524,11 @@
495
         post("/workerOrder/expectedAndActual", postData).then((ress) => {
524
         post("/workerOrder/expectedAndActual", postData).then((ress) => {
496
           uni.hideLoading();
525
           uni.hideLoading();
497
           if (ress.status == 200) {
526
           if (ress.status == 200) {
498
-            uni.navigateTo({
499
-              url: "../receiptpage/receiptpage",
500
-            });
527
+            if(this.wcFlag){
528
+              this.overFinish()
529
+            }else{
530
+              this.gotoOver();
531
+            }
501
           } else {
532
           } else {
502
             uni.showToast({
533
             uni.showToast({
503
               icon: "none",
534
               icon: "none",
@@ -510,18 +541,37 @@
510
       cancel2() {
541
       cancel2() {
511
         this.models2.disjunctor = false;
542
         this.models2.disjunctor = false;
512
       },
543
       },
544
+      know2(){
545
+        this.models2.disjunctor = false;
546
+        uni.navigateTo({
547
+          url: "../receiptpage/receiptpage",
548
+        });
549
+      },
513
       // 完成扫描
550
       // 完成扫描
514
       Scanning_complete(id) {
551
       Scanning_complete(id) {
515
-        let data = {
516
-          type: this.queryObj.type1,
517
-          ids: [],
518
-        };
519
-        data.ids.push(id);
552
+        this.wcId = id;
520
         if (
553
         if (
521
           this.queryObj.type1 == "plan-spe-ddd-2" ||
554
           this.queryObj.type1 == "plan-spe-ddd-2" ||
522
           this.queryObj.type1 == "spe-ddd-2"
555
           this.queryObj.type1 == "spe-ddd-2"
523
         ) {
556
         ) {
524
-          this.wcId = id;
557
+          this.wcFlag = true;
558
+          this.models = {
559
+            disjunctor: true,
560
+            title: "提示",
561
+            content: "是否确定标本已扫描完成?",
562
+            icon: "warn",
563
+            operate: {
564
+              ok: "确定",
565
+              cancel: "取消",
566
+            },
567
+          };
568
+        }else if (
569
+          this.queryObj.type1 == "plan-spe-dsd-2" ||
570
+          this.queryObj.type1 == "plan-spe-dsd-3" ||
571
+          this.queryObj.type1 == "spe-dsd-2" ||
572
+          this.queryObj.type1 == "spe-dsd-3"
573
+        ) {
574
+          this.wcFlag = false;
525
           this.models = {
575
           this.models = {
526
             disjunctor: true,
576
             disjunctor: true,
527
             title: "提示",
577
             title: "提示",
@@ -533,14 +583,18 @@
533
             },
583
             },
534
           };
584
           };
535
         } else {
585
         } else {
536
-          uni.navigateTo({
586
+          this.gotoOver();
587
+        }
588
+      },
589
+      // 跳转完成工单页面
590
+      gotoOver(){
591
+        uni.navigateTo({
537
             url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
592
             url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
538
             this.queryObj.type1
593
             this.queryObj.type1
539
-          }&id=${encodeURIComponent(JSON.stringify(data.ids))}&deptCode=${
594
+          }&id=${encodeURIComponent(JSON.stringify([this.wcId]))}&deptCode=${
540
             this.queryObj.deptCode
595
             this.queryObj.deptCode
541
           }&dept=${this.queryObj.dept}&speNum=${this.speNum}`,
596
           }&dept=${this.queryObj.dept}&speNum=${this.speNum}`,
542
           });
597
           });
543
-        }
544
       },
598
       },
545
       // 继续执行工单,当扫错科室码的时候,直接跳过,默默执行正确的科室码
599
       // 继续执行工单,当扫错科室码的时候,直接跳过,默默执行正确的科室码
546
       goToRight(id) {
600
       goToRight(id) {
@@ -629,6 +683,7 @@
629
       },
683
       },
630
     },
684
     },
631
     onShow() {
685
     onShow() {
686
+      this.SMFlag = true;
632
       this.gotoFlag = true;
687
       this.gotoFlag = true;
633
     },
688
     },
634
     onLoad(options) {
689
     onLoad(options) {

+ 9 - 0
pages/scanning_all/scanning_all.vue

@@ -275,6 +275,7 @@ import { post, SM, webHandle } from "../../http/http.js";
275
 export default {
275
 export default {
276
   data() {
276
   data() {
277
     return {
277
     return {
278
+      SMFlag:true,
278
       // 弹窗model
279
       // 弹窗model
279
       models: {
280
       models: {
280
         disjunctor: false,
281
         disjunctor: false,
@@ -373,6 +374,10 @@ export default {
373
               }
374
               }
374
             });
375
             });
375
           } else {
376
           } else {
377
+            if (!this.SMFlag) {
378
+              return;
379
+            }
380
+            this.SMFlag = false;
376
             SM().then((ress1) => {
381
             SM().then((ress1) => {
377
               uni.showLoading({
382
               uni.showLoading({
378
                 title: "加载中",
383
                 title: "加载中",
@@ -382,6 +387,7 @@ export default {
382
               post("/dept/scanning", {
387
               post("/dept/scanning", {
383
                 content: ress1,
388
                 content: ress1,
384
               }).then((result) => {
389
               }).then((result) => {
390
+                this.SMFlag = true;
385
                 if (result.state == 200 || result.state == 201) {
391
                 if (result.state == 200 || result.state == 201) {
386
                   let ress = result.code;
392
                   let ress = result.code;
387
                   if (ress) {
393
                   if (ress) {
@@ -467,6 +473,8 @@ export default {
467
                   });
473
                   });
468
                 }
474
                 }
469
               });
475
               });
476
+            }).catch(err=>{
477
+              this.SMFlag = true;
470
             });
478
             });
471
           }
479
           }
472
         } else {
480
         } else {
@@ -610,6 +618,7 @@ export default {
610
     // #endif
618
     // #endif
611
   },
619
   },
612
   onShow() {
620
   onShow() {
621
+    this.SMFlag = true;
613
     this.flag = true;
622
     this.flag = true;
614
     // 创建动画
623
     // 创建动画
615
     this.animation = uni.createAnimation({
624
     this.animation = uni.createAnimation({

+ 14 - 0
pages/scanning_code/scanning_code.vue

@@ -365,6 +365,7 @@
365
   export default {
365
   export default {
366
     data() {
366
     data() {
367
       return {
367
       return {
368
+        SMFlag:true,
368
         // 交接人信息
369
         // 交接人信息
369
         accountObj:undefined,
370
         accountObj:undefined,
370
         // 完成工单的id
371
         // 完成工单的id
@@ -391,6 +392,10 @@
391
       },
392
       },
392
       // 扫描
393
       // 扫描
393
       Scanning_again(id) {
394
       Scanning_again(id) {
395
+        if (!this.SMFlag) {
396
+          return;
397
+        }
398
+        this.SMFlag = false;
394
         SM().then((ress1) => {
399
         SM().then((ress1) => {
395
           // ----------------
400
           // ----------------
396
           uni.showLoading({
401
           uni.showLoading({
@@ -401,6 +406,7 @@
401
           post("/dept/scanning", {
406
           post("/dept/scanning", {
402
             content: ress1,
407
             content: ress1,
403
           }).then((result) => {
408
           }).then((result) => {
409
+            this.SMFlag = true;
404
             if (result.state == 200 || result.state == 201) {
410
             if (result.state == 200 || result.state == 201) {
405
               let codes = result.code;
411
               let codes = result.code;
406
               if (codes) {
412
               if (codes) {
@@ -421,6 +427,9 @@
421
                   if(this.accountObj){
427
                   if(this.accountObj){
422
                     data.handover = this.accountObj.accountId;
428
                     data.handover = this.accountObj.accountId;
423
                   }
429
                   }
430
+                  if(this.queryObj.grabOrders){
431
+                    data.grabOrders = '666';
432
+                  }
424
                 }
433
                 }
425
                 if (this.infoDATA.taskType.associationType.value == "specimen") {
434
                 if (this.infoDATA.taskType.associationType.value == "specimen") {
426
                   data["speCode"] = data.code;
435
                   data["speCode"] = data.code;
@@ -580,6 +589,8 @@
580
             }
589
             }
581
           });
590
           });
582
           // ------------------------------
591
           // ------------------------------
592
+        }).catch(err=>{
593
+          this.SMFlag = true;
583
         });
594
         });
584
       },
595
       },
585
       show(type) {
596
       show(type) {
@@ -713,6 +724,9 @@
713
         });
724
         });
714
       },
725
       },
715
     },
726
     },
727
+    onShow(){
728
+      this.SMFlag = true;
729
+    },
716
     onLoad(options) {
730
     onLoad(options) {
717
       console.log(options);
731
       console.log(options);
718
       if(options.accountObj && options.accountObj != "undefined"){
732
       if(options.accountObj && options.accountObj != "undefined"){

+ 93 - 27
pages/scanning_djEnd/scanning_djEnd.vue

@@ -170,9 +170,9 @@
170
           (type1 != 'spe-ddd-1') & (type1 != 'spe-ddd-2'))
170
           (type1 != 'spe-ddd-1') & (type1 != 'spe-ddd-2'))
171
       "
171
       "
172
     >
172
     >
173
-      <view class="btn1" @click="Scanning_again()">继续扫描标本</view>
174
-      <!-- <view class="btn3" @click="getNoScanSpecimen()">查看未扫描标本</view> -->
175
-      <!-- <view class="btn2" @click="Scanning_complete(ids)">完成扫描</view> -->
173
+      <view class="btn1" @click="Scanning_again()">扫描标本</view>
174
+      <view class="btn3" @click="getNoScanSpecimen()" v-show="this.queryObj.speNum">查看未扫描标本</view>
175
+      <view class="btn2" @click="Scanning_complete(ids)" v-show="this.queryObj.speNum">完成扫描</view>
176
     </view>
176
     </view>
177
     <view
177
     <view
178
       class="foot_btn"
178
       class="foot_btn"
@@ -181,9 +181,9 @@
181
         (type == 'specimen' && type1 == 'spe-ddd-2')
181
         (type == 'specimen' && type1 == 'spe-ddd-2')
182
       "
182
       "
183
     >
183
     >
184
-      <view class="btn1" @click="Scanning_again()">继续扫描标本</view>
185
-      <!-- <view class="btn3" @click="getNoScanSpecimen()">查看未扫描标本</view> -->
186
-      <!-- <view class="btn2" @click="Scanning_complete(ids)">完成扫描</view> -->
184
+      <view class="btn1" @click="Scanning_again()">扫描标本</view>
185
+      <view class="btn3" @click="getNoScanSpecimen()" v-show="this.queryObj.speNum">查看未扫描标本</view>
186
+      <view class="btn2" @click="Scanning_complete(ids)" v-show="this.queryObj.speNum">完成扫描</view>
187
     </view>
187
     </view>
188
     <view
188
     <view
189
       class="foot_btn"
189
       class="foot_btn"
@@ -249,6 +249,7 @@
249
       :disjunctor="models2.disjunctor"
249
       :disjunctor="models2.disjunctor"
250
       :content="models2.content"
250
       :content="models2.content"
251
       @ok="ok2"
251
       @ok="ok2"
252
+      @know="know2"
252
       @cancel="cancel2"
253
       @cancel="cancel2"
253
       :operate="models2.operate"
254
       :operate="models2.operate"
254
     >
255
     >
@@ -261,6 +262,7 @@ import { get, post, SM, webHandle } from "../../http/http.js";
261
 export default {
262
 export default {
262
   data() {
263
   data() {
263
     return {
264
     return {
265
+      SMFlag:true,
264
       // 弹窗model
266
       // 弹窗model
265
       models: {
267
       models: {
266
         disjunctor: false,
268
         disjunctor: false,
@@ -270,6 +272,7 @@ export default {
270
         disjunctor: false,
272
         disjunctor: false,
271
       },
273
       },
272
       wcId: "", //工单完成ID
274
       wcId: "", //工单完成ID
275
+      wcFlag:false,
273
       modelFlag: "", //工单完成类型
276
       modelFlag: "", //工单完成类型
274
       infoDATA: [],
277
       infoDATA: [],
275
       ids: [],
278
       ids: [],
@@ -277,6 +280,7 @@ export default {
277
       type1: "",
280
       type1: "",
278
       queryObj: {}, //路由传递过来的参数
281
       queryObj: {}, //路由传递过来的参数
279
       gotoFlag: true,
282
       gotoFlag: true,
283
+      speNum:0
280
     };
284
     };
281
   },
285
   },
282
   methods: {
286
   methods: {
@@ -288,7 +292,7 @@ export default {
288
       this.gotoFlag = false;
292
       this.gotoFlag = false;
289
       let id = JSON.parse(this.queryObj.ids)[0];
293
       let id = JSON.parse(this.queryObj.ids)[0];
290
       uni.navigateTo({
294
       uni.navigateTo({
291
-        url: `../noScanSpecimen/noScanSpecimen?workOrderId=${id}`,
295
+        url: `../noScanSpecimen/noScanSpecimen?workOrderId=${id}&deptCode=${this.queryObj.deptCode}`,
292
       });
296
       });
293
     },
297
     },
294
     // 正常完成扫描
298
     // 正常完成扫描
@@ -314,9 +318,15 @@ export default {
314
       });
318
       });
315
       post("/workerOrder/" + postType, data).then((res) => {
319
       post("/workerOrder/" + postType, data).then((res) => {
316
         if (res.status == 200) {
320
         if (res.status == 200) {
317
-          uni.reLaunch({
318
-            url: "../receiptpage/receiptpage",
319
-          });
321
+          this.models2 = {
322
+            disjunctor: true,
323
+            title: "提示",
324
+            content: `完成扫描成功`,
325
+            icon: "success",
326
+            operate: {
327
+              know: "知道了",
328
+            },
329
+          };
320
         } else {
330
         } else {
321
           uni.hideLoading();
331
           uni.hideLoading();
322
           uni.showToast({
332
           uni.showToast({
@@ -337,19 +347,32 @@ export default {
337
         let id = JSON.parse(this.queryObj.ids)[0];
347
         let id = JSON.parse(this.queryObj.ids)[0];
338
         let postData = {
348
         let postData = {
339
           ids: [id],
349
           ids: [id],
340
-          sign: true
350
+          sign: true,
351
+          deptQrCode:this.queryObj.deptCode
341
         };
352
         };
342
         post("/workerOrder/expectedAndActual", postData).then((ress) => {
353
         post("/workerOrder/expectedAndActual", postData).then((ress) => {
343
           uni.hideLoading();
354
           uni.hideLoading();
344
           if (ress.status == 200) {
355
           if (ress.status == 200) {
345
             if (ress.actualReceiveNum === undefined) {
356
             if (ress.actualReceiveNum === undefined) {
346
-              //正常完成扫描
347
-              this.overFinish();
357
+              if(this.wcFlag){
358
+                //正常完成扫描
359
+                this.overFinish()
360
+              }else{
361
+                this.gotoOver();
362
+              }
348
             } else {
363
             } else {
364
+              let content = '';
365
+              if(this.queryObj.type1 === 'spe-ddd-2'||this.queryObj.type1 === 'plan-spe-ddd-2'){
366
+                //待到达
367
+                content = `系统内预计标本<strong class="red">${ress.expectReceiveNum}</strong>只,您扫描收取标本<strong class="red">${ress.actualReceiveNum}</strong>只,其中<strong class="red">${ress.notReceiveNum}</strong>只未扫描;`;
368
+              }else{
369
+                //待送达
370
+                content = `本工单已签到${ress.scanSet?ress.scanSet.join('、'):''},剩余需签到科室${ress.notScanSet?ress.notScanSet.join('、'):''},总签收${ress.totalAcceptance}只,剩余${ress.notAcceptance}只未签收,您确定完成工单吗?`;
371
+              }
349
               this.models2 = {
372
               this.models2 = {
350
                 disjunctor: true,
373
                 disjunctor: true,
351
                 title: "提示",
374
                 title: "提示",
352
-                content: `您扫描的标本<strong class="red">${ress.actualReceiveNum}</strong>个,与系统预计标本${ress.expectReceiveNum}个标本不一致,您确认要完成扫描码?`,
375
+                content,
353
                 icon: "warn",
376
                 icon: "warn",
354
                 operate: {
377
                 operate: {
355
                   ok: "确定",
378
                   ok: "确定",
@@ -396,6 +419,7 @@ export default {
396
       let id = JSON.parse(this.queryObj.ids)[0];
419
       let id = JSON.parse(this.queryObj.ids)[0];
397
       let postData = {
420
       let postData = {
398
         ids: [id],
421
         ids: [id],
422
+        deptQrCode:this.queryObj.deptCode
399
       };
423
       };
400
       uni.showLoading({
424
       uni.showLoading({
401
         title: "加载中",
425
         title: "加载中",
@@ -404,9 +428,11 @@ export default {
404
       post("/workerOrder/expectedAndActual", postData).then((ress) => {
428
       post("/workerOrder/expectedAndActual", postData).then((ress) => {
405
         uni.hideLoading();
429
         uni.hideLoading();
406
         if (ress.status == 200) {
430
         if (ress.status == 200) {
407
-          uni.navigateTo({
408
-            url: "../receiptpage/receiptpage",
409
-          });
431
+          if(this.wcFlag){
432
+            this.overFinish()
433
+          }else{
434
+            this.gotoOver();
435
+          }
410
         } else {
436
         } else {
411
           uni.showToast({
437
           uni.showToast({
412
             icon: "none",
438
             icon: "none",
@@ -419,14 +445,21 @@ export default {
419
     cancel2() {
445
     cancel2() {
420
       this.models2.disjunctor = false;
446
       this.models2.disjunctor = false;
421
     },
447
     },
448
+    know2(){
449
+      this.models2.disjunctor = false;
450
+      uni.reLaunch({
451
+        url: "../receiptpage/receiptpage",
452
+      });
453
+    },
422
     //完成扫描
454
     //完成扫描
423
     Scanning_complete(id) {
455
     Scanning_complete(id) {
424
       this.modelFlag = "complete";
456
       this.modelFlag = "complete";
457
+      this.wcId = id;
425
       if (
458
       if (
426
         this.queryObj.type1 == "plan-spe-ddd-2" ||
459
         this.queryObj.type1 == "plan-spe-ddd-2" ||
427
         this.queryObj.type1 == "spe-ddd-2"
460
         this.queryObj.type1 == "spe-ddd-2"
428
       ) {
461
       ) {
429
-        this.wcId = id;
462
+        this.wcFlag = true;
430
         this.models = {
463
         this.models = {
431
           disjunctor: true,
464
           disjunctor: true,
432
           title: "提示",
465
           title: "提示",
@@ -437,16 +470,37 @@ export default {
437
             cancel: "取消",
470
             cancel: "取消",
438
           },
471
           },
439
         };
472
         };
440
-      } else {
441
-        uni.navigateTo({
442
-          url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
443
-            this.queryObj.type1
444
-          }&deptCode=${this.queryObj.code}&dept=${
445
-            this.queryObj.dept
446
-          }&id=${encodeURIComponent(JSON.stringify(this.ids))}`,
447
-        });
473
+      }else if (
474
+          this.queryObj.type1 == "plan-spe-dsd-2" ||
475
+          this.queryObj.type1 == "plan-spe-dsd-3" ||
476
+          this.queryObj.type1 == "spe-dsd-2" ||
477
+          this.queryObj.type1 == "spe-dsd-3"
478
+        ) {
479
+          this.wcFlag = false;
480
+          this.models = {
481
+            disjunctor: true,
482
+            title: "提示",
483
+            content: "是否确定标本已扫描完成?",
484
+            icon: "warn",
485
+            operate: {
486
+              ok: "确定",
487
+              cancel: "取消",
488
+            },
489
+          };
490
+        } else {
491
+        this.gotoOver();
448
       }
492
       }
449
     },
493
     },
494
+    // 跳转完成工单页面
495
+    gotoOver(){
496
+      uni.navigateTo({
497
+        url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
498
+          this.queryObj.type1
499
+        }&deptCode=${this.queryObj.code}&dept=${
500
+          this.queryObj.dept
501
+        }&id=${encodeURIComponent(JSON.stringify(this.wcId))}`,
502
+      });
503
+    },
450
     //一对一完成工单
504
     //一对一完成工单
451
     Scanning_complete1(id) {
505
     Scanning_complete1(id) {
452
       this.modelFlag = "complete1";
506
       this.modelFlag = "complete1";
@@ -464,12 +518,17 @@ export default {
464
     },
518
     },
465
     //继续扫描
519
     //继续扫描
466
     Scanning_again() {
520
     Scanning_again() {
521
+      if (!this.SMFlag) {
522
+        return;
523
+      }
524
+      this.SMFlag = false;
467
       SM().then((ress1) => {
525
       SM().then((ress1) => {
468
         // ----------------
526
         // ----------------
469
         //检验二维码的有效性
527
         //检验二维码的有效性
470
         post("/dept/scanning", {
528
         post("/dept/scanning", {
471
           content: ress1,
529
           content: ress1,
472
         }).then((result) => {
530
         }).then((result) => {
531
+          this.SMFlag = true;
473
           if (result.state == 200 || result.state == 201) {
532
           if (result.state == 200 || result.state == 201) {
474
             let ress = result.code;
533
             let ress = result.code;
475
             let speCode = ress;
534
             let speCode = ress;
@@ -501,6 +560,7 @@ export default {
501
             }
560
             }
502
             post("/workerOrder/" + postType, data).then((ress) => {
561
             post("/workerOrder/" + postType, data).then((ress) => {
503
               if (ress.status == 200) {
562
               if (ress.status == 200) {
563
+                this.speNum = ress.specimenCount;
504
                 uni.navigateTo({
564
                 uni.navigateTo({
505
                   url: `../scanning_djInfo/scanning_djInfo?type=${
565
                   url: `../scanning_djInfo/scanning_djInfo?type=${
506
                     this.queryObj.type
566
                     this.queryObj.type
@@ -510,7 +570,7 @@ export default {
510
                     this.queryObj.code
570
                     this.queryObj.code
511
                   }&dept=${this.queryObj.dept}&ids=${encodeURIComponent(
571
                   }&dept=${this.queryObj.dept}&ids=${encodeURIComponent(
512
                     JSON.stringify(this.ids)
572
                     JSON.stringify(this.ids)
513
-                  )}&model=${encodeURIComponent(JSON.stringify(ress))}`,
573
+                  )}&model=${encodeURIComponent(JSON.stringify(ress))}&speNum=${this.speNum}`,
514
                 });
574
                 });
515
               } else {
575
               } else {
516
                 uni.navigateTo({
576
                 uni.navigateTo({
@@ -536,6 +596,8 @@ export default {
536
           }
596
           }
537
         });
597
         });
538
         // ------------------------------
598
         // ------------------------------
599
+      }).catch(err=>{
600
+        this.SMFlag = true;
539
       });
601
       });
540
     },
602
     },
541
     // 知道了
603
     // 知道了
@@ -546,10 +608,14 @@ export default {
546
     },
608
     },
547
   },
609
   },
548
   onShow() {
610
   onShow() {
611
+    this.SMFlag = true;
549
     this.gotoFlag = true;
612
     this.gotoFlag = true;
550
   },
613
   },
551
   onLoad(options) {
614
   onLoad(options) {
552
     console.log(options, "djEnd");
615
     console.log(options, "djEnd");
616
+    if(options.speNum){
617
+      this.speNum = options.speNum;
618
+    }
553
     this.queryObj = options;
619
     this.queryObj = options;
554
     let list = JSON.parse(options.model); //签到返回的信息
620
     let list = JSON.parse(options.model); //签到返回的信息
555
     this.code = options.code; //二维码code
621
     this.code = options.code; //二维码code

+ 82 - 17
pages/scanning_djInfo/scanning_djInfo.vue

@@ -111,7 +111,7 @@
111
       @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
111
       @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
112
     <!-- 弹窗 -->
112
     <!-- 弹窗 -->
113
     <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
113
     <showModel :title="models2.title" :icon="models2.icon" :disjunctor="models2.disjunctor" :content="models2.content"
114
-      @ok="ok2" @cancel="cancel2" :operate="models2.operate">
114
+      @ok="ok2" @know="know2" @cancel="cancel2" :operate="models2.operate">
115
     </showModel>
115
     </showModel>
116
   </view>
116
   </view>
117
 </template>
117
 </template>
@@ -126,6 +126,7 @@
126
   export default {
126
   export default {
127
     data() {
127
     data() {
128
       return {
128
       return {
129
+        SMFlag:true,
129
         // 弹窗model
130
         // 弹窗model
130
         models: {
131
         models: {
131
           disjunctor: false,
132
           disjunctor: false,
@@ -135,6 +136,7 @@
135
           disjunctor: false,
136
           disjunctor: false,
136
         },
137
         },
137
         wcId: "", //工单完成ID
138
         wcId: "", //工单完成ID
139
+        wcFlag:false,
138
         infoDATA: [],
140
         infoDATA: [],
139
         res: {
141
         res: {
140
           status: "",
142
           status: "",
@@ -162,7 +164,7 @@
162
         }
164
         }
163
         this.gotoFlag = false;
165
         this.gotoFlag = false;
164
         uni.navigateTo({
166
         uni.navigateTo({
165
-          url: `../noScanSpecimen/noScanSpecimen?workOrderId=${this.queryObj.ids[0]}`,
167
+          url: `../noScanSpecimen/noScanSpecimen?workOrderId=${this.queryObj.ids[0]}&deptCode=${this.queryObj.deptCode}`,
166
         });
168
         });
167
       },
169
       },
168
       overFinish() {
170
       overFinish() {
@@ -182,9 +184,15 @@
182
         };
184
         };
183
         post("/workerOrder/" + postType, data).then((res) => {
185
         post("/workerOrder/" + postType, data).then((res) => {
184
           if (res.status == 200) {
186
           if (res.status == 200) {
185
-            uni.navigateTo({
186
-              url: "../receiptpage/receiptpage",
187
-            });
187
+            this.models2 = {
188
+              disjunctor: true,
189
+              title: "提示",
190
+              content: `完成扫描成功`,
191
+              icon: "success",
192
+              operate: {
193
+                know: "知道了",
194
+              },
195
+            };
188
           } else {
196
           } else {
189
             uni.showToast({
197
             uni.showToast({
190
               icon: "none",
198
               icon: "none",
@@ -198,7 +206,8 @@
198
         this.models.disjunctor = false;
206
         this.models.disjunctor = false;
199
         let postData = {
207
         let postData = {
200
           ids: this.queryObj.ids,
208
           ids: this.queryObj.ids,
201
-          sign: true
209
+          sign: true,
210
+          deptQrCode:this.queryObj.deptCode
202
         };
211
         };
203
         uni.showLoading({
212
         uni.showLoading({
204
           title: "加载中",
213
           title: "加载中",
@@ -208,13 +217,25 @@
208
           uni.hideLoading();
217
           uni.hideLoading();
209
           if (ress.status == 200) {
218
           if (ress.status == 200) {
210
             if (ress.actualReceiveNum === undefined) {
219
             if (ress.actualReceiveNum === undefined) {
211
-              //正常完成扫描
212
-              this.overFinish();
220
+              if(this.wcFlag){
221
+                //正常完成扫描
222
+                this.overFinish()
223
+              }else{
224
+                this.gotoOver();
225
+              }
213
             } else {
226
             } else {
227
+              let content = '';
228
+              if(this.queryObj.type1 === 'spe-ddd-2'||this.queryObj.type1 === 'plan-spe-ddd-2'){
229
+                //待到达
230
+                content = `系统内预计标本<strong class="red">${ress.expectReceiveNum}</strong>只,您扫描收取标本<strong class="red">${ress.actualReceiveNum}</strong>只,其中<strong class="red">${ress.notReceiveNum}</strong>只未扫描;`;
231
+              }else{
232
+                //待送达
233
+                content = `本工单已签到${ress.scanSet?ress.scanSet.join('、'):''},剩余需签到科室${ress.notScanSet?ress.notScanSet.join('、'):''},总签收${ress.totalAcceptance}只,剩余${ress.notAcceptance}只未签收,您确定完成工单吗?`;
234
+              }
214
               this.models2 = {
235
               this.models2 = {
215
                 disjunctor: true,
236
                 disjunctor: true,
216
                 title: "提示",
237
                 title: "提示",
217
-                content: `您扫描的标本<strong class="red">${ress.actualReceiveNum}</strong>个,与系统预计标本${ress.expectReceiveNum}个标本不一致,您确认要完成扫描码?`,
238
+                content,
218
                 icon: "warn",
239
                 icon: "warn",
219
                 operate: {
240
                 operate: {
220
                   ok: "确定",
241
                   ok: "确定",
@@ -240,6 +261,7 @@
240
         this.models2.disjunctor = false;
261
         this.models2.disjunctor = false;
241
         let postData = {
262
         let postData = {
242
           ids: this.queryObj.ids,
263
           ids: this.queryObj.ids,
264
+          deptQrCode:this.queryObj.deptCode
243
         };
265
         };
244
         uni.showLoading({
266
         uni.showLoading({
245
           title: "加载中",
267
           title: "加载中",
@@ -248,9 +270,11 @@
248
         post("/workerOrder/expectedAndActual", postData).then((ress) => {
270
         post("/workerOrder/expectedAndActual", postData).then((ress) => {
249
           uni.hideLoading();
271
           uni.hideLoading();
250
           if (ress.status == 200) {
272
           if (ress.status == 200) {
251
-            uni.navigateTo({
252
-              url: "../receiptpage/receiptpage",
253
-            });
273
+            if(this.wcFlag){
274
+              this.overFinish()
275
+            }else{
276
+              this.gotoOver();
277
+            }
254
           } else {
278
           } else {
255
             uni.showToast({
279
             uni.showToast({
256
               icon: "none",
280
               icon: "none",
@@ -263,13 +287,20 @@
263
       cancel2() {
287
       cancel2() {
264
         this.models2.disjunctor = false;
288
         this.models2.disjunctor = false;
265
       },
289
       },
290
+      know2(){
291
+        this.models2.disjunctor = false;
292
+        uni.navigateTo({
293
+          url: "../receiptpage/receiptpage",
294
+        });
295
+      },
266
       //完成扫描
296
       //完成扫描
267
       Scanning_complete(id) {
297
       Scanning_complete(id) {
298
+        this.wcId = id;
268
         if (
299
         if (
269
           this.queryObj.type1 == "plan-spe-ddd-2" ||
300
           this.queryObj.type1 == "plan-spe-ddd-2" ||
270
           this.queryObj.type1 == "spe-ddd-2"
301
           this.queryObj.type1 == "spe-ddd-2"
271
         ) {
302
         ) {
272
-          this.wcId = id;
303
+          this.wcFlag = true;
273
           this.models = {
304
           this.models = {
274
             disjunctor: true,
305
             disjunctor: true,
275
             title: "提示",
306
             title: "提示",
@@ -280,18 +311,43 @@
280
               cancel: "取消",
311
               cancel: "取消",
281
             },
312
             },
282
           };
313
           };
314
+        }else if (
315
+          this.queryObj.type1 == "plan-spe-dsd-2" ||
316
+          this.queryObj.type1 == "plan-spe-dsd-3" ||
317
+          this.queryObj.type1 == "spe-dsd-2" ||
318
+          this.queryObj.type1 == "spe-dsd-3"
319
+        ) {
320
+          this.wcFlag = false;
321
+          this.models = {
322
+            disjunctor: true,
323
+            title: "提示",
324
+            content: "是否确定标本已扫描完成?",
325
+            icon: "warn",
326
+            operate: {
327
+              ok: "确定",
328
+              cancel: "取消",
329
+            },
330
+          };
283
         } else {
331
         } else {
284
-          uni.navigateTo({
332
+          this.gotoOver();
333
+        }
334
+      },
335
+      // 跳转完成工单页面
336
+      gotoOver(){
337
+        uni.navigateTo({
285
             url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
338
             url: `../scanning/scanning?type=${this.queryObj.type}&type1=${
286
             this.queryObj.type1
339
             this.queryObj.type1
287
-          }&id=${encodeURIComponent(JSON.stringify(id))}&deptCode=${
340
+          }&id=${encodeURIComponent(JSON.stringify(this.wcId))}&deptCode=${
288
             this.queryObj.deptCode
341
             this.queryObj.deptCode
289
           }&dept=${this.queryObj.dept}`,
342
           }&dept=${this.queryObj.dept}`,
290
           });
343
           });
291
-        }
292
       },
344
       },
293
       // 继续扫描
345
       // 继续扫描
294
       Scanning_again() {
346
       Scanning_again() {
347
+        if (!this.SMFlag) {
348
+          return;
349
+        }
350
+        this.SMFlag = false;
295
         let list = [];
351
         let list = [];
296
         let postType = "";
352
         let postType = "";
297
         let ids = [];
353
         let ids = [];
@@ -312,6 +368,7 @@
312
           post("/dept/scanning", {
368
           post("/dept/scanning", {
313
             content: ress1,
369
             content: ress1,
314
           }).then((result) => {
370
           }).then((result) => {
371
+            this.SMFlag = true;
315
             if (result.state == 200 || result.state == 201) {
372
             if (result.state == 200 || result.state == 201) {
316
               let ress = result.code;
373
               let ress = result.code;
317
               if (ress) {
374
               if (ress) {
@@ -407,7 +464,7 @@
407
                       JSON.stringify(this.ids)
464
                       JSON.stringify(this.ids)
408
                     )}&model=${encodeURIComponent(
465
                     )}&model=${encodeURIComponent(
409
                       JSON.stringify(res)
466
                       JSON.stringify(res)
410
-                    )}`,
467
+                    )}&speNum=${this.speNum}`,
411
                     });
468
                     });
412
                   }
469
                   }
413
                 });
470
                 });
@@ -420,6 +477,8 @@
420
             }
477
             }
421
           });
478
           });
422
           // ------------------------------
479
           // ------------------------------
480
+        }).catch(err=>{
481
+          this.SMFlag = true;
423
         });
482
         });
424
       },
483
       },
425
       // 知道了
484
       // 知道了
@@ -429,8 +488,14 @@
429
         });
488
         });
430
       },
489
       },
431
     },
490
     },
491
+    onShow(){
492
+      this.SMFlag = true;
493
+    },
432
     onLoad(options) {
494
     onLoad(options) {
433
       console.log(options,'options')
495
       console.log(options,'options')
496
+      if(options.speNum){
497
+        this.speNum = options.speNum;
498
+      }
434
       this.queryObj = options;
499
       this.queryObj = options;
435
       if (this.queryObj.model) {
500
       if (this.queryObj.model) {
436
         let list = JSON.parse(this.queryObj.model);
501
         let list = JSON.parse(this.queryObj.model);

+ 581 - 0
pages/scanning_drug/scanning_drug.vue

@@ -0,0 +1,581 @@
1
+<template>
2
+  <view class="pharmacyDetails" v-show="drugsBagDto.id">
3
+    <view class="pharmacyDetails_title">请领信息</view>
4
+    <view class="page_item_wrap">
5
+      <view class="page_item">
6
+        <view class="page_item_top">
7
+          <view class="page_item_top-inner">
8
+            <view class="page_item_top_L">
9
+              <text class="L_text">请领单:{{ drugsBagDto.packid }}</text>
10
+            </view>
11
+            <view class="page_item_top_R">
12
+              <text class="L_iocn">{{
13
+                drugsBagDto.drugsState ? drugsBagDto.drugsState.name : ""
14
+              }}</text>
15
+            </view>
16
+          </view>
17
+        </view>
18
+        <view class="page_item_cont">
19
+          <view class="page_item_cont_B">
20
+            <view class="page_item_cont_title">
21
+              <text>记账时间</text>
22
+              <text class="text_big">
23
+                <text>{{ drugsBagDto.creatTime }}</text>
24
+              </text>
25
+            </view>
26
+          </view>
27
+          <view class="page_item_cont_C">
28
+            <view class="page_item_cont_title_C">
29
+              <text>请领科室</text>
30
+              <text class="text_big">
31
+                <text>{{
32
+                  drugsBagDto.target ? drugsBagDto.target.dept : ""
33
+                }}</text>
34
+              </text>
35
+            </view>
36
+          </view>
37
+          <view class="page_item_cont_C" v-show="workOrder.id">
38
+            <view class="page_item_cont_title_C">
39
+              <text>单号</text>
40
+              <text class="text_big">
41
+                <text>{{ workOrder.gdcode }}</text>
42
+              </text>
43
+            </view>
44
+          </view>
45
+          <view class="page_item_cont_C" v-show="workOrder.id">
46
+            <view class="page_item_cont_title_C">
47
+              <text>状态</text>
48
+              <text class="text_big">
49
+                <text>{{
50
+                  workOrder.gdState ? workOrder.gdState.name : ""
51
+                }}</text>
52
+              </text>
53
+            </view>
54
+          </view>
55
+          <view class="page_item_cont_C" v-show="workOrder.id">
56
+            <view class="page_item_cont_title_C">
57
+              <text>服务人员</text>
58
+              <text class="text_big">
59
+                <text>{{ workOrder.worker ? workOrder.worker.name : "" }}</text>
60
+              </text>
61
+            </view>
62
+          </view>
63
+        </view>
64
+        <view class="L"></view>
65
+        <view class="R"></view>
66
+      </view>
67
+      <view class="L-l"></view>
68
+      <view class="R-l"></view>
69
+    </view>
70
+    <button class="cube-toolbar-item" v-show="isShowBtn" @click="buildOrderAndSign()">
71
+      接单并签到
72
+    </button>
73
+    <button class="cube-toolbar-item" v-show="!isShowBtn" @click="goBack()">
74
+      知道了
75
+    </button>
76
+    <!-- 弹窗 -->
77
+    <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
78
+      @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
79
+    <!-- 填写交接人账号弹窗 -->
80
+    <selectAccount v-if="hosModels.disjunctor" :title="hosModels.title" :disjunctor="hosModels.disjunctor" @ok="hosOk"
81
+      @cancel="hosCancel">
82
+    </selectAccount>
83
+  </view>
84
+</template>
85
+<script>
86
+  import selectAccount from "@/components/selectAccount/selectAccount";
87
+  import {
88
+    webHandle,
89
+    post
90
+  } from "../../http/http.js";
91
+  export default {
92
+    data() {
93
+      return {
94
+        // 弹窗model
95
+        models: {
96
+          disjunctor: false,
97
+        },
98
+        drugsBagDto: {}, //药包信息
99
+        workOrder: {}, //药包关联的工单信息
100
+        currentCode: "", //当前小扫描的科室二维码
101
+        currentData: {}, //当前小扫描的工单对象
102
+        // 填写交接人账号弹窗model
103
+        hosModels: {
104
+          disjunctor: false,
105
+        },
106
+        grabOrders: null,
107
+        gotoFlag: true,
108
+      };
109
+    },
110
+    components: {
111
+      selectAccount,
112
+    },
113
+    computed: {
114
+      isShowBtn() {
115
+        if (this.workOrder.gdState) {
116
+          let state = this.workOrder.gdState.value;
117
+          // 待抢单,待接单,待到达,待送达
118
+          return state == 2 || state == 3 || state == 4 || state == 5;
119
+        } else {
120
+          return false;
121
+        }
122
+      },
123
+    },
124
+    methods: {
125
+      goBack(){
126
+        uni.navigateTo({
127
+          url: "../receiptpage/receiptpage",
128
+        });
129
+      },
130
+      // 如果不是患者陪检或患者转运或其他
131
+      // 科室签到
132
+      nextDeptOrder_s(data, accountObj) {
133
+        console.log(data, accountObj);
134
+        let ids = [];
135
+        let id = data.id;
136
+        ids.push(id);
137
+        let code = "";
138
+        let postData = {
139
+          ids,
140
+        };
141
+        if (accountObj) {
142
+          postData.handover = [accountObj.accountId];
143
+        }
144
+        if (this.grabOrders) {
145
+          postData.grabOrders = this.grabOrders;
146
+        }
147
+        if (this.currentCode) {
148
+          code = this.currentCode;
149
+          // 科室签到
150
+          post("/workerOrder/orderSign/" + code, postData).then((res) => {
151
+            uni.hideLoading();
152
+            if (res.status == 200) {
153
+              // 跳转到扫描科室
154
+              // type1: res.type, //type类型
155
+              // id: data.id, //工单ID
156
+              // deptCode: code, //二维码
157
+              // dept: res.dept //科室名称
158
+              let urlObj = {
159
+                url: `/pages/scanning_code/scanning_code?type=${
160
+                data.taskType.associationType.value
161
+              }&type1=${res.type}&id=${data.id}&deptCode=${code}&dept=${
162
+                res.dept
163
+              }&accountObj=${encodeURIComponent(JSON.stringify(accountObj))}`,
164
+              };
165
+              if (this.grabOrders) {
166
+                urlObj.url += `&grabOrders=666`;
167
+              }
168
+              uni.navigateTo(urlObj);
169
+            } else {
170
+              uni.navigateTo({
171
+                url: `/pages/scanning_Result/scanning_Result?type=${data.taskType.associationType.value}&type1=${res.type}&id=${data.id}&status=600&msg=${res.msg}&isKs=1`,
172
+              });
173
+            }
174
+          });
175
+        }
176
+      },
177
+      // 签到
178
+      orderSign(data, type, ress1) {
179
+        this.currentData = data;
180
+        console.log(data, "data");
181
+        uni.showLoading({
182
+          title: "加载中",
183
+          mask: true,
184
+        });
185
+        //检验二维码的有效性
186
+        post("/dept/scanning", {
187
+          content: ress1,
188
+          taskTypeId: data.taskType.id,
189
+          gdState: data.gdState.id,
190
+        }).then((result) => {
191
+          this.currentCode = result.code;
192
+          if (result.state == 200 || result.state == 201) {
193
+            if (result.account) {
194
+              if (type == 2) {
195
+                this.nextDeptOrder_s(this.currentData, {
196
+                  account: result.account,
197
+                  accountName: result.name,
198
+                  accountId: result.id,
199
+                });
200
+              }
201
+            } else {
202
+              if (type == 2) {
203
+                this.nextDeptOrder_s(this.currentData);
204
+              }
205
+            }
206
+          } else if (result.state == "0000") {
207
+            uni.hideLoading();
208
+            this.showSelectAccount();
209
+          } else {
210
+            uni.hideLoading();
211
+            uni.showToast({
212
+              icon: "none",
213
+              title: "请求失败!",
214
+            });
215
+          }
216
+        });
217
+      },
218
+      // 填写交接人账号-确认
219
+      hosOk(data) {
220
+        console.log(data);
221
+        const {
222
+          accountName,
223
+          account,
224
+          accountId
225
+        } = data;
226
+        if (!accountName && !account) {
227
+          //没有填写交接人
228
+          uni.showModal({
229
+            title: "提示",
230
+            content: "请填写交接人账号!",
231
+            showCancel: false,
232
+            success: function(res) {
233
+              if (res.confirm) {
234
+                console.log("用户点击确定");
235
+              } else if (res.cancel) {
236
+                console.log("用户点击取消");
237
+              }
238
+            },
239
+          });
240
+          return;
241
+        } else if ((!accountName && account) || (accountName && !account)) {
242
+          //没有填写交接人
243
+          uni.showModal({
244
+            title: "提示",
245
+            content: "请填写正确的交接人账号!",
246
+            showCancel: false,
247
+            success: function(res) {
248
+              if (res.confirm) {
249
+                console.log("用户点击确定");
250
+              } else if (res.cancel) {
251
+                console.log("用户点击取消");
252
+              }
253
+            },
254
+          });
255
+          return;
256
+        }
257
+        this.hosModels.disjunctor = false;
258
+        let associationTypeValue =
259
+          this.currentData.taskType.associationType.value;
260
+        console.log(associationTypeValue);
261
+        if (
262
+          associationTypeValue !== "patientTransport" &&
263
+          associationTypeValue !== "inspect" &&
264
+          associationTypeValue !== "other"
265
+        ) {
266
+          this.nextDeptOrder_s(this.currentData, data);
267
+        }
268
+      },
269
+      // 填写交接人账号-取消
270
+      hosCancel() {
271
+        this.hosModels.disjunctor = false;
272
+      },
273
+      // 填写交接人账号弹窗
274
+      showSelectAccount() {
275
+        this.hosModels = {
276
+          title: "填写交接人账号",
277
+          disjunctor: true,
278
+        };
279
+      },
280
+      // 接单
281
+      commonBuild() {
282
+        let postData = {
283
+          orderId: this.workOrder.id,
284
+        };
285
+        uni.showLoading({
286
+          title: "加载中",
287
+          mask: true,
288
+        });
289
+        post("/workerOrder/drugBagReceiving", postData).then((ress) => {
290
+          uni.hideLoading();
291
+          if (ress.status == 200) {
292
+            this.grabOrders = ress.grabOrders ? ['666'] : null;
293
+            this.orderSign(ress.workOrder, 2, ress.content);
294
+          } else {
295
+            uni.showToast({
296
+              icon: "none",
297
+              title: "请求失败!",
298
+            });
299
+          }
300
+        });
301
+      },
302
+      ok() {
303
+        this.models.disjunctor = false;
304
+        this.commonBuild();
305
+      },
306
+      // 取消
307
+      cancel() {
308
+        this.models.disjunctor = false;
309
+      },
310
+      // 接单并签到
311
+      buildOrderAndSign() {
312
+        if (!this.gotoFlag) {
313
+          return;
314
+        }
315
+        this.gotoFlag = false;
316
+        if (this.workOrder.gdState) {
317
+          let state = this.workOrder.gdState.value;
318
+          if (state == 4 || state == 5) {
319
+            //待到达,待送达
320
+            this.models = {
321
+              disjunctor: true,
322
+              title: "提示",
323
+              content: "您想接单的药品,工单正在执行中。请确认是否继续接单签到?",
324
+              icon: "warn",
325
+              operate: {
326
+                ok: "确定",
327
+                cancel: "取消",
328
+              },
329
+            };
330
+          } else {
331
+            // 待接单 待抢单
332
+            this.commonBuild();
333
+          }
334
+        }
335
+      },
336
+      //获取药包信息及其关联的工单信息
337
+      queryDrugsBagForId(drugsBagId) {
338
+        uni.showLoading({
339
+          title: "加载中",
340
+          mask: true,
341
+        });
342
+        post("/workerOrder/queryDrugsBagForId", {
343
+          drugsBagId,
344
+        }).then((res) => {
345
+          uni.hideLoading();
346
+          if (res.status == 200) {
347
+            this.drugsBagDto = res.drugsBagDto || {};
348
+            this.workOrder = res.workOrder || {};
349
+          } else {
350
+            uni.showToast({
351
+              icon: "none",
352
+              title: "请求失败",
353
+            });
354
+          }
355
+        });
356
+      },
357
+    },
358
+    onShow() {
359
+      this.gotoFlag = true;
360
+    },
361
+    onLoad(options) {
362
+      console.log(options);
363
+      let {
364
+        drugsBagId
365
+      } = options;
366
+      if (drugsBagId) {
367
+        this.queryDrugsBagForId(drugsBagId);
368
+      }
369
+      // this.infoDATA = JSON.parse(options.infoDATA); //详细信息
370
+      // console.log(this.infoDATA)
371
+      // this.res["status"] = options.status; //状态码
372
+      // this.res["msg"] = options.msg; //返回的信息
373
+      // #ifdef APP-PLUS
374
+      webHandle("no", "app");
375
+      // #endif
376
+      // #ifdef H5
377
+      webHandle("no", "wx");
378
+      // #endif
379
+    },
380
+  };
381
+</script>
382
+<style lang="less" scoped>
383
+  .pharmacyDetails {
384
+    background-color: rgb(249, 250, 251);
385
+    padding-top: 10%;
386
+
387
+    .pharmacyDetails_title {
388
+      font-size: 46rpx;
389
+      font-weight: 550;
390
+      text-align: center;
391
+    }
392
+
393
+    .page_item_wrap {
394
+      position: relative;
395
+      margin-top: 32rpx;
396
+
397
+      .page_item {
398
+        margin-top: 16rpx;
399
+        margin-bottom: 124rpx;
400
+        background: #fff;
401
+        border-radius: 8rpx;
402
+        margin: 0 20rpx;
403
+        border: 2rpx solid #e5e9ed;
404
+        position: relative;
405
+        overflow: hidden;
406
+        padding: 0 16rpx;
407
+
408
+        .L {
409
+          width: 40rpx;
410
+          height: 40rpx;
411
+          border-radius: 50%;
412
+          background: #f9fafb;
413
+          position: absolute;
414
+          left: -20rpx;
415
+          top: 68rpx;
416
+          border: 2rpx solid #e5e9ed;
417
+        }
418
+
419
+        .R {
420
+          width: 40rpx;
421
+          height: 40rpx;
422
+          border-radius: 50%;
423
+          background: #f9fafb;
424
+          position: absolute;
425
+          float: right;
426
+          right: -20rpx;
427
+          top: 68rpx;
428
+          border: 2rpx solid #e5e9ed;
429
+        }
430
+
431
+        .page_item_top {
432
+          height: 88rpx;
433
+          border-bottom: 2rpx dashed #e5e9ed;
434
+          padding: 0 16rpx;
435
+
436
+          .page_item_top-inner {
437
+            display: flex;
438
+            justify-content: space-between;
439
+            align-items: center;
440
+            height: 100%;
441
+
442
+            .page_item_top_L {
443
+              .L_text {
444
+                font-size: 32rpx;
445
+                font-weight: 700;
446
+              }
447
+            }
448
+
449
+            .page_item_top_R {
450
+              font-size: 32rpx;
451
+
452
+              .L_iocn {
453
+                color: rgb(7, 134, 60);
454
+                font-size: 36rpx;
455
+                font-weight: 700;
456
+              }
457
+            }
458
+          }
459
+        }
460
+
461
+        .page_item_cont {
462
+          min-height: 180rpx;
463
+          max-height: 424rpx;
464
+          padding: 0 16rpx;
465
+          text-align: left;
466
+          position: relative;
467
+
468
+          .text_big {
469
+            font-size: 32rpx;
470
+            font-weight: 700;
471
+
472
+            text {
473
+              font-weight: 700;
474
+              line-height: 1.5;
475
+            }
476
+          }
477
+
478
+          .line {
479
+            height: 20rpx;
480
+            width: 2rpx;
481
+            border-left: 2rpx solid #e5e9ed;
482
+            position: absolute;
483
+            top: 82rpx;
484
+            left: 40rpx;
485
+          }
486
+
487
+          .page_item_cont_T {
488
+            padding-top: 28rpx;
489
+            font-size: 28rpx;
490
+
491
+            .page_item_cont_title {
492
+              height: 100%;
493
+              font-size: 32rpx;
494
+              display: flex;
495
+              justify-content: space-between;
496
+            }
497
+          }
498
+
499
+          .page_item_cont_B {
500
+            padding-top: 28rpx;
501
+            margin-bottom: 28rpx;
502
+
503
+            .page_item_cont_title {
504
+              font-size: 32rpx;
505
+              display: flex;
506
+              justify-content: space-between;
507
+              align-items: center;
508
+            }
509
+          }
510
+
511
+          .page_item_cont_C {
512
+            margin-bottom: 28rpx;
513
+
514
+            .page_item_cont_title_C {
515
+              font-size: 32rpx;
516
+              display: flex;
517
+              justify-content: space-between;
518
+              align-items: center;
519
+            }
520
+          }
521
+
522
+          #infos {
523
+            display: none;
524
+          }
525
+        }
526
+      }
527
+
528
+      .L-l {
529
+        width: 2rpx;
530
+        height: 40rpx;
531
+        background: #f9fafb;
532
+        position: absolute;
533
+        left: 20rpx;
534
+        top: 72rpx;
535
+      }
536
+
537
+      .R-l {
538
+        width: 2rpx;
539
+        height: 40rpx;
540
+        background: #f9fafb;
541
+        position: absolute;
542
+        right: 20rpx;
543
+        top: 72rpx;
544
+      }
545
+    }
546
+
547
+    .cube-toolbar-item {
548
+      width: 710rpx;
549
+      height: 68rpx;
550
+      line-height: 68rpx;
551
+      position: fixed;
552
+      left: 20rpx;
553
+      bottom: 160rpx;
554
+      border-radius: 8rpx;
555
+      background: linear-gradient(to right, #72c172, #3bb197);
556
+      font-size: 36rpx;
557
+      color: #fff;
558
+      text-align: center;
559
+    }
560
+
561
+    .btn-wrap {
562
+      display: flex;
563
+      justify-content: space-between;
564
+      position: fixed;
565
+      left: 20rpx;
566
+      bottom: 160rpx;
567
+    }
568
+
569
+    .cube-toolbar-item1 {
570
+      width: 350rpx;
571
+      height: 68rpx;
572
+      line-height: 68rpx;
573
+      border-radius: 8rpx;
574
+      margin: 0 5rpx;
575
+      background: linear-gradient(to right, #72c172, #3bb197);
576
+      font-size: 36rpx;
577
+      color: #fff;
578
+      text-align: center;
579
+    }
580
+  }
581
+</style>

+ 16 - 0
pages/scanning_ins/scanning_ins.vue

@@ -246,6 +246,7 @@
246
   export default {
246
   export default {
247
     data() {
247
     data() {
248
       return {
248
       return {
249
+        SMFlag:true,
249
         options: {},
250
         options: {},
250
         // wechatFocusSwitch: 0,
251
         // wechatFocusSwitch: 0,
251
         hosId: "",
252
         hosId: "",
@@ -383,6 +384,10 @@
383
       },
384
       },
384
       // 送回病房-扫描科室
385
       // 送回病房-扫描科室
385
       scanDept() {
386
       scanDept() {
387
+        if (!this.SMFlag) {
388
+          return;
389
+        }
390
+        this.SMFlag = false;
386
         let infoDATA = JSON.parse(this.options.infoDATA);
391
         let infoDATA = JSON.parse(this.options.infoDATA);
387
         let code = "";
392
         let code = "";
388
         SM().then((ress1) => {
393
         SM().then((ress1) => {
@@ -394,6 +399,7 @@
394
           post("/dept/scanning", {
399
           post("/dept/scanning", {
395
             content: ress1,
400
             content: ress1,
396
           }).then((result) => {
401
           }).then((result) => {
402
+            this.SMFlag = true;
397
             if (result.state == 200 || result.state == 201) {
403
             if (result.state == 200 || result.state == 201) {
398
               let ress = result.code;
404
               let ress = result.code;
399
               if (ress) {
405
               if (ress) {
@@ -448,6 +454,8 @@
448
               });
454
               });
449
             }
455
             }
450
           });
456
           });
457
+        }).catch(err=>{
458
+          this.SMFlag = true;
451
         });
459
         });
452
       },
460
       },
453
       // 送回病房-选择起点科室
461
       // 送回病房-选择起点科室
@@ -559,6 +567,10 @@
559
         if (data) {
567
         if (data) {
560
           let type = "";
568
           let type = "";
561
           if (data.gdState.value == "8") {
569
           if (data.gdState.value == "8") {
570
+            if (!this.SMFlag) {
571
+              return;
572
+            }
573
+            this.SMFlag = false;
562
             SM().then((ress1) => {
574
             SM().then((ress1) => {
563
               // ----------------
575
               // ----------------
564
               uni.showLoading({
576
               uni.showLoading({
@@ -569,6 +581,7 @@
569
               post("/dept/scanning", {
581
               post("/dept/scanning", {
570
                 content: ress1,
582
                 content: ress1,
571
               }).then((result) => {
583
               }).then((result) => {
584
+                this.SMFlag = true;
572
                 if (result.state == 200 || result.state == 201) {
585
                 if (result.state == 200 || result.state == 201) {
573
                   let ress = result.code;
586
                   let ress = result.code;
574
                   if (ress) {
587
                   if (ress) {
@@ -609,6 +622,8 @@
609
                 }
622
                 }
610
               });
623
               });
611
               // ------------------------------
624
               // ------------------------------
625
+            }).catch(err=>{
626
+              this.SMFlag = true;
612
             });
627
             });
613
           } else {
628
           } else {
614
             if (data.taskType.associationType.value == "patientTransport") {
629
             if (data.taskType.associationType.value == "patientTransport") {
@@ -743,6 +758,7 @@
743
       // #endif
758
       // #endif
744
     },
759
     },
745
     onShow() {
760
     onShow() {
761
+      this.SMFlag = true;
746
       // 创建动画
762
       // 创建动画
747
       this.animation = uni.createAnimation({
763
       this.animation = uni.createAnimation({
748
         duration: 500,
764
         duration: 500,

+ 11 - 0
pages/settingCode/settingCode.vue

@@ -26,6 +26,7 @@
26
   export default {
26
   export default {
27
     data() {
27
     data() {
28
       return {
28
       return {
29
+        SMFlag:true,
29
         queryDept: null, //根据二维码查询到的科室
30
         queryDept: null, //根据二维码查询到的科室
30
         settings: [], //底部按钮设置
31
         settings: [], //底部按钮设置
31
         msg: '', //提示信息
32
         msg: '', //提示信息
@@ -155,6 +156,10 @@
155
       },
156
       },
156
       // 扫一扫
157
       // 扫一扫
157
       drugsScanning() {
158
       drugsScanning() {
159
+        if (!this.SMFlag) {
160
+          return;
161
+        }
162
+        this.SMFlag = false;
158
         SM().then((ress) => {
163
         SM().then((ress) => {
159
           this.qrCode = ress;
164
           this.qrCode = ress;
160
           let postData = {
165
           let postData = {
@@ -166,6 +171,7 @@
166
             mask: true,
171
             mask: true,
167
           });
172
           });
168
           post("/dept/scanChangeDept", postData).then((res) => {
173
           post("/dept/scanChangeDept", postData).then((res) => {
174
+            this.SMFlag = true;
169
             uni.hideLoading();
175
             uni.hideLoading();
170
             if (res.status == 200) {
176
             if (res.status == 200) {
171
               if (res.data) { //替换
177
               if (res.data) { //替换
@@ -191,9 +197,14 @@
191
               });
197
               });
192
             }
198
             }
193
           })
199
           })
200
+        }).catch(err=>{
201
+          this.SMFlag = true;
194
         });
202
         });
195
       },
203
       },
196
     },
204
     },
205
+    onShow(){
206
+      this.SMFlag = true;
207
+    },
197
     onLoad(options) {
208
     onLoad(options) {
198
       console.log(options,'seimin')
209
       console.log(options,'seimin')
199
       this.options = options;
210
       this.options = options;