Browse Source

解决冲突

maotao 4 months ago
parent
commit
fef3152df3

+ 188 - 4
components/bigScreen/bigScreen.vue

@@ -219,6 +219,177 @@
219 219
           }
220 220
         });
221 221
       },
222
+      //获取药包信息
223
+      getInfo(responeseData, code){
224
+        console.log(responeseData);
225
+        uni.showLoading({
226
+          title: "加载中",
227
+          mask: true,
228
+        });
229
+
230
+        post(`/transflow/scanInfo`, {type: responeseData.drugsBagType, id: responeseData.drugsBagId, orderStateValue: responeseData.orderStateValue}).then(res => {
231
+          uni.hideLoading();
232
+          if(res.state == 200){
233
+            if(res.data){
234
+              let drugsBag = res.data.dto || {};
235
+              let orderId = responeseData.orderId;
236
+              let config = res.data.taskTypeConfig || {};
237
+              console.log(res);
238
+              if(responeseData.orderStateValue == 2 || responeseData.orderStateValue == 3 || (responeseData.orderStateValue == 4 && responeseData.workerId == uni.getStorageSync('userData').user.id)){
239
+                // 待抢单、待接单、待到达(本人),进入起点科室流程
240
+                uni.navigateTo({
241
+                  url: `/pages/newDrug/createOrder/createOrder?drugsBagType=${responeseData.drugsBagType}&drugsBagId=${responeseData.drugsBagId}&orderId=${responeseData.orderId || ''}&type=receive`,
242
+                });
243
+              }else if(responeseData.orderStateValue == 5 && responeseData.workerId == uni.getStorageSync('userData').user.id){
244
+                // 待送达(本人),进入终点科室流程
245
+                this.pageNavigateByConfig(config, responeseData, responeseData, code)
246
+              }else{
247
+                // 查看药包信息
248
+                uni.navigateTo({
249
+                  url: `/pages/newDrug/createOrder/createOrder?drugsBagType=${responeseData.drugsBagType}&drugsBagId=${responeseData.drugsBagId}&type=view`,
250
+                });
251
+              }
252
+            }
253
+          }else{
254
+            uni.showToast({
255
+              icon: "none",
256
+              title: res.msg || "接口获取数据失败!",
257
+            });
258
+          }
259
+        })
260
+      },
261
+      // 工单完成
262
+      completeOrder(responseData, queryObj){
263
+        console.log(responseData, queryObj)
264
+        uni.showLoading({
265
+          title: "加载中",
266
+          mask: true,
267
+        });
268
+        let postData = {
269
+          "type": queryObj.drugsBagType,
270
+          "orderId": responseData.orderId,
271
+        };
272
+        post('/transflow/checkComplete', postData).then(res => {
273
+          uni.hideLoading();
274
+          if(res.state == 200){
275
+             uni.showToast({
276
+               icon: "none",
277
+               title: responseData.orderStateValue == 4 ? "交接成功,请尽快送达科室!" : (responseData.orderStateValue == 5 ? "交接成功,完成配送!" : ""),
278
+               duration: 60000,
279
+               mask: true,
280
+               complete(){
281
+                 setTimeout(() => {
282
+                   uni.hideToast();
283
+                   uni.redirectTo({
284
+                     url: `/pages/receiptpage/receiptpage`,
285
+                   });
286
+                 }, 2000)
287
+               }
288
+             });
289
+          }else{
290
+            uni.showToast({
291
+              icon: "none",
292
+              title: res.msg || "接口获取数据失败!",
293
+            });
294
+          }
295
+        })
296
+      },
297
+      // 根据配置跳转页面
298
+      pageNavigateByConfig(config, responseData, queryObj, code){
299
+        let drugsBagType = queryObj.drugsBagType;
300
+        let orderId = responseData.orderId;
301
+        let drugsBagId = responseData.drugsBagId;
302
+        let orderStateValue = responseData.orderStateValue;
303
+        if(config.drugsModel === 1){
304
+          // 一单一码
305
+          if(responseData.orderStateValue == 4){
306
+            // 待到达
307
+            if(config.drugsStartCheck === 1){
308
+              // 起点科室支持核对
309
+              uni.navigateTo({
310
+                url: `/pages/newDrug/checkPage/checkPage?drugsBagType=${drugsBagType}&orderId=${orderId}`,
311
+              });
312
+            }else{
313
+              // 起点科室不支持核对
314
+              if(config.drugsStartPhoto === 1){
315
+                // 起点科室支持拍照留存
316
+                uni.navigateTo({
317
+                  url: `/pages/newDrug/photoRetention/photoRetention?drugsBagType=${drugsBagType}&orderId=${orderId}`,
318
+                });
319
+              }else{
320
+                // 起点科室不支持拍照留存
321
+                this.completeOrder(responseData, queryObj);
322
+              }
323
+            }
324
+          }else if(responseData.orderStateValue == 5){
325
+            // 待送达
326
+            uni.showLoading({
327
+              title: "加载中",
328
+              mask: true,
329
+            });
330
+            post("/transflow/scanBind", { type: drugsBagType, orderId, code }).then((ress) => {
331
+              uni.hideLoading();
332
+              if (ress.state == 200) {
333
+                if(ress.data.msg){
334
+                  uni.showToast({
335
+                    icon: "none",
336
+                    title: ress.data.msg || "接口获取数据失败!",
337
+                  });
338
+                }else{
339
+                  if(config.drugsEndCheck === 1){
340
+                    // 起点科室支持核对
341
+                    uni.navigateTo({
342
+                      url: `/pages/newDrug/checkPage/checkPage?drugsBagType=${drugsBagType}&orderId=${orderId}`,
343
+                    });
344
+                  }else{
345
+                    // 起点科室不支持核对
346
+                    if(config.drugsEndPhoto === 1){
347
+                      // 起点科室支持拍照留存
348
+                      uni.navigateTo({
349
+                        url: `/pages/newDrug/photoRetention/photoRetention?drugsBagType=${drugsBagType}&orderId=${orderId}`,
350
+                      });
351
+                    }else{
352
+                      // 终点科室不支持拍照留存
353
+                      this.completeOrder(responseData, queryObj);
354
+                    }
355
+                  }
356
+                }
357
+              } else {
358
+                uni.showToast({
359
+                  icon: "none",
360
+                  title: ress.msg || "接口获取数据失败!",
361
+                });
362
+              }
363
+            });
364
+          }
365
+        }else if(config.drugsModel === 2){
366
+          // 一单多码
367
+          uni.showLoading({
368
+            title: "加载中",
369
+            mask: true,
370
+          });
371
+          post("/transflow/scanBind", { type: drugsBagType, orderId, code }).then((ress) => {
372
+            uni.hideLoading();
373
+            if (ress.state == 200) {
374
+              if(ress.data.msg){
375
+                uni.showToast({
376
+                  icon: "none",
377
+                  title: ress.data.msg || "接口获取数据失败!",
378
+                });
379
+              }else{
380
+                uni.navigateTo({
381
+                  url: `/pages/newDrug/continueScanning/continueScanning?drugsBagType=${drugsBagType}&orderId=${orderId}&drugsBagId=${drugsBagId}&orderStateValue=${orderStateValue}`,
382
+                });
383
+              }
384
+            } else {
385
+              uni.showToast({
386
+                icon: "none",
387
+                title: ress.msg || "接口获取数据失败!",
388
+              });
389
+            }
390
+          });
391
+        }
392
+      },
222 393
       // 底部扫描
223 394
       Scanning(qrcodePrefix = '') {
224 395
         if (!this.SMFlag) {
@@ -328,10 +499,23 @@
328 499
                           });
329 500
                         }
330 501
                       } else if (res.type == 'drugsBag') {
331
-                        //扫药包码
332
-                        uni.navigateTo({
333
-                          url: `/pages/scanning_drug/scanning_drug?drugsBagId=${res.drugsBagId}&drugsBagBatchNo=${res.drugsBagBatchNo}`,
334
-                        });
502
+                        if (res.drugsBagType == 'drugsJpbag' || res.drugsBagType == 'drugsWestern' || res.drugsBagType == 'drugsReturn' || res.drugsBagType == 'drugsPoison' || res.drugsBagType == 'drugsHerbal') {
503
+                          //新药品-扫静配|西药|退药|毒麻|中草药
504
+                          if(res.orderId){
505
+                            // 有工单
506
+                            this.getInfo(res, code);
507
+                          }else{
508
+                            // 没有工单,进入起点科室流程
509
+                            uni.navigateTo({
510
+                              url: `/pages/newDrug/createOrder/createOrder?drugsBagType=${res.drugsBagType}&drugsBagId=${res.drugsBagId}&type=build`,
511
+                            });
512
+                          }
513
+                        }else{
514
+                          //扫药包码
515
+                          uni.navigateTo({
516
+                            url: `/pages/scanning_drug/scanning_drug?drugsBagId=${res.drugsBagId}&drugsBagBatchNo=${res.drugsBagBatchNo}`,
517
+                          });
518
+                        }
335 519
                       } else if (res.type == 'nucleicAcid') {
336 520
                         //扫核酸码
337 521
                         uni.navigateTo({

+ 7 - 0
http/http.js

@@ -284,3 +284,10 @@ function startAudio() {
284 284
   //     }
285 285
   // });
286 286
 }
287
+
288
+/**
289
+ * 上传附件
290
+ */
291
+export function api_uploadAttachment(type, id){
292
+  return `${path}/common/common/uploadAttachment/${type}/${id}/${id}`
293
+}

+ 49 - 1
pages.json

@@ -656,7 +656,55 @@
656 656
 		      "titleNView": false
657 657
 		    }
658 658
 		  }
659
-		}
659
+		},
660
+    {
661
+      "path": "pages/newDrug/detail", //新药品-药品详情
662
+      "style": {
663
+        "h5": {
664
+          "titleNView": false
665
+        }
666
+      }
667
+    },
668
+    {
669
+      "path": "pages/newDrug/list", //新药品-药品列表
670
+      "style": {
671
+        "h5": {
672
+          "titleNView": false
673
+        }
674
+      }
675
+    },
676
+    {
677
+      "path": "pages/newDrug/createOrder/createOrder", //新药品-创建工单
678
+      "style": {
679
+        "h5": {
680
+          "titleNView": false
681
+        }
682
+      }
683
+    },
684
+    {
685
+      "path": "pages/newDrug/continueScanning/continueScanning", //新药品-继续扫描
686
+      "style": {
687
+        "h5": {
688
+          "titleNView": false
689
+        }
690
+      }
691
+    },
692
+    {
693
+      "path": "pages/newDrug/checkPage/checkPage", //新药品-核对交接
694
+      "style": {
695
+        "h5": {
696
+          "titleNView": false
697
+        }
698
+      }
699
+    },
700
+    {
701
+      "path": "pages/newDrug/photoRetention/photoRetention", //新药品-照片留存
702
+      "style": {
703
+        "h5": {
704
+          "titleNView": false
705
+        }
706
+      }
707
+    }
660 708
   ],
661 709
   "globalStyle": {
662 710
     "navigationBarTextStyle": "black",

+ 448 - 0
pages/newDrug/checkPage/checkPage.vue

@@ -0,0 +1,448 @@
1
+<template>
2
+  <view class="Scanning_Result">
3
+    <view class="Scanning_top">
4
+      <view class="Scanning_top_icon">
5
+        {{workOrder.startDept ? workOrder.startDept.dept : ''}}<text class="newicon newicon-arrow-right-full"></text>{{workOrder.endDeptNames || ''}}
6
+      </view>
7
+    </view>
8
+
9
+    <view class="Scanning_cont">
10
+      <view class="column head">
11
+        <view class="value1">单号<text class="red">({{drugsBagList.length}})</text></view>
12
+        <view class="value2">种类数</view>
13
+        <view class="value3">总数</view>
14
+      </view>
15
+      <scroll-view scroll-y class="scrollContent">
16
+        <view class="column" v-for="item in drugsBagList" :key="item.id" @click="toDetail(item.id)">
17
+          <view class="value1">{{item.batchNo}}</view>
18
+          <view class="value2">{{item.drugsTypeCount}}</view>
19
+          <view class="value3">{{item.drugsCount}}</view>
20
+        </view>
21
+      </scroll-view>
22
+    </view>
23
+
24
+    <view class="foot_btn_spe">
25
+      <view class="column">
26
+        <view class="btn" @click="scanCode()">扫一扫交接</view>
27
+        <view class="btn" @click="fillInManually(config.drugsStartManual.value)" v-if="workOrder.gdState && workOrder.gdState.value == 4 && config.drugsStartManual">{{config.drugsStartManual.name}}</view>
28
+        <view class="btn" @click="fillInManually(config.drugsStartManual.value)" v-if="workOrder.gdState && workOrder.gdState.value == 5 && config.drugsEndManual">{{config.drugsEndManual.name}}</view>
29
+      </view>
30
+    </view>
31
+    <!-- 填写交接人工号弹窗 -->
32
+    <selectAccount @click.stop.native v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
33
+      @cancel="hosCancel">
34
+    </selectAccount>
35
+  </view>
36
+</template>
37
+<script>
38
+  import {
39
+    get,
40
+    post,
41
+    SM,
42
+    webHandle
43
+  } from "@/http/http.js";
44
+  export default {
45
+    data() {
46
+      return {
47
+        hosId: uni.getStorageSync('userData').user.currentHospital.id,
48
+        drugsBagList: [], //药包列表
49
+        queryObj: {}, //路由传递过来的数据
50
+        workOrder: {}, //工单信息
51
+        config: {}, //配置
52
+        SMFlag: true, //控制扫码
53
+        // 填写交接人工号弹窗model
54
+        hosModels: {
55
+          disjunctor: false,
56
+        },
57
+      };
58
+    },
59
+    onShow() {
60
+      this.SMFlag = true;
61
+    },
62
+    methods: {
63
+      // 手动填写
64
+      fillInManually(value){
65
+        if(value == 1){
66
+          // 填写工号
67
+          this.showSelectAccount();
68
+        }
69
+      },
70
+      // 填写交接人工号-确认
71
+      hosOk(data) {
72
+        console.log(data);
73
+        const {
74
+          accountName,
75
+          account,
76
+          accountId
77
+        } = data;
78
+        if (!accountName && !account) {
79
+          //没有填写交接人
80
+          uni.showModal({
81
+            title: "提示",
82
+            content: "请填写交接人工号!",
83
+            showCancel: false,
84
+            success: function(res) {
85
+              if (res.confirm) {
86
+                console.log("用户点击确定");
87
+              } else if (res.cancel) {
88
+                console.log("用户点击取消");
89
+              }
90
+            },
91
+          });
92
+          return;
93
+        } else if ((!accountName && account) || (accountName && !account)) {
94
+          //没有填写交接人
95
+          uni.showModal({
96
+            title: "提示",
97
+            content: "请填写正确的交接人工号!",
98
+            showCancel: false,
99
+            success: function(res) {
100
+              if (res.confirm) {
101
+                console.log("用户点击确定");
102
+              } else if (res.cancel) {
103
+                console.log("用户点击取消");
104
+              }
105
+            },
106
+          });
107
+          return;
108
+        }
109
+        this.hosModels.disjunctor = false;
110
+        this.validateAccount(data);
111
+      },
112
+      // 填写交接人工号-取消
113
+      hosCancel() {
114
+        this.hosModels.disjunctor = false;
115
+        this.flag = true;
116
+      },
117
+      // 填写交接人工号弹窗
118
+      showSelectAccount() {
119
+        this.hosModels = {
120
+          disjunctor: true,
121
+        };
122
+      },
123
+      // 手动填写工号校验
124
+      validateAccount(accountObj){
125
+        const {
126
+          accountName,
127
+          account,
128
+          accountId
129
+        } = accountObj;
130
+        uni.showLoading({
131
+          title: "加载中",
132
+          mask: true,
133
+        });
134
+
135
+        let postData = {
136
+          extraType: 'inputAccountValid',
137
+          type: this.queryObj.drugsBagType,
138
+          orderStateValue: this.workOrder.gdState.value,
139
+          userId: accountId,
140
+          orderId: this.workOrder.id,
141
+        }
142
+
143
+        post("/transflow/extra", postData)
144
+          .then((res) => {
145
+            uni.hideLoading();
146
+            if(res.state == 200){
147
+              if(res.data){
148
+                if (res.data.codeBean) {
149
+                  if(res.data.codeBean.valid){
150
+                    this.pageNavigateByConfig(this.config, this.workOrder, this.queryObj, { id: accountId, name: accountName }, res.data.codeBean.departmentDTO);
151
+                  }else{
152
+                    uni.showToast({
153
+                      icon: "none",
154
+                      title: res.data.codeBean.msg || "接口获取数据失败!",
155
+                    });
156
+                  }
157
+                } else {
158
+                  uni.showToast({
159
+                    icon: "none",
160
+                    title: "接口获取数据失败!",
161
+                  });
162
+                }
163
+              }else{
164
+                uni.showToast({
165
+                  icon: "none",
166
+                  title: "接口获取数据失败!",
167
+                });
168
+              }
169
+            }else{
170
+              uni.showToast({
171
+                icon: "none",
172
+                title: res.msg || "接口获取数据失败!",
173
+              });
174
+            }
175
+          });
176
+      },
177
+      // 工单完成
178
+      completeOrder(workOrder, queryObj, accountObj){
179
+        uni.showLoading({
180
+          title: "加载中",
181
+          mask: true,
182
+        });
183
+        let postData = {
184
+          "type": queryObj.drugsBagType,
185
+          "orderId": workOrder.id,
186
+          "handover": accountObj ? accountObj.id : undefined,
187
+        };
188
+        post('/transflow/checkComplete', postData).then(res => {
189
+          uni.hideLoading();
190
+          if(res.state == 200){
191
+            uni.showToast({
192
+              icon: "none",
193
+              title: workOrder.gdState.value == 4 ? "交接成功,请尽快送达科室!" : (workOrder.gdState.value == 5 ? "交接成功,完成配送!" : ""),
194
+              duration: 60000,
195
+              mask: true,
196
+              complete(){
197
+                setTimeout(() => {
198
+                  uni.hideToast();
199
+                  uni.redirectTo({
200
+                    url: `/pages/receiptpage/receiptpage`,
201
+                  });
202
+                }, 2000)
203
+              }
204
+            });
205
+          }else{
206
+            uni.showToast({
207
+              icon: "none",
208
+              title: res.msg || "接口获取数据失败!",
209
+            });
210
+          }
211
+        })
212
+      },
213
+      // 根据配置跳转页面
214
+      pageNavigateByConfig(config, workOrder, queryObj, accountObj, departmentDTO){
215
+        console.log(accountObj, departmentDTO);
216
+        let drugsBagType = queryObj.drugsBagType;
217
+        let orderId = workOrder.id;
218
+        if(workOrder.gdState.value == 4){
219
+          // 待到达
220
+          if(config.drugsStartPhoto === 1){
221
+            // 起点科室支持拍照留存
222
+            uni.navigateTo({
223
+              url: `/pages/newDrug/photoRetention/photoRetention?drugsBagType=${drugsBagType}&orderId=${orderId}&accountId=${accountObj ? accountObj.id : ''}&accountName=${accountObj ? accountObj.name : ''}&accountDeptName=${departmentDTO ? departmentDTO.dept : ''}`,
224
+            });
225
+          }else{
226
+            // 起点科室不支持拍照留存
227
+            this.completeOrder(workOrder, queryObj, accountObj);
228
+          }
229
+        }else if(workOrder.gdState.value == 5){
230
+          // 待送达
231
+          if(config.drugsEndPhoto === 1){
232
+            // 起点科室支持拍照留存
233
+            uni.navigateTo({
234
+              url: `/pages/newDrug/photoRetention/photoRetention?drugsBagType=${drugsBagType}&orderId=${orderId}&accountId=${accountObj ? accountObj.id : ''}&accountName=${accountObj ? accountObj.name : ''}&accountDeptName=${departmentDTO ? departmentDTO.dept : ''}`,
235
+            });
236
+          }else{
237
+            // 起点科室不支持拍照留存
238
+            this.completeOrder(workOrder, queryObj, accountObj);
239
+          }
240
+        }
241
+      },
242
+      // 扫一扫交接
243
+      scanCode(){
244
+        if (!this.SMFlag) {
245
+          return;
246
+        }
247
+        this.SMFlag = false;
248
+        SM().then((content) => {
249
+          uni.showLoading({
250
+            title: "加载中",
251
+            mask: true,
252
+          });
253
+
254
+          let postData = {
255
+            type: this.queryObj.drugsBagType,
256
+            orderStateValue: this.workOrder.gdState.value,
257
+            code: content,
258
+            orderId: this.workOrder.id,
259
+          }
260
+
261
+          post("/transflow/bigScan", postData)
262
+            .then((res) => {
263
+              this.SMFlag = true;
264
+              uni.hideLoading();
265
+              if (res.codeBean) {
266
+                if(res.codeBean.valid){
267
+                  this.pageNavigateByConfig(this.config, this.workOrder, this.queryObj, res.codeBean.userDTO, res.codeBean.departmentDTO);
268
+                }else{
269
+                  uni.showToast({
270
+                    icon: "none",
271
+                    title: res.codeBean.msg || "接口获取数据失败!",
272
+                  });
273
+                }
274
+              } else {
275
+                uni.showToast({
276
+                  icon: "none",
277
+                  title: "接口获取数据失败!",
278
+                });
279
+              }
280
+            });
281
+        }).catch(err => {
282
+          this.SMFlag = true;
283
+        });
284
+      },
285
+      // 详情
286
+      toDetail(drugsBagId){
287
+        uni.navigateTo({
288
+          url: `/pages/newDrug/detail?drugsBagType=${this.queryObj.drugsBagType}&drugsBagId=${drugsBagId}`,
289
+        });
290
+      },
291
+      // 初始化
292
+      init(){
293
+        uni.showLoading({
294
+          title: "加载中",
295
+          mask: true,
296
+        });
297
+
298
+        let info$ = post(`/transflow/extra`, {type: this.queryObj.drugsBagType, extraType: 'orderInfo', orderId: +this.queryObj.orderId, checkComplete: '1'});
299
+        let config$ = post(`/simple/data/fetchDataList/taskTypeConfig`, {
300
+            "idx": 0,
301
+            "sum": 1,
302
+            "taskTypeConfig": {
303
+                "taskTypeDTO": {
304
+                    "hosId": {
305
+                        "id": this.hosId
306
+                    },
307
+                    "ordinaryField": {
308
+                        "key": "ordinary_field",
309
+                        "value": this.queryObj.drugsBagType
310
+                    }
311
+                }
312
+            }
313
+        });
314
+
315
+        Promise.all([info$, config$]).then(result => {
316
+          uni.hideLoading();
317
+          let [info, config] = result || [];
318
+
319
+          if(info.state == 200){
320
+            if(info.data){
321
+              this.drugsBagList = info.data.drugsBagList || [];
322
+              if(Array.isArray(info.data.workOrder.endDepts)){
323
+                info.data.workOrder.endDeptNames = info.data.workOrder.endDepts.map(v => v.dept).join();
324
+              }
325
+              this.workOrder = info.data.workOrder || {};
326
+            }
327
+          }else{
328
+            uni.showToast({
329
+              icon: "none",
330
+              title: info.msg || "接口获取数据失败!",
331
+            });
332
+          }
333
+
334
+          if(config.status == 200){
335
+            let list  = config.list || [];
336
+            this.config = list.length ? list[0] : {};
337
+          }else{
338
+            uni.showToast({
339
+              icon: "none",
340
+              title: config.msg || "接口获取数据失败!",
341
+            });
342
+          }
343
+        })
344
+      },
345
+    },
346
+    onLoad(options) {
347
+      console.log(options, "options");
348
+      this.queryObj = options;
349
+      this.init();
350
+      // #ifdef APP-PLUS
351
+      webHandle("no", "app");
352
+      // #endif
353
+      // #ifdef H5
354
+      webHandle("no", "wx");
355
+      // #endif
356
+    },
357
+  };
358
+</script>
359
+<style lang="less" scoped>
360
+  .Scanning_Result {
361
+    background: #FAFBFD;
362
+    padding: 0 24rpx;
363
+    display: flex;
364
+    flex-direction: column;
365
+    height: 100vh;
366
+
367
+    .Scanning_top {
368
+      margin: 24rpx auto;
369
+      .Scanning_top_icon {
370
+        font-size: 30rpx;
371
+        font-weight: bold;
372
+        .newicon{
373
+          margin: 0 32rpx;
374
+        }
375
+      }
376
+    }
377
+
378
+    .Scanning_cont {
379
+      flex: 1;
380
+      min-height: 0;
381
+      display: flex;
382
+      flex-direction: column;
383
+      .scrollContent{
384
+        flex: 1;
385
+        min-height: 0;
386
+      }
387
+      .column{
388
+        display: flex;
389
+        justify-content: center;
390
+        align-items: center;
391
+        font-size: 28rpx;
392
+        padding: 32rpx 24rpx;
393
+        color: #565656;
394
+        border-bottom: 1rpx solid #D9D9D9;
395
+        gap: 8rpx;
396
+        &.head{
397
+          font-size: 30rpx;
398
+          color: #000000;
399
+          border: 1rpx solid #D9D9D9;
400
+          box-shadow: 0rpx 3rpx 6rpx 1rpx rgba(0,0,0,0.16);
401
+          background: #FBFCFE;
402
+        }
403
+        .value1{
404
+          flex: 2;
405
+          text-align: left;
406
+          word-break: break-all;
407
+          flex-shrink: 0;
408
+        }
409
+        .value2,.value3{
410
+          flex: 1;
411
+          text-align: center;
412
+          word-break: break-all;
413
+          flex-shrink: 0;
414
+        }
415
+      }
416
+    }
417
+
418
+    .foot_btn_spe {
419
+      margin: 24rpx 0;
420
+      display: flex;
421
+      flex-direction: column;
422
+      align-items: center;
423
+      gap: 24rpx;
424
+      font-weight: bold;
425
+
426
+      .column{
427
+        width: 100%;
428
+        height: 78rpx;
429
+        display: flex;
430
+        align-items: center;
431
+        justify-content: space-between;
432
+        gap: 24rpx;
433
+
434
+        .btn {
435
+          height: 100%;
436
+          flex: 1;
437
+          background: linear-gradient( 90deg, #6FC073 0%, #3DB197 100%);
438
+          color: #fff;
439
+          border-radius: 4rpx;
440
+          font-size: 30rpx;
441
+          display: flex;
442
+          justify-content: center;
443
+          align-items: center;
444
+        }
445
+      }
446
+    }
447
+  }
448
+</style>

+ 291 - 0
pages/newDrug/continueScanning/continueScanning.vue

@@ -0,0 +1,291 @@
1
+<template>
2
+  <view class="Scanning_Result">
3
+    <view class="Scanning_top">
4
+      <view class="Scanning_top_icon">{{scanCount}}</view>
5
+    </view>
6
+
7
+    <view class="Scanning_cont">
8
+      <scroll-view scroll-y class="scrollContent">
9
+        <view class="column">
10
+          <view class="name">单号:</view>
11
+          <view class="value">{{drugsBag.batchNo}}</view>
12
+        </view>
13
+        <view class="column">
14
+          <view class="name">申请科室:</view>
15
+          <view class="value">{{drugsBag.target ? drugsBag.target.dept : ''}}</view>
16
+        </view>
17
+        <view class="column">
18
+          <view class="name">发药科室:</view>
19
+          <view class="value">{{drugsBag.launch ? drugsBag.launch.dept : ''}}</view>
20
+        </view>
21
+        <view class="column">
22
+          <view class="name">种类数:</view>
23
+          <view class="value">{{drugsBag.drugsTypeCount}}</view>
24
+        </view>
25
+        <view class="column">
26
+          <view class="name">药品数:</view>
27
+          <view class="value">{{drugsBag.drugsCount}}</view>
28
+        </view>
29
+      </scroll-view>
30
+    </view>
31
+
32
+    <view class="foot_btn_spe">
33
+      <view class="column">
34
+        <view class="btn" @click="Scanning_again()">继续扫描</view>
35
+        <view class="btn" @click="hand_again()">手动录入</view>
36
+      </view>
37
+      <view class="column">
38
+        <view class="btn" @click="checkHandover()">核对交接</view>
39
+      </view>
40
+    </view>
41
+    <!-- 手动查询药品弹窗 -->
42
+    <handViewDrugsBag v-if="drugbagModels.disjunctor" :title="drugbagModels.title"
43
+      :disjunctor="drugbagModels.disjunctor" @ok="drugbagOk" @cancel="drugbagCancel">
44
+    </handViewDrugsBag>
45
+  </view>
46
+</template>
47
+<script>
48
+  import {
49
+    get,
50
+    post,
51
+    SM,
52
+    webHandle
53
+  } from "@/http/http.js";
54
+  export default {
55
+    data() {
56
+      return {
57
+        drugsBag: {}, //药包信息
58
+        queryObj: {}, //路由传递过来的数据
59
+        scanCount: '', //已扫描数量
60
+        SMFlag: true,
61
+        // 手动查询弹窗model
62
+        drugbagModels: {
63
+          disjunctor: false,
64
+        },
65
+      };
66
+    },
67
+    onShow() {
68
+      this.SMFlag = true;
69
+    },
70
+    methods: {
71
+      // 手动查询药品-确认
72
+      drugbagOk(data) {
73
+        console.log(data);
74
+        if (!data.id) {
75
+          //没有查询到药品
76
+          uni.showModal({
77
+            title: '提示',
78
+            content: "没有查询到发药单号!",
79
+            showCancel: false,
80
+            success: function(res) {
81
+              if (res.confirm) {
82
+                console.log('用户点击确定');
83
+              } else if (res.cancel) {
84
+                console.log('用户点击取消');
85
+              }
86
+            }
87
+          });
88
+          return;
89
+        }
90
+        this.drugbagModels.disjunctor = false;
91
+        this.hand_scanning_common(data.packid, 'hand');
92
+      },
93
+      // 手动查询药品-取消
94
+      drugbagCancel() {
95
+        this.drugbagModels.disjunctor = false;
96
+      },
97
+      // 手动查询药品弹窗
98
+      showHandViewDrugsbag() {
99
+        this.drugbagModels = {
100
+          title: '填写发药单号',
101
+          disjunctor: true,
102
+        }
103
+      },
104
+      // 手动录入
105
+      hand_again() {
106
+        this.showHandViewDrugsbag();
107
+      },
108
+      // 核对交接
109
+      checkHandover(){
110
+        uni.navigateTo({
111
+          url: `/pages/newDrug/checkPage/checkPage?drugsBagType=${this.queryObj.drugsBagType}&orderId=${this.queryObj.orderId}`,
112
+        });
113
+      },
114
+      // 继续扫描
115
+      Scanning_again(isFlag = false) {
116
+        if (!this.SMFlag) {
117
+          return;
118
+        }
119
+        this.SMFlag = false;
120
+        SM().then((ress1) => {
121
+          this.hand_scanning_common(ress1, 'scan', isFlag);
122
+        }).catch(err => {
123
+          this.SMFlag = true;
124
+        });
125
+      },
126
+      // 手动输入和扫码公共方法
127
+      hand_scanning_common(ress1, type, isFlag = false) {
128
+        // ----------------
129
+        uni.showLoading({
130
+          title: "加载中",
131
+          mask: true,
132
+        });
133
+        //检验二维码的有效性
134
+        post("/dept/scanning", {
135
+          content: ress1,
136
+        }).then((result) => {
137
+          this.SMFlag = true;
138
+          if (result.state == 200 || result.state == 201) {
139
+            let codes = result.code;
140
+            if (codes) {
141
+              this.input_common(ress1, type, isFlag);
142
+            } else {
143
+              uni.hideLoading();
144
+            }
145
+          } else {
146
+            uni.hideLoading();
147
+            uni.showToast({
148
+              icon: "none",
149
+              title: result.info || "接口获取数据失败!",
150
+            });
151
+          }
152
+        });
153
+        // ------------------------------
154
+      },
155
+      // 录入到工单
156
+      input_common(ress1, type, isFlag = false){
157
+        uni.showLoading({
158
+          title: "加载中",
159
+          mask: true,
160
+        });
161
+        post("/transflow/scanBind", { type: this.queryObj.drugsBagType, orderId: this.queryObj.orderId, code: ress1 }).then((ress) => {
162
+          uni.hideLoading();
163
+          if (ress.state == 200) {
164
+            if(ress.data.msg){
165
+              uni.showToast({
166
+                icon: "none",
167
+                title: ress.data.msg || "接口获取数据失败!",
168
+              });
169
+            }else{
170
+              uni.redirectTo({
171
+                url: `/pages/newDrug/continueScanning/continueScanning?drugsBagType=${this.queryObj.drugsBagType}&orderId=${this.queryObj.orderId}&scanOrHand=${type}&drugsBagId=${this.queryObj.drugsBagId}&orderStateValue=${this.queryObj.orderStateValue}`,
172
+              });
173
+            }
174
+          } else {
175
+            uni.showToast({
176
+              icon: "none",
177
+              title: ress.msg || "接口获取数据失败!",
178
+            });
179
+          }
180
+        });
181
+      },
182
+      //获取页面信息
183
+      getInfo(){
184
+        uni.showLoading({
185
+          title: "加载中",
186
+          mask: true,
187
+        });
188
+
189
+        post(`/transflow/scanInfo`, {type: this.queryObj.drugsBagType, id: +this.queryObj.drugsBagId, orderStateValue: this.queryObj.orderStateValue, orderId: +this.queryObj.orderId}).then(res => {
190
+          uni.hideLoading();
191
+          if(res.state == 200){
192
+            if(res.data){
193
+              this.scanCount = res.data.scanCount;
194
+              this.drugsBag = res.data.dto || {};
195
+            }
196
+          }else{
197
+            uni.showToast({
198
+              icon: "none",
199
+              title: res.msg || "接口获取数据失败!",
200
+            });
201
+          }
202
+        })
203
+      },
204
+    },
205
+    onLoad(options) {
206
+      console.log(options, "options");
207
+      this.queryObj = options;
208
+      this.getInfo();
209
+      // #ifdef APP-PLUS
210
+      webHandle("no", "app");
211
+      // #endif
212
+      // #ifdef H5
213
+      webHandle("no", "wx");
214
+      // #endif
215
+    },
216
+  };
217
+</script>
218
+<style lang="less" scoped>
219
+  .Scanning_Result {
220
+    background: #FAFBFD;
221
+    padding: 0 24rpx;
222
+    display: flex;
223
+    flex-direction: column;
224
+    height: 100vh;
225
+
226
+    .Scanning_top {
227
+      margin: 24rpx auto;
228
+      .Scanning_top_icon {
229
+        font-size: 140rpx;
230
+        color: #FF0000;
231
+        font-weight: bold;
232
+      }
233
+    }
234
+
235
+    .Scanning_cont {
236
+      flex: 1;
237
+      min-height: 0;
238
+      display: flex;
239
+      flex-direction: column;
240
+      .scrollContent{
241
+        flex: 1;
242
+        min-height: 0;
243
+      }
244
+      .column{
245
+        display: flex;
246
+        justify-content: center;
247
+        align-items: center;
248
+        font-size: 30rpx;
249
+        margin-bottom: 32rpx;
250
+        .name{
251
+          font-weight: bold;
252
+          word-break: break-all;
253
+          flex-shrink: 0;
254
+        }
255
+        .value{
256
+          word-break: break-all;
257
+        }
258
+      }
259
+    }
260
+
261
+    .foot_btn_spe {
262
+      margin: 24rpx 0;
263
+      display: flex;
264
+      flex-direction: column;
265
+      align-items: center;
266
+      gap: 24rpx;
267
+      font-weight: bold;
268
+
269
+      .column{
270
+        width: 100%;
271
+        height: 78rpx;
272
+        display: flex;
273
+        align-items: center;
274
+        justify-content: space-between;
275
+        gap: 24rpx;
276
+
277
+        .btn {
278
+          height: 100%;
279
+          flex: 1;
280
+          background: linear-gradient( 90deg, #6FC073 0%, #3DB197 100%);
281
+          color: #fff;
282
+          border-radius: 4rpx;
283
+          font-size: 30rpx;
284
+          display: flex;
285
+          justify-content: center;
286
+          align-items: center;
287
+        }
288
+      }
289
+    }
290
+  }
291
+</style>

+ 311 - 0
pages/newDrug/createOrder/createOrder.vue

@@ -0,0 +1,311 @@
1
+<template>
2
+  <view class="Scanning_Result">
3
+    <view class="Scanning_top">
4
+      <view class="Scanning_top_icon">
5
+        <text class="cubeic-ok newicon newicon-duigou"></text>
6
+      </view>
7
+    </view>
8
+
9
+    <view class="Scanning_cont">
10
+      <scroll-view scroll-y class="scrollContent">
11
+        <view class="column">
12
+          <view class="name">单号:</view>
13
+          <view class="value">{{drugsBag.batchNo}}</view>
14
+        </view>
15
+        <view class="column">
16
+          <view class="name">申请科室:</view>
17
+          <view class="value">{{drugsBag.target ? drugsBag.target.dept : ''}}</view>
18
+        </view>
19
+        <view class="column">
20
+          <view class="name">发药科室:</view>
21
+          <view class="value">{{drugsBag.launch ? drugsBag.launch.dept : ''}}</view>
22
+        </view>
23
+        <view class="column">
24
+          <view class="name">种类数:</view>
25
+          <view class="value">{{drugsBag.drugsTypeCount}}</view>
26
+        </view>
27
+        <view class="column">
28
+          <view class="name">药品数:</view>
29
+          <view class="value">{{drugsBag.drugsCount}}</view>
30
+        </view>
31
+      </scroll-view>
32
+    </view>
33
+
34
+    <view class="foot_btn_spe">
35
+      <view class="column">
36
+        <view class="btn" @click="goIndex()">知道了</view>
37
+        <view class="btn" @click="createOrBuildOrder()" v-if="queryObj.type === 'build' && config.drugsCreateSign === 1">建单并签到</view>
38
+        <view class="btn" @click="createOrBuildOrder(orderId)" v-if="queryObj.type === 'receive' && config.drugsReceiveSign === 1">接单并签到</view>
39
+      </view>
40
+    </view>
41
+  </view>
42
+</template>
43
+<script>
44
+  import {
45
+    get,
46
+    post,
47
+    SM,
48
+    webHandle
49
+  } from "@/http/http.js";
50
+  export default {
51
+    data() {
52
+      return {
53
+        queryObj: {}, //路由传递过来的数据
54
+        drugsBag: {}, //药包信息
55
+        config: {}, //药品的业务流程配置
56
+        orderId: undefined, //根据药包查询到的工单ID
57
+      };
58
+    },
59
+    methods: {
60
+      // 知道了
61
+      goIndex(){
62
+       uni.redirectTo({
63
+         url: `/pages/receiptpage/receiptpage`,
64
+       });
65
+      },
66
+      // 根据配置跳转页面
67
+      pageNavigateByConfig(config, responseData, queryObj){
68
+        let drugsBagType = queryObj.drugsBagType;
69
+        let orderId = responseData.orderId;
70
+        let drugsBagId = queryObj.drugsBagId;
71
+        let orderStateValue = responseData.orderStateValue;
72
+        if(config.drugsModel === 1){
73
+          // 一单一码
74
+          if(responseData.orderStateValue == 4){
75
+            // 待到达
76
+            if(config.drugsStartCheck === 1){
77
+              // 起点科室支持核对
78
+              uni.navigateTo({
79
+                url: `/pages/newDrug/checkPage/checkPage?drugsBagType=${drugsBagType}&orderId=${orderId}`,
80
+              });
81
+            }else{
82
+              // 起点科室不支持核对
83
+              if(config.drugsStartPhoto === 1){
84
+                // 起点科室支持拍照留存
85
+                uni.navigateTo({
86
+                  url: `/pages/newDrug/photoRetention/photoRetention?drugsBagType=${drugsBagType}&orderId=${orderId}`,
87
+                });
88
+              }else{
89
+                // 起点科室不支持拍照留存
90
+                this.completeOrder(responseData, queryObj);
91
+              }
92
+            }
93
+          }else if(responseData.orderStateValue == 5){
94
+            // 待送达
95
+            if(config.drugsEndCheck === 1){
96
+              // 起点科室支持核对
97
+              uni.navigateTo({
98
+                url: `/pages/newDrug/checkPage/checkPage?drugsBagType=${drugsBagType}&orderId=${orderId}`,
99
+              });
100
+            }else{
101
+              // 起点科室不支持核对
102
+              if(config.drugsEndPhoto === 1){
103
+                // 起点科室支持拍照留存
104
+                uni.navigateTo({
105
+                  url: `/pages/newDrug/photoRetention/photoRetention?drugsBagType=${drugsBagType}&orderId=${orderId}`,
106
+                });
107
+              }else{
108
+                // 起点科室不支持拍照留存
109
+                this.completeOrder(responseData, queryObj);
110
+              }
111
+            }
112
+          }
113
+        }else if(config.drugsModel === 2){
114
+          // 一单多码
115
+          uni.navigateTo({
116
+            url: `/pages/newDrug/continueScanning/continueScanning?drugsBagType=${drugsBagType}&orderId=${orderId}&drugsBagId=${drugsBagId}&orderStateValue=${orderStateValue}`,
117
+          });
118
+        }
119
+      },
120
+      // 工单完成
121
+      completeOrder(responseData, queryObj){
122
+        uni.showLoading({
123
+          title: "加载中",
124
+          mask: true,
125
+        });
126
+        let postData = {
127
+          "type": queryObj.drugsBagType,
128
+          "orderId": responseData.orderId,
129
+        };
130
+        post('/transflow/checkComplete', postData).then(res => {
131
+          uni.hideLoading();
132
+          if(res.state == 200){
133
+            uni.showToast({
134
+              icon: "none",
135
+              title: responseData.orderStateValue == 4 ? "交接成功,请尽快送达科室!" : (responseData.orderStateValue == 5 ? "交接成功,完成配送!" : ""),
136
+              duration: 60000,
137
+              mask: true,
138
+              complete(){
139
+                setTimeout(() => {
140
+                  uni.hideToast();
141
+                  uni.redirectTo({
142
+                    url: `/pages/receiptpage/receiptpage`,
143
+                  });
144
+                }, 2000)
145
+              }
146
+            });
147
+          }else{
148
+            uni.showToast({
149
+              icon: "none",
150
+              title: res.msg || "接口获取数据失败!",
151
+            });
152
+          }
153
+        })
154
+      },
155
+      // 建单并签到/接单并签到-orderId
156
+      createOrBuildOrder(orderId){
157
+        uni.showModal({
158
+          title: "提示",
159
+          content: `请确认是否${orderId ? '接' : '建'}单并签到?`,
160
+          success: (result) => {
161
+            if (result.confirm) {
162
+              console.log("用户点击确定");
163
+              let postData = {
164
+                type: this.queryObj.drugsBagType,
165
+                id: +this.queryObj.drugsBagId,
166
+                orderId,
167
+              };
168
+              uni.showLoading({
169
+                title: "加载中",
170
+                mask: true,
171
+              });
172
+              post(`/transflow/createOrTakeOrder`, postData).then((ress) => {
173
+                uni.hideLoading();
174
+                if (ress.state == 200) {
175
+                  if(ress.data.msg){
176
+                    uni.showToast({
177
+                      icon: "none",
178
+                      title: ress.data.msg || "接口获取数据失败!",
179
+                    });
180
+                  }else{
181
+                    this.pageNavigateByConfig(this.config, ress.data, this.queryObj);
182
+                  }
183
+                } else {
184
+                  uni.showToast({
185
+                    icon: "none",
186
+                    title: ress.msg || "接口获取数据失败!",
187
+                  });
188
+                }
189
+              });
190
+            } else if (result.cancel) {
191
+              console.log("用户点击取消");
192
+            }
193
+          },
194
+        });
195
+      },
196
+      //获取页面信息
197
+      getInfo(){
198
+        uni.showLoading({
199
+          title: "加载中",
200
+          mask: true,
201
+        });
202
+
203
+        post(`/transflow/scanInfo`, {type: this.queryObj.drugsBagType, id: +this.queryObj.drugsBagId, orderStateValue: '4'}).then(res => {
204
+          uni.hideLoading();
205
+          if(res.state == 200){
206
+            if(res.data){
207
+              this.drugsBag = res.data.dto || {};
208
+              this.orderId = this.queryObj.orderId;
209
+              this.config = res.data.taskTypeConfig || {};
210
+            }
211
+          }else{
212
+            uni.showToast({
213
+              icon: "none",
214
+              title: res.msg || "接口获取数据失败!",
215
+            });
216
+          }
217
+        })
218
+      },
219
+    },
220
+    onLoad(options) {
221
+      console.log(options, "options");
222
+      this.queryObj = options;
223
+      this.getInfo();
224
+      // #ifdef APP-PLUS
225
+      webHandle("no", "app");
226
+      // #endif
227
+      // #ifdef H5
228
+      webHandle("no", "wx");
229
+      // #endif
230
+    },
231
+  };
232
+</script>
233
+<style lang="less" scoped>
234
+  .Scanning_Result {
235
+    background: #FAFBFD;
236
+    padding: 0 24rpx;
237
+    display: flex;
238
+    flex-direction: column;
239
+    height: 100vh;
240
+
241
+    .Scanning_top {
242
+      margin: 50rpx auto 64rpx;
243
+      .Scanning_top_icon {
244
+        width: 128rpx;
245
+        height: 128rpx;
246
+        border-radius: 50%;
247
+
248
+        .cubeic-ok {
249
+          font-size: 128rpx;
250
+          color: #35b34a;
251
+        }
252
+      }
253
+    }
254
+
255
+    .Scanning_cont {
256
+      flex: 1;
257
+      min-height: 0;
258
+      display: flex;
259
+      flex-direction: column;
260
+      .scrollContent{
261
+        flex: 1;
262
+        min-height: 0;
263
+      }
264
+      .column{
265
+        display: flex;
266
+        justify-content: center;
267
+        align-items: center;
268
+        font-size: 30rpx;
269
+        margin-bottom: 32rpx;
270
+        .name{
271
+          font-weight: bold;
272
+          word-break: break-all;
273
+          flex-shrink: 0;
274
+        }
275
+        .value{
276
+          word-break: break-all;
277
+        }
278
+      }
279
+    }
280
+
281
+    .foot_btn_spe {
282
+      margin: 24rpx 0;
283
+      display: flex;
284
+      flex-direction: column;
285
+      align-items: center;
286
+      gap: 24rpx;
287
+      font-weight: bold;
288
+
289
+      .column{
290
+        width: 100%;
291
+        height: 78rpx;
292
+        display: flex;
293
+        align-items: center;
294
+        justify-content: space-between;
295
+        gap: 24rpx;
296
+
297
+        .btn {
298
+          height: 100%;
299
+          flex: 1;
300
+          background: linear-gradient( 90deg, #6FC073 0%, #3DB197 100%);
301
+          color: #fff;
302
+          border-radius: 4rpx;
303
+          font-size: 30rpx;
304
+          display: flex;
305
+          justify-content: center;
306
+          align-items: center;
307
+        }
308
+      }
309
+    }
310
+  }
311
+</style>

+ 220 - 0
pages/newDrug/detail.vue

@@ -0,0 +1,220 @@
1
+<template>
2
+  <view class="Scanning_Result">
3
+    <view class="Scanning_top">
4
+      <view class="Scanning_top_icon">{{drugsBag.batchNo}}</view>
5
+    </view>
6
+    <view class="Scanning_top_tips">
7
+      <view class="info">申请:{{drugsBag.target ? drugsBag.target.dept : ''}}</view>
8
+      <view class="info">发药:{{drugsBag.launch ? drugsBag.launch.dept : ''}}</view>
9
+    </view>
10
+
11
+    <view class="Scanning_cont">
12
+      <view class="column head">
13
+        <view class="value1">药品名称+规格<text class="red">({{drugsList.length}})</text></view>
14
+        <view class="value2">数量</view>
15
+      </view>
16
+      <scroll-view scroll-y class="scrollContent">
17
+        <view class="column" v-for="item in drugsList" :key="item.id">
18
+          <view class="value1">{{item.drugsInfo}} {{item.model}}</view>
19
+          <view class="value2">{{item.drugsNum}}</view>
20
+        </view>
21
+      </scroll-view>
22
+    </view>
23
+
24
+    <view class="foot_btn_spe">
25
+      <view class="column">
26
+        <view class="btn" @click="goBack()">返回</view>
27
+      </view>
28
+    </view>
29
+  </view>
30
+</template>
31
+<script>
32
+  import {
33
+    get,
34
+    post,
35
+    SM,
36
+    webHandle
37
+  } from "@/http/http.js";
38
+  export default {
39
+    data() {
40
+      return {
41
+        hosId: uni.getStorageSync('userData').user.currentHospital.id,
42
+        drugsList: [], //药品列表
43
+        queryObj: {}, //路由传递过来的数据
44
+        drugsBag: {}, //药包信息
45
+        config: {}, //配置
46
+      };
47
+    },
48
+    methods: {
49
+      // 返回
50
+      goBack(){
51
+        uni.navigateBack()
52
+      },
53
+      // 根据药包id查询药品
54
+      getDrugsByDrugsBugId(drugsBagId){
55
+        post(`/transflow/extra`, {type: this.queryObj.drugsBagType, extraType: 'drugsInfo', drugsBagId}).then(res => {
56
+          uni.hideLoading();
57
+          if(res.state == 200){
58
+            if(res.data){
59
+              this.drugsList = res.data.drugsList || [];
60
+              this.drugsBag = res.data.drugsBag || {};
61
+            }
62
+          }else{
63
+            uni.showToast({
64
+              icon: "none",
65
+              title: res.msg || "接口获取数据失败!",
66
+            });
67
+          }
68
+        })
69
+      },
70
+      //获取页面信息
71
+      getInfo(){
72
+        uni.showLoading({
73
+          title: "加载中",
74
+          mask: true,
75
+        });
76
+        
77
+        if(this.queryObj.drugsBagId){
78
+          // 根据药包id查询药品
79
+          this.getDrugsByDrugsBugId(this.queryObj.drugsBagId);
80
+        }else if(this.queryObj.orderId){
81
+          // 根据工单id查询药包,此时必是一单一码,即只有一个药包码
82
+          post(`/transflow/extra`, {type: this.queryObj.drugsBagType, extraType: 'orderInfo', orderId: +this.queryObj.orderId}).then(res => {
83
+            if(res.state == 200){
84
+              if(res.data){
85
+                let drugsBagList = res.data.drugsBagList || [];
86
+                let drugsBag = drugsBagList[0] || {};
87
+                if(drugsBag.id){
88
+                  this.getDrugsByDrugsBugId(drugsBag.id);
89
+                }else{
90
+                  uni.hideLoading();
91
+                  uni.showToast({
92
+                    icon: "none",
93
+                    title: "未查询到药品!",
94
+                  });
95
+                }
96
+              }else{
97
+                uni.hideLoading();
98
+              }
99
+            }else{
100
+              uni.hideLoading();
101
+              uni.showToast({
102
+                icon: "none",
103
+                title: res.msg || "接口获取数据失败!",
104
+              });
105
+            }
106
+          })
107
+        }
108
+      },
109
+    },
110
+    onLoad(options) {
111
+      console.log(options, "options");
112
+      this.queryObj = options;
113
+      this.getInfo();
114
+      // #ifdef APP-PLUS
115
+      webHandle("no", "app");
116
+      // #endif
117
+      // #ifdef H5
118
+      webHandle("no", "wx");
119
+      // #endif
120
+    },
121
+  };
122
+</script>
123
+<style lang="less" scoped>
124
+  .Scanning_Result {
125
+    background: #FAFBFD;
126
+    padding: 0 24rpx;
127
+    display: flex;
128
+    flex-direction: column;
129
+    height: 100vh;
130
+
131
+    .Scanning_top {
132
+      margin: 32rpx auto;
133
+      .Scanning_top_icon {
134
+        font-size: 30rpx;
135
+        font-weight: bold;
136
+        .newicon{
137
+          margin: 0 32rpx;
138
+        }
139
+      }
140
+    }
141
+    .Scanning_top_tips{
142
+      display: flex;
143
+      align-items: center;
144
+      justify-content: center;
145
+      font-size: 28rpx;
146
+      margin-bottom: 32rpx;
147
+      gap: 64rpx;
148
+    }
149
+
150
+    .Scanning_cont {
151
+      flex: 1;
152
+      min-height: 0;
153
+      display: flex;
154
+      flex-direction: column;
155
+      .scrollContent{
156
+        flex: 1;
157
+        min-height: 0;
158
+      }
159
+      .column{
160
+        display: flex;
161
+        justify-content: center;
162
+        align-items: center;
163
+        font-size: 28rpx;
164
+        padding: 32rpx 24rpx;
165
+        color: #565656;
166
+        border-bottom: 1rpx solid #D9D9D9;
167
+        gap: 8rpx;
168
+        &.head{
169
+          font-size: 30rpx;
170
+          color: #000000;
171
+          border: 1rpx solid #D9D9D9;
172
+          box-shadow: 0rpx 3rpx 6rpx 1rpx rgba(0,0,0,0.16);
173
+          background: #FBFCFE;
174
+        }
175
+        .value1{
176
+          flex: 2;
177
+          text-align: left;
178
+          word-break: break-all;
179
+          flex-shrink: 0;
180
+        }
181
+        .value2,.value3{
182
+          flex: 1;
183
+          text-align: center;
184
+          word-break: break-all;
185
+          flex-shrink: 0;
186
+        }
187
+      }
188
+    }
189
+
190
+    .foot_btn_spe {
191
+      margin: 24rpx 0;
192
+      display: flex;
193
+      flex-direction: column;
194
+      align-items: center;
195
+      gap: 24rpx;
196
+      font-weight: bold;
197
+      
198
+      .column{
199
+        width: 100%;
200
+        height: 78rpx;
201
+        display: flex;
202
+        align-items: center;
203
+        justify-content: space-between;
204
+        gap: 24rpx;
205
+        
206
+        .btn {
207
+          height: 100%;
208
+          flex: 1;
209
+          background: linear-gradient( 90deg, #6FC073 0%, #3DB197 100%);
210
+          color: #fff;
211
+          border-radius: 4rpx;
212
+          font-size: 30rpx;
213
+          display: flex;
214
+          justify-content: center;
215
+          align-items: center;
216
+        }
217
+      }
218
+    }
219
+  }
220
+</style>

+ 189 - 0
pages/newDrug/list.vue

@@ -0,0 +1,189 @@
1
+<template>
2
+  <view class="Scanning_Result">
3
+    <view class="Scanning_cont">
4
+      <scroll-view scroll-y class="scrollContent">
5
+        <view class="column" v-for="item in drugsBagList" :key="item.id" @click="toDetail(item.id)">
6
+          <view class="head">
7
+            <view class="name">{{item.batchNo}}</view>
8
+            <view class="value">{{item.drugsState ? item.drugsState.name : ''}}</view>
9
+          </view>
10
+          <view class="body">
11
+            <view class="bodyColumn">
12
+              <view class="name">种类数:{{item.drugsTypeCount}}</view>
13
+              <view class="value">总数:{{item.drugsCount}}</view>
14
+            </view>
15
+            <view class="bodyColumn">
16
+              <view class="name">收取人:<template v-if="item.startLog">{{item.startLog.username}}</template></view>
17
+              <view class="value">收取时间:<template v-if="item.startLog">{{item.startLog.operationTime | formatDate('yyyy-MM-dd hh:mm')}}</template></view>
18
+            </view>
19
+            <view class="bodyColumn">
20
+              <view class="name">送达人:<template v-if="item.endLog">{{item.endLog.username}}</template></view>
21
+              <view class="value">送达时间:<template v-if="item.endLog">{{item.endLog.operationTime | formatDate('yyyy-MM-dd hh:mm')}}</template></view>
22
+            </view>
23
+            <view class="bodyColumn">
24
+              <view class="name">收取交接人:<template v-if="item.startLog">{{item.startLog.handoverName}}</template></view>
25
+              <view class="name">送达交接人:<template v-if="item.endLog">{{item.endLog.handoverName}}</template></view>
26
+            </view>
27
+          </view>
28
+        </view>
29
+      </scroll-view>
30
+    </view>
31
+  </view>
32
+</template>
33
+<script>
34
+  import {
35
+    get,
36
+    post,
37
+    SM,
38
+    webHandle
39
+  } from "@/http/http.js";
40
+  export default {
41
+    data() {
42
+      return {
43
+        hosId: uni.getStorageSync('userData').user.currentHospital.id,
44
+        drugsBagList: [], //药包列表
45
+        queryObj: {}, //路由传递过来的数据
46
+        workOrder: {}, //工单信息
47
+        config: {}, //配置
48
+      };
49
+    },
50
+    methods: {
51
+      // 详情
52
+      toDetail(drugsBagId){
53
+        uni.navigateTo({
54
+          url: `/pages/newDrug/detail?drugsBagType=${this.queryObj.drugsBagType}&drugsBagId=${drugsBagId}`,
55
+        });
56
+      },
57
+      //获取页面信息
58
+      getInfo(){
59
+        uni.showLoading({
60
+          title: "加载中",
61
+          mask: true,
62
+        });
63
+
64
+        post(`/transflow/extra`, {type: this.queryObj.drugsBagType, extraType: 'orderInfo', orderId: +this.queryObj.orderId}).then(res => {
65
+          uni.hideLoading();
66
+          if(res.state == 200){
67
+            if(res.data){
68
+              this.drugsBagList = res.data.drugsBagList || [];
69
+              this.workOrder = res.data.workOrder || {};
70
+            }
71
+          }else{
72
+            uni.showToast({
73
+              icon: "none",
74
+              title: res.msg || "接口获取数据失败!",
75
+            });
76
+          }
77
+        })
78
+      },
79
+    },
80
+    onLoad(options) {
81
+      console.log(options, "options");
82
+      this.queryObj = options;
83
+      this.getInfo();
84
+      // #ifdef APP-PLUS
85
+      webHandle("no", "app");
86
+      // #endif
87
+      // #ifdef H5
88
+      webHandle("no", "wx");
89
+      // #endif
90
+    },
91
+  };
92
+</script>
93
+<style lang="less" scoped>
94
+  .Scanning_Result {
95
+    background: #F7F7F7;
96
+    display: flex;
97
+    flex-direction: column;
98
+    height: 100vh;
99
+
100
+    .Scanning_top {
101
+      margin: 32rpx auto;
102
+      .Scanning_top_icon {
103
+        font-size: 30rpx;
104
+        font-weight: bold;
105
+        .newicon{
106
+          margin: 0 32rpx;
107
+        }
108
+      }
109
+    }
110
+    .Scanning_top_tips{
111
+      display: flex;
112
+      align-items: center;
113
+      justify-content: center;
114
+      font-size: 28rpx;
115
+      margin-bottom: 32rpx;
116
+      gap: 64rpx;
117
+    }
118
+
119
+    .Scanning_cont {
120
+      flex: 1;
121
+      min-height: 0;
122
+      display: flex;
123
+      flex-direction: column;
124
+      .scrollContent{
125
+        flex: 1;
126
+        min-height: 0;
127
+        overflow: hidden;
128
+      }
129
+      .column{
130
+        background: #FFFFFF;
131
+        font-size: 24rpx;
132
+        margin-bottom: 16rpx;
133
+        .head{
134
+          padding: 24rpx;
135
+          display: flex;
136
+          justify-content: space-between;
137
+          align-content: center;
138
+          border-bottom: 1rpx solid #D2D2D2;
139
+          font-weight: bold;
140
+        }
141
+        .body{
142
+          padding: 24rpx;
143
+          .bodyColumn{
144
+            display: flex;
145
+            justify-content: space-between;
146
+            align-content: center;
147
+            margin-top: 24rpx;
148
+            &:first-of-type{
149
+              margin-top: 0;
150
+            }
151
+            .value{
152
+              text-align: left;
153
+            }
154
+          }
155
+        }
156
+      }
157
+    }
158
+
159
+    .foot_btn_spe {
160
+      margin: 24rpx 0;
161
+      display: flex;
162
+      flex-direction: column;
163
+      align-items: center;
164
+      gap: 24rpx;
165
+      font-weight: bold;
166
+
167
+      .column{
168
+        width: 100%;
169
+        height: 78rpx;
170
+        display: flex;
171
+        align-items: center;
172
+        justify-content: space-between;
173
+        gap: 24rpx;
174
+
175
+        .btn {
176
+          height: 100%;
177
+          flex: 1;
178
+          background: linear-gradient( 90deg, #6FC073 0%, #3DB197 100%);
179
+          color: #fff;
180
+          border-radius: 4rpx;
181
+          font-size: 30rpx;
182
+          display: flex;
183
+          justify-content: center;
184
+          align-items: center;
185
+        }
186
+      }
187
+    }
188
+  }
189
+</style>

+ 371 - 0
pages/newDrug/photoRetention/photoRetention.vue

@@ -0,0 +1,371 @@
1
+<template>
2
+  <view class="Scanning_Result">
3
+    <view class="Scanning_top">
4
+      <view class="Scanning_top_icon">
5
+        您需要上传图片留存,请拍摄照片上传!
6
+      </view>
7
+    </view>
8
+
9
+    <view class="Scanning_cont">
10
+      <scroll-view scroll-y class="scrollContent">
11
+        <view class="content">
12
+          <view class="dept">
13
+            {{workOrder.startDept ? workOrder.startDept.dept : ''}}<text class="newicon newicon-arrow-right-full"></text>{{workOrder.endDeptNames || ''}}
14
+          </view>
15
+          <view class="column">
16
+            <view class="name">工单单号:</view>
17
+            <view class="value">{{workOrder.gdcode}}</view>
18
+          </view>
19
+          <view class="column">
20
+            <view class="name">任务类型:</view>
21
+            <view class="value">{{workOrder.taskType ? workOrder.taskType.taskName : ''}}</view>
22
+          </view>
23
+          <view class="column">
24
+            <view class="name">签到科室:</view>
25
+            <view class="value">{{queryObj.accountDeptName}}</view>
26
+          </view>
27
+          <view class="column" v-if="queryObj.accountName">
28
+            <view class="name">交接人:</view>
29
+            <view class="value">{{queryObj.accountName}}</view>
30
+          </view>
31
+          <template v-if="config.drugsModel === 1">
32
+            <view class="column">
33
+              <view class="name">药品数:</view>
34
+              <view class="value">{{drugsBagList.length ? drugsBagList[0].drugsCount : ''}}</view>
35
+            </view>
36
+            <view class="column">
37
+              <view class="name">药品单号:</view>
38
+              <view class="value">{{drugsBagList.length ? drugsBagList[0].batchNo : ''}}</view>
39
+            </view>
40
+          </template>
41
+          <template v-if="config.drugsModel === 2">
42
+            <view class="column">
43
+              <view class="name">药单数:</view>
44
+              <view class="value">{{drugsBagList.length}}</view>
45
+            </view>
46
+          </template>
47
+          <view class="column top">
48
+            <view class="name">留存照片:</view>
49
+            <view class="value flex1">
50
+              <uni-file-picker ref="handlerImgRef" file-mediatype="image" v-model="imgList" limit="1" @success="handlerImgSuccess" @fail="handlerImgFail" @select="handlerImgSelect" @delete="handlerImgDelete"></uni-file-picker>
51
+              <text class="imgTips">(支持JPG/PNG格式图片,单张大小10M以内)</text>
52
+            </view>
53
+          </view>
54
+        </view>
55
+      </scroll-view>
56
+    </view>
57
+
58
+    <view class="foot_btn_spe">
59
+      <view class="column">
60
+        <view class="btn" @click="goBack()">返回</view>
61
+        <view class="btn" @click="completeOrder()">提交</view>
62
+      </view>
63
+    </view>
64
+  </view>
65
+</template>
66
+<script>
67
+  import { uploadFile } from '@/tools/uploadFile.js'
68
+  import {
69
+    get,
70
+    post,
71
+    SM,
72
+    webHandle
73
+  } from "@/http/http.js";
74
+  export default {
75
+    data() {
76
+      return {
77
+        imgList: [],//图片列表
78
+        hosId: uni.getStorageSync('userData').user.currentHospital.id,
79
+        queryObj: {}, //路由传递过来的数据
80
+        drugsBagList: [], //药包列表
81
+        drugsList: [], //药品列表
82
+        workOrder: {}, //工单信息
83
+        config: {}, //配置
84
+      };
85
+    },
86
+    methods: {
87
+      // 返回
88
+      goBack(){
89
+       uni.navigateBack();
90
+      },
91
+      // 工单完成
92
+      completeOrder(){
93
+        if(!this.imgList.length){
94
+          uni.showToast({
95
+            icon: 'none',
96
+            title: '请上传留存照片!'
97
+          });
98
+          return;
99
+        }
100
+        uni.showLoading({
101
+          title: "加载中",
102
+          mask: true,
103
+        });
104
+        if(this.imgList.length){
105
+          // 有图片
106
+          this.$refs.handlerImgRef.upload();
107
+        }else{
108
+          // 没有图片
109
+          let handlerOrder$ = this.handlerOrder();
110
+          let requestList = [handlerOrder$];
111
+          Promise.all(requestList).then(resList => {
112
+            uni.hideLoading();
113
+            console.log(resList);
114
+            if(resList[0].state == 200){
115
+              uni.showToast({
116
+                icon: "none",
117
+                title: this.workOrder.gdState.value == 4 ? "交接成功,请尽快送达科室!" : (this.workOrder.gdState.value == 5 ? "交接成功,完成配送!" : ""),
118
+                duration: 60000,
119
+                mask: true,
120
+                complete(){
121
+                  setTimeout(() => {
122
+                    uni.hideToast();
123
+                    uni.redirectTo({
124
+                      url: `/pages/receiptpage/receiptpage`,
125
+                    });
126
+                  }, 2000)
127
+                }
128
+              });
129
+            }else{
130
+              uni.showToast({
131
+                icon: 'none',
132
+                title: resList[0].msg || '请求数据失败!'
133
+              });
134
+            }
135
+          })
136
+        }
137
+      },
138
+      // 工单完成接口
139
+      handlerOrder(){
140
+        let postData = {
141
+          "type": this.queryObj.drugsBagType,
142
+          "orderId": this.workOrder.id,
143
+          "handover": this.queryObj.accountId ? +this.queryObj.accountId : undefined,
144
+        };
145
+        return post('/transflow/checkComplete', postData);
146
+      },
147
+      // 处理图片
148
+      handlerOrderImg(imgObj){
149
+        return uploadFile(imgObj, this.workOrder.gdState.value == 4 ? 'drugsBagStartCheck' : 'drugsBagEndCheck', this.workOrder.id)
150
+      },
151
+      // 上传报修图片成功
152
+      handlerImgSuccess(e){
153
+        this.imgList.forEach(v => {
154
+          v.url = v.path;
155
+        })
156
+        console.log(this.imgList);
157
+
158
+        let handlerOrder$ = this.handlerOrder();
159
+        let requestList = [handlerOrder$];
160
+        this.imgList.forEach(v => {
161
+          let handlerOrderImg$ = this.handlerOrderImg(v);
162
+          requestList.push(handlerOrderImg$);
163
+        })
164
+
165
+        Promise.all(requestList).then(resList => {
166
+          uni.hideLoading();
167
+          console.log(resList);
168
+          if(resList[0].state == 200){
169
+            uni.showToast({
170
+              icon: "none",
171
+              title: this.workOrder.gdState.value == 4 ? "交接成功,请尽快送达科室!" : (this.workOrder.gdState.value == 5 ? "交接成功,完成配送!" : ""),
172
+              duration: 60000,
173
+              mask: true,
174
+              complete(){
175
+                setTimeout(() => {
176
+                  uni.hideToast();
177
+                  uni.redirectTo({
178
+                    url: `/pages/receiptpage/receiptpage`,
179
+                  });
180
+                }, 2000)
181
+              }
182
+            });
183
+          }else{
184
+            uni.showToast({
185
+              icon: 'none',
186
+              title: resList[0].msg || '请求数据失败!'
187
+            });
188
+          }
189
+        })
190
+      },
191
+
192
+      // 上传报修图片失败
193
+      handlerImgFail(e){
194
+        this.imgList.forEach(v => {
195
+          v.url = v.path;
196
+        })
197
+        console.log(this.imgList);
198
+      },
199
+      // 选择上传图片
200
+      handlerImgSelect(e){
201
+        this.imgList = this.imgList.concat(e.tempFiles);
202
+        console.log(this.imgList);
203
+      },
204
+      // 删除上传图片
205
+      handlerImgDelete(e){
206
+        this.imgList = this.imgList.filter(v => e.tempFile.uuid != v.uuid);
207
+        console.log(this.imgList);
208
+      },
209
+      // 初始化
210
+      init(){
211
+        uni.showLoading({
212
+          title: "加载中",
213
+          mask: true,
214
+        });
215
+
216
+        let info$ = post(`/transflow/extra`, {type: this.queryObj.drugsBagType, extraType: 'orderInfo', orderId: +this.queryObj.orderId});
217
+        let config$ = post(`/simple/data/fetchDataList/taskTypeConfig`, {
218
+            "idx": 0,
219
+            "sum": 1,
220
+            "taskTypeConfig": {
221
+                "taskTypeDTO": {
222
+                    "hosId": {
223
+                        "id": this.hosId
224
+                    },
225
+                    "ordinaryField": {
226
+                        "key": "ordinary_field",
227
+                        "value": this.queryObj.drugsBagType
228
+                    }
229
+                }
230
+            }
231
+        });
232
+
233
+        Promise.all([info$, config$]).then(result => {
234
+          uni.hideLoading();
235
+          let [info, config] = result || [];
236
+
237
+          if(info.state == 200){
238
+            if(info.data){
239
+              this.drugsBagList = info.data.drugsBagList || [];
240
+              if(Array.isArray(info.data.workOrder.endDepts)){
241
+                info.data.workOrder.endDeptNames = info.data.workOrder.endDepts.map(v => v.dept).join();
242
+              }
243
+              this.workOrder = info.data.workOrder || {};
244
+            }
245
+          }else{
246
+            uni.showToast({
247
+              icon: "none",
248
+              title: info.msg || "接口获取数据失败!",
249
+            });
250
+          }
251
+
252
+          if(config.status == 200){
253
+            let list  = config.list || [];
254
+            this.config = list.length ? list[0] : {};
255
+          }else{
256
+            uni.showToast({
257
+              icon: "none",
258
+              title: config.msg || "接口获取数据失败!",
259
+            });
260
+          }
261
+        })
262
+      },
263
+    },
264
+    onLoad(options) {
265
+      console.log(options, "options");
266
+      this.queryObj = options;
267
+      this.init();
268
+      // #ifdef APP-PLUS
269
+      webHandle("no", "app");
270
+      // #endif
271
+      // #ifdef H5
272
+      webHandle("no", "wx");
273
+      // #endif
274
+    },
275
+  };
276
+</script>
277
+<style lang="less" scoped>
278
+  .Scanning_Result {
279
+    background: #FAFBFD;
280
+    padding: 0 24rpx;
281
+    display: flex;
282
+    flex-direction: column;
283
+    height: 100vh;
284
+
285
+    .Scanning_top {
286
+      margin: 32rpx auto;
287
+      .Scanning_top_icon {
288
+        font-size: 28rpx;
289
+        font-weight: bold;
290
+      }
291
+    }
292
+
293
+    .Scanning_cont {
294
+      flex: 1;
295
+      min-height: 0;
296
+      display: flex;
297
+      flex-direction: column;
298
+      .scrollContent{
299
+        flex: 1;
300
+        min-height: 0;
301
+      }
302
+      .content{
303
+        border: 1rpx solid #C5C5C5;
304
+        background: #FFFFFF;
305
+        padding: 32rpx;
306
+        .dept{
307
+          font-size: 30rpx;
308
+          font-weight: bold;
309
+          .newicon{
310
+            margin: 0 32rpx;
311
+          }
312
+        }
313
+        .column{
314
+          display: flex;
315
+          align-items: center;
316
+          font-size: 30rpx;
317
+          margin-top: 32rpx;
318
+          &.top{
319
+            align-items: flex-start;
320
+          }
321
+          .name{
322
+            font-weight: bold;
323
+            word-break: break-all;
324
+            flex-shrink: 0;
325
+          }
326
+          .value{
327
+            word-break: break-all;
328
+            &.flex1{
329
+              flex: 1;
330
+              flex-shrink: 0;
331
+            }
332
+            .imgTips{
333
+              font-size: 22rpx;
334
+              color: #8E8E8E;
335
+            }
336
+          }
337
+        }
338
+      }
339
+    }
340
+
341
+    .foot_btn_spe {
342
+      margin: 24rpx 0;
343
+      display: flex;
344
+      flex-direction: column;
345
+      align-items: center;
346
+      gap: 24rpx;
347
+      font-weight: bold;
348
+
349
+      .column{
350
+        width: 100%;
351
+        height: 78rpx;
352
+        display: flex;
353
+        align-items: center;
354
+        justify-content: space-between;
355
+        gap: 24rpx;
356
+
357
+        .btn {
358
+          height: 100%;
359
+          flex: 1;
360
+          background: linear-gradient( 90deg, #6FC073 0%, #3DB197 100%);
361
+          color: #fff;
362
+          border-radius: 4rpx;
363
+          font-size: 30rpx;
364
+          display: flex;
365
+          justify-content: center;
366
+          align-items: center;
367
+        }
368
+      }
369
+    }
370
+  }
371
+</style>

File diff suppressed because it is too large
+ 52 - 1
pages/receipt_infopage/receipt_infopage.vue


+ 46 - 39
pages/receiptpage/receiptpage.vue

@@ -212,11 +212,18 @@
212 212
                 </view>
213 213
                 <view class="line"></view>
214 214
               </view>
215
+              <view class="page_item_conts" v-else-if="item.taskType.associationType.value == 'ordinary' && (item.taskType.ordinaryField.value == 'drugsJpbag' || item.taskType.ordinaryField.value == 'drugsWestern' || item.taskType.ordinaryField.value == 'drugsReturn' || item.taskType.ordinaryField.value == 'drugsPoison' || item.taskType.ordinaryField.value == 'drugsHerbal')">
216
+                <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
217
+                <view style="word-break: break-all;" v-if="item.workOrderRemark">
218
+                  备注信息 :
219
+                  <text>{{ item.workOrderRemark || "暂无" }}</text>
220
+                </view>
221
+                <view class="line"></view>
222
+              </view>
215 223
               <view class="page_item_conts" v-else>
216 224
                 <view v-if="item.overdueTime">{{ item.overdueTime }}前送达</view>
217 225
 								<view>
218
-								  预约时间 : {{ item.yyjdTime | yyTimeFilter
219
-								  }}
226
+								  预约时间 : {{ item.yyjdTime | yyTimeFilter}}
220 227
 								</view>
221 228
                 <view style="word-break: break-all;" v-if="item.workOrderRemark">
222 229
                   备注信息 :
@@ -303,12 +310,12 @@
303 310
               <!-- 领血证 -->
304 311
               <view class="page_item_btn" @click="certificatHandler(item)" hover-class="seimin-btn-hover" v-if="useTakeCode == 1">领血证</view>
305 312
             </view>
306
-            
313
+
307 314
             <!-- 如果是万能交接-被服洗涤送回 -->
308 315
             <view class="page_item_btn" v-if="item.taskType.associationType.value == 'ordinary' && item.taskType.ordinaryField.value == 'clothingSend' && item.gdState.value == 5" hover-class="seimin-btn-hover">
309 316
               <view class="page_item_btn" @click="goToWashingEnd(item)" hover-class="seimin-btn-hover">核对被服</view>
310 317
             </view>
311
-            
318
+
312 319
             <view class="page_item_btn" v-if="selectedLabelSlots == '待接单'" @click="showAlerts(item)" hover-class="seimin-btn-hover">接单</view>
313 320
           </view>
314 321
           <view class="L-l"></view>
@@ -379,7 +386,7 @@
379 386
 								</view>
380 387
 							</view>
381 388
 						</view>
382
-						
389
+
383 390
 						<view class="execFilterItem">
384 391
 							<view class="execFilterItemHeader">
385 392
 								申请科室
@@ -388,7 +395,7 @@
388 395
 								<input class="deptName" @click="searchAdm" v-model.trim="deptName" placeholder="请选择科室名称" placeholder-style="color:#cecece" />
389 396
 							</view>
390 397
 						</view>
391
-						
398
+
392 399
 						<view class="execFilterItem">
393 400
 							<view class="execFilterItemHeader">
394 401
 								任务类型
@@ -400,7 +407,7 @@
400 407
 							</view>
401 408
 						</view>
402 409
 					</view>
403
-					
410
+
404 411
 					<view class="execFilterFooter">
405 412
 						<view class="btn" @click="execFilterReset()">重置</view>
406 413
 						<view class="btn" @click="execFilterOk()">完成</view>
@@ -412,13 +419,13 @@
412 419
     <!-- 被服洗涤弹窗 -->
413 420
     <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content"
414 421
       @ok="ok1" @cancel="cancel1" :operate="models1.operate"></showModel>
415
-      
422
+
416 423
     <!-- 父级科室弹窗 -->
417 424
     <showModel :title="models2.title" icon="" :disjunctor="models2.disjunctor" :content="models2.content" @ok="ok2" @cancel="cancel2" :operate="models2.operate" :childrenDeptList="models2.list"></showModel>
418
-    
425
+
419 426
     <!-- 父级科室弹窗 -->
420 427
     <showModel :title="models3.title" icon="" :disjunctor="models3.disjunctor" :content="models3.content" @know="know3" @ok="ok3" @cancel="cancel3" :operate="models3.operate" :busyContentList="models3.list"></showModel>
421
-    
428
+
422 429
     <!-- 示闲弹窗 -->
423 430
     <showModel :title="models4.title" icon="models4.icon" :disjunctor="models4.disjunctor" :content="models4.content" @know="know4" @ok="ok4" @cancel="cancel4" :operate="models4.operate"></showModel>
424 431
 		<scanner></scanner>
@@ -680,7 +687,7 @@
680 687
 										this.isNumberKey = false
681 688
 									}
682 689
 								}else if(i.key=='numberDigitalSecretKey'){
683
-									this.keyNum = Number(i.value) 
690
+									this.keyNum = Number(i.value)
684 691
 								}
685 692
 							}
686 693
 							for(let i = 0; i < this.keyNum; i++){
@@ -745,7 +752,7 @@
745 752
 			  if (accountObj) {
746 753
 			    list.handover = [accountObj.accountId];
747 754
 			  }
748
-			
755
+
749 756
 			  post("/workerOrder/" + type, list).then((res) => {
750 757
 			    console.log(this.tabType)
751 758
 			    uni.hideLoading();
@@ -1118,7 +1125,7 @@
1118 1125
             title: '未设置其他临床服务业务类型!'
1119 1126
           })
1120 1127
         }
1121
-        
1128
+
1122 1129
         this.getBloodPageConfig()
1123 1130
         this.waitingOrdersGetNum();
1124 1131
         this.executingOrders(0);
@@ -1762,7 +1769,7 @@
1762 1769
         if (this.currentCode) {
1763 1770
           let gdStateValue = data.gdState.value; //工单状态value
1764 1771
           let associationTypeValue = data.taskType.associationType.value; //关联类型value
1765
-          
1772
+
1766 1773
           // 其他临床服务,并且工单状态是待到达||工单状态待送达
1767 1774
           if (
1768 1775
             (associationTypeValue == "other" &&
@@ -2501,7 +2508,7 @@
2501 2508
                     });
2502 2509
                   }
2503 2510
                 });
2504
-                
2511
+
2505 2512
               } else {
2506 2513
                 uni.hideLoading();
2507 2514
                 uni.showToast({
@@ -2661,25 +2668,25 @@
2661 2668
           idx,
2662 2669
           sum: 20,
2663 2670
         };
2664
-        
2671
+
2665 2672
         if (this.currentId) {
2666 2673
           data.keyWord = this.currentId;
2667 2674
         } else {
2668 2675
           delete data.keyWord;
2669 2676
         }
2670
-        
2677
+
2671 2678
         if (this.deptId) {
2672 2679
           data.deptId = this.deptId;
2673 2680
         } else {
2674 2681
           delete data.deptId;
2675 2682
         }
2676
-        
2683
+
2677 2684
 				if (this.taskTypeId) {
2678 2685
 				  data.taskTypeId = this.taskTypeId;
2679 2686
 				} else {
2680 2687
 				  delete data.taskTypeId;
2681 2688
 				}
2682
-				
2689
+
2683 2690
         uni.showLoading({
2684 2691
           title: "加载中",
2685 2692
           mask: true,
@@ -2727,13 +2734,13 @@
2727 2734
 				} else {
2728 2735
 				  delete data.deptId;
2729 2736
 				}
2730
-				
2737
+
2731 2738
 				if (this.taskTypeId) {
2732 2739
 				  data.taskTypeId = this.taskTypeId;
2733 2740
 				} else {
2734 2741
 				  delete data.taskTypeId;
2735 2742
 				}
2736
-				
2743
+
2737 2744
         uni.showLoading({
2738 2745
           title: "加载中",
2739 2746
           mask: true,
@@ -3008,12 +3015,12 @@
3008 3015
 	/deep/ .selected-item-active{
3009 3016
 		border-bottom: 4rpx solid #49b856;
3010 3017
 	}
3011
-	
3018
+
3012 3019
   .Receiptpage {
3013 3020
     width: 100%;
3014 3021
     height: 100%;
3015 3022
     position: relative;
3016
-    
3023
+
3017 3024
     .execFilterMask{
3018 3025
       // position: fixed;
3019 3026
       // top: 0;
@@ -3024,14 +3031,14 @@
3024 3031
       // background-color: rgba(0, 0, 0, 0.5);
3025 3032
       // display: flex;
3026 3033
       // flex-direction: column;
3027
-      // justify-content: flex-end;      
3028
-      
3034
+      // justify-content: flex-end;
3035
+
3029 3036
       .execFilter{
3030 3037
         position: relative;
3031 3038
         background-color: #fff;
3032 3039
         height: 100vh;
3033 3040
         border-radius: 100rpx 100rpx 0 0;
3034
-        
3041
+
3035 3042
         .execFilterHeader{
3036 3043
           height: 70rpx;
3037 3044
           display: flex;
@@ -3039,7 +3046,7 @@
3039 3046
           align-items: center;
3040 3047
           border-bottom: 2rpx solid #ccc;
3041 3048
         }
3042
-        
3049
+
3043 3050
         .execFilterBody{
3044 3051
           .execFilterItem{
3045 3052
             padding: 32rpx;
@@ -3054,7 +3061,7 @@
3054 3061
               padding: 32rpx 0 0;
3055 3062
               justify-content: space-between;
3056 3063
               text-align: left;
3057
-              
3064
+
3058 3065
               .execFilterItemBox{
3059 3066
                 width: 200rpx;
3060 3067
                 height: 80rpx;
@@ -3068,7 +3075,7 @@
3068 3075
                   background-color: #49b856;
3069 3076
                 }
3070 3077
               }
3071
-              
3078
+
3072 3079
               .deptName {
3073 3080
                 height: 80rpx;
3074 3081
                 background-color: #f6f6f6;
@@ -3079,7 +3086,7 @@
3079 3086
             }
3080 3087
           }
3081 3088
         }
3082
-        
3089
+
3083 3090
         .execFilterFooter {
3084 3091
           position: absolute;
3085 3092
           bottom: 0;
@@ -3089,7 +3096,7 @@
3089 3096
           height: 100rpx;
3090 3097
           display: flex;
3091 3098
           justify-content: space-between;
3092
-        
3099
+
3093 3100
           .btn {
3094 3101
             height: 66rpx;
3095 3102
             flex: 1;
@@ -3104,7 +3111,7 @@
3104 3111
         }
3105 3112
       }
3106 3113
     }
3107
-    
3114
+
3108 3115
     .more {
3109 3116
       position: absolute;
3110 3117
       right: 20rpx;
@@ -3119,7 +3126,7 @@
3119 3126
       top: 50%;
3120 3127
       transform: translateY(-50%);
3121 3128
     }
3122
-    
3129
+
3123 3130
     .more_picker {
3124 3131
       position: absolute;
3125 3132
       right: 0;
@@ -3128,7 +3135,7 @@
3128 3135
       opacity: 0;
3129 3136
       z-index: 9999;
3130 3137
     }
3131
-    
3138
+
3132 3139
     .bigScreenWrap{
3133 3140
       position: fixed;
3134 3141
       left: 0;
@@ -3307,20 +3314,20 @@
3307 3314
                 line-height: 88rpx;
3308 3315
                 display: flex;
3309 3316
                 align-items: center;
3310
-                
3317
+
3311 3318
                 .emergencys {
3312 3319
                   background: #ff3b53 !important;
3313 3320
                   width: 124rpx !important;
3314 3321
                 }
3315
-                
3322
+
3316 3323
                 .emergency {
3317 3324
                   background: #ff3b53 !important;
3318 3325
                 }
3319
-                
3326
+
3320 3327
                 .emergency1 {
3321 3328
                   background: #49b856 !important;
3322 3329
                 }
3323
-                
3330
+
3324 3331
                 .page_item_cont_start {
3325 3332
                   text-align: center;
3326 3333
                   height: 44rpx;
@@ -3329,7 +3336,7 @@
3329 3336
                   border-radius: 8rpx;
3330 3337
                   background: #49b856;
3331 3338
                   color: #fff;
3332
-                
3339
+
3333 3340
                   .page_item_cont_start-img {
3334 3341
                     width: 22rpx;
3335 3342
                     position: relative;

+ 20 - 1
readme.md

@@ -5,4 +5,23 @@
5 5
 - 被服洗涤 quiltWashing
6 6
 
7 7
 # 宜昌中心医院有二级目录,打包的时候需要修改配置
8
-- manifest.json文件需要修改h5.router.base,代码已注释
8
+- manifest.json文件需要修改h5.router.base,代码已注释
9
+
10
+# iconfont下载后路径前添加前缀,如下:
11
+```js
12
+@font-face {
13
+  font-family: "newicon"; /* Project id 4304849 */
14
+  src: url('iconfont.woff2?t=1728893186075') format('woff2'),
15
+       url('iconfont.woff?t=1728893186075') format('woff'),
16
+       url('iconfont.ttf?t=1728893186075') format('truetype');
17
+}
18
+```
19
+改成
20
+```js
21
+@font-face {
22
+  font-family: "newicon"; /* Project id 4304849 */
23
+  src: url('~@/static/font/iconfont.woff2?t=1728893186075') format('woff2'),
24
+       url('~@/static/font/iconfont.woff?t=1728893186075') format('woff'),
25
+       url('~@/static/font/iconfont.ttf?t=1728893186075') format('truetype');
26
+}
27
+```

+ 67 - 0
tools/uploadFile.js

@@ -0,0 +1,67 @@
1
+import { api_uploadAttachment } from "@/http/http.js"
2
+/**
3
+ * 压缩
4
+ */
5
+const toBlob = (canvas, imgObj) => {
6
+  return new Promise((resolve,reject) => {
7
+    canvas.toBlob((fileSrc) => {
8
+      resolve(fileSrc)
9
+    }, `${imgObj.fileType}/${imgObj.extname}`, 0.3)
10
+  })
11
+}
12
+/**
13
+ * 图片加载完成
14
+ */
15
+const newImage = (img) => {
16
+  return new Promise((resolve,reject) => {
17
+    img.onload = () => {
18
+      resolve()
19
+    }
20
+  })
21
+}
22
+/**
23
+ * 上传图片
24
+ */
25
+export const uploadFile = async (imgObj, type, incidentId) => {
26
+  console.log('44444', type)
27
+  if(imgObj.extname=='mp4' || imgObj.extname=='avi' || imgObj.extname=='mpeg' ||
28
+    imgObj.extname=='wmv' || imgObj.extname=='mov' || imgObj.extname=='3gp' ||
29
+    imgObj.extname=='flv' || imgObj.extname=='mkv'){
30
+    return uni.uploadFile({
31
+      url: api_uploadAttachment(type, incidentId),
32
+      filePath: imgObj.path,
33
+      name: 'file',
34
+      formData: {
35
+        'filename': imgObj.name
36
+      }
37
+    })
38
+  }else{
39
+    const res1 = await uni.getImageInfo({src: imgObj.url});
40
+    const res = res1[1];
41
+    console.log('压缩前', res)
42
+    let canvasWidth = res.width //图片原始长宽
43
+    let canvasHeight = res.height
44
+    let img = new Image()
45
+    img.src = res.path
46
+    let canvas = document.createElement('canvas');
47
+    let ctx = canvas.getContext('2d')
48
+    canvas.width = canvasWidth
49
+    canvas.height = canvasHeight
50
+    await newImage(img)
51
+    ctx.drawImage(img, 0, 0, canvasWidth, canvasHeight)
52
+
53
+    const fileSrc = await toBlob(canvas, imgObj)
54
+    let tp = window.URL.createObjectURL(fileSrc)
55
+    console.log('压缩后', tp);
56
+    return uni.uploadFile({
57
+      timeout: 600000,
58
+      url: api_uploadAttachment(type, incidentId),
59
+      filePath: tp,
60
+      name: 'file',
61
+      formData: {
62
+        'filename': imgObj.name
63
+      }
64
+    });
65
+  }
66
+
67
+}