seimin 1 月之前
父節點
當前提交
0ddf654886

+ 7 - 0
src/app/services/main.service.ts

@@ -1211,4 +1211,11 @@ export class MainService {
1211
 		});
1211
 		});
1212
 	}
1212
 	}
1213
 
1213
 
1214
+  // 标本打包-标本包里的标本的所有终点科室列表
1215
+	getSpePackageEndDeptList(data = {}){
1216
+		return this.http.post(host.host + `/nurse/specimen/getSpePackageEndDeptList`, data, {
1217
+		  headers: this.headers,
1218
+		});
1219
+	}
1220
+
1214
 }
1221
 }

+ 12 - 1
src/app/share/dialog-delete/dialog-delete.component.html

@@ -1,5 +1,5 @@
1
 <!-- 删除模态框 -->
1
 <!-- 删除模态框 -->
2
-<div class="dialog-delete" *ngIf="delModal" [ngStyle]="{'z-index': isSelected ? '9' : '9999999'}">
2
+<div class="dialog-delete" *ngIf="delModal" [ngStyle]="{'z-index': isSelected ? '9' : '999'}">
3
   <div class="modalBody" [ngStyle]="{'height': isSelected ? 'auto' : '220px'}">
3
   <div class="modalBody" [ngStyle]="{'height': isSelected ? 'auto' : '220px'}">
4
     <div class="title">提示<i class="icon_transport transport-guanbi" (click)="hideDelModal('x')"></i></div>
4
     <div class="title">提示<i class="icon_transport transport-guanbi" (click)="hideDelModal('x')"></i></div>
5
     <div class="content">
5
     <div class="content">
@@ -21,6 +21,17 @@
21
           </nz-option>
21
           </nz-option>
22
         </nz-select>
22
         </nz-select>
23
       </div>
23
       </div>
24
+      <div *ngIf="isShowEndDeptId" class="mt8 mb8 w100">
25
+        <nz-select class="w100" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择终点科室" [(ngModel)]="endDeptId">
26
+          <ng-container *ngFor="let option of isShowEndDeptIdArr">
27
+            <nz-option *ngIf="!isLoading" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id"></nz-option>
28
+          </ng-container>
29
+          <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
30
+            <i nz-icon nzType="loading" class="loading-icon"></i>
31
+            搜索中...
32
+          </nz-option>
33
+        </nz-select>
34
+      </div>
24
     </div>
35
     </div>
25
     <div class="operate">
36
     <div class="operate">
26
       <button nz-button nzType="primary" (click)="cancel('cancel')" *ngIf="!isShowConfirm">知道了</button>
37
       <button nz-button nzType="primary" (click)="cancel('cancel')" *ngIf="!isShowConfirm">知道了</button>

+ 1 - 0
src/app/share/dialog-delete/dialog-delete.component.less

@@ -46,6 +46,7 @@
46
       flex-direction: column;
46
       flex-direction: column;
47
       align-items: center;
47
       align-items: center;
48
       justify-content: center;
48
       justify-content: center;
49
+      padding: 0 16px;
49
 
50
 
50
       .defeat{
51
       .defeat{
51
         width: 100%;
52
         width: 100%;

+ 13 - 0
src/app/share/dialog-delete/dialog-delete.component.ts

@@ -22,11 +22,14 @@ export class DialogDeleteComponent implements OnInit, OnChanges {
22
   @Input() deptDisplay: number = 0;
22
   @Input() deptDisplay: number = 0;
23
   @Input() isShowConfirm: boolean = true;
23
   @Input() isShowConfirm: boolean = true;
24
   @Input() isShowConfirmInfo: string = '';
24
   @Input() isShowConfirmInfo: string = '';
25
+  @Input() isShowEndDeptId: boolean = false;
26
+  @Input() isShowEndDeptIdArr: any[] = [];
25
   constructor(private message: NzMessageService) {}
27
   constructor(private message: NzMessageService) {}
26
 
28
 
27
   isRemandClean:boolean = true;
29
   isRemandClean:boolean = true;
28
   isLoading:boolean = false;
30
   isLoading:boolean = false;
29
   recoveryRoom:any = null;
31
   recoveryRoom:any = null;
32
+  endDeptId:any = null;
30
 
33
 
31
   ngOnInit() {}
34
   ngOnInit() {}
32
 
35
 
@@ -36,6 +39,9 @@ export class DialogDeleteComponent implements OnInit, OnChanges {
36
       this.isLoading = false;
39
       this.isLoading = false;
37
       // this.recoveryRoom = null;
40
       // this.recoveryRoom = null;
38
     }
41
     }
42
+    if(changes.isShowEndDeptId){
43
+      this.endDeptId = null;
44
+    }
39
     if(changes.isSelected && changes.isSelectedArr){
45
     if(changes.isSelected && changes.isSelectedArr){
40
       if(changes.isSelectedArr.currentValue.length === 1){
46
       if(changes.isSelectedArr.currentValue.length === 1){
41
         this.recoveryRoom = changes.isSelectedArr.currentValue[0].id;
47
         this.recoveryRoom = changes.isSelectedArr.currentValue[0].id;
@@ -55,6 +61,10 @@ export class DialogDeleteComponent implements OnInit, OnChanges {
55
       this.message.info('请选择苏醒科室!');
61
       this.message.info('请选择苏醒科室!');
56
       return;
62
       return;
57
     }
63
     }
64
+    if(this.isShowEndDeptId && !this.endDeptId){
65
+      this.message.info('请选择终点科室!');
66
+      return;
67
+    }
58
     let data:any = {};
68
     let data:any = {};
59
     if(this.isChecked){
69
     if(this.isChecked){
60
       data.isRemandClean = this.isRemandClean;
70
       data.isRemandClean = this.isRemandClean;
@@ -62,6 +72,9 @@ export class DialogDeleteComponent implements OnInit, OnChanges {
62
     if(this.isSelected){
72
     if(this.isSelected){
63
       data.recoveryRoom = this.recoveryRoom;
73
       data.recoveryRoom = this.recoveryRoom;
64
     }
74
     }
75
+    if(this.isShowEndDeptId){
76
+      data.endDeptId = this.endDeptId;
77
+    }
65
     this.confirmDelEvent.emit(data);
78
     this.confirmDelEvent.emit(data);
66
   }
79
   }
67
 
80
 

+ 1 - 1
src/app/share/specimen-package-list-modal/specimen-package-list-modal.component.html

@@ -84,7 +84,7 @@
84
       </div>
84
       </div>
85
       <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
85
       <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
86
       <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
86
       <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
87
-      <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.endDeptNames}}</div>
87
+      <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.targetDeptDTO?.dept}}</div>
88
       <div style="display: flex;flex-wrap: wrap;">
88
       <div style="display: flex;flex-wrap: wrap;">
89
         <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
89
         <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
90
       </div>
90
       </div>

+ 2 - 2
src/app/views/batch-specimen/batch-specimen.component.html

@@ -69,7 +69,7 @@
69
 
69
 
70
 <!-- 删除模态框 -->
70
 <!-- 删除模态框 -->
71
 <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
71
 <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
72
-(confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
72
+(confirmDelEvent)="confirmDel($event)" [content]="tipsMsg1" [isShowEndDeptId]="isShowEndDeptId" [isShowEndDeptIdArr]="isShowEndDeptIdArr"></app-dialog-delete>
73
 
73
 
74
 <app-package-specimen-rule *ngIf="isShowPackageSpecimenRule" (cancelFlagHand)="closePackageSpecimenRule($event)"></app-package-specimen-rule>
74
 <app-package-specimen-rule *ngIf="isShowPackageSpecimenRule" (cancelFlagHand)="closePackageSpecimenRule($event)"></app-package-specimen-rule>
75
 
75
 
@@ -88,7 +88,7 @@
88
       </div>
88
       </div>
89
       <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
89
       <div style="margin-top: 3mm;">打包时间:{{package.packTime | date: 'yyyy-MM-dd HH:mm'}}</div>
90
       <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
90
       <div style="margin-top: 3mm;">打包科室:{{package.packDeptDTO?.dept}}</div>
91
-      <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.endDeptNames}}</div>
91
+      <div style="margin-top: 3mm;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">终点科室:{{package.targetDeptDTO?.dept}}</div>
92
       <div style="display: flex;flex-wrap: wrap;">
92
       <div style="display: flex;flex-wrap: wrap;">
93
         <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
93
         <div style="width: 33.33%;margin-top: 3mm;" *ngFor="let item of typeSpecimentList | slice:0:9">{{item.name}}:{{item.size}}</div>
94
       </div>
94
       </div>

+ 41 - 32
src/app/views/batch-specimen/batch-specimen.component.ts

@@ -105,14 +105,7 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
105
           this.total = result.totalCount;
105
           this.total = result.totalCount;
106
           this.typeSpecimentList = result.tube || [];
106
           this.typeSpecimentList = result.tube || [];
107
           this.patientSpecimentList = result.patient || [];
107
           this.patientSpecimentList = result.patient || [];
108
-          let packageDTO:any = result.package || {};
109
-          if(packageDTO.endDeptList){
110
-            packageDTO.endDeptNames = packageDTO.endDeptList.map(v => v.dept).toString();
111
-          }else{
112
-            packageDTO.endDeptNames = "";
113
-          }
114
-          this.package = packageDTO;
115
-
108
+          this.package = result.package || {};
116
           this.getList();
109
           this.getList();
117
         }
110
         }
118
       })
111
       })
@@ -143,9 +136,11 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
143
   // 隐藏删除框
136
   // 隐藏删除框
144
   hideDelModal() {
137
   hideDelModal() {
145
     this.delModal = false;
138
     this.delModal = false;
139
+    this.isShowEndDeptId = false;
146
   }
140
   }
147
   // 确认删除
141
   // 确认删除
148
-  confirmDel() {
142
+  confirmDel(e) {
143
+    console.log(e)
149
     this.btnLoading = true;
144
     this.btnLoading = true;
150
     if (this.confirmDelType === "del") {
145
     if (this.confirmDelType === "del") {
151
       //删除-移除标本
146
       //删除-移除标本
@@ -184,29 +179,24 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
184
         });
179
         });
185
     }else if (this.confirmDelType === "package") {
180
     }else if (this.confirmDelType === "package") {
186
       //打包
181
       //打包
187
-      if(this.configs.spePackageCreateOrder == 1){
188
-        // 生成配送工单
189
-        let postData = {
190
-          type: 'specimenPackage',
191
-          id: this.package.id,
192
-        }
193
-
194
-        this.mainService
195
-          .createOrTakeOrderSpecimen(postData)
196
-          .subscribe((data:any) => {
197
-            this.btnLoading = false;
198
-            this.delModal = false;
199
-            if (data.state == 200) {
200
-              this.printPackage();
201
-            } else {
202
-              this.message.error(data.msg || "操作失败");
203
-            }
204
-          });
205
-      }else{
206
-        this.btnLoading = false;
207
-        this.delModal = false;
208
-        this.printPackage();
182
+      let postData = {
183
+        type: 'specimenPackage',
184
+        id: this.package.id,
185
+        endDeptId: e.endDeptId,
209
       }
186
       }
187
+
188
+      this.mainService
189
+        .createOrTakeOrderSpecimen(postData)
190
+        .subscribe((data:any) => {
191
+          this.btnLoading = false;
192
+          this.delModal = false;
193
+          this.isShowEndDeptId = false;
194
+          if (data.state == 200) {
195
+            this.printPackage();
196
+          } else {
197
+            this.message.error(data.msg || "操作失败");
198
+          }
199
+        });
210
     }
200
     }
211
   }
201
   }
212
 
202
 
@@ -221,6 +211,7 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
221
           this.typeSpecimentList = data.tube || [];
211
           this.typeSpecimentList = data.tube || [];
222
           this.patientSpecimentList = data.patient || [];
212
           this.patientSpecimentList = data.patient || [];
223
           this.package = data.package || {};
213
           this.package = data.package || {};
214
+
224
           this.base64 = data.base64 || '';
215
           this.base64 = data.base64 || '';
225
 
216
 
226
           this.message.success("操作成功");
217
           this.message.success("操作成功");
@@ -235,8 +226,26 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
235
   }
226
   }
236
 
227
 
237
   // 打包
228
   // 打包
229
+  isShowEndDeptId:boolean = false;
238
   packageHandler(){
230
   packageHandler(){
239
-    this.showDelModal({}, `你确认要打包${this.total}只标本吗?`,'打包','package')
231
+    this.isShowEndDeptId = true;
232
+    this.getSpePackageEndDeptList();
233
+  }
234
+
235
+  // 查询标本包里的所有终点克是
236
+  isShowEndDeptIdArr:any[] = [];
237
+  getSpePackageEndDeptList(){
238
+    this.mainService
239
+      .getSpePackageEndDeptList({packageId: this.package.id})
240
+      .subscribe((data:any) => {
241
+        if (data.state == 200) {
242
+          this.isShowEndDeptIdArr = data.data;
243
+
244
+          this.showDelModal({}, `你确认要打包${this.total}只标本吗?`,'打包','package')
245
+        } else {
246
+          this.message.error(data.msg || "操作失败");
247
+        }
248
+      });
240
   }
249
   }
241
 
250
 
242
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
251
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)

+ 1 - 1
src/app/views/specimen-package/specimen-package.component.html

@@ -53,7 +53,7 @@
53
             <th nzWidth="10%">包号</th>
53
             <th nzWidth="10%">包号</th>
54
             <th nzWidth="10%">打包人</th>
54
             <th nzWidth="10%">打包人</th>
55
             <th nzWidth="10%">打包科室</th>
55
             <th nzWidth="10%">打包科室</th>
56
-            <th nzWidth="10%">终点科室</th>
56
+            <th nzWidth="10%">检验科室</th>
57
             <th nzWidth="10%">标本数</th>
57
             <th nzWidth="10%">标本数</th>
58
             <th nzWidth="10%">配送人|配送时间</th>
58
             <th nzWidth="10%">配送人|配送时间</th>
59
             <th nzWidth="10%">接收人|接收时间</th>
59
             <th nzWidth="10%">接收人|接收时间</th>