seimin 2 年 前
コミット
5ff49c451f
共有3 個のファイルを変更した215 個の追加1 個の削除を含む
  1. 17 0
      components/showModel/showModel.vue
  2. 92 0
      components/smallScreen/smallScreen.vue
  3. 106 1
      pages/scanning_ins/scanning_ins.vue

+ 17 - 0
components/showModel/showModel.vue

@@ -36,6 +36,16 @@
36 36
             </view>
37 37
           </radio-group>
38 38
         </view>
39
+        <view class="radio-wrap" v-if="radioInspectionDistanceItem.length">
40
+          <radio-group @change="radioChange">
41
+            <view v-for="(item, index) in radioInspectionDistanceItem" :key="item.id" class="radio-item">
42
+              <label>
43
+                <radio :value="item.id" />
44
+                <text>{{ item.inspectMode }}</text>
45
+              </label>
46
+            </view>
47
+          </radio-group>
48
+        </view>
39 49
       </view>
40 50
       <view class="showModel__footer">
41 51
         <view
@@ -138,6 +148,13 @@ export default {
138 148
         return [];
139 149
       },
140 150
     },
151
+    // 单选框选项-陪检方式
152
+    radioInspectionDistanceItem: {
153
+      type: Array,
154
+      default: () => {
155
+        return [];
156
+      },
157
+    },
141 158
     // 操作按钮文字
142 159
     operate: {
143 160
       type: Object,

+ 92 - 0
components/smallScreen/smallScreen.vue

@@ -7,6 +7,10 @@
7 7
     <selectAccount v-if="hosModels.disjunctor" :title="hosModels.title" :disjunctor="hosModels.disjunctor" @ok="hosOk"
8 8
       @cancel="hosCancel">
9 9
     </selectAccount>
10
+    <!-- 弹窗 -->
11
+    <showModel :title="models4.title" :icon="models4.icon" :disjunctor="models4.disjunctor"
12
+      :radioInspectionDistanceItem="models4.radioInspectionDistanceItem" @ok="ok4" @radioChange="radioChange4" :operate="models4.operate">
13
+    </showModel>
10 14
   </view>
11 15
 </template>
12 16
 
@@ -19,6 +23,11 @@
19 23
   export default {
20 24
     data() {
21 25
       return {
26
+        // 单选框弹窗model1
27
+        models4: {
28
+          disjunctor: false,
29
+        },
30
+        hosId: "",
22 31
         currentCode: '', //当前小扫描的科室二维码
23 32
         currentData: {}, //当前小扫描的工单对象
24 33
         // 填写交接人账号弹窗model
@@ -37,6 +46,86 @@
37 46
       }
38 47
     },
39 48
     methods: {
49
+      // 获取是否需要选择陪检方式
50
+      getInspectAndPatientTransform(){
51
+        if(this.typeData){
52
+          const postData = {
53
+            "idx":0,
54
+            "sum":1,
55
+            "taskTypeConfig":{
56
+              "taskTypeDTO":{
57
+                "hosId": {"id": this.hosId},
58
+                "associationType": {
59
+                  "key": "association_types",
60
+                  "value":"inspect",
61
+                },
62
+              },
63
+            },
64
+          };
65
+          uni.showLoading({
66
+            mask: true,
67
+            title: '加载中'
68
+          })
69
+          post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
70
+            console.log(res)
71
+            if (res.status == 200) {
72
+              res.list = res.list || [];
73
+              if(res.list[0].signTypeIds && this.typeData.gdState.value == 4){
74
+                // 如果开启并且工单状态是待到达
75
+                const postData = {
76
+                  "idx":0,
77
+                  "sum":9999,
78
+                  "workOrderInspectScore":{
79
+                    "hosId": this.hosId,
80
+                  },
81
+                };
82
+                post("/simple/data/fetchDataList/workOrderInspectScore", postData).then((res) => {
83
+                  console.log(res)
84
+                  uni.hideLoading();
85
+                  if (res.status == 200) {
86
+                    res.list = res.list || [];
87
+                    let radioInspectionDistanceItem = res.list.map(v => ({id: v.id + "__" + v.inspectMode, inspectMode: v.inspectMode}));
88
+                    this.models4 = {
89
+                      disjunctor: true,
90
+                      title: "请选择陪检方式",
91
+                      radioInspectionDistanceItem,
92
+                      icon: "",
93
+                      operate: {
94
+                        ok: "确定",
95
+                      },
96
+                    };
97
+                  } else {
98
+                    uni.showToast({
99
+                      icon: "none",
100
+                      title: "请求失败!",
101
+                    });
102
+                  }
103
+                })
104
+              }
105
+            } else {
106
+              uni.hideLoading();
107
+              uni.showToast({
108
+                icon: "none",
109
+                title: "请求失败!",
110
+              });
111
+            }
112
+          })
113
+        }
114
+      },
115
+      // 选中单选框
116
+      radioChange4(item) {
117
+        console.log(item);
118
+        this.selectRadio = item.split("__");
119
+      },
120
+      // 确定
121
+      ok4() {
122
+        console.log(this.selectRadio);
123
+        if (!this.selectRadio.length) {
124
+          return;
125
+        }
126
+        this.models4.disjunctor = false;
127
+        this.allStart(this.typeData);
128
+      },
40 129
       // 如果不是静配,药配,标本配送,标本轮巡
41 130
       // 科室签到(小扫描)
42 131
       nextDeptOrder_ss(data, accountObj) {
@@ -355,6 +444,9 @@
355 444
     },
356 445
     onShow(){
357 446
       this.SMFlag = true;
447
+    },
448
+    onLoad(){
449
+      this.hosId = uni.getStorageSync("userData").user.currentHospital.id;
358 450
     }
359 451
   };
360 452
 </script>

+ 106 - 1
pages/scanning_ins/scanning_ins.vue

@@ -198,7 +198,8 @@
198 198
       </view>
199 199
 
200 200
       <view class="foot_btn2" v-if="workData && workData.length > 0 && isShow">
201
-        <view class="btn1" @click="allStart(typeData)">一键操作</view>
201
+        <!-- <view class="btn1" @click="allStart(typeData)">一键操作</view> -->
202
+        <view class="btn1" @click="getInspectAndPatientTransform(typeData)">一键操作</view>
202 203
         <view class="btn1" @click="scanDept()">送回病房</view>
203 204
         <view class="btn2" @click="showAlert">知道了</view>
204 205
       </view>
@@ -233,6 +234,10 @@
233 234
     <!-- 送回病房建单弹窗-扫描科室 -->
234 235
     <showModel :title="models3.title" :icon="models3.icon" :disjunctor="models3.disjunctor" :content="models3.content"
235 236
       :operate="models3.operate" @ok="ok3" @cancel="cancel3"></showModel>
237
+    <!-- 弹窗 -->
238
+    <showModel :title="models4.title" :icon="models4.icon" :disjunctor="models4.disjunctor"
239
+      :radioInspectionDistanceItem="models4.radioInspectionDistanceItem" @ok="ok4" @radioChange="radioChange4" :operate="models4.operate">
240
+    </showModel>
236 241
   </view>
237 242
 </template>
238 243
 <script>
@@ -246,6 +251,11 @@
246 251
   export default {
247 252
     data() {
248 253
       return {
254
+        selectRadio: [], //单选框选中的数据,第一项是qrcode,第二项是名称
255
+        // 单选框弹窗model1
256
+        models4: {
257
+          disjunctor: false,
258
+        },
249 259
         currentCode: '', //当前小扫描的科室二维码
250 260
         SMFlag:true,
251 261
         options: {},
@@ -285,6 +295,98 @@
285 295
       };
286 296
     },
287 297
     methods: {
298
+      // 获取是否需要选择陪检方式
299
+      getInspectAndPatientTransform(){
300
+        console.log(this.typeData);
301
+        if(this.typeData){
302
+          const postData = {
303
+            "idx":0,
304
+            "sum":1,
305
+            "taskTypeConfig":{
306
+              "taskTypeDTO":{
307
+                "hosId": {"id": this.hosId},
308
+                "associationType": {
309
+                  "key": "association_types",
310
+                  "value":"inspect",
311
+                },
312
+              },
313
+            },
314
+          };
315
+          uni.showLoading({
316
+            mask: true,
317
+            title: '加载中'
318
+          })
319
+          post("/simple/data/fetchDataList/taskTypeConfig", postData).then((res) => {
320
+            console.log(res)
321
+            if (res.status == 200) {
322
+              res.list = res.list || [];
323
+              if(res.list[0].signTypeIds && this.typeData.gdState.value == 4){
324
+                // 如果开启并且工单状态是待到达
325
+                const postData = {
326
+                  "idx":0,
327
+                  "sum":9999,
328
+                  "workOrderInspectScore":{
329
+                    "hosId": this.hosId,
330
+                  },
331
+                };
332
+                post("/simple/data/fetchDataList/workOrderInspectScore", postData).then((res) => {
333
+                  console.log(res)
334
+                  uni.hideLoading();
335
+                  if (res.status == 200) {
336
+                    res.list = res.list || [];
337
+                    let radioInspectionDistanceItem = res.list.map(v => ({id: v.id + "__" + v.inspectMode, inspectMode: v.inspectMode}));
338
+                    this.models4 = {
339
+                      disjunctor: true,
340
+                      title: "请选择陪检方式",
341
+                      radioInspectionDistanceItem,
342
+                      icon: "",
343
+                      operate: {
344
+                        ok: "确定",
345
+                      },
346
+                    };
347
+                  } else {
348
+                    uni.showToast({
349
+                      icon: "none",
350
+                      title: "请求失败!",
351
+                    });
352
+                  }
353
+                })
354
+              }else{
355
+                this.allStart(this.typeData);
356
+              }
357
+            } else {
358
+              uni.hideLoading();
359
+              uni.showToast({
360
+                icon: "none",
361
+                title: "请求失败!",
362
+              });
363
+            }
364
+          })
365
+        }else{
366
+          this.models = {
367
+            disjunctor: true,
368
+            content: "请选择工单",
369
+            icon: "warn",
370
+            operate: {
371
+              know: "知道了",
372
+            },
373
+          };
374
+        }
375
+      },
376
+      // 选中单选框
377
+      radioChange4(item) {
378
+        console.log(item);
379
+        this.selectRadio = item.split("__");
380
+      },
381
+      // 确定
382
+      ok4() {
383
+        console.log(this.selectRadio);
384
+        if (!this.selectRadio.length) {
385
+          return;
386
+        }
387
+        this.models4.disjunctor = false;
388
+        this.allStart(this.typeData);
389
+      },
288 390
       ok2() {
289 391
         this.models2.disjunctor = false;
290 392
         uni.showLoading({
@@ -634,6 +736,7 @@
634 736
                 ids: this.userId.ids,
635 737
                 // "11789558|51131895|7|黄石城乡|陈琛|女|19981003|20180803081051|Z消化内科Ⅰ"
636 738
                 code: this.code,
739
+                inspectMode: this.selectRadio.length > 0 ? this.selectRadio[0] : undefined,
637 740
               };
638 741
               list = data;
639 742
             }
@@ -643,6 +746,7 @@
643 746
                 ids: this.userId.ids,
644 747
                 // "11789558|51131895|7|黄石城乡|陈琛|女|19981003|20180803081051|Z消化内科Ⅰ"
645 748
                 code: this.code,
749
+                inspectMode: this.selectRadio.length > 0 ? this.selectRadio[0] : undefined,
646 750
               };
647 751
               list = data;
648 752
             }
@@ -752,6 +856,7 @@
752 856
         this.patientOrders = JSON.parse(options.patientOrders);
753 857
       }
754 858
       this.code = options.code;
859
+      
755 860
       // #ifdef APP-PLUS
756 861
       webHandle("no", "app");
757 862
       // #endif