瀏覽代碼

bug修复

seimin 1 年之前
父節點
當前提交
b461af3d1d

+ 222 - 21
pages/scanning_result_seimin/scanning_result_seimin.vue

@@ -19,21 +19,44 @@
19 19
     </view>
20 20
 
21 21
     <view class="Scanning_cont" v-if="queryObj.status == 200">
22
-      <view> 药包编码 : #{{ queryObj.packid }} </view>
23
-      <view v-if="queryObj.account"> 交接人账号 : {{ queryObj.account }} </view>
24
-      <view v-if="queryObj.accountName">
22
+      <view class="Scanning_cont_block"> 药包编码 : #{{ queryObj.packid }} </view>
23
+      <view class="Scanning_cont_block" v-if="queryObj.account"> 交接人账号 : {{ queryObj.account }} </view>
24
+      <view class="Scanning_cont_block" v-if="queryObj.accountName">
25 25
         交接人姓名 : {{ queryObj.accountName }}
26 26
       </view>
27
-      <view> 所属科室 : {{ queryObj.targetDept || "-" }} </view>
27
+      <view class="Scanning_cont_block"> 所属科室 : {{ queryObj.targetDept || "-" }} </view>
28
+      <!-- 药品批次列表 -->
29
+      <view class="page_item_wrap" v-for="item in batchNoList" :key="item.id">
30
+        <view class="page_item">
31
+          <view class="page_item_top">
32
+            <view class="page_item_top-inner">
33
+              <view class="page_item_top_L">
34
+                <view class="L_text">{{item.packid || "无"}}</view>
35
+              </view>
36
+              <view class="page_item_top_R">
37
+                <text>{{item.drugsState ? item.drugsState.name : "无"}}</text>
38
+              </view>
39
+            </view>
40
+          </view>
41
+          <view class="page_item_cont">
42
+            <view class="page_item_cont_T">
43
+              
44
+            </view>
45
+          </view>
46
+          <view class="L"></view>
47
+          <view class="R"></view>
48
+        </view>
49
+        <view class="L-l"></view>
50
+        <view class="R-l"></view>
51
+      </view>
28 52
     </view>
29 53
     <view class="Scanning_cont" v-if="queryObj.status != 200">
30
-      <view class="Scanning_cont_center">
54
+      <view class="Scanning_cont_center Scanning_cont_block">
31 55
         {{ queryObj.msg }}
32 56
       </view>
33 57
     </view>
34 58
     <view class="foot_btn">
35 59
       <view class="btn3" @click="showAlert()"> 知道了 </view>
36
-      <view class="btn3" @click="toDrugBatches(queryObj.batchNo)" v-if="taskTypeConfig.drugsBatchInfo == 1"> 药品批次 </view>
37 60
     </view>
38 61
   </view>
39 62
 </template>
@@ -45,16 +68,11 @@ export default {
45 68
       hosId: null,
46 69
       options: {},
47 70
       queryObj: {},
71
+      batchNoList: [],
48 72
       taskTypeConfig: {},
49 73
     };
50 74
   },
51 75
   methods: {
52
-    // 跳转到药品批次页面
53
-    toDrugBatches(batchNo){
54
-      uni.navigateTo({
55
-        url: `../drugBatches/drugBatches?batchNo=${batchNo}`,
56
-      });
57
-    },
58 76
     // 知道了
59 77
     showAlert() {
60 78
       uni.navigateTo({
@@ -100,7 +118,11 @@ export default {
100 118
               if (res.status == 200) {
101 119
                 res.list = res.list || [];
102 120
                 this.taskTypeConfig = res.list[0] || {};
103
-                uni.hideLoading();
121
+                if(this.taskTypeConfig.drugsBatchInfo == 1){
122
+                  this.queryDrugsBagForBatchNo(this.queryObj.batchNo);
123
+                }else{
124
+                  uni.hideLoading();
125
+                }
104 126
               } else {
105 127
                 uni.hideLoading();
106 128
                 uni.showToast({
@@ -125,7 +147,27 @@ export default {
125 147
         }
126 148
       });
127 149
     },
128
-    
150
+    //获取药包信息及其关联的工单信息
151
+    queryDrugsBagForBatchNo(batchNo) {
152
+      post("/drugsBag/fetchDataList/drugsBag", {
153
+        "idx": 0,
154
+        "sum": 10,
155
+        "drugsBag": {
156
+            "hosId": this.hosId,
157
+            "batchNo": batchNo,
158
+        }
159
+      }).then((res) => {
160
+        uni.hideLoading();
161
+        if (res.status == 200) {
162
+          this.batchNoList = res.list || [];
163
+        } else {
164
+          uni.showToast({
165
+            icon: "none",
166
+            title: "请求失败",
167
+          });
168
+        }
169
+      });
170
+    },
129 171
   },
130 172
   onLoad(options) {
131 173
     this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
@@ -145,7 +187,161 @@ export default {
145 187
 <style lang="less">
146 188
 .Scanning_Result_seimin {
147 189
   padding: 0 20rpx;
148
-
190
+  .page_item_wrap {
191
+    position: relative;
192
+    margin-top: 32rpx;
193
+  
194
+    .page_item {
195
+      margin-top: 16rpx;
196
+      margin-bottom: 124rpx;
197
+      background: #fff;
198
+      border-radius: 8rpx;
199
+      margin: 0 20rpx;
200
+      border: 2rpx solid #e5e9ed;
201
+      position: relative;
202
+      overflow: hidden;
203
+      padding: 0 16rpx;
204
+  
205
+      .L {
206
+        width: 40rpx;
207
+        height: 40rpx;
208
+        border-radius: 50%;
209
+        background: #f9fafb;
210
+        position: absolute;
211
+        left: -20rpx;
212
+        top: 68rpx;
213
+        border: 2rpx solid #e5e9ed;
214
+      }
215
+  
216
+      .R {
217
+        width: 40rpx;
218
+        height: 40rpx;
219
+        border-radius: 50%;
220
+        background: #f9fafb;
221
+        position: absolute;
222
+        float: right;
223
+        right: -20rpx;
224
+        top: 68rpx;
225
+        border: 2rpx solid #e5e9ed;
226
+      }
227
+  
228
+      .page_item_top {
229
+        height: 88rpx;
230
+        border-bottom: 2rpx dashed #e5e9ed;
231
+        padding: 0 16rpx;
232
+  
233
+        .page_item_top-inner {
234
+          display: flex;
235
+          justify-content: space-between;
236
+          align-items: center;
237
+          height: 100%;
238
+  
239
+          .page_item_top_L {
240
+            .L_text {
241
+              font-size: 32rpx;
242
+              font-weight: 700;
243
+            }
244
+          }
245
+  
246
+          .page_item_top_R {
247
+            font-size: 32rpx;
248
+  
249
+            .L_iocn {
250
+              color: rgb(7, 134, 60);
251
+              font-size: 36rpx;
252
+              font-weight: 700;
253
+            }
254
+          }
255
+        }
256
+      }
257
+  
258
+      .page_item_cont {
259
+        min-height: 90rpx;
260
+        padding: 0 16rpx;
261
+        text-align: left;
262
+        position: relative;
263
+  
264
+        .text_big {
265
+          font-size: 32rpx;
266
+          font-weight: 700;
267
+          // margin-top: 10rpx;
268
+        
269
+          p {
270
+            font-weight: 700;
271
+            line-height: 1.5;
272
+          }
273
+        }
274
+  
275
+        .line {
276
+          height: 20rpx;
277
+          width: 2rpx;
278
+          border-left: 2rpx solid #e5e9ed;
279
+          position: absolute;
280
+          top: 82rpx;
281
+          left: 40rpx;
282
+        }
283
+  
284
+        .page_item_cont_T {
285
+          padding-top: 28rpx;
286
+          padding-bottom: 28rpx;
287
+          font-size: 28rpx;
288
+  
289
+          .page_item_cont_title {
290
+            height: 100%;
291
+            font-size: 32rpx;
292
+            display: flex;
293
+            justify-content: space-between;
294
+            align-items: center;
295
+          }
296
+        }
297
+  
298
+        .page_item_cont_B {
299
+          padding-top: 28rpx;
300
+          margin-bottom: 28rpx;
301
+  
302
+          .page_item_cont_title {
303
+            font-size: 32rpx;
304
+            display: flex;
305
+            justify-content: space-between;
306
+            align-items: center;
307
+          }
308
+        }
309
+  
310
+        .page_item_cont_C {
311
+          margin-bottom: 28rpx;
312
+  
313
+          .page_item_cont_title_C {
314
+            font-size: 32rpx;
315
+            display: flex;
316
+            justify-content: space-between;
317
+            align-items: center;
318
+          }
319
+        }
320
+  
321
+        #infos {
322
+          display: none;
323
+        }
324
+      }
325
+    }
326
+  
327
+    .L-l {
328
+      width: 2rpx;
329
+      height: 40rpx;
330
+      background: #f9fafb;
331
+      position: absolute;
332
+      left: 20rpx;
333
+      top: 72rpx;
334
+    }
335
+  
336
+    .R-l {
337
+      width: 2rpx;
338
+      height: 40rpx;
339
+      background: #f9fafb;
340
+      position: absolute;
341
+      right: 20rpx;
342
+      top: 72rpx;
343
+    }
344
+  }
149 345
   .Scanning_top {
150 346
     .Scanning_top_icon {
151 347
       width: 140rpx;
@@ -184,7 +380,7 @@ export default {
184 380
     font-size: 32rpx;
185 381
     text-align: center;
186 382
 
187
-    view {
383
+    .Scanning_cont_block {
188 384
       margin-bottom: 16rpx;
189 385
     }
190 386
 
@@ -204,17 +400,22 @@ export default {
204 400
   }
205 401
 
206 402
   .foot_btn {
207
-    line-height: 88rpx;
403
+    position: fixed;
404
+    bottom: 0;
405
+    right: 20rpx;
406
+    left: 20rpx;
407
+    line-height: 66rpx;
208 408
     height: 100rpx;
209
-    margin-top: 40rpx;
409
+    border-top: 2rpx solid #e5e9ed;
410
+    background: #f9fafb;
210 411
     display: flex;
211
-    justify-content: center;
412
+    justify-content: space-between;
212 413
 
213 414
     .btn1,
214 415
     .btn2,
215 416
     .btn3 {
216
-      height: 88rpx;
217
-      flex: 1;
417
+      height: 66rpx;
418
+      width: 100%;
218 419
       margin: 0 1%;
219 420
       background-image: linear-gradient(to right, #72c172, #3bb197);
220 421
       color: #fff;

+ 3 - 3
pages/search/search.vue

@@ -243,7 +243,7 @@
243 243
           if (res.status == 200 || res.state == 200) {
244 244
             if(this.type == "settingCode"){
245 245
               let deptList = res.deptList.map(v => ({...v, sign: 'dept'}));
246
-              let qrList = res.qrList.map(v => ({...v.deptDTO, sign: 'qr', qrId: v.id}));
246
+              let qrList = res.qrList.map(v => ({...v.deptDTO, sign: 'qr', qrId: v.id, name: v.name}));
247 247
               this.searchData.push({
248 248
                 name: keyword,
249 249
                 list: deptList.concat(qrList)
@@ -277,7 +277,7 @@
277 277
           //定义高亮#9f9f9f
278 278
           var html = row.dept.replace(
279 279
             keyword,
280
-            "<span style='color: #9f9f9f;'>" + keyword + "</span>" + (row.sign == 'qr' ? '<span class="red">(配置)</span>' : '')
280
+            "<span style='color: #9f9f9f;'>" + keyword + (row.sign == 'qr' ? '('+ row.name +')' : '') + "</span>" + (row.sign == 'qr' ? '<span class="red">(配置)</span>' : '')
281 281
           );
282 282
           html = "<div>" + html + "</div>";
283 283
           var tmpObj = {
@@ -414,7 +414,7 @@
414 414
             if (this.queryDept) { //替换
415 415
               console.log(arr);
416 416
               uni.navigateTo({
417
-                url: `../settingCode/settingCode?destQr=${arr[0].qrId || ''}&targetId=${arr[0].id}&targetDept=${arr[0].dept}&uniName=${this.uniName}&queryDept=${this.queryDept}&queryDeptId=${this.queryDeptId}&sourceQr=${this.sourceQr || ''}&qrCode=${this.qrCode}`,
417
+                url: `../settingCode/settingCode?destQr=${arr[0].qrId || ''}&name=${arr[0].name || ''}&targetId=${arr[0].id}&targetDept=${arr[0].dept}&uniName=${this.uniName}&queryDept=${this.queryDept}&queryDeptId=${this.queryDeptId}&sourceQr=${this.sourceQr || ''}&qrCode=${this.qrCode}`,
418 418
               });
419 419
             } else { //设置
420 420
               uni.navigateTo({

+ 1 - 1
pages/searchMuti/searchMuti.vue

@@ -91,7 +91,7 @@
91 91
             "idx": 0,
92 92
             "sum": 1000,
93 93
             department: {
94
-              hospital: {id: this.hosId},
94
+              // hospital: {id: this.hosId},
95 95
               type: {id: this.sysDeptType},
96 96
               buildIds: dataList.map(v => v.id).toString()
97 97
             }

+ 3 - 1
pages/settingCode/settingCode.vue

@@ -5,7 +5,7 @@
5 5
     </view>
6 6
     <view class="scanFont">可通过扫一扫功能设置科室,扫描二维码后设置或替换科室</view>
7 7
     <view class="scanFont nr">
8
-      <text v-if="queryDept">查询科室结果:{{queryDept.dept}}<text v-if="queryDept.sourceQr" class="red">(配置)</text></text>
8
+      <text v-if="queryDept">查询科室结果:{{queryDept.dept}}<text v-if="queryDept.name">({{queryDept.name}})</text><text v-if="queryDept.sourceQr" class="red">(配置)</text></text>
9 9
       <text v-else>查询科室结果:无</text>
10 10
     </view>
11 11
     <view class="scanFont nr red">{{msg}}</view>
@@ -184,6 +184,7 @@
184 184
                     dept: res.data.deptDTO.dept,
185 185
                     id: res.data.deptDTO.id,
186 186
                     sourceQr: res.data.id,
187
+                    name: res.data.name,
187 188
                   };
188 189
                 }else{
189 190
                   this.queryDept = {
@@ -226,6 +227,7 @@
226 227
           dept: options.queryDept,
227 228
           id: options.queryDeptId,
228 229
           sourceQr: options.sourceQr,
230
+          name: options.name,
229 231
         };
230 232
         this.msg = `此二维码绑定${options.targetDept}成功,${this.queryDept.dept}的二维码被清空`;
231 233
         this.settings = [{