浏览代码

工单标本详情

seimin 1 年之前
父节点
当前提交
c80fa58387
共有 2 个文件被更改,包括 167 次插入6 次删除
  1. 1 1
      main.js
  2. 166 5
      pages/specimenDetail/specimenDetail.vue

+ 1 - 1
main.js

@@ -7,7 +7,7 @@ import './mixins/mixin'
7 7
 // new VConsole();
8 8
 // import eruda from 'eruda';
9 9
 // eruda.init();
10
-console.info('v2.4.41');
10
+console.info('v2.4.42');
11 11
 Vue.prototype.wx = wx //声明扫码
12 12
 Vue.prototype.audios = [] //待播放的语音集合
13 13
 // #endif

+ 166 - 5
pages/specimenDetail/specimenDetail.vue

@@ -1,5 +1,17 @@
1 1
 <template>
2 2
   <view class="specimenCheckingDetail">
3
+    <view class="page_tab">
4
+      <view class="page_tab_bar active">
5
+        <picker class="more_picker" @change="execFilter($event)" :value="index" :range="array" range-key="name">
6
+          <view class="more_picker_text">{{ array[index].name }}<text class="tab_num">( {{ total }} )</text></view>
7
+          <view class="more"></view>
8
+        </picker>
9
+      </view>
10
+    </view>
11
+    <view class="zwsj" v-if="list.length == 0">
12
+      <image class="zwsj-img" mode="widthFix" src="../../static/img/zanwushuju.png"></image>
13
+      <view class="zwsj-txt">暂无数据</view>
14
+    </view>
3 15
     <view class="page_item_wrap" v-for="item in list" :key="item.id">
4 16
       <view class="page_item">
5 17
         <view class="page_item_top">
@@ -27,6 +39,14 @@
27 39
               <view class="text_big">{{item.residenceNo||'无'}}</text></view>
28 40
             </view>
29 41
             <view class="page_item_cont_title">
42
+              <view> 收取人 </view>
43
+              <view class="text_big">{{item.receiverName||'无'}}</text></view>
44
+            </view>
45
+            <view class="page_item_cont_title">
46
+              <view> 收取时间 </view>
47
+              <view class="text_big">{{item.arriveTime||'无'}}</text></view>
48
+            </view>
49
+            <view class="page_item_cont_title">
30 50
               <view class="text_big">{{
31 51
                 item.sickRoom ? item.sickRoom.dept : "无"
32 52
               }}</view>
@@ -57,31 +77,69 @@
57 77
   export default {
58 78
     data() {
59 79
       return {
80
+        index: 0,
81
+        arrayKey: 0,
82
+        total: 0,
83
+        array: [
84
+          { id: 0, name: '全部'}
85
+        ],
86
+        
87
+        idx: 0,
60 88
         workOrderId: 0,
61 89
         associationTypeValue: '',
62 90
         list: [],
63 91
       };
64 92
     },
65 93
     methods: {
66
-      getList() {
94
+      // 筛选
95
+      execFilter({
96
+        detail: {
97
+          value
98
+        }
99
+      }) {
100
+        this.index = value;
101
+        this.arrayKey = this.array[value].id;
102
+        this.getList();
103
+      },
104
+      // 获取标本类型
105
+      getSpecimenType(){
106
+        let array = [{ id: 0, name: '全部'}];
107
+        post(`/common/common/getDictionary`, {"type":"list","key":"specimen_type"}).then((res) => {
108
+          this.array = array.concat(res) || array;
109
+        });
110
+      },
111
+      // 获取标本列表
112
+      getList(isAccumulate = false) {
67 113
         uni.showLoading({
68 114
           mask: true,
69 115
           title: "加载中",
70 116
         });
71 117
         let postData = {
72
-          "idx": 0,
73
-          "sum": 999,
118
+          "idx": isAccumulate ? ++this.idx : 0,
119
+          "sum": 20,
74 120
           "specimen": {
75 121
             "gdid": this.workOrderId,
76 122
             "hosId": uni.getStorageSync('userData').user.currentHospital.id,
77
-            "wxSign": "1",
123
+            "stype": this.array[this.index].id ? { id: this.array[this.index].id } : undefined,
124
+            "orderBy": 'arrive_time desc',
78 125
           }
79 126
         };
80 127
         post(`/simple/data/fetchDataList/specimen`, postData).then((res) => {
81 128
           uni.hideLoading();
82 129
           uni.stopPullDownRefresh();
83 130
           if (res.status == 200) {
84
-            this.list = res.list;
131
+            if(isAccumulate){
132
+               this.list = this.list.concat(res.list);
133
+               if(!res.list.length){
134
+                 uni.showToast({
135
+                   icon: 'none',
136
+                   title: '没有更多数据了',
137
+                 })
138
+               }
139
+            }else{
140
+              this.list = res.list;
141
+            }
142
+            this.total = res.totalNum;
85 143
           } else {
86 144
             uni.showToast({
87 145
               icon: "none",
@@ -100,6 +158,7 @@
100 158
       this.workOrderId = options.workOrderId;
101 159
       this.associationTypeValue = options.associationTypeValue;
102 160
       this.getList();
161
+      this.getSpecimenType();
103 162
       // #ifdef APP-PLUS
104 163
       webHandle("no", "app");
105 164
       // #endif
@@ -110,11 +169,90 @@
110 169
     onPullDownRefresh() {
111 170
       this.getList();
112 171
     },
172
+    // 上拉加载
173
+    onReachBottom(){
174
+      console.log('到底了');
175
+      this.getList(true);
176
+    }
113 177
   };
114 178
 </script>
115 179
 <style lang="less" scoped>
116 180
   .specimenCheckingDetail {
181
+    padding-top: 96rpx;
117 182
     padding-bottom: 100rpx;
183
+    
184
+    .page_tab {
185
+      width: 100%;
186
+      height: 96rpx;
187
+      display: flex;
188
+      position: fixed;
189
+      left: 0;
190
+      top: 0;
191
+      z-index: 999;
192
+      
193
+      .more {
194
+        position: absolute;
195
+        right: 20rpx;
196
+        width: 40rpx;
197
+        height: 4rpx;
198
+        border-top: 2px solid #49b856;
199
+        border-bottom: 2px solid #49b856;
200
+        background-color: #49b856;
201
+        padding: 5px 0;
202
+        background-clip: content-box;
203
+        z-index: 9999;
204
+        top: 50%;
205
+        transform: translateY(-50%);
206
+      }
207
+      
208
+      .more_picker {
209
+        position: absolute;
210
+        right: 0;
211
+        width: 100%;
212
+        height: 100%;
213
+        z-index: 9999;
214
+        
215
+        .more_picker_text{
216
+          height: 100%;
217
+          display: flex;
218
+          justify-content: center;
219
+          align-items: center;
220
+        }
221
+      }
222
+    
223
+      .page_tab_bar {
224
+        flex: 1;
225
+        font-size: 36rpx;
226
+        background: #fff;
227
+        display: flex;
228
+        justify-content: center;
229
+        align-items: center;
230
+        position: relative;
231
+    
232
+        &:after {
233
+          content: "";
234
+          position: absolute;
235
+          left: 0;
236
+          bottom: 0;
237
+          height: 2rpx;
238
+          width: 100%;
239
+          background-color: transparent;
240
+        }
241
+    
242
+        .tab_num {
243
+          color: #ff3b53;
244
+          margin-left: 8rpx;
245
+        }
246
+    
247
+        &.active {
248
+          color: #49b856;
249
+    
250
+          &:after {
251
+            background-color: #49b856;
252
+          }
253
+        }
254
+      }
255
+    }
118 256
 
119 257
     .page_header {
120 258
       margin: 20rpx;
@@ -142,6 +280,29 @@
142 280
         }
143 281
       }
144 282
     }
283
+    
284
+    .zwsj {
285
+      position: absolute;
286
+      left: 0;
287
+      top: 0;
288
+      right: 0;
289
+      bottom: 0;
290
+      display: flex;
291
+      justify-content: center;
292
+      align-items: center;
293
+      flex-direction: column;
294
+    
295
+      .zwsj-img {
296
+        width: 560rpx;
297
+      }
298
+    
299
+      .zwsj-txt {
300
+        font-size: 36rpx;
301
+        font-weight: 700;
302
+        margin-top: 20rpx;
303
+        text-align: center;
304
+      }
305
+    }
145 306
 
146 307
     .page_item_wrap {
147 308
       width: 100%;