Browse Source

药房流程信息

seimin 2 years ago
parent
commit
2beb9c920e
2 changed files with 22 additions and 11 deletions
  1. 3 3
      pages/pharmacy/pharmacy.vue
  2. 19 8
      pages/pharmacyDetails/pharmacyDetails.vue

+ 3 - 3
pages/pharmacy/pharmacy.vue

@@ -44,7 +44,7 @@
44 44
             class="page_item_wrap"
45 45
             v-for="row in list"
46 46
             :key="row.id"
47
-            @click="getDetails(row.id)"
47
+            @click="getDetails(row)"
48 48
           >
49 49
             <view class="page_item">
50 50
               <view class="page_item_top">
@@ -236,9 +236,9 @@ export default {
236 236
       }
237 237
     },
238 238
     // 详情页面
239
-    getDetails(id) {
239
+    getDetails(drugBug) {
240 240
       uni.navigateTo({
241
-        url: `../pharmacyDetails/pharmacyDetails?id=${id}`,
241
+        url: `../pharmacyDetails/pharmacyDetails?id=${drugBug.id}&packid=${drugBug.packid}`,
242 242
       });
243 243
     },
244 244
     // 阻止浏览器滑动

+ 19 - 8
pages/pharmacyDetails/pharmacyDetails.vue

@@ -40,16 +40,17 @@
40 40
             </view>
41 41
           </view>
42 42
         </view>
43
-        <view class="page_item_cont" v-show="selectedLabelSlots == 2">
43
+        <scroll-view scroll-y class="page_item_cont" v-show="selectedLabelSlots == 2">
44 44
           <view class="page_item_cont_C" v-for="(item,i) in queryProcessList" :key="i">
45 45
             <view class="page_item_cont_title_C">
46
-              <text>{{item.operationType?item.operationType.name:''}}</text>
47
-              <text class="text_big">
46
+              <text style="flex: 1;">{{item.operationTime}}</text>
47
+              <text style="flex: 1;">{{item.operationType?item.operationType.name:''}}</text>
48
+              <text class="text_big" style="width: 3em;">
48 49
                 <text>{{ item.username || '暂无' }}</text>
49 50
               </text>
50 51
             </view>
51 52
           </view>
52
-        </view>
53
+        </scroll-view>
53 54
         <view class="L"></view>
54 55
         <view class="R"></view>
55 56
       </view>
@@ -537,7 +538,12 @@
537 538
           post("/simple/data/fetchDataList/drugsBagOperationLog", postData).then((result) => {
538 539
             uni.hideLoading();
539 540
             if (result.status == 200) {
540
-              this.queryProcessList = res.list;
541
+              result.list.forEach(v => {
542
+                if (v.operationTime) {
543
+                  v.operationTime = (new Date(v.operationTime)).Format("MM-dd hh:mm");
544
+                }
545
+              });
546
+              this.queryProcessList = result.list;
541 547
             } else {
542 548
               uni.showToast({
543 549
                 icon: "none",
@@ -547,8 +553,8 @@
547 553
           });
548 554
         }
549 555
         // 点击列表进入详情
550
-        let id = options.id;
551
-        if (id) {
556
+        let packid = options.packid;
557
+        if (packid) {
552 558
           uni.showLoading({
553 559
             title: "加载中",
554 560
             mask: true,
@@ -564,6 +570,11 @@
564 570
           post("/simple/data/fetchDataList/drugsBagOperationLog", postData).then((res) => {
565 571
             uni.hideLoading();
566 572
             if (res.status == 200) {
573
+              res.list.forEach(v => {
574
+                if (v.operationTime) {
575
+                  v.operationTime = (new Date(v.operationTime)).Format("MM-dd hh:mm");
576
+                }
577
+              });
567 578
               this.queryProcessList = res.list;
568 579
             } else {
569 580
               uni.showToast({
@@ -694,9 +705,9 @@
694 705
         }
695 706
 
696 707
         .page_item_cont {
708
+          box-sizing: border-box;
697 709
           min-height: 180rpx;
698 710
           max-height: calc(100vh - 534rpx);
699
-          overflow-y: auto;
700 711
           padding: 0 16rpx;
701 712
           text-align: left;
702 713
           position: relative;