Procházet zdrojové kódy

Merge branch 'master' of http://git.dashitech.com/seimin/zy-wechat

maotao před 4 měsíci
rodič
revize
58225d7f2a

+ 94 - 29
pages/newDrug/checkPage/checkPage.vue

@@ -14,7 +14,7 @@
14 14
       </view>
15 15
       <scroll-view scroll-y class="scrollContent">
16 16
         <view class="column" v-for="item in drugsBagList" :key="item.id" @click="toDetail(item.id)">
17
-          <view class="value1">{{item.batchNo}}</view>
17
+          <view class="value1">{{item.packid}}</view>
18 18
           <view class="value2">{{item.drugsTypeCount}}</view>
19 19
           <view class="value3">{{item.drugsCount}}</view>
20 20
         </view>
@@ -25,16 +25,19 @@
25 25
       <view class="column">
26 26
         <view class="btn" @click="scanCode()">扫一扫交接</view>
27 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>
28
+        <view class="btn" @click="fillInManually(config.drugsEndManual.value)" v-if="workOrder.gdState && workOrder.gdState.value == 5 && config.drugsEndManual">{{config.drugsEndManual.name}}</view>
29 29
       </view>
30 30
     </view>
31 31
     <!-- 填写交接人工号弹窗 -->
32 32
     <selectAccount @click.stop.native v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
33 33
       @cancel="hosCancel">
34 34
     </selectAccount>
35
+    <!-- 动态密钥 -->
36
+    <numberKeyModel v-if="showKey" :keyArr="keyArr" @cancel="showKey = false" @confirm="confirmKey($event)"></numberKeyModel>
35 37
   </view>
36 38
 </template>
37 39
 <script>
40
+  import numberKeyModel from "@/components/numberKeyModel/numberKeyModel.vue";
38 41
   import {
39 42
     get,
40 43
     post,
@@ -54,17 +57,74 @@
54 57
         hosModels: {
55 58
           disjunctor: false,
56 59
         },
60
+        showKey:false,
61
+        keyNum:4, //密钥位数
62
+        isNumberKey:false, //是否开启动态密钥
63
+        keyArr: [],
57 64
       };
58 65
     },
66
+    components: {
67
+    	numberKeyModel,
68
+    },
59 69
     onShow() {
60 70
       this.SMFlag = true;
61 71
     },
62 72
     methods: {
73
+      // 获取配置
74
+      getConfig() {
75
+        let postData = {
76
+          idx: 0,
77
+          sum: 9999,
78
+      		hospitalConfig:{
79
+      			hosId:this.hosId,
80
+      			model:"all"
81
+      		}
82
+        };
83
+
84
+        post("/simple/data/fetchDataList/hospitalConfig",postData).then((result) => {
85
+            if (result.status == 200) {
86
+      				this.keyArr = []
87
+      				for(let i of result.list){
88
+      					if(i.key=='digitalSecretKey'){
89
+      						if(i.value==1){
90
+      							this.isNumberKey = true
91
+      						}else{
92
+      							this.isNumberKey = false
93
+      						}
94
+      					}else if(i.key=='numberDigitalSecretKey'){
95
+      						this.keyNum = Number(i.value)
96
+      					}
97
+      				}
98
+      				for(let i = 0; i < this.keyNum; i++){
99
+      					this.keyArr.push({
100
+      						value:null
101
+      					})
102
+      				}
103
+      				console.log(444,this.keyArr)
104
+            }
105
+          });
106
+      },
107
+      confirmKey(data){
108
+      	this.padChange(data)
109
+      	this.showKey = false
110
+      },
111
+      isShowKey(){
112
+      	this.showKey = true
113
+      },
114
+      padChange(scannerCode){
115
+        if(!this.isNumberKey){
116
+        	scannerCode = scannerCode.replace('\n','')
117
+        }
118
+        this.bigScan(scannerCode);
119
+      },
63 120
       // 手动填写
64 121
       fillInManually(value){
65 122
         if(value == 1){
66 123
           // 填写工号
67 124
           this.showSelectAccount();
125
+        }else if(value == 2){
126
+          // 动态密钥
127
+          this.isShowKey();
68 128
         }
69 129
       },
70 130
       // 填写交接人工号-确认
@@ -251,33 +311,7 @@
251 311
             mask: true,
252 312
           });
253 313
 
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
-            });
314
+          this.bigScan(content);
281 315
         }).catch(err => {
282 316
           this.SMFlag = true;
283 317
         });
@@ -288,6 +322,36 @@
288 322
           url: `/pages/newDrug/detail?drugsBagType=${this.queryObj.drugsBagType}&drugsBagId=${drugsBagId}`,
289 323
         });
290 324
       },
325
+      // 扫码
326
+      bigScan(content){
327
+        let postData = {
328
+          type: this.queryObj.drugsBagType,
329
+          orderStateValue: this.workOrder.gdState.value,
330
+          code: content,
331
+          orderId: this.workOrder.id,
332
+        }
333
+
334
+        post("/transflow/bigScan", postData)
335
+          .then((res) => {
336
+            this.SMFlag = true;
337
+            uni.hideLoading();
338
+            if (res.codeBean) {
339
+              if(res.codeBean.valid){
340
+                this.pageNavigateByConfig(this.config, this.workOrder, this.queryObj, res.codeBean.userDTO, res.codeBean.departmentDTO);
341
+              }else{
342
+                uni.showToast({
343
+                  icon: "none",
344
+                  title: res.codeBean.msg || "接口获取数据失败!",
345
+                });
346
+              }
347
+            } else {
348
+              uni.showToast({
349
+                icon: "none",
350
+                title: "接口获取数据失败!",
351
+              });
352
+            }
353
+          });
354
+      },
291 355
       // 初始化
292 356
       init(){
293 357
         uni.showLoading({
@@ -347,6 +411,7 @@
347 411
       console.log(options, "options");
348 412
       this.queryObj = options;
349 413
       this.init();
414
+      this.getConfig();
350 415
       // #ifdef APP-PLUS
351 416
       webHandle("no", "app");
352 417
       // #endif

+ 1 - 1
pages/newDrug/continueScanning/continueScanning.vue

@@ -8,7 +8,7 @@
8 8
       <scroll-view scroll-y class="scrollContent">
9 9
         <view class="column">
10 10
           <view class="name">单号:</view>
11
-          <view class="value">{{drugsBag.batchNo}}</view>
11
+          <view class="value">{{drugsBag.packid}}</view>
12 12
         </view>
13 13
         <view class="column">
14 14
           <view class="name">申请科室:</view>

+ 1 - 1
pages/newDrug/createOrder/createOrder.vue

@@ -10,7 +10,7 @@
10 10
       <scroll-view scroll-y class="scrollContent">
11 11
         <view class="column">
12 12
           <view class="name">单号:</view>
13
-          <view class="value">{{drugsBag.batchNo}}</view>
13
+          <view class="value">{{drugsBag.packid}}</view>
14 14
         </view>
15 15
         <view class="column">
16 16
           <view class="name">申请科室:</view>

+ 4 - 4
pages/newDrug/detail.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <view class="Scanning_Result">
3 3
     <view class="Scanning_top">
4
-      <view class="Scanning_top_icon">{{drugsBag.batchNo}}</view>
4
+      <view class="Scanning_top_icon">{{drugsBag.packid}}</view>
5 5
     </view>
6 6
     <view class="Scanning_top_tips">
7 7
       <view class="info">申请:{{drugsBag.target ? drugsBag.target.dept : ''}}</view>
@@ -73,7 +73,7 @@
73 73
           title: "加载中",
74 74
           mask: true,
75 75
         });
76
-        
76
+
77 77
         if(this.queryObj.drugsBagId){
78 78
           // 根据药包id查询药品
79 79
           this.getDrugsByDrugsBugId(this.queryObj.drugsBagId);
@@ -194,7 +194,7 @@
194 194
       align-items: center;
195 195
       gap: 24rpx;
196 196
       font-weight: bold;
197
-      
197
+
198 198
       .column{
199 199
         width: 100%;
200 200
         height: 78rpx;
@@ -202,7 +202,7 @@
202 202
         align-items: center;
203 203
         justify-content: space-between;
204 204
         gap: 24rpx;
205
-        
205
+
206 206
         .btn {
207 207
           height: 100%;
208 208
           flex: 1;

+ 1 - 1
pages/newDrug/list.vue

@@ -4,7 +4,7 @@
4 4
       <scroll-view scroll-y class="scrollContent">
5 5
         <view class="column" v-for="item in drugsBagList" :key="item.id" @click="toDetail(item.id)">
6 6
           <view class="head">
7
-            <view class="name">{{item.batchNo}}</view>
7
+            <view class="name">{{item.packid}}</view>
8 8
             <view class="value">{{item.drugsState ? item.drugsState.name : ''}}</view>
9 9
           </view>
10 10
           <view class="body">

+ 1 - 1
pages/newDrug/photoRetention/photoRetention.vue

@@ -35,7 +35,7 @@
35 35
             </view>
36 36
             <view class="column">
37 37
               <view class="name">药品单号:</view>
38
-              <view class="value">{{drugsBagList.length ? drugsBagList[0].batchNo : ''}}</view>
38
+              <view class="value">{{drugsBagList.length ? drugsBagList[0].packid : ''}}</view>
39 39
             </view>
40 40
           </template>
41 41
           <template v-if="config.drugsModel === 2">