seimin 5 kuukautta sitten
vanhempi
commit
84db6dc0a7

+ 48 - 0
src/app/share/businessData-detail-info-modal/businessData-detail-info-modal.component.html

@@ -0,0 +1,48 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
2
+  <div class="modalBody" style="width: 1200px;">
3
+    <div class="title">业务数据查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <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>
35
+
36
+      <div class="pagination" *ngIf="type !== 'drugsJpbag' || type !== 'drugsWestern' || type !== 'drugsReturn' || type !== 'drugsPoison' || type !== 'drugsHerbal'">
37
+        <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
38
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"
39
+          [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList()"
40
+          (nzPageSizeChange)="getList()" [nzShowTotal]="totalTemplate">
41
+        </nz-pagination>
42
+      </div>
43
+    </div>
44
+    <div class="display_flex justify-content_flex-center">
45
+      <button class="btn know" nz-button nzType="primary" (click)="hideModal()">知道了</button>
46
+    </div>
47
+  </div>
48
+</div>

+ 201 - 0
src/app/share/businessData-detail-info-modal/businessData-detail-info-modal.component.less

@@ -0,0 +1,201 @@
1
+@import "../../../../src/theme.less";
2
+.modal {
3
+  position: fixed;
4
+  left: 0;
5
+  top: 0;
6
+  width: 100%;
7
+  height: 100%;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 999;
10
+  .hospitalTable {
11
+    width: 100%;
12
+    td {
13
+      text-align: center !important;
14
+      position: relative;
15
+      word-break: break-all;
16
+    }
17
+    .thead {
18
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
19
+      th {
20
+        text-align: center !important;
21
+        color: #fff;
22
+        background: transparent;
23
+      }
24
+    }
25
+  }
26
+
27
+  .ji {
28
+    position: absolute;
29
+    right: 0px;
30
+    top: -3px;
31
+    width: 30px;
32
+  }
33
+
34
+  .list-template__top{
35
+    div{
36
+      text-align: left!important;
37
+    }
38
+  }
39
+
40
+  .tab {
41
+    width: 100%;
42
+    height: 60px;
43
+    border-bottom: 1px solid #e5e9ed;
44
+    background-color: #fff;
45
+
46
+    .item {
47
+      text-align: center;
48
+      line-height: 60px;
49
+      height: 100%;
50
+      border-right: 1px solid #e5e9ed;
51
+
52
+      &:nth-last-child(1) {
53
+        border: none;
54
+      }
55
+
56
+      &.checked {
57
+        background: #f0f6ed;
58
+      }
59
+    }
60
+  }
61
+
62
+  .modalBody {
63
+    width: 700px;
64
+    min-height: 220px;
65
+    background: #fff;
66
+    border-radius: 5px;
67
+    padding: 10px 20px;
68
+    color: #333;
69
+    &.modalBody-search {
70
+      width: 480px;
71
+      min-height: 250px;
72
+    }
73
+
74
+    .title {
75
+      width: 100%;
76
+      text-align: center;
77
+      font-size: 18px;
78
+      position: relative;
79
+
80
+      i {
81
+        position: absolute;
82
+        right: 0;
83
+        top: 0;
84
+        font-size: 20px;
85
+        color: #666;
86
+        cursor: pointer;
87
+        padding: 0 5px;
88
+      }
89
+    }
90
+
91
+    .content {
92
+      min-height: 117px;
93
+      background: #f9fafb;
94
+      border: 1px solid #e5e9ed;
95
+      border-radius: 5px;
96
+      overflow: hidden;
97
+      margin-top: 12px;
98
+      display: flex;
99
+      flex-direction: column;
100
+      justify-content: center;
101
+      align-items: center;
102
+      &.content-search {
103
+        min-height: 147px;
104
+        justify-content: start;
105
+        .defeat-search {
106
+          width: 100%;
107
+          height: 52px;
108
+          display: flex;
109
+          justify-content: center;
110
+          align-items: center;
111
+          border-bottom: solid 1px #e5e9ed;
112
+          em {
113
+            color: #666;
114
+            font-style: normal;
115
+          }
116
+        }
117
+        .form {
118
+          width: 100%;
119
+          padding: 0 16px;
120
+          .ant-form-item-label,
121
+          .ant-form-explain {
122
+            text-align: left !important;
123
+          }
124
+        }
125
+      }
126
+
127
+      div {
128
+        text-align: center;
129
+        margin: 0;
130
+
131
+        &.defeat {
132
+          color: #333;
133
+          font-size: 28px;
134
+        }
135
+        &.countDown {
136
+          font-size: 14px;
137
+          color: 666;
138
+          em {
139
+            font-style: normal;
140
+            color: @primary-color;
141
+          }
142
+        }
143
+
144
+        &.pagination {
145
+          font-size: 14px;
146
+          color: #666;
147
+          padding-top: 16px;
148
+          padding-bottom: 16px;
149
+        }
150
+      }
151
+    }
152
+
153
+    button {
154
+      margin-top: 10px;
155
+
156
+      &.btn {
157
+        margin-left: 8px;
158
+      }
159
+    }
160
+  }
161
+
162
+  // 新增
163
+  &.add {
164
+    .modalBody {
165
+      width: 480px;
166
+      height: auto;
167
+
168
+      .content {
169
+        width: 100%;
170
+        height: auto;
171
+        padding: 18px 14px 0 14px;
172
+
173
+        .addForm {
174
+          .ant-form-item {
175
+            margin-bottom: 15px;
176
+
177
+            .ant-form-item-label {
178
+              line-height: 0;
179
+            }
180
+          }
181
+        }
182
+
183
+        .editForm {
184
+          .ant-form-item {
185
+            margin-bottom: 15px;
186
+
187
+            .ant-form-item-label {
188
+              line-height: 0;
189
+            }
190
+          }
191
+        }
192
+      }
193
+
194
+      button {
195
+        &:nth-child(1) {
196
+          margin-right: 20px;
197
+        }
198
+      }
199
+    }
200
+  }
201
+}

+ 422 - 0
src/app/share/businessData-detail-info-modal/businessData-detail-info-modal.component.ts

@@ -0,0 +1,422 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
+import { MainService } from '../../services/main.service';
3
+import { ToolService } from 'src/app/services/tool.service';
4
+import { format, startOfDay, endOfDay } from 'date-fns';
5
+@Component({
6
+  selector: 'app-businessData-detail-info-modal',
7
+  templateUrl: './businessData-detail-info-modal.component.html',
8
+  styleUrls: ['./businessData-detail-info-modal.component.less']
9
+})
10
+export class BusinessDataDetailInfoModalComponent implements OnInit {
11
+  // 切换科室,切换弹窗
12
+  hosId;
13
+  hsLoading = false;
14
+  bloodList: any = [];// 血制品列表
15
+  washingExceptionList: any = [];// 被服洗涤异常列表
16
+  specimenList: any = [];// 标本列表
17
+  inspectionRateStatisticsList: any = [];// 科室检查率统计列表
18
+  pageIndex: number = 1;//表格当前页码
19
+  pageSize: number = 10;//表格每页展示条数
20
+  total: number = 0;//表格总数据量
21
+  searchCriteria:any = {
22
+    stype: 0,
23
+    specimenDesc: 0,
24
+  }
25
+  @Input() show: Boolean;
26
+  @Input() orderId: String;
27
+  @Input() type: String = '';
28
+  @Input() dataInfo: any;
29
+
30
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
31
+
32
+  constructor(private mainService: MainService, private tool: ToolService) { }
33
+
34
+  ngOnInit() {
35
+    this.hosId = this.tool.getCurrentHospital().id;
36
+    this.tabType = 1;
37
+    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
+      case 'drugsJpbag':
56
+        this.getNewDrugConfig(1);
57
+        break;
58
+      case 'drugsWestern':
59
+        this.getNewDrugConfig(1);
60
+        break;
61
+      case 'drugsReturn':
62
+        this.getNewDrugConfig(1);
63
+        break;
64
+      case 'drugsPoison':
65
+        this.getNewDrugConfig(1);
66
+        break;
67
+      case 'drugsHerbal':
68
+        this.getNewDrugConfig(1);
69
+        break;
70
+
71
+    }
72
+  }
73
+  // 关闭弹窗
74
+  hideModal() {
75
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
76
+  }
77
+
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
+  // 分页获取数据
99
+  getList(){
100
+    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
+      case 'drugsJpbag':
117
+        this.getDrugsBugList(1);
118
+        break;
119
+      case 'drugsWestern':
120
+        this.getDrugsBugList(1);
121
+        break;
122
+      case 'drugsReturn':
123
+        this.getDrugsBugList(1);
124
+        break;
125
+      case 'drugsPoison':
126
+        this.getDrugsBugList(1);
127
+        break;
128
+      case 'drugsHerbal':
129
+        this.getDrugsBugList(1);
130
+        break;
131
+    }
132
+  }
133
+
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
+  // 获取新药品一单一码列表
223
+  drugsBugSingleList: any = [];// 药品列表
224
+  getDrugsBugSingle(idx?) {
225
+    if (idx) {
226
+      this.pageIndex = 1;
227
+    }
228
+    let postData = {
229
+      idx: this.pageIndex - 1,
230
+      sum: this.pageSize,
231
+      clothesException: {
232
+        hosId: this.hosId,
233
+        batchId: this.orderId,
234
+      }
235
+    }
236
+    this.hsLoading = true;
237
+    this.mainService.getFetchDataList('simple/data','clothesException',postData).subscribe(data => {
238
+      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,
256
+      }
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
+    })
264
+  }
265
+
266
+  // 获取新药品列表
267
+  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
+    }
275
+  }
276
+
277
+  // 获取新药品配置
278
+  configs:any = {};
279
+  getNewDrugConfig(idx?) {
280
+    this.hsLoading = true;
281
+    let postData = {
282
+      idx: 0,
283
+      sum: 1,
284
+      taskTypeConfig: {
285
+        taskTypeDTO: {
286
+          hosId: {
287
+            id: this.hosId
288
+          },
289
+          ordinaryField: {
290
+            key: 'ordinary_field',
291
+            value: this.type,
292
+          }
293
+        }
294
+      }
295
+    };
296
+    this.mainService
297
+      .getFetchDataList("simple/data", "taskTypeConfig", postData)
298
+      .subscribe((result) => {
299
+        if (result.status == 200) {
300
+          let list = result.list || [];
301
+          this.configs = list[0] || {};
302
+          this.getDrugsBugList(idx);
303
+        }else{
304
+          this.hsLoading = false;
305
+        }
306
+      });
307
+  }
308
+
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
+}
420
+
421
+
422
+

+ 56 - 1
src/app/share/businessData-detail-modal/businessData-detail-modal.component.html

@@ -32,6 +32,52 @@
32 32
           </tr>
33 33
         </tbody>
34 34
       </nz-table>
35
+      <!-- 新药品-一单一码 -->
36
+      <nz-table *ngIf="configs.drugsModel === 1 && (type === 'drugsJpbag' || type === 'drugsWestern' || type === 'drugsReturn' || type === 'drugsPoison' || type === 'drugsHerbal')" class="hospitalTable" [nzData]="drugsBugSingleList" nzSize="middle" [nzShowPagination]="false"
37
+        [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
38
+        <thead>
39
+          <tr class="thead">
40
+            <th nzWidth="5%">序号</th>
41
+            <th nzWidth="85%">药品名称+规格</th>
42
+            <th nzWidth="10%">数量</th>
43
+          </tr>
44
+        </thead>
45
+        <tbody>
46
+          <tr *ngFor="let data of bloodList;let i = index;" (click)="viewDetail(type)">
47
+            <td>{{i+1}}</td>
48
+            <td><span>{{ data.patientName }}<span *ngIf="data.bedNum">({{ data.bedNum }})</span></span></td>
49
+            <td>{{ data.patientNo||'' }}</td>
50
+          </tr>
51
+        </tbody>
52
+      </nz-table>
53
+      <!-- 新药品-一单多码 -->
54
+      <nz-table *ngIf="configs.drugsModel === 2 && (type === 'drugsJpbag' || type === 'drugsWestern' || type === 'drugsReturn' || type === 'drugsPoison' || type === 'drugsHerbal')" class="hospitalTable" [nzData]="drugsBugMultipleList" nzSize="middle" [nzShowPagination]="false"
55
+        [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
56
+        <thead>
57
+          <tr class="thead">
58
+            <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>
66
+          </tr>
67
+        </thead>
68
+        <tbody>
69
+          <tr *ngFor="let data of bloodList;let i = index;" (click)="viewDetail(type)">
70
+            <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>
78
+          </tr>
79
+        </tbody>
80
+      </nz-table>
35 81
       <!-- 标本 -->
36 82
       <div class="list-template w100" *ngIf="type === 'specimen'">
37 83
         <div class="list-template__content">
@@ -155,7 +201,7 @@
155 201
         </tbody>
156 202
       </nz-table>
157 203
 
158
-      <div class="pagination" *ngIf="type !== 'blood'">
204
+      <div class="pagination" *ngIf="type !== 'blood' || type !== 'drugsJpbag' || type !== 'drugsWestern' || type !== 'drugsReturn' || type !== 'drugsPoison' || type !== 'drugsHerbal'">
159 205
         <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
160 206
         <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"
161 207
           [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList()"
@@ -168,3 +214,12 @@
168 214
     </div>
169 215
   </div>
170 216
 </div>
217
+
218
+<!-- 业务数据-二级信息查看 -->
219
+<app-businessData-detail-info-modal
220
+  *ngIf="businessDataModalShow"
221
+  [show]="businessDataModalShow"
222
+  [type]="businessDataModalType"
223
+  [orderId]="orderId"
224
+  (closeModelHs)="closeModelBlood($event)"
225
+></app-businessData-detail-info-modal>

+ 132 - 8
src/app/share/businessData-detail-modal/businessData-detail-modal.component.ts

@@ -39,19 +39,35 @@ export class BusinessDataDetailModalComponent implements OnInit {
39 39
         this.getBlood(1);
40 40
         break;
41 41
       case 'specimen':
42
-          this.getSpecimen(1);
43
-          this.getSpecimenType();
44
-          this.getSpecimenDesc();
45
-          break;
42
+        this.getSpecimen(1);
43
+        this.getSpecimenType();
44
+        this.getSpecimenDesc();
45
+        break;
46 46
       case 'deptInspectionRateStatistics':
47
-          this.getDeptInspectionRateStatistics(1);
48
-          break;
47
+        this.getDeptInspectionRateStatistics(1);
48
+        break;
49 49
       case 'deptInspectionStatistics':
50 50
         this.getDeptInspectionStatistics(1);
51 51
         break;
52 52
       case 'washingException':
53
-          this.getWashingException(1);
54
-          break;
53
+        this.getWashingException(1);
54
+        break;
55
+      case 'drugsJpbag':
56
+        this.getNewDrugConfig(1);
57
+        break;
58
+      case 'drugsWestern':
59
+        this.getNewDrugConfig(1);
60
+        break;
61
+      case 'drugsReturn':
62
+        this.getNewDrugConfig(1);
63
+        break;
64
+      case 'drugsPoison':
65
+        this.getNewDrugConfig(1);
66
+        break;
67
+      case 'drugsHerbal':
68
+        this.getNewDrugConfig(1);
69
+        break;
70
+
55 71
     }
56 72
   }
57 73
   // 关闭弹窗
@@ -97,6 +113,21 @@ export class BusinessDataDetailModalComponent implements OnInit {
97 113
       case 'washingException':
98 114
         this.getWashingException();
99 115
         break;
116
+      case 'drugsJpbag':
117
+        this.getDrugsBugList(1);
118
+        break;
119
+      case 'drugsWestern':
120
+        this.getDrugsBugList(1);
121
+        break;
122
+      case 'drugsReturn':
123
+        this.getDrugsBugList(1);
124
+        break;
125
+      case 'drugsPoison':
126
+        this.getDrugsBugList(1);
127
+        break;
128
+      case 'drugsHerbal':
129
+        this.getDrugsBugList(1);
130
+        break;
100 131
     }
101 132
   }
102 133
 
@@ -188,6 +219,87 @@ export class BusinessDataDetailModalComponent implements OnInit {
188 219
     })
189 220
   }
190 221
 
222
+  // 获取新药品一单一码列表
223
+  drugsBugSingleList: any = [];// 药品列表
224
+  getDrugsBugSingle(idx?) {
225
+    if (idx) {
226
+      this.pageIndex = 1;
227
+    }
228
+    let postData = {
229
+      type: this.type,
230
+      extraType: 'drugsInfo',
231
+      // drugsBagId,
232
+    }
233
+    this.hsLoading = true;
234
+    this.mainService.transflow(postData, 'extra').subscribe(data => {
235
+      this.hsLoading = false;
236
+      this.drugsBugSingleList = data.list || [];
237
+      this.total = data.totalNum || 0;
238
+    })
239
+  }
240
+
241
+  // 获取新药品一单多码列表
242
+  drugsBugMultipleList: any = [];// 药包列表
243
+  getDrugsBugMultiple(idx?) {
244
+    if (idx) {
245
+      this.pageIndex = 1;
246
+    }
247
+    let postData = {
248
+      type: this.type,
249
+      extraType: 'orderInfo',
250
+      orderId: this.orderId,
251
+    }
252
+    this.hsLoading = true;
253
+    this.mainService.transflow(postData, 'extra').subscribe(data => {
254
+      this.hsLoading = false;
255
+      this.drugsBugMultipleList = data.list || [];
256
+      this.total = data.totalNum || 0;
257
+    })
258
+  }
259
+
260
+  // 获取新药品列表
261
+  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
+    }
269
+  }
270
+
271
+  // 获取新药品配置
272
+  configs:any = {};
273
+  getNewDrugConfig(idx?) {
274
+    this.hsLoading = true;
275
+    let postData = {
276
+      idx: 0,
277
+      sum: 1,
278
+      taskTypeConfig: {
279
+        taskTypeDTO: {
280
+          hosId: {
281
+            id: this.hosId
282
+          },
283
+          ordinaryField: {
284
+            key: 'ordinary_field',
285
+            value: this.type,
286
+          }
287
+        }
288
+      }
289
+    };
290
+    this.mainService
291
+      .getFetchDataList("simple/data", "taskTypeConfig", postData)
292
+      .subscribe((result) => {
293
+        if (result.status == 200) {
294
+          let list = result.list || [];
295
+          this.configs = list[0] || {};
296
+          this.getDrugsBugList(idx);
297
+        }else{
298
+          this.hsLoading = false;
299
+        }
300
+      });
301
+  }
302
+
191 303
   // 获取科室检查率统计-详情列表
192 304
   getDeptInspectionRateStatistics(idx?) {
193 305
     if (idx) {
@@ -298,6 +410,18 @@ export class BusinessDataDetailModalComponent implements OnInit {
298 410
     })
299 411
 
300 412
   }
413
+
414
+  // 查看业务数据
415
+  businessDataModalShow = false; //业务数据弹窗开关
416
+  businessDataModalType = ''; //业务数据类型
417
+  viewDetail(type) {
418
+    this.businessDataModalType = type;
419
+    this.businessDataModalShow = true;
420
+  }
421
+  // 关闭业务数据弹窗
422
+  closeModelBlood(e) {
423
+    this.businessDataModalShow = JSON.parse(e).show;
424
+  }
301 425
 }
302 426
 
303 427
 

+ 3 - 0
src/app/share/order-detail/order-detail.component.html

@@ -1239,6 +1239,9 @@
1239 1239
     <button *ngIf="orderInfo.taskType.associationType.value == 'ordinary' && orderInfo.taskType.ordinaryField.value == 'blood'" class="btn default" nz-button nzType="default" (click)="viewDetail(orderInfo, 'blood')">
1240 1240
       业务数据
1241 1241
     </button>
1242
+    <button *ngIf="orderInfo.taskType.associationType.value == 'ordinary' && (orderInfo.taskType.ordinaryField.value == 'drugsJpbag' || orderInfo.taskType.ordinaryField.value == 'drugsWestern' || orderInfo.taskType.ordinaryField.value == 'drugsReturn' || orderInfo.taskType.ordinaryField.value == 'drugsPoison' || orderInfo.taskType.ordinaryField.value == 'drugsHerbal')" class="btn default" nz-button nzType="default" (click)="viewDetail(orderInfo, orderInfo.taskType.ordinaryField.value)">
1243
+      业务数据
1244
+    </button>
1242 1245
     <button *ngIf="orderInfo.taskType.associationType.value == 'specimen' || orderInfo.taskType.associationType.value == 'specimenPlan'" class="btn default" nz-button nzType="default" (click)="viewDetail(orderInfo, 'specimen')">
1243 1246
       业务数据
1244 1247
     </button>

+ 4 - 0
src/app/share/share.module.ts

@@ -58,6 +58,7 @@ import { StripHtmlPipe } from '../pipes/strip-html.pipe.';
58 58
 import { PathologyAddComponent } from './pathology-add/pathology-add.component';
59 59
 import { PathologyDetailComponent } from './pathology-detail/pathology-detail.component';
60 60
 import { StringToFirstValuePipe } from '../pipes/string-to-first-name.pipe';
61
+import { BusinessDataDetailInfoModalComponent } from './businessData-detail-info-modal/businessData-detail-info-modal.component';
61 62
 
62 63
 @NgModule({
63 64
   declarations: [
@@ -81,6 +82,7 @@ import { StringToFirstValuePipe } from '../pipes/string-to-first-name.pipe';
81 82
     InspectionAddressTagPromptModalComponent,
82 83
     InspectionExecuteAssignPromptModalComponent,
83 84
     BusinessDataDetailModalComponent,
85
+    BusinessDataDetailInfoModalComponent,
84 86
     RelationTransDetailModalComponent,
85 87
     BxPromptModalComponent,
86 88
     AppraiseDetailComponent,
@@ -113,6 +115,7 @@ import { StringToFirstValuePipe } from '../pipes/string-to-first-name.pipe';
113 115
     SpePromptModalComponent,
114 116
     OrderPromptModalComponent,
115 117
     BusinessDataDetailModalComponent,
118
+    BusinessDataDetailInfoModalComponent,
116 119
     RelationTransDetailModalComponent,
117 120
     DetailOrdinaryComponent,
118 121
     BloodHistoryPromptModalComponent,
@@ -148,6 +151,7 @@ import { StringToFirstValuePipe } from '../pipes/string-to-first-name.pipe';
148 151
     InspectionAddressTagPromptModalComponent,
149 152
     InspectionExecuteAssignPromptModalComponent,
150 153
     BusinessDataDetailModalComponent,
154
+    BusinessDataDetailInfoModalComponent,
151 155
     RelationTransDetailModalComponent,
152 156
     BxPromptModalComponent,
153 157
     AppraiseDetailComponent,