浏览代码

BUG修复

seimin 3 年之前
父节点
当前提交
786606cc22
共有 1 个文件被更改,包括 13 次插入8 次删除
  1. 13 8
      pages/scanning_drug/scanning_drug.vue

+ 13 - 8
pages/scanning_drug/scanning_drug.vue

@@ -284,7 +284,7 @@ export default {
284
         packId: this.workOrder.drugs.packid,
284
         packId: this.workOrder.drugs.packid,
285
         orderId: this.workOrder.id,
285
         orderId: this.workOrder.id,
286
       };
286
       };
287
-      if(data){
287
+      if (data) {
288
         //有交接人
288
         //有交接人
289
         postData.handover = data.accountId;
289
         postData.handover = data.accountId;
290
       }
290
       }
@@ -298,15 +298,20 @@ export default {
298
           this.grabOrders = ress.grabOrders ? ["666"] : null;
298
           this.grabOrders = ress.grabOrders ? ["666"] : null;
299
           // this.orderSign(ress.workOrder, 2, ress.content);
299
           // this.orderSign(ress.workOrder, 2, ress.content);
300
           let info = {
300
           let info = {
301
-            targetDept:ress.data.target.dept,//所属科室
302
-            packid:ress.data.packid,//药包编码
303
-            accountName:data.accountName,//交接人姓名
304
-            account:data.account,//交接人账号
305
-            status:ress.status,
306
-            msg:ress.msg,
301
+            targetDept: ress.data.target.dept, //所属科室
302
+            packid: ress.data.packid, //药包编码
303
+            status: ress.status,
304
+            msg: ress.msg,
305
+          };
306
+          if (data) {
307
+            //有交接人
308
+            info.accountName = data.accountName; //交接人姓名
309
+            info.account = data.account; //交接人账号
307
           }
310
           }
308
           uni.navigateTo({
311
           uni.navigateTo({
309
-            url: `../scanning_result_seimin/scanning_result_seimin?info=${encodeURIComponent(JSON.stringify(info))}`,
312
+            url: `../scanning_result_seimin/scanning_result_seimin?info=${encodeURIComponent(
313
+              JSON.stringify(info)
314
+            )}`,
310
           });
315
           });
311
         } else if (ress.status == "0000") {
316
         } else if (ress.status == "0000") {
312
           uni.hideLoading();
317
           uni.hideLoading();