2 커밋 27845810ee ... ae5a12bd56

작성자 SHA1 메시지 날짜
  maotao ae5a12bd56 药品录入添加大扫描逻辑 1 개월 전
  maotao 77736f6c29 拉取代码 1 개월 전
2개의 변경된 파일198개의 추가작업 그리고 9개의 파일을 삭제
  1. 5 5
      components/showModel/showModel.vue
  2. 193 4
      pages/receiptpage/receiptpage.vue

+ 5 - 5
components/showModel/showModel.vue

@@ -12,7 +12,7 @@
12 12
           :class="[
13 13
             'showModel__icon--' + icon,
14 14
             { 'newicon-duigou': icon === 'success' },
15
-            { 'newicon-shibai': icon === 'error' },
15
+            // { 'newicon-shibai': icon === 'error' },
16 16
             { 'newicon-wenhao': icon === 'warn' },
17 17
           ]"
18 18
         ></text>
@@ -98,16 +98,16 @@
98 98
 export default {
99 99
   data() {
100 100
     return {
101
-      time: 5, //5秒后自动关闭
101
+      time: 3, //5秒后自动关闭
102 102
       timer: null, //5秒后自动关闭,定时器
103
-      timerFlag: true, //是否显示取消自动关闭按钮
103
+      timerFlag: false, //是否显示取消自动关闭按钮
104 104
     };
105 105
   },
106 106
   watch: {
107 107
     disjunctor(newValue) {
108 108
       if (newValue && this.operate.know == "知道了") {
109
-        this.time = 5;
110
-        this.timerFlag = true;
109
+        this.time = 3;
110
+        // this.timerFlag = true;
111 111
         this.timer = setInterval(() => {
112 112
           this.time--;
113 113
           if (this.time <= 0) {

+ 193 - 4
pages/receiptpage/receiptpage.vue

@@ -1179,10 +1179,199 @@
1179 1179
           return;
1180 1180
         }
1181 1181
         this.drugbagModels.disjunctor = false;
1182
-        uni.navigateTo({
1183
-          url: `/pages/scanning_drug/scanning_drug?drugsBagId=${data.id}`,
1184
-        });
1185
-      },
1182
+				if ( data.drugsBagType && (data.drugsBagType.value == 'drugsJpbag' || data.drugsBagType.value == 'drugsWestern' || data.drugsBagType.value == 'drugsReturn' || data.drugsBagType.value == 'drugsPoison' || data.drugsBagType.value == 'drugsHerbal')) {
1183
+				  //新药品-扫静配|西药|退药|毒麻|中草药
1184
+				  if(data.gdId){
1185
+				    // 有工单
1186
+				    this.getInfo(data, data.packid);
1187
+				  }else{
1188
+				    // 没有工单,进入起点科室流程
1189
+				    uni.navigateTo({
1190
+				      url: `/pages/newDrug/createOrder/createOrder?drugsBagType=${data.drugsBagType.value}&drugsBagId=${data.id}&type=build`,
1191
+				    });
1192
+				  }
1193
+				}else{
1194
+				  //扫药包码
1195
+				  uni.navigateTo({
1196
+				    url: `/pages/scanning_drug/scanning_drug?drugsBagId=${data.id}&drugsBagBatchNo=${data.batchNo}`,
1197
+				  });
1198
+				}
1199
+        // uni.navigateTo({
1200
+        //   url: `/pages/scanning_drug/scanning_drug?drugsBagId=${data.id}`,
1201
+        // });
1202
+      },
1203
+			//获取药包信息
1204
+			getInfo(responeseData, code){
1205
+			  console.log(responeseData);
1206
+				let gdValue = responeseData.workOrderDTO ? responeseData.workOrderDTO.gdState.value : null;
1207
+			  uni.showLoading({
1208
+			    title: "加载中",
1209
+			    mask: true,
1210
+			  });
1211
+			
1212
+			  post(`/transflow/scanInfo`, {type: responeseData.drugsBagType.value, id: responeseData.id, orderStateValue: gdValue}).then(res => {
1213
+			    uni.hideLoading();
1214
+			    if(res.state == 200){
1215
+			      if(res.data){
1216
+			        let drugsBag = res.data.dto || {};
1217
+			        let orderId = responeseData.gdId;
1218
+			        let config = res.data.taskTypeConfig || {};
1219
+			        console.log(res);
1220
+			        if(gdValue == 2 || gdValue == 3 || (gdValue == 4 && responeseData.workOrderDTO.worker.id == uni.getStorageSync('userData').user.id)){
1221
+			          // 待抢单、待接单、待到达(本人),进入起点科室流程
1222
+			          uni.navigateTo({
1223
+			            url: `/pages/newDrug/createOrder/createOrder?drugsBagType=${responeseData.drugsBagType.value}&drugsBagId=${responeseData.id}&orderId=${responeseData.gdId || ''}&type=receive`,
1224
+			          });
1225
+			        }else if(gdValue == 5 && responeseData.workOrderDTO.worker.id == uni.getStorageSync('userData').user.id){
1226
+			          // 待送达(本人),进入终点科室流程
1227
+			          this.pageNavigateByConfig(config, responeseData, responeseData, code)
1228
+			        }else{
1229
+			          // 查看药包信息
1230
+			          uni.navigateTo({
1231
+			            url: `/pages/newDrug/createOrder/createOrder?drugsBagType=${responeseData.drugsBagType.value}&drugsBagId=${responeseData.id}&type=view`,
1232
+			          });
1233
+			        }
1234
+			      }
1235
+			    }else{
1236
+			      uni.showToast({
1237
+			        icon: "none",
1238
+			        title: res.msg || "接口获取数据失败!",
1239
+			      });
1240
+			    }
1241
+			  })
1242
+			},
1243
+			// 根据配置跳转页面
1244
+			pageNavigateByConfig(config, responseData, queryObj, code){
1245
+			  let drugsBagType = queryObj.drugsBagType.value;
1246
+			  let orderId = responseData.gdId;
1247
+			  let drugsBagId = responseData.id;
1248
+				let orderStateValue = responeseData.workOrderDTO ? responeseData.workOrderDTO.gdState.value : null;
1249
+			  if(config.drugsModel === 1){
1250
+			    // 一单一码
1251
+			    if(orderStateValue == 4){
1252
+			      // 待到达
1253
+			      if(config.drugsStartCheck === 1){
1254
+			        // 起点科室支持核对
1255
+			        uni.navigateTo({
1256
+			          url: `/pages/newDrug/checkPage/checkPage?drugsBagType=${drugsBagType}&orderId=${orderId}`,
1257
+			        });
1258
+			      }else{
1259
+			        // 起点科室不支持核对
1260
+			        if(config.drugsStartPhoto === 1){
1261
+			          // 起点科室支持拍照留存
1262
+			          uni.navigateTo({
1263
+			            url: `/pages/newDrug/photoRetention/photoRetention?drugsBagType=${drugsBagType}&orderId=${orderId}`,
1264
+			          });
1265
+			        }else{
1266
+			          // 起点科室不支持拍照留存
1267
+			          this.completeOrder(responseData, queryObj);
1268
+			        }
1269
+			      }
1270
+			    }else if(orderStateValue == 5){
1271
+			      // 待送达
1272
+			      uni.showLoading({
1273
+			        title: "加载中",
1274
+			        mask: true,
1275
+			      });
1276
+			      post("/transflow/scanBind", { type: drugsBagType, orderId, code }).then((ress) => {
1277
+			        uni.hideLoading();
1278
+			        if (ress.state == 200) {
1279
+			          if(ress.data.msg){
1280
+			            uni.showToast({
1281
+			              icon: "none",
1282
+			              title: ress.data.msg || "接口获取数据失败!",
1283
+			            });
1284
+			          }else{
1285
+			            if(config.drugsEndCheck === 1){
1286
+			              // 起点科室支持核对
1287
+			              uni.navigateTo({
1288
+			                url: `/pages/newDrug/checkPage/checkPage?drugsBagType=${drugsBagType}&orderId=${orderId}`,
1289
+			              });
1290
+			            }else{
1291
+			              // 起点科室不支持核对
1292
+			              if(config.drugsEndPhoto === 1){
1293
+			                // 起点科室支持拍照留存
1294
+			                uni.navigateTo({
1295
+			                  url: `/pages/newDrug/photoRetention/photoRetention?drugsBagType=${drugsBagType}&orderId=${orderId}`,
1296
+			                });
1297
+			              }else{
1298
+			                // 终点科室不支持拍照留存
1299
+			                this.completeOrder(responseData, queryObj);
1300
+			              }
1301
+			            }
1302
+			          }
1303
+			        } else {
1304
+			          uni.showToast({
1305
+			            icon: "none",
1306
+			            title: ress.msg || "接口获取数据失败!",
1307
+			          });
1308
+			        }
1309
+			      });
1310
+			    }
1311
+			  }else if(config.drugsModel === 2){
1312
+			    // 一单多码
1313
+			    uni.showLoading({
1314
+			      title: "加载中",
1315
+			      mask: true,
1316
+			    });
1317
+			    post("/transflow/scanBind", { type: drugsBagType, orderId, code }).then((ress) => {
1318
+			      uni.hideLoading();
1319
+			      if (ress.state == 200) {
1320
+			        if(ress.data.msg){
1321
+			          uni.showToast({
1322
+			            icon: "none",
1323
+			            title: ress.data.msg || "接口获取数据失败!",
1324
+			          });
1325
+			        }else{
1326
+			          uni.navigateTo({
1327
+			            url: `/pages/newDrug/continueScanning/continueScanning?drugsBagType=${drugsBagType}&orderId=${orderId}&drugsBagId=${drugsBagId}&orderStateValue=${orderStateValue}`,
1328
+			          });
1329
+			        }
1330
+			      } else {
1331
+			        uni.showToast({
1332
+			          icon: "none",
1333
+			          title: ress.msg || "接口获取数据失败!",
1334
+			        });
1335
+			      }
1336
+			    });
1337
+			  }
1338
+			},
1339
+			// 工单完成
1340
+			completeOrder(responseData, queryObj){
1341
+			  console.log(responseData, queryObj)
1342
+			  uni.showLoading({
1343
+			    title: "加载中",
1344
+			    mask: true,
1345
+			  });
1346
+			  let postData = {
1347
+			    "type": queryObj.drugsBagType.value,
1348
+			    "orderId": responseData.gdId,
1349
+			  };
1350
+			  post('/transflow/checkComplete', postData).then(res => {
1351
+			    uni.hideLoading();
1352
+			    if(res.state == 200){
1353
+			       uni.showToast({
1354
+			         icon: "none",
1355
+			         title: orderStateValue == 4 ? "交接成功,请尽快送达科室!" : (orderStateValue == 5 ? "交接成功,完成配送!" : ""),
1356
+			         duration: 60000,
1357
+			         mask: true,
1358
+			         complete(){
1359
+			           setTimeout(() => {
1360
+			             uni.hideToast();
1361
+			             uni.redirectTo({
1362
+			               url: `/pages/receiptpage/receiptpage`,
1363
+			             });
1364
+			           }, 2000)
1365
+			         }
1366
+			       });
1367
+			    }else{
1368
+			      uni.showToast({
1369
+			        icon: "none",
1370
+			        title: res.msg || "接口获取数据失败!",
1371
+			      });
1372
+			    }
1373
+			  })
1374
+			},
1186 1375
       // 手动查询药品-取消
1187 1376
       drugbagCancel() {
1188 1377
         this.drugbagModels.disjunctor = false;