浏览代码

送回病房增加选择陪检方式

seimin 2 年之前
父节点
当前提交
cffd4a43c4
共有 3 个文件被更改,包括 227 次插入104 次删除
  1. 1 1
      main.js
  2. 100 35
      pages/patientInformationList/patientInformationList.vue
  3. 126 68
      pages/scanning_ins/scanning_ins.vue

+ 1 - 1
main.js

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

+ 100 - 35
pages/patientInformationList/patientInformationList.vue

@@ -73,6 +73,11 @@
73
     <!-- 送回病房建单弹窗-扫描科室 -->
73
     <!-- 送回病房建单弹窗-扫描科室 -->
74
     <showModel :title="models3.title" :icon="models3.icon" :disjunctor="models3.disjunctor" :content="models3.content"
74
     <showModel :title="models3.title" :icon="models3.icon" :disjunctor="models3.disjunctor" :content="models3.content"
75
       :operate="models3.operate" @ok="ok3" @cancel="cancel3"></showModel>
75
       :operate="models3.operate" @ok="ok3" @cancel="cancel3"></showModel>
76
+    <!-- 弹窗 -->
77
+    <showModel :title="models4.title" :icon="models4.icon" :disjunctor="models4.disjunctor"
78
+      :radioInspectionDistanceItem="models4.radioInspectionDistanceItem" @ok="ok4" @cancel="cancel4"
79
+      @radioChange="radioChange4" :operate="models4.operate">
80
+    </showModel>
76
   </view>
81
   </view>
77
 </template>
82
 </template>
78
 <script>
83
 <script>
@@ -87,6 +92,11 @@
87
   export default {
92
   export default {
88
     data() {
93
     data() {
89
       return {
94
       return {
95
+        selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
96
+        // 单选框弹窗model
97
+        models4: {
98
+          disjunctor: false,
99
+        },
90
         SMFlag:true,
100
         SMFlag:true,
91
         hosId: uni.getStorageSync("userData").user.currentHospital.id,
101
         hosId: uni.getStorageSync("userData").user.currentHospital.id,
92
         // 选中的患者项
102
         // 选中的患者项
@@ -127,41 +137,71 @@
127
       bigScreen,
137
       bigScreen,
128
     },
138
     },
129
     methods: {
139
     methods: {
130
-      ok2() {
131
-        console.log(this.options)
132
-        this.models2.disjunctor = false;
133
-        let currentItem = JSON.parse(this.options.currentItem);
140
+      // 获取是否需要选择陪检方式
141
+      getInspectAndPatientTransformSend() {
142
+        const postData = {
143
+          "idx": 0,
144
+          "sum": 1,
145
+          "taskTypeConfig": {
146
+            "taskTypeDTO": {
147
+              "hosId": {
148
+                "id": this.hosId
149
+              },
150
+              "associationType": {
151
+                "key": "association_types",
152
+                "value": "inspect",
153
+              },
154
+            },
155
+          },
156
+        };
134
         uni.showLoading({
157
         uni.showLoading({
135
           mask: true,
158
           mask: true,
136
           title: '加载中'
159
           title: '加载中'
137
         })
160
         })
138
-        let userId = uni.getStorageSync("userData").user.id;
139
-        let postData = {
140
-          "workOrder": {
141
-            sourceId: 4,
142
-            "hosId": this.hosId,
143
-            "startDept": {
144
-              "id": this.options.did
145
-            },
146
-            "createDept": this.options.did,
147
-            "patient": {
148
-              "patientCode": this.currentItem.patientCode
149
-            },
150
-            "worker": {
151
-              "id": userId
152
-            }
153
-          }
154
-        };
155
-        console.log(postData)
156
-        // return;
157
-        post("/workerOrder/returnSickRoom", postData).then((res) => {
158
-          uni.hideLoading();
161
+        post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
162
+          console.log(res)
159
           if (res.status == 200) {
163
           if (res.status == 200) {
160
-            uni.showToast({
161
-              icon: 'success',
162
-              title: '建单成功',
163
-            });
164
+            res.list = res.list || [];
165
+            if (res.list[0].signTypeIds) {
166
+              // 如果开启
167
+              const postData = {
168
+                "idx": 0,
169
+                "sum": 9999,
170
+                "workOrderInspectScore": {
171
+                  "hosId": this.hosId,
172
+                },
173
+              };
174
+              post("/simple/data/fetchDataList/workOrderInspectScore", postData).then((res) => {
175
+                console.log(res)
176
+                uni.hideLoading();
177
+                if (res.status == 200) {
178
+                  res.list = res.list || [];
179
+                  let radioInspectionDistanceItem = res.list.map(v => ({
180
+                    id: v.id + "__" + v.inspectMode,
181
+                    inspectMode: v.inspectMode
182
+                  }));
183
+                  this.models4 = {
184
+                    disjunctor: true,
185
+                    title: "请选择陪检方式",
186
+                    radioInspectionDistanceItem,
187
+                    icon: "",
188
+                    operate: {
189
+                      ok: "确定",
190
+                      cancel: "取消",
191
+                    },
192
+                  };
193
+                } else {
194
+                  uni.showToast({
195
+                    icon: "none",
196
+                    title: "请求失败!",
197
+                  });
198
+                }
199
+              })
200
+            } else {
201
+              this.ok3Result();
202
+            }
164
           } else {
203
           } else {
204
+            uni.hideLoading();
165
             uni.showToast({
205
             uni.showToast({
166
               icon: "none",
206
               icon: "none",
167
               title: "请求失败!",
207
               title: "请求失败!",
@@ -169,12 +209,32 @@
169
           }
209
           }
170
         })
210
         })
171
       },
211
       },
212
+      // 选中单选框
213
+      radioChange4(item) {
214
+        console.log(item);
215
+        this.selectRadio = item.split("__");
216
+      },
217
+      // 确定
218
+      ok4() {
219
+        console.log(this.selectRadio);
220
+        if (!this.selectRadio.length) {
221
+          return;
222
+        }
223
+        this.models4.disjunctor = false;
224
+        this.ok3Result();
225
+      },
226
+      cancel4() {
227
+        this.models4.disjunctor = false;
228
+      },
229
+      ok2() {
230
+        this.models2.disjunctor = false;
231
+        this.getInspectAndPatientTransformSend();
232
+      },
172
       cancel2() {
233
       cancel2() {
173
         this.models2.disjunctor = false;
234
         this.models2.disjunctor = false;
174
       },
235
       },
175
-      ok3() {
236
+      ok3Result() {
176
         console.log(this.currentItem)
237
         console.log(this.currentItem)
177
-        this.models3.disjunctor = false;
178
         uni.showLoading({
238
         uni.showLoading({
179
           mask: true,
239
           mask: true,
180
           title: '加载中'
240
           title: '加载中'
@@ -185,16 +245,17 @@
185
             sourceId: 4,
245
             sourceId: 4,
186
             "hosId": this.hosId,
246
             "hosId": this.hosId,
187
             "startDept": {
247
             "startDept": {
188
-              "id": this.currentStartDept.id
248
+              "id": this.options.did || this.currentStartDept.id
189
             },
249
             },
190
-            "createDept": this.currentStartDept.id,
250
+            "createDept": this.options.did || this.currentStartDept.id,
191
             "patient": {
251
             "patient": {
192
               "patientCode": this.currentItem.patientCode
252
               "patientCode": this.currentItem.patientCode
193
             },
253
             },
194
             "worker": {
254
             "worker": {
195
               "id": userId
255
               "id": userId
196
-            }
197
-          }
256
+            },
257
+          },
258
+          "inspectMode": this.selectRadio.length > 0 ? this.selectRadio[0] : undefined,
198
         };
259
         };
199
         console.log(postData);
260
         console.log(postData);
200
         // return;
261
         // return;
@@ -213,6 +274,10 @@
213
           }
274
           }
214
         })
275
         })
215
       },
276
       },
277
+      ok3() {
278
+        this.models3.disjunctor = false;
279
+        this.getInspectAndPatientTransformSend();
280
+      },
216
       cancel3() {
281
       cancel3() {
217
         this.models3.disjunctor = false;
282
         this.models3.disjunctor = false;
218
       },
283
       },

+ 126 - 68
pages/scanning_ins/scanning_ins.vue

@@ -236,7 +236,8 @@
236
       :operate="models3.operate" @ok="ok3" @cancel="cancel3"></showModel>
236
       :operate="models3.operate" @ok="ok3" @cancel="cancel3"></showModel>
237
     <!-- 弹窗 -->
237
     <!-- 弹窗 -->
238
     <showModel :title="models4.title" :icon="models4.icon" :disjunctor="models4.disjunctor"
238
     <showModel :title="models4.title" :icon="models4.icon" :disjunctor="models4.disjunctor"
239
-      :radioInspectionDistanceItem="models4.radioInspectionDistanceItem" @ok="ok4" @cancel="cancel4" @radioChange="radioChange4" :operate="models4.operate">
239
+      :radioInspectionDistanceItem="models4.radioInspectionDistanceItem" @ok="ok4" @cancel="cancel4"
240
+      @radioChange="radioChange4" :operate="models4.operate">
240
     </showModel>
241
     </showModel>
241
   </view>
242
   </view>
242
 </template>
243
 </template>
@@ -251,13 +252,14 @@
251
   export default {
252
   export default {
252
     data() {
253
     data() {
253
       return {
254
       return {
255
+        isInspectAndPatientTransform: false, //是否是一键操作
254
         selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
256
         selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
255
         // 单选框弹窗model1
257
         // 单选框弹窗model1
256
         models4: {
258
         models4: {
257
           disjunctor: false,
259
           disjunctor: false,
258
         },
260
         },
259
         currentCode: '', //当前小扫描的科室二维码
261
         currentCode: '', //当前小扫描的科室二维码
260
-        SMFlag:true,
262
+        SMFlag: true,
261
         options: {},
263
         options: {},
262
         // wechatFocusSwitch: 0,
264
         // wechatFocusSwitch: 0,
263
         hosId: "",
265
         hosId: "",
@@ -296,18 +298,94 @@
296
     },
298
     },
297
     methods: {
299
     methods: {
298
       // 获取是否需要选择陪检方式
300
       // 获取是否需要选择陪检方式
299
-      getInspectAndPatientTransform(){
301
+      getInspectAndPatientTransformSend() {
302
+        let infoDATA = JSON.parse(this.options.infoDATA);
303
+        const postData = {
304
+          "idx": 0,
305
+          "sum": 1,
306
+          "taskTypeConfig": {
307
+            "taskTypeDTO": {
308
+              "hosId": {
309
+                "id": this.hosId
310
+              },
311
+              "associationType": {
312
+                "key": "association_types",
313
+                "value": "inspect",
314
+              },
315
+            },
316
+          },
317
+        };
318
+        uni.showLoading({
319
+          mask: true,
320
+          title: '加载中'
321
+        })
322
+        post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
323
+          console.log(res)
324
+          if (res.status == 200) {
325
+            res.list = res.list || [];
326
+            if (res.list[0].signTypeIds) {
327
+              // 如果开启
328
+              const postData = {
329
+                "idx": 0,
330
+                "sum": 9999,
331
+                "workOrderInspectScore": {
332
+                  "hosId": this.hosId,
333
+                },
334
+              };
335
+              post("/simple/data/fetchDataList/workOrderInspectScore", postData).then((res) => {
336
+                console.log(res)
337
+                uni.hideLoading();
338
+                if (res.status == 200) {
339
+                  res.list = res.list || [];
340
+                  let radioInspectionDistanceItem = res.list.map(v => ({
341
+                    id: v.id + "__" + v.inspectMode,
342
+                    inspectMode: v.inspectMode
343
+                  }));
344
+                  this.models4 = {
345
+                    disjunctor: true,
346
+                    title: "请选择陪检方式",
347
+                    radioInspectionDistanceItem,
348
+                    icon: "",
349
+                    operate: {
350
+                      ok: "确定",
351
+                      cancel: "取消",
352
+                    },
353
+                  };
354
+                } else {
355
+                  uni.showToast({
356
+                    icon: "none",
357
+                    title: "请求失败!",
358
+                  });
359
+                }
360
+              })
361
+            } else {
362
+              this.ok3Result();
363
+            }
364
+          } else {
365
+            uni.hideLoading();
366
+            uni.showToast({
367
+              icon: "none",
368
+              title: "请求失败!",
369
+            });
370
+          }
371
+        })
372
+      },
373
+      // 获取是否需要选择陪检方式
374
+      getInspectAndPatientTransform() {
375
+        this.isInspectAndPatientTransform = true;
300
         console.log(this.typeData);
376
         console.log(this.typeData);
301
-        if(this.typeData){
377
+        if (this.typeData) {
302
           const postData = {
378
           const postData = {
303
-            "idx":0,
304
-            "sum":1,
305
-            "taskTypeConfig":{
306
-              "taskTypeDTO":{
307
-                "hosId": {"id": this.hosId},
379
+            "idx": 0,
380
+            "sum": 1,
381
+            "taskTypeConfig": {
382
+              "taskTypeDTO": {
383
+                "hosId": {
384
+                  "id": this.hosId
385
+                },
308
                 "associationType": {
386
                 "associationType": {
309
                   "key": "association_types",
387
                   "key": "association_types",
310
-                  "value":"inspect",
388
+                  "value": "inspect",
311
                 },
389
                 },
312
               },
390
               },
313
             },
391
             },
@@ -320,12 +398,12 @@
320
             console.log(res)
398
             console.log(res)
321
             if (res.status == 200) {
399
             if (res.status == 200) {
322
               res.list = res.list || [];
400
               res.list = res.list || [];
323
-              if(res.list[0].signTypeIds && this.typeData.gdState.value == 4){
401
+              if (res.list[0].signTypeIds && this.typeData.gdState.value == 4) {
324
                 // 如果开启并且工单状态是待到达
402
                 // 如果开启并且工单状态是待到达
325
                 const postData = {
403
                 const postData = {
326
-                  "idx":0,
327
-                  "sum":9999,
328
-                  "workOrderInspectScore":{
404
+                  "idx": 0,
405
+                  "sum": 9999,
406
+                  "workOrderInspectScore": {
329
                     "hosId": this.hosId,
407
                     "hosId": this.hosId,
330
                   },
408
                   },
331
                 };
409
                 };
@@ -334,7 +412,10 @@
334
                   uni.hideLoading();
412
                   uni.hideLoading();
335
                   if (res.status == 200) {
413
                   if (res.status == 200) {
336
                     res.list = res.list || [];
414
                     res.list = res.list || [];
337
-                    let radioInspectionDistanceItem = res.list.map(v => ({id: v.id + "__" + v.inspectMode, inspectMode: v.inspectMode}));
415
+                    let radioInspectionDistanceItem = res.list.map(v => ({
416
+                      id: v.id + "__" + v.inspectMode,
417
+                      inspectMode: v.inspectMode
418
+                    }));
338
                     this.models4 = {
419
                     this.models4 = {
339
                       disjunctor: true,
420
                       disjunctor: true,
340
                       title: "请选择陪检方式",
421
                       title: "请选择陪检方式",
@@ -352,7 +433,7 @@
352
                     });
433
                     });
353
                   }
434
                   }
354
                 })
435
                 })
355
-              }else{
436
+              } else {
356
                 this.allStart(this.typeData);
437
                 this.allStart(this.typeData);
357
               }
438
               }
358
             } else {
439
             } else {
@@ -363,7 +444,7 @@
363
               });
444
               });
364
             }
445
             }
365
           })
446
           })
366
-        }else{
447
+        } else {
367
           this.models = {
448
           this.models = {
368
             disjunctor: true,
449
             disjunctor: true,
369
             content: "请选择工单",
450
             content: "请选择工单",
@@ -386,55 +467,24 @@
386
           return;
467
           return;
387
         }
468
         }
388
         this.models4.disjunctor = false;
469
         this.models4.disjunctor = false;
389
-        this.allStart(this.typeData);
470
+        // 判断是一键操作还是送回病房
471
+        if(this.isInspectAndPatientTransform){
472
+          this.allStart(this.typeData);
473
+        }else{
474
+          this.ok3Result();
475
+        }
390
       },
476
       },
391
       cancel4() {
477
       cancel4() {
392
         this.models4.disjunctor = false;
478
         this.models4.disjunctor = false;
393
       },
479
       },
394
       ok2() {
480
       ok2() {
395
         this.models2.disjunctor = false;
481
         this.models2.disjunctor = false;
396
-        uni.showLoading({
397
-          mask: true,
398
-          title: '加载中'
399
-        })
400
-        let userId = uni.getStorageSync("userData").user.id;
401
-        let postData = {
402
-          "workOrder": {
403
-            sourceId: 4,
404
-            "hosId": this.hosId,
405
-            "startDept": {
406
-              "id": this.options.id
407
-            },
408
-            "createDept": this.options.id,
409
-            "patient": {
410
-              "patientCode": this.infoDATA.patientCode
411
-            },
412
-            "worker": {
413
-              "id": userId
414
-            }
415
-          }
416
-        };
417
-        post("/workerOrder/returnSickRoom", postData).then((res) => {
418
-          console.log(res)
419
-          uni.hideLoading();
420
-          if (res.status == 200) {
421
-            uni.showToast({
422
-              icon: 'success',
423
-              title: '建单成功',
424
-            });
425
-          } else {
426
-            uni.showToast({
427
-              icon: "none",
428
-              title: "请求失败!",
429
-            });
430
-          }
431
-        })
482
+        this.getInspectAndPatientTransformSend();
432
       },
483
       },
433
       cancel2() {
484
       cancel2() {
434
         this.models2.disjunctor = false;
485
         this.models2.disjunctor = false;
435
       },
486
       },
436
-      ok3() {
437
-        this.models3.disjunctor = false;
487
+      ok3Result() {
438
         uni.showLoading({
488
         uni.showLoading({
439
           mask: true,
489
           mask: true,
440
           title: '加载中'
490
           title: '加载中'
@@ -445,16 +495,17 @@
445
             sourceId: 4,
495
             sourceId: 4,
446
             "hosId": this.hosId,
496
             "hosId": this.hosId,
447
             "startDept": {
497
             "startDept": {
448
-              "id": this.currentStartDept.id
498
+              "id": this.options.id || this.currentStartDept.id
449
             },
499
             },
450
-            "createDept": this.currentStartDept.id,
500
+            "createDept": this.options.id || this.currentStartDept.id,
451
             "patient": {
501
             "patient": {
452
               "patientCode": this.infoDATA.patientCode
502
               "patientCode": this.infoDATA.patientCode
453
             },
503
             },
454
             "worker": {
504
             "worker": {
455
               "id": userId
505
               "id": userId
456
-            }
457
-          }
506
+            },
507
+          },
508
+          "inspectMode": this.selectRadio.length > 0 ? this.selectRadio[0] : undefined,
458
         };
509
         };
459
         post("/workerOrder/returnSickRoom", postData).then((res) => {
510
         post("/workerOrder/returnSickRoom", postData).then((res) => {
460
           console.log(res)
511
           console.log(res)
@@ -472,6 +523,10 @@
472
           }
523
           }
473
         })
524
         })
474
       },
525
       },
526
+      ok3() {
527
+        this.models3.disjunctor = false;
528
+        this.getInspectAndPatientTransformSend();
529
+      },
475
       cancel3() {
530
       cancel3() {
476
         this.models3.disjunctor = false;
531
         this.models3.disjunctor = false;
477
       },
532
       },
@@ -491,6 +546,7 @@
491
       },
546
       },
492
       // 送回病房-扫描科室
547
       // 送回病房-扫描科室
493
       scanDept() {
548
       scanDept() {
549
+        this.isInspectAndPatientTransform = false;
494
         if (!this.SMFlag) {
550
         if (!this.SMFlag) {
495
           return;
551
           return;
496
         }
552
         }
@@ -525,8 +581,8 @@
525
                 post("/data/fetchDataList/department", postData).then((res) => {
581
                 post("/data/fetchDataList/department", postData).then((res) => {
526
                   uni.hideLoading();
582
                   uni.hideLoading();
527
                   if (res.status == 200) {
583
                   if (res.status == 200) {
528
-                    if(res.totalNum > 0){
529
-                      this.currentStartDept = res.list[0]; //baba
584
+                    if (res.totalNum > 0) {
585
+                      this.currentStartDept = res.list[0];
530
                       this.models3 = {
586
                       this.models3 = {
531
                         disjunctor: true,
587
                         disjunctor: true,
532
                         title: "提示",
588
                         title: "提示",
@@ -536,8 +592,8 @@
536
                           ok: "确认建单",
592
                           ok: "确认建单",
537
                           cancel: "取消",
593
                           cancel: "取消",
538
                         },
594
                         },
539
-                      };
540
-                    }else{
595
+                      };                      
596
+                    } else {
541
                       uni.hideLoading();
597
                       uni.hideLoading();
542
                       uni.showToast({
598
                       uni.showToast({
543
                         icon: "none",
599
                         icon: "none",
@@ -561,7 +617,7 @@
561
               });
617
               });
562
             }
618
             }
563
           });
619
           });
564
-        }).catch(err=>{
620
+        }).catch(err => {
565
           this.SMFlag = true;
621
           this.SMFlag = true;
566
         });
622
         });
567
       },
623
       },
@@ -696,7 +752,9 @@
696
                     var ids = [];
752
                     var ids = [];
697
                     ids.push(data.id);
753
                     ids.push(data.id);
698
                     type = "orderSign/" + ress;
754
                     type = "orderSign/" + ress;
699
-                    list = {ids};
755
+                    list = {
756
+                      ids
757
+                    };
700
                     // 科室签到
758
                     // 科室签到
701
                     post("/workerOrder/" + type, list).then((res) => {
759
                     post("/workerOrder/" + type, list).then((res) => {
702
                       uni.hideLoading();
760
                       uni.hideLoading();
@@ -730,7 +788,7 @@
730
                 }
788
                 }
731
               });
789
               });
732
               // ------------------------------
790
               // ------------------------------
733
-            }).catch(err=>{
791
+            }).catch(err => {
734
               this.SMFlag = true;
792
               this.SMFlag = true;
735
             });
793
             });
736
           } else {
794
           } else {
@@ -860,7 +918,7 @@
860
         this.patientOrders = JSON.parse(options.patientOrders);
918
         this.patientOrders = JSON.parse(options.patientOrders);
861
       }
919
       }
862
       this.code = options.code;
920
       this.code = options.code;
863
-      
921
+
864
       // #ifdef APP-PLUS
922
       // #ifdef APP-PLUS
865
       webHandle("no", "app");
923
       webHandle("no", "app");
866
       // #endif
924
       // #endif