Browse Source

完成工单详情

seimin 2 years ago
parent
commit
26a1e87ded
1 changed files with 274 additions and 9 deletions
  1. 274 9
      pages/orderDetail/orderDetail.vue

+ 274 - 9
pages/orderDetail/orderDetail.vue

@@ -3,7 +3,7 @@
3 3
     <!-- 头部 -->
4 4
     <view class="orderDetail_header">
5 5
       <view class="orderDetail_header_item" v-for="tab in tabs" :key="tab.id" :class="{active:tab.id === selectedTab}"
6
-        @click="changeTab(tab.id)">
6
+        @click="debouncedChangeTab(tab.id)">
7 7
         {{tab.name}}
8 8
       </view>
9 9
     </view>
@@ -161,25 +161,146 @@
161 161
             </view>
162 162
           </view>
163 163
         </view>
164
-        <view class="orderDetail_infoItem_item business business-inspect">
165
-          <view class="inspect_info">
164
+        <!-- 检查信息 -->
165
+        <view class="orderDetail_infoItem_item business business_inspect"
166
+          v-if="orderInfo.taskType&&(orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['患者陪检业务'] || orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['患者其他服务业务'])">
167
+          <!-- 患者信息 -->
168
+          <view class="inspect_info" v-if="orderInfo.patient">
166 169
             <view class="inspect_info_block">
167 170
               <view class="inspect_info_left">
168
-                张三
171
+                <block v-if="orderInfo.patient.illnessState">
172
+                  <view class="inspect_info_icon" v-if="orderInfo.patient.illnessState.value === '2'">危</view>
173
+                  <view class="inspect_info_icon" v-else-if="orderInfo.patient.illnessState.value === '3'">重</view>
174
+                </block>
175
+                <block v-if="orderInfo.patient.careLevel">
176
+                  <view class="inspect_info_icon green" v-if="orderInfo.patient.careLevel.value === '0'">特</view>
177
+                  <view class="inspect_info_icon green" v-else-if="orderInfo.patient.careLevel.value === '1'">1</view>
178
+                  <view class="inspect_info_icon green" v-else-if="orderInfo.patient.careLevel.value === '2'">2</view>
179
+                  <view class="inspect_info_icon green" v-else-if="orderInfo.patient.careLevel.value === '3'">3</view>
180
+                </block>
181
+                <view class="inspect_info_name">{{orderInfo.patient.patientName}}</view>
169 182
               </view>
170 183
               <view class="inspect_info_right">
171
-                14床
184
+                {{orderInfo.patient.bedNum}}
172 185
               </view>
173 186
             </view>
174 187
             <view class="inspect_info_block">
175 188
               <view class="inspect_info_left">
176
-                10086
189
+                {{orderInfo.patient.patientCode}}
177 190
               </view>
178
-              <view class="inspect_info_right">
179
-                待检6
191
+              <view class="inspect_info_right"
192
+                v-if="orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['患者陪检业务']">
193
+                待检{{orderInfo.checkList.length}}
180 194
               </view>
181 195
             </view>
182 196
           </view>
197
+          <!-- 检查信息 -->
198
+          <block v-if="orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['患者陪检业务']">
199
+            <view class="inspect_item" v-for="item in orderInfo.checkList" :key="item.id">
200
+              <view class="inspect_item_name">
201
+                {{item.inspectName||'暂无'}}
202
+              </view>
203
+              <view class="inspect_item_info">
204
+                <view class="inspect_item_dept">
205
+                  {{item.execDept?(deptDisplay==2?item.execDept.deptalias:item.execDept.dept):'暂无'}}
206
+                </view>
207
+                <view class="inspect_item_number">
208
+                  叫号信息 {{item.reservationNumber || '暂无'}}
209
+                </view>
210
+              </view>
211
+              <view class="inspect_item_yytime">
212
+                预约时间{{item.yyTime || '暂无'}}
213
+              </view>
214
+            </view>
215
+          </block>
216
+        </view>
217
+        <!-- 标本信息 -->
218
+        <view class="orderDetail_infoItem_item business business_specimen"
219
+          v-if="orderInfo.taskType&&(orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['临时标本业务'] || orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['标本轮巡业务'])">
220
+          <view class="inspect_specimen">
221
+            <uni-table stripe emptyText="暂无更多数据">
222
+              <!-- 表头行 -->
223
+              <uni-tr class="th">
224
+                <uni-th align="center" width="68">标本类型</uni-th>
225
+                <uni-th align="center" width="71">标本编码</uni-th>
226
+                <uni-th align="center" width="66">状态</uni-th>
227
+                <uni-th align="center" width="71">科室</uni-th>
228
+              </uni-tr>
229
+              <!-- 表格数据行 -->
230
+              <uni-tr v-for="data in orderInfo.specimenSet" :key="data.id">
231
+                <uni-td align="center">{{data.stype?data.stype.name:'暂无'}}</uni-td>
232
+                <uni-td align="center">{{data.scode || '暂无'}}</uni-td>
233
+                <uni-td align="center">{{data.speState?data.speState.name:'暂无'}}</uni-td>
234
+                <uni-td align="center" class="td" v-if="data.checkDept">
235
+                  {{deptDisplay==2?data.checkDept.deptalias:data.checkDept.dept}}
236
+                  <image class="urgent" v-if="data.urgent == 1" src="../../static/imgs/icon_ji.png" mode="widthFix">
237
+                  </image>
238
+                </uni-td>
239
+                <uni-td align="center" class="td" v-else>
240
+                  暂无
241
+                  <image class="urgent" v-if="data.urgent == 1" src="../../static/imgs/icon_ji.png" mode="widthFix">
242
+                  </image>
243
+                </uni-td>
244
+              </uni-tr>
245
+            </uni-table>
246
+          </view>
247
+        </view>
248
+        <!-- 药品信息 -->
249
+        <view class="orderDetail_infoItem_item business business_drugsBag"
250
+          v-if="orderInfo.taskType&&(orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['药品配送业务'] || orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['静配配送'])">
251
+          <!-- 检查信息 -->
252
+          <block v-if="orderInfo.drugs&&orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['药品配送业务']">
253
+            <view class="drugsBag_item">
254
+              <view class="drugsBag_item_name">
255
+                发药单号
256
+              </view>
257
+              <view class="drugsBag_item_value">
258
+                {{orderInfo.drugs.packid || '暂无'}}
259
+              </view>
260
+            </view>
261
+            <view class="drugsBag_item">
262
+              <view class="drugsBag_item_name">
263
+                发药科室
264
+              </view>
265
+              <view class="drugsBag_item_value">
266
+                {{orderInfo.drugs.launch?(deptDisplay == 2?orderInfo.drugs.launch.deptalias:orderInfo.drugs.launch.dept):'暂无'}}
267
+              </view>
268
+            </view>
269
+            <view class="drugsBag_item">
270
+              <view class="drugsBag_item_name">
271
+                状态
272
+              </view>
273
+              <view class="drugsBag_item_value">
274
+                {{orderInfo.drugs.drugsState?orderInfo.drugs.drugsState.name:'暂无'}}
275
+              </view>
276
+            </view>
277
+          </block>
278
+          <block v-if="orderInfo.staticDistri&&orderInfo.taskType.associationType.value==ASSOCIATION_TYPES['静配配送']">
279
+            <view class="drugsBag_item">
280
+              <view class="drugsBag_item_name">
281
+                发药单号
282
+              </view>
283
+              <view class="drugsBag_item_value">
284
+                {{orderInfo.staticDistri.packid || '暂无'}}
285
+              </view>
286
+            </view>
287
+            <view class="drugsBag_item">
288
+              <view class="drugsBag_item_name">
289
+                发药科室
290
+              </view>
291
+              <view class="drugsBag_item_value">
292
+                {{orderInfo.staticDistri.launch?(deptDisplay == 2?orderInfo.staticDistri.launch.deptalias:orderInfo.staticDistri.launch.dept):'暂无'}}
293
+              </view>
294
+            </view>
295
+            <view class="drugsBag_item">
296
+              <view class="drugsBag_item_name">
297
+                状态
298
+              </view>
299
+              <view class="drugsBag_item_value">
300
+                {{orderInfo.staticDistri.drugsState?orderInfo.staticDistri.drugsState.name:'暂无'}}
301
+              </view>
302
+            </view>
303
+          </block>
183 304
         </view>
184 305
       </scroll-view>
185 306
     </view>
@@ -191,6 +312,9 @@
191 312
 
192 313
 <script>
193 314
   import {
315
+    debounce
316
+  } from 'lodash/function';
317
+  import {
194 318
     reqFetchData,
195 319
     reqFetchWorkOrderLog,
196 320
   } from "../../request/api.js";
@@ -212,6 +336,7 @@
212 336
   export default {
213 337
     data() {
214 338
       return {
339
+        debouncedChangeTab: null,
215 340
         // 路由传参
216 341
         queryParams: {},
217 342
         // 关联类型
@@ -287,7 +412,6 @@
287 412
             this.getProcess(this.queryParams);
288 413
             break;
289 414
           case 3:
290
-            this.getInfo(this.queryParams);
291 415
             break;
292 416
         }
293 417
       },
@@ -444,6 +568,12 @@
444 568
     onLoad(queryParams) {
445 569
       console.log(queryParams);
446 570
       this.init(queryParams);
571
+    },
572
+    created() {
573
+      this.debouncedChangeTab = debounce(this.changeTab, 166);
574
+    },
575
+    beforeDestroy() {
576
+      this.debouncedChangeTab.cancel()
447 577
     }
448 578
   }
449 579
 </script>
@@ -638,6 +768,141 @@
638 768
               padding-bottom: 16rpx;
639 769
             }
640 770
           }
771
+
772
+          // 业务信息-检查
773
+          &.business_inspect {
774
+            .inspect_info {
775
+              font-size: 34rpx;
776
+              color: #333;
777
+              padding-top: 20rpx;
778
+              padding-bottom: 20rpx;
779
+              @include border($directive:bottom, $style:dashed);
780
+
781
+              .inspect_info_block {
782
+                height: 60rpx;
783
+                @include flex(space-between, center);
784
+
785
+                .inspect_info_left {
786
+                  @include flex;
787
+
788
+                  .inspect_info_icon {
789
+                    width: 50rpx;
790
+                    height: 50rpx;
791
+                    line-height: 50rpx;
792
+                    background-color: #FFE8EB;
793
+                    border-radius: 50%;
794
+                    border: 1px solid #FF3B53;
795
+                    color: #FF3B53;
796
+                    font-size: 28rpx;
797
+                    margin-right: 8rpx;
798
+                    @include flex(center, center);
799
+
800
+                    &.green {
801
+                      border: 1px solid $defaultColor;
802
+                      background-color: rgba(73, 184, 86, 0.1);
803
+                    }
804
+                  }
805
+
806
+                  .inspect_info_name {
807
+                    font-weight: bold;
808
+                  }
809
+                }
810
+
811
+                .inspect_info_right {
812
+                  font-weight: bold;
813
+                }
814
+              }
815
+            }
816
+
817
+            .inspect_item {
818
+              color: #333;
819
+              font-size: 34rpx;
820
+              line-height: 48rpx;
821
+              padding-top: 26rpx;
822
+              padding-bottom: 26rpx;
823
+              @include border($directive:bottom, $style:dashed);
824
+
825
+              .inspect_item_name {
826
+                font-weight: bold;
827
+              }
828
+
829
+              .inspect_item_yytime {
830
+                font-weight: bold;
831
+              }
832
+
833
+              .inspect_item_info {
834
+                margin-top: 16rpx;
835
+                margin-bottom: 16rpx;
836
+                @include flex(space-between, center);
837
+
838
+                .inspect_item_dept {
839
+                  flex: 1;
840
+                  word-break: break-all;
841
+                  @include clamp;
842
+                }
843
+
844
+                .inspect_item_number {
845
+                  flex: 1;
846
+                  text-align: right;
847
+                  word-break: break-all;
848
+                  @include clamp;
849
+                }
850
+              }
851
+            }
852
+          }
853
+
854
+          // 业务信息-标本
855
+          &.business_specimen {
856
+            font-size: 34rpx;
857
+
858
+            .th {
859
+              background-color: red;
860
+              @include btn_background;
861
+
862
+              th {
863
+                color: #fff;
864
+              }
865
+            }
866
+
867
+            .td {
868
+              position: relative;
869
+
870
+              .urgent {
871
+                width: 60rpx;
872
+                position: absolute !important;
873
+                right: 0;
874
+                top: 0;
875
+              }
876
+            }
877
+
878
+            .table--border {
879
+              border: none;
880
+            }
881
+
882
+            ::v-deep .uni-table {
883
+              min-width: 0;
884
+            }
885
+
886
+            ::v-deep .uni-table-td {
887
+              word-break: break-all;
888
+            }
889
+          }
890
+
891
+          // 业务信息-药品
892
+          &.business_drugsBag {
893
+            .drugsBag_item {
894
+              color: #333;
895
+              font-size: 34rpx;
896
+              margin-top: 20rpx;
897
+              @include flex(space-between, center);
898
+
899
+              .drugsBag_item_name {}
900
+
901
+              .drugsBag_item_value {
902
+                font-weight: bold;
903
+              }
904
+            }
905
+          }
641 906
         }
642 907
       }
643 908
     }