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 126
         taskTypeConfig: {}, //血制品配置信息
127 127
         orderId:'',//工单id
128 128
         gotoFlag: true,
129
+				configs:null,
130
+				hosId:null,
131
+				orderState:null
129 132
       };
130 133
     },
131 134
     methods: {
@@ -139,10 +142,18 @@
139 142
         if (!this.gotoFlag) {
140 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 153
         this.gotoFlag = false;
143 154
         uni.showModal({
144 155
           title: "提示",
145
-          content: "请确认是否接单并签到?",
156
+          content: content,
146 157
           success: (result) => {
147 158
             if (result.confirm) {
148 159
               console.log("用户点击确定");
@@ -245,6 +256,7 @@
245 256
             if (res.state == 200) {
246 257
               this.bloodDTO = res.data.dto || {};
247 258
               this.orderId = res.data.orderId;
259
+							this.orderState = res.data.orderState
248 260
               console.log(this.orderId);
249 261
               this.taskTypeConfig = res.data.taskTypeConfig;
250 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 321
     onShow() {
282 322
       this.gotoFlag = true;
@@ -289,6 +329,7 @@
289 329
       }else if (this.options.id) {
290 330
         this.scanInfo(this.options.id, 'id');
291 331
       }
332
+			this.getTaskConfig()
292 333
       // #ifdef APP-PLUS
293 334
       webHandle("no", "app");
294 335
       // #endif
@@ -296,6 +337,9 @@
296 337
       webHandle("no", "wx");
297 338
       // #endif
298 339
     },
340
+		created(){
341
+		  this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
342
+		}
299 343
   };
300 344
 </script>
301 345
 <style lang="less" scoped>