Pārlūkot izejas kodu

药品批次页面

seimin 1 gadu atpakaļ
vecāks
revīzija
293661bb85

+ 1 - 1
components/bigScreen/bigScreen.vue

@@ -274,7 +274,7 @@
274 274
                       } else if (res.type == 'drugsBag') {
275 275
                         //扫药包码
276 276
                         uni.navigateTo({
277
-                          url: `/pages/scanning_drug/scanning_drug?drugsBagId=${res.drugsBagId}`,
277
+                          url: `/pages/scanning_drug/scanning_drug?drugsBagId=${res.drugsBagId}&drugsBagBatchNo=${res.drugsBagBatchNo}`,
278 278
                         });
279 279
                       } else if (res.type == 'nucleicAcid') {
280 280
                         //扫核酸码

+ 8 - 0
pages.json

@@ -420,6 +420,14 @@
420 420
           "titleNView": false
421 421
         }
422 422
       }
423
+    }, {
424
+      "path": "pages/drugBatches/drugBatches",
425
+      "style": {
426
+        "h5": {
427
+          "titleNView": false
428
+        }
429
+      }
430
+
423 431
     }
424 432
   ],
425 433
   "globalStyle": {

+ 334 - 0
pages/drugBatches/drugBatches.vue

@@ -0,0 +1,334 @@
1
+<template>
2
+  <view class="pharmacyDetails">
3
+    <view class="pharmacyDetails_title">药品批次</view>
4
+    <view class="page_item footerOtherMargin">
5
+      <view class="page_item_wrap" v-for="item in batchNoList" :key="item.id">
6
+        <view class="page_item">
7
+          <view class="page_item_top">
8
+            <view class="page_item_top-inner">
9
+              <view class="page_item_top_L">
10
+                <view class="L_text">{{item.packid || "无"}}</view>
11
+              </view>
12
+              <view class="page_item_top_R">
13
+                <text>{{item.drugsState ? item.drugsState.name : "无"}}</text>
14
+              </view>
15
+            </view>
16
+          </view>
17
+          <view class="page_item_cont">
18
+            <view class="page_item_cont_T">
19
+              
20
+            </view>
21
+          </view>
22
+          <view class="L"></view>
23
+          <view class="R"></view>
24
+        </view>
25
+        <view class="L-l"></view>
26
+        <view class="R-l"></view>
27
+      </view>
28
+    </view>
29
+    <view class="foot_btn2 footerPadding">
30
+      <view class="btn2" @click="goBack">返回</view>
31
+    </view>
32
+  </view>
33
+</template>
34
+<script>
35
+  import {
36
+    post,
37
+    webHandle
38
+  } from "../../http/http.js";
39
+  export default {
40
+    data() {
41
+      return {
42
+        hosId: null,
43
+        options: {}, //路由传递过来的数据
44
+        batchNoList: [],
45
+      };
46
+    },
47
+    methods: {
48
+      // 返回
49
+      goBack() {
50
+        uni.navigateBack();
51
+      },
52
+      //获取药包信息及其关联的工单信息
53
+      queryDrugsBagForBatchNo(batchNo) {
54
+        uni.showLoading({
55
+          title: "加载中",
56
+          mask: true,
57
+        });
58
+        post("/drugsBag/fetchDataList/drugsBag", {
59
+          "idx": 0,
60
+          "sum": 10,
61
+          "drugsBag": {
62
+              "hosId": this.hosId,
63
+              "batchNo": batchNo,
64
+          }
65
+        }).then((res) => {
66
+          uni.hideLoading();
67
+          if (res.status == 200) {
68
+            this.batchNoList = res.list || [];
69
+          } else {
70
+            uni.showToast({
71
+              icon: "none",
72
+              title: "请求失败",
73
+            });
74
+          }
75
+        });
76
+      },
77
+    },
78
+    onLoad(options) {
79
+      this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
80
+      console.log(options);
81
+      this.options = options;
82
+      if (options.batchNo) {
83
+        this.queryDrugsBagForBatchNo(options.batchNo);
84
+      }
85
+      // #ifdef APP-PLUS
86
+      webHandle("no", "app");
87
+      // #endif
88
+      // #ifdef H5
89
+      webHandle("no", "wx");
90
+      // #endif
91
+    },
92
+  };
93
+</script>
94
+<style lang="less" scoped>
95
+  .pharmacyDetails {
96
+    background-color: rgb(249, 250, 251);
97
+    padding-top: 50rpx;
98
+    height: 100%;
99
+    box-sizing: border-box;
100
+
101
+    .pharmacyDetails_title {
102
+      font-size: 46rpx;
103
+      font-weight: 550;
104
+      text-align: center;
105
+    }
106
+
107
+    .page_item_wrap {
108
+      position: relative;
109
+      margin-top: 32rpx;
110
+
111
+      .page_item {
112
+        margin-top: 16rpx;
113
+        margin-bottom: 124rpx;
114
+        background: #fff;
115
+        border-radius: 8rpx;
116
+        margin: 0 20rpx;
117
+        border: 2rpx solid #e5e9ed;
118
+        position: relative;
119
+        overflow: hidden;
120
+        padding: 0 16rpx;
121
+
122
+        .L {
123
+          width: 40rpx;
124
+          height: 40rpx;
125
+          border-radius: 50%;
126
+          background: #f9fafb;
127
+          position: absolute;
128
+          left: -20rpx;
129
+          top: 68rpx;
130
+          border: 2rpx solid #e5e9ed;
131
+        }
132
+
133
+        .R {
134
+          width: 40rpx;
135
+          height: 40rpx;
136
+          border-radius: 50%;
137
+          background: #f9fafb;
138
+          position: absolute;
139
+          float: right;
140
+          right: -20rpx;
141
+          top: 68rpx;
142
+          border: 2rpx solid #e5e9ed;
143
+        }
144
+
145
+        .page_item_top {
146
+          height: 88rpx;
147
+          border-bottom: 2rpx dashed #e5e9ed;
148
+          padding: 0 16rpx;
149
+
150
+          .page_item_top-inner {
151
+            display: flex;
152
+            justify-content: space-between;
153
+            align-items: center;
154
+            height: 100%;
155
+
156
+            .page_item_top_L {
157
+              .L_text {
158
+                font-size: 32rpx;
159
+                font-weight: 700;
160
+              }
161
+            }
162
+
163
+            .page_item_top_R {
164
+              font-size: 32rpx;
165
+
166
+              .L_iocn {
167
+                color: rgb(7, 134, 60);
168
+                font-size: 36rpx;
169
+                font-weight: 700;
170
+              }
171
+            }
172
+          }
173
+        }
174
+
175
+        .page_item_cont {
176
+          min-height: 90rpx;
177
+          padding: 0 16rpx;
178
+          text-align: left;
179
+          position: relative;
180
+
181
+          .text_big {
182
+            font-size: 32rpx;
183
+            font-weight: 700;
184
+            // margin-top: 10rpx;
185
+          
186
+            p {
187
+              font-weight: 700;
188
+              line-height: 1.5;
189
+            }
190
+          }
191
+
192
+          .line {
193
+            height: 20rpx;
194
+            width: 2rpx;
195
+            border-left: 2rpx solid #e5e9ed;
196
+            position: absolute;
197
+            top: 82rpx;
198
+            left: 40rpx;
199
+          }
200
+
201
+          .page_item_cont_T {
202
+            padding-top: 28rpx;
203
+            padding-bottom: 28rpx;
204
+            font-size: 28rpx;
205
+
206
+            .page_item_cont_title {
207
+              height: 100%;
208
+              font-size: 32rpx;
209
+              display: flex;
210
+              justify-content: space-between;
211
+              align-items: center;
212
+            }
213
+          }
214
+
215
+          .page_item_cont_B {
216
+            padding-top: 28rpx;
217
+            margin-bottom: 28rpx;
218
+
219
+            .page_item_cont_title {
220
+              font-size: 32rpx;
221
+              display: flex;
222
+              justify-content: space-between;
223
+              align-items: center;
224
+            }
225
+          }
226
+
227
+          .page_item_cont_C {
228
+            margin-bottom: 28rpx;
229
+
230
+            .page_item_cont_title_C {
231
+              font-size: 32rpx;
232
+              display: flex;
233
+              justify-content: space-between;
234
+              align-items: center;
235
+            }
236
+          }
237
+
238
+          #infos {
239
+            display: none;
240
+          }
241
+        }
242
+      }
243
+
244
+      .L-l {
245
+        width: 2rpx;
246
+        height: 40rpx;
247
+        background: #f9fafb;
248
+        position: absolute;
249
+        left: 20rpx;
250
+        top: 72rpx;
251
+      }
252
+
253
+      .R-l {
254
+        width: 2rpx;
255
+        height: 40rpx;
256
+        background: #f9fafb;
257
+        position: absolute;
258
+        right: 20rpx;
259
+        top: 72rpx;
260
+      }
261
+    }
262
+
263
+    .cube-toolbar-item {
264
+      width: 710rpx;
265
+      height: 68rpx;
266
+      line-height: 68rpx;
267
+      position: fixed;
268
+      left: 20rpx;
269
+      bottom: 160rpx;
270
+      border-radius: 8rpx;
271
+      background: linear-gradient(to right, #72c172, #3bb197);
272
+      font-size: 36rpx;
273
+      color: #fff;
274
+      text-align: center;
275
+    }
276
+
277
+    .btn-wrap {
278
+      display: flex;
279
+      justify-content: space-between;
280
+      position: fixed;
281
+      left: 20rpx;
282
+      bottom: 160rpx;
283
+    }
284
+
285
+    .cube-toolbar-item1 {
286
+      width: 350rpx;
287
+      height: 68rpx;
288
+      line-height: 68rpx;
289
+      border-radius: 8rpx;
290
+      margin: 0 5rpx;
291
+      background: linear-gradient(to right, #72c172, #3bb197);
292
+      font-size: 36rpx;
293
+      color: #fff;
294
+      text-align: center;
295
+    }
296
+
297
+    .foot_btn2 {
298
+      position: fixed;
299
+      bottom: 0;
300
+      right: 20rpx;
301
+      left: 20rpx;
302
+      line-height: 66rpx;
303
+      height: 100rpx;
304
+      border-top: 2rpx solid #e5e9ed;
305
+      background: #f9fafb;
306
+      display: flex;
307
+      justify-content: space-between;
308
+
309
+      .btn2 {
310
+        height: 66rpx;
311
+        width: 100%;
312
+        margin: 0 1%;
313
+        background-image: linear-gradient(to right, #72c172, #3bb197);
314
+        color: #fff;
315
+        border-radius: 8rpx;
316
+        font-size: 32rpx;
317
+        margin-top: 16rpx;
318
+        text-align: center;
319
+      }
320
+
321
+      .btn3 {
322
+        height: 66rpx;
323
+        width: 48%;
324
+        margin: 0 1%;
325
+        background-image: linear-gradient(to right, #72c172, #3bb197);
326
+        color: #fff;
327
+        border-radius: 8rpx;
328
+        font-size: 32rpx;
329
+        margin-top: 16rpx;
330
+        text-align: center;
331
+      }
332
+    }
333
+  }
334
+</style>

+ 65 - 0
pages/receipt_infopage/receipt_infopage.vue

@@ -394,6 +394,7 @@
394 394
           infoDATA.taskType.associationType.value == 'specimenPlan'
395 395
         " hover-class="seimin-btn-hover">查看标本</view>
396 396
       <view class="btn3" @click="viewDrugsBag(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'drugsBag'" hover-class="seimin-btn-hover">查看业务流程</view>
397
+      <view class="btn3" @click="toDrugBatches(infoDATA.drugs.batchNo)" v-if="infoDATA.taskType.associationType.value == 'drugsBag' && taskTypeConfig.drugsBatchInfo == 1" hover-class="seimin-btn-hover">药品批次</view>
397 398
       <view class="btn3" @click="viewBlood(infoDATA)" v-if="infoDATA.taskType.associationType.value == 'ordinary' && infoDATA.taskType.ordinaryField.value == 'blood'" hover-class="seimin-btn-hover">查看血制品</view>
398 399
       <view class="btn3" @click="additionalUser(infoDATA)" v-if="(infoDATA.taskType.associationType.value == 'inspect' || infoDATA.taskType.associationType.value == 'patientTransport') && infoDATA.worker && infoDATA.worker.id && multiplayerMode === 1" hover-class="seimin-btn-hover">追加陪检人员</view>
399 400
     </view>
@@ -430,6 +431,7 @@
430 431
     },
431 432
     data() {
432 433
       return {
434
+        taskTypeConfig: {},
433 435
         // 填写交接人账号弹窗model
434 436
         hosModels: {
435 437
           disjunctor: false,
@@ -488,6 +490,68 @@
488 490
       },
489 491
     },
490 492
     methods: {
493
+      // 判断药品页面控制-是否显示关联批次药品
494
+      isShowDrugsBatchInfo(){
495
+        post("/simple/data/fetchDataList/taskType", {
496
+          "idx": 0,
497
+          "sum": 10,
498
+          "taskType": {
499
+            "simpleQuery": true,
500
+            "hosId": {
501
+              "id": this.hosId
502
+            },
503
+            "associationType": {
504
+              "key": "association_types",
505
+              "value": "drugsBag"
506
+            }
507
+          }
508
+        }).then((res) => {
509
+          if (res.status == 200) {
510
+            res.list = res.list || [];
511
+            let taskType = res.list[0] || {};
512
+            if(taskType.id){
513
+              post("/simple/data/fetchDataList/taskTypeConfig", {
514
+                "idx": 0,
515
+                "sum": 10,
516
+                "taskTypeConfig": {
517
+                  "taskTypeDTO": {
518
+                    "hosId": {
519
+                      "id": this.hosId
520
+                    },
521
+                    "associationType": taskType.associationType
522
+                  }
523
+                }
524
+              }).then((res) => {
525
+                if (res.status == 200) {
526
+                  res.list = res.list || [];
527
+                  this.taskTypeConfig = res.list[0] || {};
528
+                } else {
529
+                  uni.showToast({
530
+                    icon: "none",
531
+                    title: "请求失败!",
532
+                  });
533
+                }
534
+              });
535
+            }else{
536
+              uni.showToast({
537
+                icon: "none",
538
+                title: "请配置药品业务类型!",
539
+              });
540
+            }
541
+          } else {
542
+            uni.showToast({
543
+              icon: "none",
544
+              title: "请求失败!",
545
+            });
546
+          }
547
+        });
548
+      },
549
+      // 跳转到药品批次页面
550
+      toDrugBatches(batchNo){
551
+        uni.navigateTo({
552
+          url: `../drugBatches/drugBatches?batchNo=${batchNo}`,
553
+        });
554
+      },
491 555
       // 前往其他临床服务完成工单确认页面
492 556
       otherCompleteOrder(data){
493 557
         console.log(data);
@@ -1282,6 +1346,7 @@
1282 1346
       }
1283 1347
     },
1284 1348
     onLoad(options) {
1349
+      this.isShowDrugsBatchInfo();
1285 1350
       console.log(options, 'options');
1286 1351
       this.currentUserId = uni.getStorageSync('userData').user.id;
1287 1352
       let id = options.id;

+ 6 - 1
pages/scanning_drug/scanning_drug.vue

@@ -107,6 +107,7 @@
107 107
   export default {
108 108
     data() {
109 109
       return {
110
+        hosId: null,
110 111
         DRUGSBAG_TYPE,
111 112
         // 弹窗model
112 113
         models: {
@@ -308,6 +309,7 @@
308 309
             let info = {
309 310
               targetDept: ress.data.target.dept, //所属科室
310 311
               packid: ress.data.packid, //药包编码
312
+              batchNo: ress.data.batchNo, //药包批次
311 313
               status: ress.status,
312 314
               msg: ress.msg,
313 315
             };
@@ -392,6 +394,7 @@
392 394
                   let info = {
393 395
                     targetDept: ress.data.target.dept, //所属科室
394 396
                     packid: ress.data.packid, //药包编码
397
+                    batchNo: ress.data.batchNo, //药包批次
395 398
                     status: ress.status,
396 399
                     msg: ress.msg,
397 400
                   };
@@ -440,9 +443,11 @@
440 443
       this.gotoFlag = true;
441 444
     },
442 445
     onLoad(options) {
446
+      this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
443 447
       console.log(options);
444 448
       let {
445
-        drugsBagId
449
+        drugsBagId,
450
+        drugsBagBatchNo,
446 451
       } = options;
447 452
       if (drugsBagId) {
448 453
         this.queryDrugsBagForId(drugsBagId);

+ 80 - 2
pages/scanning_result_seimin/scanning_result_seimin.vue

@@ -33,28 +33,106 @@
33 33
     </view>
34 34
     <view class="foot_btn">
35 35
       <view class="btn3" @click="showAlert()"> 知道了 </view>
36
+      <view class="btn3" @click="toDrugBatches(queryObj.batchNo)" v-if="taskTypeConfig.drugsBatchInfo == 1"> 药品批次 </view>
36 37
     </view>
37 38
   </view>
38 39
 </template>
39 40
 <script>
40
-import { webHandle } from "../../http/http.js";
41
+import { post, webHandle } from "../../http/http.js";
41 42
 export default {
42 43
   data() {
43 44
     return {
45
+      hosId: null,
46
+      options: {},
44 47
       queryObj: {},
48
+      taskTypeConfig: {},
45 49
     };
46 50
   },
47 51
   methods: {
52
+    // 跳转到药品批次页面
53
+    toDrugBatches(batchNo){
54
+      uni.navigateTo({
55
+        url: `../drugBatches/drugBatches?batchNo=${batchNo}`,
56
+      });
57
+    },
48 58
     // 知道了
49 59
     showAlert() {
50 60
       uni.navigateTo({
51 61
         url: "../receiptpage/receiptpage",
52 62
       });
53 63
     },
64
+    // 判断药品页面控制-是否显示关联批次药品
65
+    isShowDrugsBatchInfo(){
66
+      uni.showLoading({
67
+        title: "加载中",
68
+        mask: true,
69
+      });
70
+      post("/simple/data/fetchDataList/taskType", {
71
+        "idx": 0,
72
+        "sum": 10,
73
+        "taskType": {
74
+          "simpleQuery": true,
75
+          "hosId": {
76
+            "id": this.hosId
77
+          },
78
+          "associationType": {
79
+            "key": "association_types",
80
+            "value": "drugsBag"
81
+          }
82
+        }
83
+      }).then((res) => {
84
+        if (res.status == 200) {
85
+          res.list = res.list || [];
86
+          let taskType = res.list[0] || {};
87
+          if(taskType.id){
88
+            post("/simple/data/fetchDataList/taskTypeConfig", {
89
+              "idx": 0,
90
+              "sum": 10,
91
+              "taskTypeConfig": {
92
+                "taskTypeDTO": {
93
+                  "hosId": {
94
+                    "id": this.hosId
95
+                  },
96
+                  "associationType": taskType.associationType
97
+                }
98
+              }
99
+            }).then((res) => {
100
+              if (res.status == 200) {
101
+                res.list = res.list || [];
102
+                this.taskTypeConfig = res.list[0] || {};
103
+                uni.hideLoading();
104
+              } else {
105
+                uni.hideLoading();
106
+                uni.showToast({
107
+                  icon: "none",
108
+                  title: "请求失败!",
109
+                });
110
+              }
111
+            });
112
+          }else{
113
+            uni.hideLoading();
114
+            uni.showToast({
115
+              icon: "none",
116
+              title: "请配置药品业务类型!",
117
+            });
118
+          }
119
+        } else {
120
+          uni.hideLoading();
121
+          uni.showToast({
122
+            icon: "none",
123
+            title: "请求失败!",
124
+          });
125
+        }
126
+      });
127
+    },
128
+    
54 129
   },
55 130
   onLoad(options) {
131
+    this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
56 132
     console.log(options, "result");
57
-    this.queryObj = JSON.parse(options.info);
133
+    this.options = options;
134
+    this.isShowDrugsBatchInfo();
135
+    this.queryObj = JSON.parse(this.options.info);
58 136
     // #ifdef APP-PLUS
59 137
     webHandle("no", "app");
60 138
     // #endif