Browse Source

拉取代码

maotao 10 months ago
parent
commit
9829d417f0
1 changed files with 45 additions and 1 deletions
  1. 45 1
      pages/scanning_blood/scanning_blood.vue

+ 45 - 1
pages/scanning_blood/scanning_blood.vue

@@ -126,6 +126,9 @@
126
         taskTypeConfig: {}, //血制品配置信息
126
         taskTypeConfig: {}, //血制品配置信息
127
         orderId:'',//工单id
127
         orderId:'',//工单id
128
         gotoFlag: true,
128
         gotoFlag: true,
129
+				configs:null,
130
+				hosId:null,
131
+				orderState:null
129
       };
132
       };
130
     },
133
     },
131
     methods: {
134
     methods: {
@@ -139,10 +142,18 @@
139
         if (!this.gotoFlag) {
142
         if (!this.gotoFlag) {
140
           return;
143
           return;
141
         }
144
         }
145
+				let content = null
146
+				if(this.configs.sendingMergeOrder && 
147
+					this.configs.sendingMergeOrder==1 && 
148
+					this.orderState==5){
149
+					content = "您有当前科室未送达的血制品工单,将为您合并工单。"
150
+				}else{
151
+					content = "请确认是否接单并签到?"
152
+				}
142
         this.gotoFlag = false;
153
         this.gotoFlag = false;
143
         uni.showModal({
154
         uni.showModal({
144
           title: "提示",
155
           title: "提示",
145
-          content: "请确认是否接单并签到?",
156
+          content: content,
146
           success: (result) => {
157
           success: (result) => {
147
             if (result.confirm) {
158
             if (result.confirm) {
148
               console.log("用户点击确定");
159
               console.log("用户点击确定");
@@ -245,6 +256,7 @@
245
             if (res.state == 200) {
256
             if (res.state == 200) {
246
               this.bloodDTO = res.data.dto || {};
257
               this.bloodDTO = res.data.dto || {};
247
               this.orderId = res.data.orderId;
258
               this.orderId = res.data.orderId;
259
+							this.orderState = res.data.orderState
248
               console.log(this.orderId);
260
               console.log(this.orderId);
249
               this.taskTypeConfig = res.data.taskTypeConfig;
261
               this.taskTypeConfig = res.data.taskTypeConfig;
250
               let sign_ids = this.taskTypeConfig.signTypeIds?this.taskTypeConfig.signTypeIds.split(','):[];
262
               let sign_ids = this.taskTypeConfig.signTypeIds?this.taskTypeConfig.signTypeIds.split(','):[];
@@ -277,6 +289,34 @@
277
           });
289
           });
278
         });
290
         });
279
       },
291
       },
292
+			//获取血制品配置页面
293
+			getTaskConfig(){
294
+			  let postData = {
295
+			      "idx": 0,
296
+			      "sum": 10,
297
+			      "taskTypeConfig": {
298
+			          "taskTypeDTO": {
299
+			              "hosId": {
300
+			                  "id": this.hosId
301
+			              },
302
+			              "ordinaryField": {
303
+			                  "key": "ordinary_field",
304
+			                  "value": "blood"
305
+			              }
306
+			          }
307
+			      }
308
+			  };
309
+			  post('/simple/data/fetchDataList/taskTypeConfig', postData).then(result => {
310
+			    if(result.status == 200){
311
+			      this.configs = result.list[0] || {};
312
+			    }else{
313
+			      uni.showToast({
314
+			        icon: "none",
315
+			        title: result.msg || "接口获取数据失败!",
316
+			      });
317
+			    }
318
+			  })
319
+			},
280
     },
320
     },
281
     onShow() {
321
     onShow() {
282
       this.gotoFlag = true;
322
       this.gotoFlag = true;
@@ -289,6 +329,7 @@
289
       }else if (this.options.id) {
329
       }else if (this.options.id) {
290
         this.scanInfo(this.options.id, 'id');
330
         this.scanInfo(this.options.id, 'id');
291
       }
331
       }
332
+			this.getTaskConfig()
292
       // #ifdef APP-PLUS
333
       // #ifdef APP-PLUS
293
       webHandle("no", "app");
334
       webHandle("no", "app");
294
       // #endif
335
       // #endif
@@ -296,6 +337,9 @@
296
       webHandle("no", "wx");
337
       webHandle("no", "wx");
297
       // #endif
338
       // #endif
298
     },
339
     },
340
+		created(){
341
+		  this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
342
+		}
299
   };
343
   };
300
 </script>
344
 </script>
301
 <style lang="less" scoped>
345
 <style lang="less" scoped>