seimin 1 年之前
父節點
當前提交
9e5b84e5e1
共有 1 個文件被更改,包括 24 次插入11 次删除
  1. 24 11
      pages/specimenDetail/specimenDetail.vue

+ 24 - 11
pages/specimenDetail/specimenDetail.vue

@@ -2,8 +2,8 @@
2
   <view class="specimenCheckingDetail">
2
   <view class="specimenCheckingDetail">
3
     <view class="page_tab">
3
     <view class="page_tab">
4
       <view class="page_tab_bar active">
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>
5
+        <picker class="more_picker" @change="execFilter($event)" :value="index" :range="array" range-key="nameNum">
6
+          <view class="more_picker_text">{{ array[index].name }}<text class="tab_num">( {{ array[index].total }} )</text></view>
7
           <view class="more"></view>
7
           <view class="more"></view>
8
         </picker>
8
         </picker>
9
       </view>
9
       </view>
@@ -77,11 +77,11 @@
77
   export default {
77
   export default {
78
     data() {
78
     data() {
79
       return {
79
       return {
80
+        id: 0,
80
         index: 0,
81
         index: 0,
81
         arrayKey: 0,
82
         arrayKey: 0,
82
-        total: 0,
83
         array: [
83
         array: [
84
-          { id: 0, name: '全部'}
84
+          { id: 0, name: '全部', total: '', nameNum: ''}
85
         ],
85
         ],
86
         
86
         
87
         idx: 0,
87
         idx: 0,
@@ -102,10 +102,23 @@
102
         this.getList();
102
         this.getList();
103
       },
103
       },
104
       // 获取标本类型
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;
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
+      getSpecimenDesc(){
113
+        post(`/api/specimenDesc/specimenCount`, {
114
+          "hosId": uni.getStorageSync('userData').user.currentHospital.id,
115
+          "gdId": this.workOrderId,
116
+          }).then((res) => {
117
+          res.data = res.data || [];
118
+          let array = [{ id: 0, name: '全部', total: '', nameNum: ''}];
119
+          array[0].total = res.total;
120
+          array[0].nameNum = `全部(${res.total})`;
121
+          this.array = array.concat(res.data.map( v=> ({id: --this.id, name: v[0] || '', nameNum: `${v[0] || ''}(${v[1]})`, total: v[1]})));
109
         });
122
         });
110
       },
123
       },
111
       // 获取标本列表
124
       // 获取标本列表
@@ -120,7 +133,8 @@
120
           "specimen": {
133
           "specimen": {
121
             "gdid": this.workOrderId,
134
             "gdid": this.workOrderId,
122
             "hosId": uni.getStorageSync('userData').user.currentHospital.id,
135
             "hosId": uni.getStorageSync('userData').user.currentHospital.id,
123
-            "stype": this.array[this.index].id ? { id: this.array[this.index].id } : undefined,
136
+            // "stype": this.array[this.index].id ? { id: this.array[this.index].id } : undefined,
137
+            "specimenDesc": this.array[this.index].id ? this.array[this.index].name : undefined,
124
             "orderBy": 'arrive_time desc',
138
             "orderBy": 'arrive_time desc',
125
           }
139
           }
126
         };
140
         };
@@ -139,7 +153,6 @@
139
             }else{
153
             }else{
140
               this.list = res.list;
154
               this.list = res.list;
141
             }
155
             }
142
-            this.total = res.totalNum;
143
           } else {
156
           } else {
144
             uni.showToast({
157
             uni.showToast({
145
               icon: "none",
158
               icon: "none",
@@ -158,7 +171,7 @@
158
       this.workOrderId = options.workOrderId;
171
       this.workOrderId = options.workOrderId;
159
       this.associationTypeValue = options.associationTypeValue;
172
       this.associationTypeValue = options.associationTypeValue;
160
       this.getList();
173
       this.getList();
161
-      this.getSpecimenType();
174
+      this.getSpecimenDesc();
162
       // #ifdef APP-PLUS
175
       // #ifdef APP-PLUS
163
       webHandle("no", "app");
176
       webHandle("no", "app");
164
       // #endif
177
       // #endif