浏览代码

新药品

seimin 5 月之前
父节点
当前提交
c5e386ae6a

+ 30 - 32
src/app/share/businessData-detail-info-modal/businessData-detail-info-modal.component.html

@@ -1,39 +1,37 @@
1 1
 <div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
2 2
   <div class="modalBody" style="width: 1200px;">
3
-    <div class="title">业务数据查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
3
+    <div class="title" *ngIf="(type === 'drugsJpbag' || type === 'drugsWestern' || type === 'drugsReturn' || type === 'drugsPoison' || type === 'drugsHerbal');else elseTpl">药品详情<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <ng-template #elseTpl>
5
+      <div class="title">业务数据查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
6
+    </ng-template>
7
+    <div class="drugsBag" *ngIf="type === 'drugsJpbag' || type === 'drugsWestern' || type === 'drugsReturn' || type === 'drugsPoison' || type === 'drugsHerbal'">
8
+      <div>单号:{{drugsBag.batchNo}}</div>
9
+      <div>申请科室:{{drugsBag.target ? drugsBag.target.dept : ''}}</div>
10
+      <div>发药科室:{{drugsBag.launch ? drugsBag.launch.dept : ''}}</div>
11
+    </div>
4 12
     <div class="content">
5
-      <!-- 新药品 -->
6
-      <nz-table *ngIf="type === 'drugsJpbag' || type === 'drugsWestern' || type === 'drugsReturn' || type === 'drugsPoison' || type === 'drugsHerbal'" class="hospitalTable" [nzData]="drugsBugMultipleList" nzSize="middle" [nzShowPagination]="false"
7
-        [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
8
-        <thead>
9
-          <tr class="thead">
10
-            <th nzWidth="5%">序号</th>
11
-            <th nzWidth="13%">患者姓名</th>
12
-            <th nzWidth="11%">患者ID</th>
13
-            <th nzWidth="11%">血液类型</th>
14
-            <th nzWidth="14%">血袋号</th>
15
-            <th nzWidth="11%">取血人</th>
16
-            <th nzWidth="12%">取血时间</th>
17
-            <th nzWidth="11%">接收人</th>
18
-            <th nzWidth="12%">接收时间</th>
19
-          </tr>
20
-        </thead>
21
-        <tbody>
22
-          <tr *ngFor="let data of bloodList;let i = index;">
23
-            <td>{{i+1}}</td>
24
-            <td><span>{{ data.patientName }}<span *ngIf="data.bedNum">({{ data.bedNum }})</span></span></td>
25
-            <td>{{ data.patientNo||'' }}</td>
26
-            <td>{{ data.type ? data.type.name : "" }}</td>
27
-            <td>{{ data.bloodCode||'' }}</td>
28
-            <td>{{ data.arriverDTO?data.arriverDTO.name:'' }}</td>
29
-            <td>{{ data.arriveTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
30
-            <td>{{ data.receiverDTO ? data.receiverDTO.name : '' }}</td>
31
-            <td>{{ data.receiveTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
32
-          </tr>
33
-        </tbody>
34
-      </nz-table>
13
+      <ng-container *ngIf="type === 'drugsJpbag' || type === 'drugsWestern' || type === 'drugsReturn' || type === 'drugsPoison' || type === 'drugsHerbal'">
14
+        <!-- 新药品 -->
15
+        <nz-table class="hospitalTable" [nzData]="drugsBugSingleList" nzSize="middle" [nzShowPagination]="false"
16
+          [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
17
+          <thead>
18
+            <tr class="thead">
19
+              <th nzWidth="5%">序号</th>
20
+              <th nzWidth="85%">药品名称+规格</th>
21
+              <th nzWidth="10%">数量</th>
22
+            </tr>
23
+          </thead>
24
+          <tbody>
25
+            <tr *ngFor="let data of drugsBugSingleList;let i = index;">
26
+              <td>{{i+1}}</td>
27
+              <td>{{ data.drugsInfo }} {{ data.model }}</td>
28
+              <td>{{ data.drugsNum }}</td>
29
+            </tr>
30
+          </tbody>
31
+        </nz-table>
32
+      </ng-container>
35 33
 
36
-      <div class="pagination" *ngIf="type !== 'drugsJpbag' || type !== 'drugsWestern' || type !== 'drugsReturn' || type !== 'drugsPoison' || type !== 'drugsHerbal'">
34
+      <div class="pagination" *ngIf="type !== 'drugsJpbag' && type !== 'drugsWestern' && type !== 'drugsReturn' && type !== 'drugsPoison' && type !== 'drugsHerbal'">
37 35
         <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
38 36
         <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"
39 37
           [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList()"

+ 15 - 5
src/app/share/businessData-detail-info-modal/businessData-detail-info-modal.component.less

@@ -7,6 +7,14 @@
7 7
   height: 100%;
8 8
   background: rgba(0, 0, 0, 0.4);
9 9
   z-index: 999;
10
+  .drugsBag{
11
+    display: flex;
12
+    align-items: center;
13
+    font-size: 16px;
14
+    gap: 40px;
15
+    padding: 16px 24px 0;
16
+    border-top: 1px solid #E8EBEF;
17
+  }
10 18
   .hospitalTable {
11 19
     width: 100%;
12 20
     td {
@@ -61,10 +69,8 @@
61 69
 
62 70
   .modalBody {
63 71
     width: 700px;
64
-    min-height: 220px;
65 72
     background: #fff;
66 73
     border-radius: 5px;
67
-    padding: 10px 20px;
68 74
     color: #333;
69 75
     &.modalBody-search {
70 76
       width: 480px;
@@ -73,13 +79,17 @@
73 79
 
74 80
     .title {
75 81
       width: 100%;
82
+      height: 53px;
83
+      line-height: 53px;
84
+      border-bottom: 1px solid #E8EBEF;
85
+      padding: 0 28px;
76 86
       text-align: center;
77 87
       font-size: 18px;
78 88
       position: relative;
79 89
 
80 90
       i {
81 91
         position: absolute;
82
-        right: 0;
92
+        right: 28px;
83 93
         top: 0;
84 94
         font-size: 20px;
85 95
         color: #666;
@@ -89,12 +99,11 @@
89 99
     }
90 100
 
91 101
     .content {
92
-      min-height: 117px;
93 102
       background: #f9fafb;
94 103
       border: 1px solid #e5e9ed;
95 104
       border-radius: 5px;
96 105
       overflow: hidden;
97
-      margin-top: 12px;
106
+      margin: 16px 24px 0;
98 107
       display: flex;
99 108
       flex-direction: column;
100 109
       justify-content: center;
@@ -152,6 +161,7 @@
152 161
 
153 162
     button {
154 163
       margin-top: 10px;
164
+      margin-bottom: 10px;
155 165
 
156 166
       &.btn {
157 167
         margin-left: 8px;

+ 13 - 298
src/app/share/businessData-detail-info-modal/businessData-detail-info-modal.component.ts

@@ -1,7 +1,6 @@
1 1
 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2 2
 import { MainService } from '../../services/main.service';
3 3
 import { ToolService } from 'src/app/services/tool.service';
4
-import { format, startOfDay, endOfDay } from 'date-fns';
5 4
 @Component({
6 5
   selector: 'app-businessData-detail-info-modal',
7 6
   templateUrl: './businessData-detail-info-modal.component.html',
@@ -11,10 +10,6 @@ export class BusinessDataDetailInfoModalComponent implements OnInit {
11 10
   // 切换科室,切换弹窗
12 11
   hosId;
13 12
   hsLoading = false;
14
-  bloodList: any = [];// 血制品列表
15
-  washingExceptionList: any = [];// 被服洗涤异常列表
16
-  specimenList: any = [];// 标本列表
17
-  inspectionRateStatisticsList: any = [];// 科室检查率统计列表
18 13
   pageIndex: number = 1;//表格当前页码
19 14
   pageSize: number = 10;//表格每页展示条数
20 15
   total: number = 0;//表格总数据量
@@ -23,7 +18,7 @@ export class BusinessDataDetailInfoModalComponent implements OnInit {
23 18
     specimenDesc: 0,
24 19
   }
25 20
   @Input() show: Boolean;
26
-  @Input() orderId: String;
21
+  @Input() infoId: String;
27 22
   @Input() type: String = '';
28 23
   @Input() dataInfo: any;
29 24
 
@@ -33,25 +28,7 @@ export class BusinessDataDetailInfoModalComponent implements OnInit {
33 28
 
34 29
   ngOnInit() {
35 30
     this.hosId = this.tool.getCurrentHospital().id;
36
-    this.tabType = 1;
37 31
     switch(this.type){
38
-      case 'blood':
39
-        this.getBlood(1);
40
-        break;
41
-      case 'specimen':
42
-        this.getSpecimen(1);
43
-        this.getSpecimenType();
44
-        this.getSpecimenDesc();
45
-        break;
46
-      case 'deptInspectionRateStatistics':
47
-        this.getDeptInspectionRateStatistics(1);
48
-        break;
49
-      case 'deptInspectionStatistics':
50
-        this.getDeptInspectionStatistics(1);
51
-        break;
52
-      case 'washingException':
53
-        this.getWashingException(1);
54
-        break;
55 32
       case 'drugsJpbag':
56 33
         this.getNewDrugConfig(1);
57 34
         break;
@@ -75,44 +52,9 @@ export class BusinessDataDetailInfoModalComponent implements OnInit {
75 52
     this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
76 53
   }
77 54
 
78
-  // 切换tab栏
79
-  tabType: number = 1; //tab栏
80
-  checkTab(type) {
81
-    this.tabType = type;
82
-  }
83
-
84
-  // 切换标本类型下拉框
85
-  selectStype(e){
86
-    console.log(e);
87
-    this.searchCriteria.specimenDesc = 0;
88
-    this.getSpecimenDesc();
89
-    this.getSpecimen(1);
90
-  }
91
-
92
-  // 切换标本类型下拉框
93
-  selectDesc(e){
94
-    console.log(e);
95
-    this.getSpecimen(1);
96
-  }
97
-
98 55
   // 分页获取数据
99 56
   getList(){
100 57
     switch(this.type){
101
-      case 'blood':
102
-        this.getBlood();
103
-        break;
104
-      case 'specimen':
105
-          this.getSpecimen();
106
-          break;
107
-      case 'deptInspectionRateStatistics':
108
-        this.getDeptInspectionRateStatistics();
109
-        break;
110
-      case 'deptInspectionStatistics':
111
-        this.getDeptInspectionStatistics();
112
-        break;
113
-      case 'washingException':
114
-        this.getWashingException();
115
-        break;
116 58
       case 'drugsJpbag':
117 59
         this.getDrugsBugList(1);
118 60
         break;
@@ -131,147 +73,30 @@ export class BusinessDataDetailInfoModalComponent implements OnInit {
131 73
     }
132 74
   }
133 75
 
134
-  // 获取列表数据
135
-  getBlood(idx?) {
136
-    if (idx) {
137
-      this.pageIndex = 1;
138
-    }
139
-    let postData = {
140
-      "type": "blood",
141
-      "orderId": this.orderId
142
-    }
143
-    this.hsLoading = true;
144
-    this.mainService.checkData(postData).subscribe((data:any) => {
145
-      this.hsLoading = false;
146
-      this.bloodList = data.data ? data.data.all : [];
147
-      this.pageSize = this.total = data.data ? data.data.all.length : 0;
148
-    })
149
-  }
150
-
151
-  // 获取标本类型
152
-  specimentTypeList: any[] = [{ id: 0, name: '全部' }];
153
-  getSpecimenType() {
154
-    this.mainService.getDictionary("list", "specimen_type").subscribe((data:any) => {
155
-      let specimentTypeList = [{ id: 0, name: '全部' }];
156
-      this.specimentTypeList = specimentTypeList.concat(data);
157
-    })
158
-  }
159
-
160
-  // 获取检验项目
161
-  specimenDescList: any[] = [{ id: 0, name: '', nameNum: '全部' }];
162
-  id:number = 0;
163
-  getSpecimenDesc() {
164
-    let postData = {
165
-      "hosId": this.hosId,
166
-      "gdId": this.orderId,
167
-      "stype": this.searchCriteria.stype || undefined,
168
-    };
169
-    this.mainService.specimenCount(postData).subscribe((data:any) => {
170
-      data.data = data.data || [];
171
-      let specimenDescList:any = [{ id: 0, name: '全部', nameNum: '全部' }];
172
-      specimenDescList[0].nameNum = `全部(${data.total})`;
173
-      this.specimenDescList = specimenDescList.concat( data.data.map(v => ({id: --this.id, name: v[0] || '', nameNum: (v[0] ? v[0].slice(0, 15) + (v[0].length >= 15 ? '...' : '') : '') + `(${v[1]})`})));
174
-    })
175
-  }
176
-
177
-  // 获取标本列表
178
-  getSpecimen(idx?) {
179
-    if (idx) {
180
-      this.pageIndex = 1;
181
-    }
182
-    let postData = {
183
-      idx: this.pageIndex - 1,
184
-      sum: this.pageSize,
185
-      specimen: {
186
-        orderBy: 'arrive_time desc',
187
-        hosId: this.hosId,
188
-        gdid: this.orderId,
189
-        stype: this.searchCriteria.stype ? { id: this.searchCriteria.stype } : undefined,
190
-        specimenDesc: this.searchCriteria.specimenDesc ? this.specimenDescList.find(v => v.id == this.searchCriteria.specimenDesc).name: undefined,
191
-      }
192
-    }
193
-    this.hsLoading = true;
194
-    this.mainService.getFetchDataList('simple/data','specimen',postData).subscribe(data => {
195
-      this.hsLoading = false;
196
-      this.specimenList = data.list || [];
197
-      this.total = data.totalNum || 0;
198
-    })
199
-  }
200
-
201
-  // 获取被服洗涤异常列表
202
-  getWashingException(idx?) {
203
-    if (idx) {
204
-      this.pageIndex = 1;
205
-    }
206
-    let postData = {
207
-      idx: this.pageIndex - 1,
208
-      sum: this.pageSize,
209
-      clothesException: {
210
-        hosId: this.hosId,
211
-        batchId: this.orderId,
212
-      }
213
-    }
214
-    this.hsLoading = true;
215
-    this.mainService.getFetchDataList('simple/data','clothesException',postData).subscribe(data => {
216
-      this.hsLoading = false;
217
-      this.washingExceptionList = data.list || [];
218
-      this.total = data.totalNum || 0;
219
-    })
220
-  }
221
-
222 76
   // 获取新药品一单一码列表
223 77
   drugsBugSingleList: any = [];// 药品列表
224
-  getDrugsBugSingle(idx?) {
225
-    if (idx) {
226
-      this.pageIndex = 1;
227
-    }
78
+  drugsBag:any = {};// 药包
79
+  getDrugsBugSingle(drugsBagId) {
228 80
     let postData = {
229
-      idx: this.pageIndex - 1,
230
-      sum: this.pageSize,
231
-      clothesException: {
232
-        hosId: this.hosId,
233
-        batchId: this.orderId,
234
-      }
81
+      type: this.type,
82
+      extraType: 'drugsInfo',
83
+      drugsBagId,
235 84
     }
236 85
     this.hsLoading = true;
237
-    this.mainService.getFetchDataList('simple/data','clothesException',postData).subscribe(data => {
86
+    this.mainService.transflow(postData, 'extra').subscribe(res => {
238 87
       this.hsLoading = false;
239
-      this.drugsBugSingleList = data.list || [];
240
-      this.total = data.totalNum || 0;
241
-    })
242
-  }
243
-
244
-  // 获取新药品一单多码列表
245
-  drugsBugMultipleList: any = [];// 药包列表
246
-  getDrugsBugMultiple(idx?) {
247
-    if (idx) {
248
-      this.pageIndex = 1;
249
-    }
250
-    let postData = {
251
-      idx: this.pageIndex - 1,
252
-      sum: this.pageSize,
253
-      clothesException: {
254
-        hosId: this.hosId,
255
-        batchId: this.orderId,
88
+      if(res.state == 200){
89
+        if(res.data){
90
+          this.drugsBugSingleList = res.data.drugsList || [];
91
+          this.drugsBag = res.data.drugsBag || {};
92
+        }
256 93
       }
257
-    }
258
-    this.hsLoading = true;
259
-    this.mainService.getFetchDataList('simple/data','clothesException',postData).subscribe(data => {
260
-      this.hsLoading = false;
261
-      this.drugsBugMultipleList = data.list || [];
262
-      this.total = data.totalNum || 0;
263 94
     })
264 95
   }
265 96
 
266 97
   // 获取新药品列表
267 98
   getDrugsBugList(idx?){
268
-    if(this.configs.drugsModel === 1){
269
-      // 一单一码
270
-      this.getDrugsBugSingle(idx);
271
-    }else if(this.configs.drugsModel === 2){
272
-      // 一单多码
273
-      this.getDrugsBugMultiple(idx);
274
-    }
99
+    this.getDrugsBugSingle(this.infoId);
275 100
   }
276 101
 
277 102
   // 获取新药品配置
@@ -306,116 +131,6 @@ export class BusinessDataDetailInfoModalComponent implements OnInit {
306 131
       });
307 132
   }
308 133
 
309
-  // 获取科室检查率统计-详情列表
310
-  getDeptInspectionRateStatistics(idx?) {
311
-    if (idx) {
312
-      this.pageIndex = 1;
313
-    }
314
-    let postData:any = {
315
-      idx: this.pageIndex - 1,
316
-      sum: this.pageSize,
317
-      canceled: this.dataInfo.canceled ? true : undefined,
318
-      priority: this.dataInfo.priority ? 0 : undefined,
319
-    }
320
-    switch(this.dataInfo.type){
321
-      case 'total':
322
-        postData.deptId = this.dataInfo.data.id;
323
-        postData.hosId = this.hosId;
324
-        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
325
-        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
326
-        break;
327
-      case 'noCheckCount':
328
-        postData.deptId = this.dataInfo.data.id;
329
-        postData.hosId = this.hosId;
330
-        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
331
-        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
332
-        postData.reportInsState = 'noCheck';
333
-        break;
334
-      case 'checkCount':
335
-        postData.deptId = this.dataInfo.data.id;
336
-        postData.hosId = this.hosId;
337
-        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
338
-        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
339
-        postData.reportInsState = 'check';
340
-        break;
341
-      case 'insCount':
342
-        postData.deptId = this.dataInfo.data.id;
343
-        postData.hosId = this.hosId;
344
-        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
345
-        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
346
-        postData.reportInsState = 'inspect';
347
-        break;
348
-    }
349
-    this.hsLoading = true;
350
-    this.mainService.listMsgByMain("listInspect", postData).subscribe((data: any) => {
351
-      this.hsLoading = false;
352
-      this.inspectionRateStatisticsList = data.list || [];
353
-      this.total = data.totalNum || 0;
354
-    })
355
-
356
-  }
357
-
358
-  // 获取科室检查统计-详情列表
359
-  getDeptInspectionStatistics(idx?) {
360
-    if (idx) {
361
-      this.pageIndex = 1;
362
-    }
363
-    let postData:any = {
364
-      idx: this.pageIndex - 1,
365
-      sum: this.pageSize,
366
-      znDeptInspect: true,
367
-    }
368
-    switch(this.dataInfo.type){
369
-      case 'total':
370
-        postData.deptId = this.dataInfo.data[10];
371
-        postData.hosId = this.hosId;
372
-        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
373
-        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
374
-        break;
375
-      case 'cancel':
376
-        postData.deptId = this.dataInfo.data[10];
377
-        postData.hosId = this.hosId;
378
-        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
379
-        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
380
-        postData.cancel = true;
381
-        break;
382
-      case 'priority':
383
-        postData.deptId = this.dataInfo.data[10];
384
-        postData.hosId = this.hosId;
385
-        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
386
-        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
387
-        postData.priority = 1;
388
-        break;
389
-      case 'noneYY':
390
-        postData.deptId = this.dataInfo.data[10];
391
-        postData.hosId = this.hosId;
392
-        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
393
-        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
394
-        postData.noneYY = true;
395
-        break;
396
-      case 'waitCheck':
397
-        postData.deptId = this.dataInfo.data[10];
398
-        postData.hosId = this.hosId;
399
-        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
400
-        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
401
-        postData.waitCheck = true;
402
-        break;
403
-      case 'doCheck':
404
-        postData.deptId = this.dataInfo.data[10];
405
-        postData.hosId = this.hosId;
406
-        postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
407
-        postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
408
-        postData.doCheck = true;
409
-        break;
410
-    }
411
-    this.hsLoading = true;
412
-    this.mainService.listMsgByMain("listInspect", postData).subscribe((data: any) => {
413
-      this.hsLoading = false;
414
-      this.inspectionRateStatisticsList = data.list || [];
415
-      this.total = data.totalNum || 0;
416
-    })
417
-
418
-  }
419 134
 }
420 135
 
421 136
 

+ 33 - 21
src/app/share/businessData-detail-modal/businessData-detail-modal.component.html

@@ -1,6 +1,14 @@
1 1
 <div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
2 2
   <div class="modalBody" style="width: 1200px;">
3
-    <div class="title">业务数据查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
3
+    <div class="title" *ngIf="(type === 'drugsJpbag' || type === 'drugsWestern' || type === 'drugsReturn' || type === 'drugsPoison' || type === 'drugsHerbal');else elseTpl">药品详情<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <ng-template #elseTpl>
5
+      <div class="title">业务数据查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
6
+    </ng-template>
7
+    <div class="drugsBag" *ngIf="configs.drugsModel === 1 && (type === 'drugsJpbag' || type === 'drugsWestern' || type === 'drugsReturn' || type === 'drugsPoison' || type === 'drugsHerbal')">
8
+      <div>单号:{{drugsBag.batchNo}}</div>
9
+      <div>申请科室:{{drugsBag.target ? drugsBag.target.dept : ''}}</div>
10
+      <div>发药科室:{{drugsBag.launch ? drugsBag.launch.dept : ''}}</div>
11
+    </div>
4 12
     <div class="content">
5 13
       <!-- 血制品 -->
6 14
       <nz-table *ngIf="type === 'blood'" class="hospitalTable" [nzData]="bloodList" nzSize="middle" [nzShowPagination]="false"
@@ -43,10 +51,10 @@
43 51
           </tr>
44 52
         </thead>
45 53
         <tbody>
46
-          <tr *ngFor="let data of bloodList;let i = index;" (click)="viewDetail(type)">
54
+          <tr *ngFor="let data of drugsBugSingleList;let i = index;">
47 55
             <td>{{i+1}}</td>
48
-            <td><span>{{ data.patientName }}<span *ngIf="data.bedNum">({{ data.bedNum }})</span></span></td>
49
-            <td>{{ data.patientNo||'' }}</td>
56
+            <td>{{ data.drugsInfo }} {{ data.model }}</td>
57
+            <td>{{ data.drugsNum }}</td>
50 58
           </tr>
51 59
         </tbody>
52 60
       </nz-table>
@@ -56,25 +64,29 @@
56 64
         <thead>
57 65
           <tr class="thead">
58 66
             <th nzWidth="5%">序号</th>
59
-            <th nzWidth="15%">单号</th>
60
-            <th nzWidth="10%">种类数</th>
61
-            <th nzWidth="10%">总数</th>
62
-            <th nzWidth="15%">收取时间</th>
63
-            <th nzWidth="15%">送达时间</th>
64
-            <th nzWidth="15%">送达人</th>
65
-            <th nzWidth="15%">交接人</th>
67
+            <th nzWidth="11%">单号</th>
68
+            <th nzWidth="8%">种类数</th>
69
+            <th nzWidth="8%">总数</th>
70
+            <th nzWidth="10%">收取人</th>
71
+            <th nzWidth="10%">收取交接人</th>
72
+            <th nzWidth="14%">收取时间</th>
73
+            <th nzWidth="10%">送达人</th>
74
+            <th nzWidth="14%">送达交接人</th>
75
+            <th nzWidth="10%">送达时间</th>
66 76
           </tr>
67 77
         </thead>
68 78
         <tbody>
69
-          <tr *ngFor="let data of bloodList;let i = index;" (click)="viewDetail(type)">
79
+          <tr *ngFor="let data of drugsBugMultipleList;let i = index;" (click)="viewDetail(type, data.id)">
70 80
             <td>{{i+1}}</td>
71
-            <td><span>{{ data.patientName }}<span *ngIf="data.bedNum">({{ data.bedNum }})</span></span></td>
72
-            <td>{{ data.patientNo||'' }}</td>
73
-            <td>{{ data.type ? data.type.name : "" }}</td>
74
-            <td>{{ data.bloodCode||'' }}</td>
75
-            <td>{{ data.arriverDTO?data.arriverDTO.name:'' }}</td>
76
-            <td>{{ data.arriveTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
77
-            <td>{{ data.receiverDTO ? data.receiverDTO.name : '' }}</td>
81
+            <td>{{ data.batchNo }}</td>
82
+            <td>{{ data.drugsTypeCount }}</td>
83
+            <td>{{ data.drugsCount }}</td>
84
+            <td><ng-container *ngIf="handoverStartObj">{{handoverStartObj.username}}</ng-container></td>
85
+            <td><ng-container *ngIf="handoverStartObj && handoverStartObj.handoverUserid">{{handoverStartObj.handoverUserid.name}}</ng-container></td>
86
+            <td><ng-container *ngIf="handoverStartObj">{{handoverStartObj.operationTime}}</ng-container></td>
87
+            <td><ng-container *ngIf="handoverEndObj">{{handoverEndObj.username}}</ng-container></td>
88
+            <td><ng-container *ngIf="handoverEndObj && handoverEndObj.handoverUserid">{{handoverEndObj.handoverUserid.name}}</ng-container></td>
89
+            <td><ng-container *ngIf="handoverEndObj">{{handoverEndObj.operationTime}}</ng-container></td>
78 90
           </tr>
79 91
         </tbody>
80 92
       </nz-table>
@@ -201,7 +213,7 @@
201 213
         </tbody>
202 214
       </nz-table>
203 215
 
204
-      <div class="pagination" *ngIf="type !== 'blood' || type !== 'drugsJpbag' || type !== 'drugsWestern' || type !== 'drugsReturn' || type !== 'drugsPoison' || type !== 'drugsHerbal'">
216
+      <div class="pagination" *ngIf="type !== 'blood' && type !== 'drugsJpbag' && type !== 'drugsWestern' && type !== 'drugsReturn' && type !== 'drugsPoison' && type !== 'drugsHerbal'">
205 217
         <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
206 218
         <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"
207 219
           [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList()"
@@ -220,6 +232,6 @@
220 232
   *ngIf="businessDataModalShow"
221 233
   [show]="businessDataModalShow"
222 234
   [type]="businessDataModalType"
223
-  [orderId]="orderId"
235
+  [infoId]="infoId"
224 236
   (closeModelHs)="closeModelBlood($event)"
225 237
 ></app-businessData-detail-info-modal>

+ 15 - 5
src/app/share/businessData-detail-modal/businessData-detail-modal.component.less

@@ -7,6 +7,14 @@
7 7
   height: 100%;
8 8
   background: rgba(0, 0, 0, 0.4);
9 9
   z-index: 999;
10
+  .drugsBag{
11
+    display: flex;
12
+    align-items: center;
13
+    font-size: 16px;
14
+    gap: 40px;
15
+    padding: 16px 24px 0;
16
+    border-top: 1px solid #E8EBEF;
17
+  }
10 18
   .hospitalTable {
11 19
     width: 100%;
12 20
     td {
@@ -61,10 +69,8 @@
61 69
 
62 70
   .modalBody {
63 71
     width: 700px;
64
-    min-height: 220px;
65 72
     background: #fff;
66 73
     border-radius: 5px;
67
-    padding: 10px 20px;
68 74
     color: #333;
69 75
     &.modalBody-search {
70 76
       width: 480px;
@@ -73,13 +79,17 @@
73 79
 
74 80
     .title {
75 81
       width: 100%;
82
+      height: 53px;
83
+      line-height: 53px;
84
+      border-bottom: 1px solid #E8EBEF;
85
+      padding: 0 28px;
76 86
       text-align: center;
77 87
       font-size: 18px;
78 88
       position: relative;
79 89
 
80 90
       i {
81 91
         position: absolute;
82
-        right: 0;
92
+        right: 28px;
83 93
         top: 0;
84 94
         font-size: 20px;
85 95
         color: #666;
@@ -89,12 +99,11 @@
89 99
     }
90 100
 
91 101
     .content {
92
-      min-height: 117px;
93 102
       background: #f9fafb;
94 103
       border: 1px solid #e5e9ed;
95 104
       border-radius: 5px;
96 105
       overflow: hidden;
97
-      margin-top: 12px;
106
+      margin: 16px 24px 0;
98 107
       display: flex;
99 108
       flex-direction: column;
100 109
       justify-content: center;
@@ -152,6 +161,7 @@
152 161
 
153 162
     button {
154 163
       margin-top: 10px;
164
+      margin-bottom: 10px;
155 165
 
156 166
       &.btn {
157 167
         margin-left: 8px;

+ 45 - 21
src/app/share/businessData-detail-modal/businessData-detail-modal.component.ts

@@ -2,6 +2,7 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2 2
 import { MainService } from '../../services/main.service';
3 3
 import { ToolService } from 'src/app/services/tool.service';
4 4
 import { format, startOfDay, endOfDay } from 'date-fns';
5
+import { NzMessageService } from 'ng-zorro-antd';
5 6
 @Component({
6 7
   selector: 'app-businessData-detail-modal',
7 8
   templateUrl: './businessData-detail-modal.component.html',
@@ -29,7 +30,11 @@ export class BusinessDataDetailModalComponent implements OnInit {
29 30
 
30 31
   @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
31 32
 
32
-  constructor(private mainService: MainService, private tool: ToolService) { }
33
+  constructor(
34
+    private mainService: MainService,
35
+    private tool: ToolService,
36
+    private message: NzMessageService,
37
+  ) { }
33 38
 
34 39
   ngOnInit() {
35 40
     this.hosId = this.tool.getCurrentHospital().id;
@@ -221,26 +226,31 @@ export class BusinessDataDetailModalComponent implements OnInit {
221 226
 
222 227
   // 获取新药品一单一码列表
223 228
   drugsBugSingleList: any = [];// 药品列表
224
-  getDrugsBugSingle(idx?) {
225
-    if (idx) {
226
-      this.pageIndex = 1;
227
-    }
229
+  drugsBag:any = {};// 药包
230
+  getDrugsBugSingle(drugsBagId) {
228 231
     let postData = {
229 232
       type: this.type,
230 233
       extraType: 'drugsInfo',
231
-      // drugsBagId,
234
+      drugsBagId,
232 235
     }
233 236
     this.hsLoading = true;
234
-    this.mainService.transflow(postData, 'extra').subscribe(data => {
237
+    this.mainService.transflow(postData, 'extra').subscribe(res => {
235 238
       this.hsLoading = false;
236
-      this.drugsBugSingleList = data.list || [];
237
-      this.total = data.totalNum || 0;
239
+      if(res.state == 200){
240
+        if(res.data){
241
+          this.drugsBugSingleList = res.data.drugsList || [];
242
+          this.drugsBag = res.data.drugsBag || {};
243
+        }
244
+      }
238 245
     })
239 246
   }
240 247
 
241 248
   // 获取新药品一单多码列表
242 249
   drugsBugMultipleList: any = [];// 药包列表
243
-  getDrugsBugMultiple(idx?) {
250
+  workOrder:any = {};// 工单
251
+  handoverStartObj:any = {};// 接收人
252
+  handoverEndObj:any = {};// 送达人
253
+  getDrugsBugMultiple(idx, drugsModel) {
244 254
     if (idx) {
245 255
       this.pageIndex = 1;
246 256
     }
@@ -250,22 +260,34 @@ export class BusinessDataDetailModalComponent implements OnInit {
250 260
       orderId: this.orderId,
251 261
     }
252 262
     this.hsLoading = true;
253
-    this.mainService.transflow(postData, 'extra').subscribe(data => {
263
+    this.mainService.transflow(postData, 'extra').subscribe(res => {
254 264
       this.hsLoading = false;
255
-      this.drugsBugMultipleList = data.list || [];
256
-      this.total = data.totalNum || 0;
265
+      if(res.state == 200){
266
+        if(res.data){
267
+          this.drugsBugMultipleList = res.data.drugsBagList || [];
268
+          this.workOrder = res.data.workOrder || {};
269
+          this.total = this.drugsBugMultipleList.length;
270
+
271
+          this.handoverStartObj = this.workOrder.record.find(v => v.operation.value == 8);
272
+          this.handoverEndObj = this.workOrder.record.find(v => v.operation.value == 10);
273
+
274
+          if(drugsModel === 1){
275
+            // 一单一码
276
+            if(this.drugsBugMultipleList.length){
277
+              this.getDrugsBugSingle(this.drugsBugMultipleList[0].id);
278
+            }else{
279
+              this.message.warning('未查询到药品!')
280
+            }
281
+          }
282
+
283
+        }
284
+      }
257 285
     })
258 286
   }
259 287
 
260 288
   // 获取新药品列表
261 289
   getDrugsBugList(idx?){
262
-    if(this.configs.drugsModel === 1){
263
-      // 一单一码
264
-      this.getDrugsBugSingle(idx);
265
-    }else if(this.configs.drugsModel === 2){
266
-      // 一单多码
267
-      this.getDrugsBugMultiple(idx);
268
-    }
290
+    this.getDrugsBugMultiple(idx, this.configs.drugsModel);
269 291
   }
270 292
 
271 293
   // 获取新药品配置
@@ -414,7 +436,9 @@ export class BusinessDataDetailModalComponent implements OnInit {
414 436
   // 查看业务数据
415 437
   businessDataModalShow = false; //业务数据弹窗开关
416 438
   businessDataModalType = ''; //业务数据类型
417
-  viewDetail(type) {
439
+  infoId = ''; //业务数据id
440
+  viewDetail(type, id) {
441
+    this.infoId = id;
418 442
     this.businessDataModalType = type;
419 443
     this.businessDataModalShow = true;
420 444
   }