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

+ 24 - 11
pages/specimenDetail/specimenDetail.vue

@@ -2,8 +2,8 @@
2 2
   <view class="specimenCheckingDetail">
3 3
     <view class="page_tab">
4 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 7
           <view class="more"></view>
8 8
         </picker>
9 9
       </view>
@@ -77,11 +77,11 @@
77 77
   export default {
78 78
     data() {
79 79
       return {
80
+        id: 0,
80 81
         index: 0,
81 82
         arrayKey: 0,
82
-        total: 0,
83 83
         array: [
84
-          { id: 0, name: '全部'}
84
+          { id: 0, name: '全部', total: '', nameNum: ''}
85 85
         ],
86 86
         
87 87
         idx: 0,
@@ -102,10 +102,23 @@
102 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 133
           "specimen": {
121 134
             "gdid": this.workOrderId,
122 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 138
             "orderBy": 'arrive_time desc',
125 139
           }
126 140
         };
@@ -139,7 +153,6 @@
139 153
             }else{
140 154
               this.list = res.list;
141 155
             }
142
-            this.total = res.totalNum;
143 156
           } else {
144 157
             uni.showToast({
145 158
               icon: "none",
@@ -158,7 +171,7 @@
158 171
       this.workOrderId = options.workOrderId;
159 172
       this.associationTypeValue = options.associationTypeValue;
160 173
       this.getList();
161
-      this.getSpecimenType();
174
+      this.getSpecimenDesc();
162 175
       // #ifdef APP-PLUS
163 176
       webHandle("no", "app");
164 177
       // #endif