Browse Source

工单标本详情

seimin 1 year ago
parent
commit
c80fa58387
2 changed files with 167 additions and 6 deletions
  1. 1 1
      main.js
  2. 166 5
      pages/specimenDetail/specimenDetail.vue

+ 1 - 1
main.js

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

+ 166 - 5
pages/specimenDetail/specimenDetail.vue

@@ -1,5 +1,17 @@
1
 <template>
1
 <template>
2
   <view class="specimenCheckingDetail">
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
     <view class="page_item_wrap" v-for="item in list" :key="item.id">
15
     <view class="page_item_wrap" v-for="item in list" :key="item.id">
4
       <view class="page_item">
16
       <view class="page_item">
5
         <view class="page_item_top">
17
         <view class="page_item_top">
@@ -27,6 +39,14 @@
27
               <view class="text_big">{{item.residenceNo||'无'}}</text></view>
39
               <view class="text_big">{{item.residenceNo||'无'}}</text></view>
28
             </view>
40
             </view>
29
             <view class="page_item_cont_title">
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
               <view class="text_big">{{
50
               <view class="text_big">{{
31
                 item.sickRoom ? item.sickRoom.dept : "无"
51
                 item.sickRoom ? item.sickRoom.dept : "无"
32
               }}</view>
52
               }}</view>
@@ -57,31 +77,69 @@
57
   export default {
77
   export default {
58
     data() {
78
     data() {
59
       return {
79
       return {
80
+        index: 0,
81
+        arrayKey: 0,
82
+        total: 0,
83
+        array: [
84
+          { id: 0, name: '全部'}
85
+        ],
86
+        
87
+        idx: 0,
60
         workOrderId: 0,
88
         workOrderId: 0,
61
         associationTypeValue: '',
89
         associationTypeValue: '',
62
         list: [],
90
         list: [],
63
       };
91
       };
64
     },
92
     },
65
     methods: {
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
         uni.showLoading({
113
         uni.showLoading({
68
           mask: true,
114
           mask: true,
69
           title: "加载中",
115
           title: "加载中",
70
         });
116
         });
71
         let postData = {
117
         let postData = {
72
-          "idx": 0,
73
-          "sum": 999,
118
+          "idx": isAccumulate ? ++this.idx : 0,
119
+          "sum": 20,
74
           "specimen": {
120
           "specimen": {
75
             "gdid": this.workOrderId,
121
             "gdid": this.workOrderId,
76
             "hosId": uni.getStorageSync('userData').user.currentHospital.id,
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
         post(`/simple/data/fetchDataList/specimen`, postData).then((res) => {
127
         post(`/simple/data/fetchDataList/specimen`, postData).then((res) => {
81
           uni.hideLoading();
128
           uni.hideLoading();
82
           uni.stopPullDownRefresh();
129
           uni.stopPullDownRefresh();
83
           if (res.status == 200) {
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
           } else {
143
           } else {
86
             uni.showToast({
144
             uni.showToast({
87
               icon: "none",
145
               icon: "none",
@@ -100,6 +158,7 @@
100
       this.workOrderId = options.workOrderId;
158
       this.workOrderId = options.workOrderId;
101
       this.associationTypeValue = options.associationTypeValue;
159
       this.associationTypeValue = options.associationTypeValue;
102
       this.getList();
160
       this.getList();
161
+      this.getSpecimenType();
103
       // #ifdef APP-PLUS
162
       // #ifdef APP-PLUS
104
       webHandle("no", "app");
163
       webHandle("no", "app");
105
       // #endif
164
       // #endif
@@ -110,11 +169,90 @@
110
     onPullDownRefresh() {
169
     onPullDownRefresh() {
111
       this.getList();
170
       this.getList();
112
     },
171
     },
172
+    // 上拉加载
173
+    onReachBottom(){
174
+      console.log('到底了');
175
+      this.getList(true);
176
+    }
113
   };
177
   };
114
 </script>
178
 </script>
115
 <style lang="less" scoped>
179
 <style lang="less" scoped>
116
   .specimenCheckingDetail {
180
   .specimenCheckingDetail {
181
+    padding-top: 96rpx;
117
     padding-bottom: 100rpx;
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
     .page_header {
257
     .page_header {
120
       margin: 20rpx;
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
     .page_item_wrap {
307
     .page_item_wrap {
147
       width: 100%;
308
       width: 100%;