瀏覽代碼

药包流程查询

seimin 2 年之前
父節點
當前提交
1f145d8cf3
共有 2 個文件被更改,包括 207 次插入86 次删除
  1. 205 86
      pages/pharmacyDetails/pharmacyDetails.vue
  2. 2 0
      pages/scanning_B/scanning_B.vue

+ 205 - 86
pages/pharmacyDetails/pharmacyDetails.vue

@@ -1,10 +1,17 @@
1 1
 <template>
2 2
   <view class="pharmacyDetails">
3
-    <view class="pharmacyDetails_title">请领信息</view>
3
+    <view class="pharmacyDetails_title">
4
+      <view class="pharmacyDetails_tab" :class="{ 'active': selectedLabelSlots === item.id }" v-for="item in tabs"
5
+        :key="item.id" @click="clickHandler(item.id)">
6
+        <view class="pharmacyDetails_label">
7
+          {{ item.label }}
8
+        </view>
9
+      </view>
10
+    </view>
4 11
     <view class="page_item_wrap">
5 12
       <view class="page_item">
6 13
         <view class="page_item_top">
7
-          <view class="page_item_top-inner">
14
+          <view class="page_item_top-inner" v-show="selectedLabelSlots == 1">
8 15
             <view class="page_item_top_L">
9 16
               <text class="L_text">请领单:{{ infoDATA.packid }}</text>
10 17
             </view>
@@ -15,13 +22,7 @@
15 22
             </view>
16 23
           </view>
17 24
         </view>
18
-        <view class="page_item_cont">
19
-          <!-- <view class="page_item_cont_T">
20
-            <view class="page_item_cont_title">
21
-              <text>批次号</text>
22
-              <text class="text_big">{{ infoDATA.batchNo }}</text>
23
-            </view>
24
-          </view> -->
25
+        <view class="page_item_cont" v-show="selectedLabelSlots == 1">
25 26
           <view class="page_item_cont_B">
26 27
             <view class="page_item_cont_title">
27 28
               <text>记账时间</text>
@@ -39,6 +40,16 @@
39 40
             </view>
40 41
           </view>
41 42
         </view>
43
+        <view class="page_item_cont" v-show="selectedLabelSlots == 2">
44
+          <view class="page_item_cont_C" v-for="(item,i) in queryProcessList" :key="i">
45
+            <view class="page_item_cont_title_C">
46
+              <text>{{item.operationType?item.operationType.name:''}}</text>
47
+              <text class="text_big">
48
+                <text>{{ item.username || '暂无' }}</text>
49
+              </text>
50
+            </view>
51
+          </view>
52
+        </view>
42 53
         <view class="L"></view>
43 54
         <view class="R"></view>
44 55
       </view>
@@ -89,6 +100,16 @@
89 100
   export default {
90 101
     data() {
91 102
       return {
103
+        selectedLabelSlots: 1,
104
+        tabs: [{
105
+            id: 1,
106
+            label: "基础信息",
107
+          },
108
+          {
109
+            id: 2,
110
+            label: "流程信息",
111
+          }
112
+        ],
92 113
         infoDATA: [],
93 114
         isLoading: false,
94 115
         isTLoading: false,
@@ -98,12 +119,22 @@
98 119
         hosModels: {
99 120
           disjunctor: false,
100 121
         },
122
+        queryProcessList: [],
101 123
       };
102 124
     },
103 125
     components: {
104 126
       selectAccount
105 127
     },
106 128
     methods: {
129
+      // tab切换
130
+      clickHandler(id) {
131
+        this.selectedLabelSlots = id;
132
+        if (id == 1) {
133
+          this.queryBase(this.queryObj);
134
+        } else if (id == 2) {
135
+          this.queryProcess(this.queryObj);
136
+        }
137
+      },
107 138
       // 确认
108 139
       hosOk(data) {
109 140
         console.log(data);
@@ -153,7 +184,7 @@
153 184
           id: this.infoDATA.id,
154 185
           packId: this.infoDATA.packid,
155 186
           recipient: accountId,
156
-          recipientName:accountName
187
+          recipientName: accountName
157 188
         };
158 189
         if (this.infoDATA.gdId) {
159 190
           postData.gdId = this.infoDATA.gdId;
@@ -413,6 +444,136 @@
413 444
           }
414 445
         });
415 446
       },
447
+      //基础信息查询
448
+      queryBase(options) {
449
+        //扫码进入详情
450
+        let qrcode = options.qrcode;
451
+        if (qrcode) {
452
+          uni.showLoading({
453
+            title: "加载中",
454
+            mask: true,
455
+          });
456
+          post("/drugsBag/getDrugsBagByQr", {
457
+            qrcode,
458
+          }).then((result) => {
459
+            uni.hideLoading();
460
+            if (result.state == 200) {
461
+              this.infoDATA = result.result;
462
+              if (this.loginUser.dept.id != this.infoDATA.launch.id) {
463
+                uni.showModal({
464
+                  title: '提示',
465
+                  content: "您现在所在的科室是【" + this.loginUser.dept.dept + "】,药包所在的科室是【" + this.infoDATA.launch.dept +
466
+                    "】,您不能进行操作",
467
+                  showCancel: false,
468
+                  success: function(res) {
469
+                    if (res.confirm) {
470
+                      console.log('用户点击确定');
471
+                    } else if (res.cancel) {
472
+                      console.log('用户点击取消');
473
+                    }
474
+                  }
475
+                });
476
+              }
477
+            } else {
478
+              uni.showToast({
479
+                icon: "none",
480
+                title: "请求失败!",
481
+              });
482
+            }
483
+          });
484
+        }
485
+        // 点击列表进入详情
486
+        let id = options.id;
487
+        if (id) {
488
+          uni.showLoading({
489
+            title: "加载中",
490
+            mask: true,
491
+          });
492
+          get("/api/fetchData/drugsBag/" + id).then((res) => {
493
+            uni.hideLoading();
494
+            if (res.status == 200) {
495
+              this.infoDATA = res.data;
496
+              if (this.loginUser.dept.id != this.infoDATA.launch.id) {
497
+                uni.showModal({
498
+                  title: '提示',
499
+                  content: "您现在所在的科室是【" + this.loginUser.dept.dept + "】,药包所在的科室是【" + this.infoDATA.launch.dept +
500
+                    "】,您不能进行操作",
501
+                  showCancel: false,
502
+                  success: function(res) {
503
+                    if (res.confirm) {
504
+                      console.log('用户点击确定');
505
+                    } else if (res.cancel) {
506
+                      console.log('用户点击取消');
507
+                    }
508
+                  }
509
+                });
510
+              }
511
+            } else {
512
+              uni.showToast({
513
+                icon: "none",
514
+                title: "请求失败!",
515
+              });
516
+            }
517
+          });
518
+        }
519
+      },
520
+      // 流程信息查询
521
+      queryProcess(options) {
522
+        //扫码进入详情
523
+        let qrcode = options.qrcode;
524
+        if (qrcode) {
525
+          uni.showLoading({
526
+            title: "加载中",
527
+            mask: true,
528
+          });
529
+          let postData = {
530
+            idx: 0,
531
+            sum: 9999,
532
+            drugsBagOperationLog: {
533
+              qrcode,
534
+              hosId: this.loginUser.currentHospital.id
535
+            }
536
+          }
537
+          post("/simple/data/fetchDataList/drugsBagOperationLog", postData).then((result) => {
538
+            uni.hideLoading();
539
+            if (result.status == 200) {
540
+              this.queryProcessList = res.list;
541
+            } else {
542
+              uni.showToast({
543
+                icon: "none",
544
+                title: "请求失败!",
545
+              });
546
+            }
547
+          });
548
+        }
549
+        // 点击列表进入详情
550
+        let id = options.id;
551
+        if (id) {
552
+          uni.showLoading({
553
+            title: "加载中",
554
+            mask: true,
555
+          });
556
+          let postData = {
557
+            idx: 0,
558
+            sum: 9999,
559
+            drugsBagOperationLog: {
560
+              packid: options.packid,
561
+              hosId: this.loginUser.currentHospital.id
562
+            }
563
+          }
564
+          post("/simple/data/fetchDataList/drugsBagOperationLog", postData).then((res) => {
565
+            uni.hideLoading();
566
+            if (res.status == 200) {
567
+              this.queryProcessList = res.list;
568
+            } else {
569
+              uni.showToast({
570
+                icon: "none",
571
+                title: "请求失败!",
572
+              });
573
+            }
574
+          });
575
+        }
576
+      }
416 577
     },
417 578
     onLoad(options) {
418 579
       this.loginUser = uni.getStorageSync("userData").user;
@@ -423,88 +584,45 @@
423 584
       // #ifdef H5
424 585
       webHandle("no", "wx");
425 586
       // #endif
426
-      //扫码进入详情
427
-      let qrcode = options.qrcode;
428
-      if (qrcode) {
429
-        uni.showLoading({
430
-          title: "加载中",
431
-          mask: true,
432
-        });
433
-        post("/drugsBag/getDrugsBagByQr", {
434
-          qrcode,
435
-        }).then((result) => {
436
-          uni.hideLoading();
437
-          if (result.state == 200) {
438
-            this.infoDATA = result.result;
439
-            if (this.loginUser.dept.id != this.infoDATA.launch.id) {
440
-              uni.showModal({
441
-                title: '提示',
442
-                content: "您现在所在的科室是【" + this.loginUser.dept.dept + "】,药包所在的科室是【" + this.infoDATA.launch.dept +
443
-                  "】,您不能进行操作",
444
-                showCancel: false,
445
-                success: function(res) {
446
-                  if (res.confirm) {
447
-                    console.log('用户点击确定');
448
-                  } else if (res.cancel) {
449
-                    console.log('用户点击取消');
450
-                  }
451
-                }
452
-              });
453
-            }
454
-          } else {
455
-            uni.showToast({
456
-              icon: "none",
457
-              title: "请求失败!",
458
-            });
459
-          }
460
-        });
461
-      }
462
-      // 点击列表进入详情
463
-      let id = options.id;
464
-      if (id) {
465
-        uni.showLoading({
466
-          title: "加载中",
467
-          mask: true,
468
-        });
469
-        get("/api/fetchData/drugsBag/" + id).then((res) => {
470
-          uni.hideLoading();
471
-          if (res.status == 200) {
472
-            this.infoDATA = res.data;
473
-            if (this.loginUser.dept.id != this.infoDATA.launch.id) {
474
-              uni.showModal({
475
-                title: '提示',
476
-                content: "您现在所在的科室是【" + this.loginUser.dept.dept + "】,药包所在的科室是【" + this.infoDATA.launch.dept +
477
-                  "】,您不能进行操作",
478
-                showCancel: false,
479
-                success: function(res) {
480
-                  if (res.confirm) {
481
-                    console.log('用户点击确定');
482
-                  } else if (res.cancel) {
483
-                    console.log('用户点击取消');
484
-                  }
485
-                }
486
-              });
487
-            }
488
-          } else {
489
-            uni.showToast({
490
-              icon: "none",
491
-              title: "请求失败!",
492
-            });
493
-          }
494
-        });
495
-      }
587
+      this.queryObj = options;
588
+      this.queryBase(this.queryObj);
496 589
     },
497 590
   };
498 591
 </script>
499 592
 <style lang="less">
500 593
   .pharmacyDetails {
501 594
     background-color: rgb(249, 250, 251);
502
-    padding-top: 10%;
595
+    padding-top: 32rpx;
503 596
 
504 597
     .pharmacyDetails_title {
505
-      font-size: 46rpx;
506
-      font-weight: 550;
507
-      text-align: center;
598
+      height: 100rpx;
599
+      display: flex;
600
+      align-items: center;
601
+      background-color: #fff;
602
+
603
+      .pharmacyDetails_tab {
604
+        flex: 1;
605
+        display: flex;
606
+        align-items: center;
607
+
608
+        .pharmacyDetails_label {
609
+          display: flex;
610
+          justify-content: center;
611
+          align-items: center;
612
+          font-size: 40rpx;
613
+          width: 100%;
614
+          height: 66rpx;
615
+          border-radius: 32rpx;
616
+          color: #666;
617
+        }
618
+
619
+        &.active {
620
+          .pharmacyDetails_label {
621
+            color: #333;
622
+            background-color: #e5e9ed;
623
+          }
624
+        }
625
+      }
508 626
     }
509 627
 
510 628
     .page_item_wrap {
@@ -577,7 +695,8 @@
577 695
 
578 696
         .page_item_cont {
579 697
           min-height: 180rpx;
580
-          max-height: 424rpx;
698
+          max-height: calc(100vh - 534rpx);
699
+          overflow-y: auto;
581 700
           padding: 0 16rpx;
582 701
           text-align: left;
583 702
           position: relative;
@@ -626,7 +745,7 @@
626 745
           }
627 746
 
628 747
           .page_item_cont_C {
629
-            margin-bottom: 28rpx;
748
+            margin-top: 28rpx;
630 749
 
631 750
             .page_item_cont_title_C {
632 751
               font-size: 32rpx;

+ 2 - 0
pages/scanning_B/scanning_B.vue

@@ -21,9 +21,11 @@
21 21
     <view class="Scanning_cont" v-if="res.status == 200 || res.status == 666">
22 22
       <view>标本类型 : {{ infoDATA.stype.name || "-" }}</view>
23 23
       <view>标本编码 : {{ infoDATA.scode || "-" }}</view>
24
+      <view>标本状态 : {{ res.data.speState ? res.data.speState.name : "-" }}</view>
24 25
       <view>患者床号 : {{ infoDATA.bedNum || "-" }}</view>
25 26
       <view>申请科室 : {{ infoDATA.sickRoom || "-" }}</view>
26 27
       <view>检查科室 : {{ infoDATA.checkDept || "-" }}</view>
28
+      <view>检验项目 : {{ res.data.specimenDesc || "-" }}</view>
27 29
     </view>
28 30
     <view class="Scanning_cont" v-else>
29 31
       <view>{{ res.msg }}</view>