浏览代码

执行中列表根据状态进行筛选

seimin 3 年之前
父节点
当前提交
2246100b5c
共有 1 个文件被更改,包括 67 次插入5 次删除
  1. 67 5
      pages/receiptpage/receiptpage.vue

+ 67 - 5
pages/receiptpage/receiptpage.vue

@@ -3,7 +3,13 @@
3
     <view class="page_tab">
3
     <view class="page_tab">
4
       <view class="page_tab_bar" :class="{ active: item.label === selectedLabelSlots }" v-for="item in tabs"
4
       <view class="page_tab_bar" :class="{ active: item.label === selectedLabelSlots }" v-for="item in tabs"
5
         :key="item.value" @click="clickHandler(item.label)">
5
         :key="item.value" @click="clickHandler(item.label)">
6
-        {{ item.label }}<text class="tab_num">( {{ item.num }} )</text>
6
+        {{ item.label }}
7
+        <text class="tab_num">( {{ item.num }} )</text>
8
+        <view class="more" v-if="item.label==='执行中'"></view>
9
+        <picker class="more_picker" v-if="item.label==='执行中'" @click.stop @change="execFilter($event)" :value="index"
10
+          :range="array" range-key="name">
11
+          <view class="uni-input">{{array[index].name}}</view>
12
+        </picker>
7
       </view>
13
       </view>
8
     </view>
14
     </view>
9
     <view v-if="zxzData.length == 0" class="zwsj">
15
     <view v-if="zxzData.length == 0" class="zwsj">
@@ -225,6 +231,22 @@
225
   export default {
231
   export default {
226
     data() {
232
     data() {
227
       return {
233
       return {
234
+        // 筛选条件
235
+        array: [{
236
+          id: 0,
237
+          name: '全部'
238
+        }, {
239
+          id: 71,
240
+          name: '待到达'
241
+        }, {
242
+          id: 72,
243
+          name: '待送达'
244
+        }, {
245
+          id: 75,
246
+          name: '执行中'
247
+        }, ],
248
+        index: 0,
249
+        arrayKey: 0,
228
         // 当前登录人是否是药房角色
250
         // 当前登录人是否是药房角色
229
         pharmacistFlag: false,
251
         pharmacistFlag: false,
230
         // 抢单的id
252
         // 抢单的id
@@ -298,6 +320,20 @@
298
       bigScreen,
320
       bigScreen,
299
     },
321
     },
300
     methods: {
322
     methods: {
323
+      // 执行中筛选
324
+      execFilter({
325
+        detail: {
326
+          value
327
+        }
328
+      }) {
329
+        this.index = value;
330
+        this.arrayKey = this.array[value].id;
331
+        this.zxzData = [];
332
+        this.totalNum = -1;
333
+        this.idx = 0;
334
+        this.selectedLabelSlots = '执行中';
335
+        this.executingOrders(0);
336
+      },
301
       // 获取科室二维码设置开关
337
       // 获取科室二维码设置开关
302
       getMenu() {
338
       getMenu() {
303
         let menu = uni.getStorageSync('userData').menu;
339
         let menu = uni.getStorageSync('userData').menu;
@@ -327,10 +363,6 @@
327
               text: "二维码设置",
363
               text: "二维码设置",
328
             });
364
             });
329
           }
365
           }
330
-          // --------------------------
331
-
332
-
333
-          // --------------------------
334
         })
366
         })
335
       },
367
       },
336
       // 拍照
368
       // 拍照
@@ -670,6 +702,7 @@
670
       },
702
       },
671
       //执行中列表数据获取
703
       //执行中列表数据获取
672
       executingOrders(idx) {
704
       executingOrders(idx) {
705
+        console.log(this.zxzData.length,this.totalNum)
673
         if (this.zxzData.length == this.totalNum) {
706
         if (this.zxzData.length == this.totalNum) {
674
           uni.showToast({
707
           uni.showToast({
675
             icon: "none",
708
             icon: "none",
@@ -682,6 +715,11 @@
682
           idx,
715
           idx,
683
           sum: 20,
716
           sum: 20,
684
         };
717
         };
718
+        if (this.arrayKey) {
719
+          data.keyWord = this.arrayKey;
720
+        } else {
721
+          delete data.keyWord;
722
+        }
685
         uni.showLoading({
723
         uni.showLoading({
686
           title: "加载中",
724
           title: "加载中",
687
           mask: true,
725
           mask: true,
@@ -794,6 +832,11 @@
794
           idx: 0,
832
           idx: 0,
795
           sum: 20,
833
           sum: 20,
796
         };
834
         };
835
+        if (this.arrayKey) {
836
+          data.keyWord = this.arrayKey;
837
+        } else {
838
+          delete data.keyWord;
839
+        }
797
         post("/workerOrder/executingOrders", data).then((res) => {
840
         post("/workerOrder/executingOrders", data).then((res) => {
798
           if (res.status == 200) {
841
           if (res.status == 200) {
799
             this.tabs[1].num = res.data.resultCount;
842
             this.tabs[1].num = res.data.resultCount;
@@ -912,6 +955,25 @@
912
           margin-left: 8rpx;
955
           margin-left: 8rpx;
913
         }
956
         }
914
 
957
 
958
+        .more {
959
+          position: absolute;
960
+          right: 20rpx;
961
+          width: 40rpx;
962
+          height: 4rpx;
963
+          border-top: 2px solid #49b856;
964
+          border-bottom: 2px solid #49b856;
965
+          background-color: #49b856;
966
+          padding: 5px 0;
967
+          background-clip: content-box;
968
+        }
969
+
970
+        .more_picker {
971
+          position: absolute;
972
+          right: 0;
973
+          height: 100%;
974
+          opacity: 0;
975
+        }
976
+
915
         &.active {
977
         &.active {
916
           color: #49b856;
978
           color: #49b856;
917
 
979