Explorar el Código

Merge branch 'master' into develop

seimin hace 3 meses
padre
commit
0f4c8cf7c8
Se han modificado 21 ficheros con 1978 adiciones y 406 borrados
  1. 23 18
      src/app/share/pathology-add/pathology-add.component.html
  2. 10 2
      src/app/share/pathology-add/pathology-add.component.less
  3. 34 18
      src/app/share/pathology-add/pathology-add.component.ts
  4. 14 11
      src/app/share/pathology-detail/pathology-detail.component.html
  5. 24 0
      src/app/views/batch-distribution/batch-distribution-routing.module.ts
  6. 255 0
      src/app/views/batch-distribution/batch-distribution.component.html
  7. 668 0
      src/app/views/batch-distribution/batch-distribution.component.less
  8. 238 0
      src/app/views/batch-distribution/batch-distribution.component.ts
  9. 19 0
      src/app/views/batch-distribution/batch-distribution.module.ts
  10. 10 13
      src/app/views/hushijiandan/hushijiandan.component.html
  11. 61 5
      src/app/views/hushijiandan/hushijiandan.component.less
  12. 13 61
      src/app/views/hushijiandan/hushijiandan.component.ts
  13. 5 0
      src/app/views/main/main-routing.module.ts
  14. 137 106
      src/app/views/pathology-communication-book/pathology-communication-book.component.html
  15. 124 1
      src/app/views/pathology-communication-book/pathology-communication-book.component.ts
  16. 57 53
      src/app/views/pathology-sample/pathology-sample.component.html
  17. 7 2
      src/app/views/pathology-sample/pathology-sample.component.less
  18. 74 34
      src/app/views/pathology-sample/pathology-sample.component.ts
  19. 31 10
      src/app/views/specimen-room-view/specimen-room-view.component.html
  20. 119 36
      src/app/views/specimen-room-view/specimen-room-view.component.less
  21. 55 36
      src/app/views/specimen-room-view/specimen-room-view.component.ts

+ 23 - 18
src/app/share/pathology-add/pathology-add.component.html

@@ -9,6 +9,7 @@
9 9
 						<div class="form-title" *ngIf="detailsData.pathologyFormType==null">申请单类型:无</div>
10 10
 						<div class="form-title" *ngIf="detailsData.pathologyFormType==1">申请单类型:术中快速病理检查申请单</div>
11 11
 						<div class="form-title" *ngIf="detailsData.pathologyFormType==0">申请单类型:病理检查申请单</div>
12
+						<div class="form-title" *ngIf="detailsData.pathologyFormType==2">申请单类型:病理细胞学申请单</div>
12 13
 						<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
13 14
 					</nz-form-item>
14 15
 					<nz-form-item class="form-title-box">
@@ -195,7 +196,7 @@
195 196
 					</div>
196 197
 				</nz-form-item>
197 198
 				
198
-				<nz-form-item class="form-item">
199
+	<!-- 			<nz-form-item class="form-item">
199 200
 					<nz-form-label [nzSm]="4" [nzXs]="24">快捷键入</nz-form-label>
200 201
 					<div class="specimen-list">
201 202
 						<div *ngFor="let item of fastList;let index=index;" class="select-item"
@@ -203,16 +204,16 @@
203 204
 							{{item.name}}
204 205
 						</div>
205 206
 					</div>
206
-				</nz-form-item>
207
+				</nz-form-item> -->
207 208
 				
208 209
 				<nz-form-item class="form-item">
209 210
 					<nz-form-label nzRequired nzFor="specimenName" [nzSm]="3" [nzXs]="24">标本名称</nz-form-label>
210 211
 					<div class="specimen-tip" [ngClass]="{'isSpecumen':placeName}">{{placeName?placeName:''}}</div>
211 212
 					<nz-form-control nzErrorTip="请输入标本名称" [(nzSm)]="nzSmNum" [nzXs]="24">
212
-						<input nz-input maxlength="15" (ngModelChange)="specimenInput($event)" formControlName="specimenName" placeholder="请输入标本名称"/>
213
+						<input nz-input maxlength="20" (ngModelChange)="specimenInput($event)" formControlName="specimenName" placeholder="请输入标本名称"/>
213 214
 					</nz-form-control>
214
-					<div class="empty-box" [ngClass]="{'beSpecumenEmpty':placeName, 'noSpecumenEmpty':placeName==''}">
215
-						<span class="name">{{specimenNameLength}}/15</span>
215
+					<div class="empty-box" [ngClass]="{'beSpecumenEmpty':placeName, 'noSpecumenEmpty':!placeName}">
216
+						<span class="name">{{specimenNameLength}}/20</span>
216 217
 						<span class="empty" (click)="emptData($event)">清空</span>
217 218
 					</div>
218 219
 				</nz-form-item>
@@ -273,7 +274,7 @@
273 274
 						</nz-input-group>
274 275
 					</nz-form-control>
275 276
 				</nz-form-item>
276
-				<nz-form-item *ngIf="ifImmobilization">
277
+				<nz-form-item *ngIf="ifImmobilization && detailsData.pathologyFormType==0">
277 278
 				  <nz-form-label nzRequired [nzSpan]="6" nzFor="fixationTime">固定时间</nz-form-label>
278 279
 				  <nz-form-control style="display: flex;align-items: center;" [nzSpan]="18" nzErrorTip="请选择固定时间!">
279 280
 				    <nz-input-group style="display: flex;gap: 10px">
@@ -286,7 +287,7 @@
286 287
 						</nz-input-group>
287 288
 				  </nz-form-control>
288 289
 				</nz-form-item>
289
-				<nz-form-item *ngIf="ifImmobilization">
290
+				<nz-form-item *ngIf="ifImmobilization && detailsData.pathologyFormType==0">
290 291
 				  <nz-form-label nzRequired [nzSpan]="8" nzFor="fixative">固定液类型</nz-form-label>
291 292
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择固定液类型!">
292 293
 				    <nz-input-group>
@@ -305,7 +306,7 @@
305 306
 					</nz-form-control>
306 307
 				</nz-form-item>
307 308
 				<nz-form-item>
308
-				  <nz-form-label nzRequired [nzSpan]="5" nzFor="name">姓名</nz-form-label>
309
+				  <nz-form-label nzRequired [nzSpan]="5">姓名</nz-form-label>
309 310
 					<nz-form-control [nzSpan]="19" nzErrorTip="请输入姓名!">
310 311
 						<input nz-input disabled formControlName="name" placeholder="请输入姓名" nzSize="default" />
311 312
 					</nz-form-control>
@@ -436,6 +437,7 @@
436 437
 							 <div>标本号:{{data.specimenCode}}</div>
437 438
 						 </div>
438 439
 						 <div style="width: 40%;height: 100%;text-align: center;display: flex;align-items: center;">
440
+							 <!-- <span style="font-weight: bold;">速</span> -->
439 441
 							 <img style="max-width: 100%;max-height: 100%;" [src]="tool.logoUrl" alt="">
440 442
 						 </div>
441 443
 					 </div>
@@ -455,7 +457,7 @@
455 457
 								<div>日期: {{data.inVitroTime|date:'yyyy-MM-dd'}}</div>
456 458
 							</div>
457 459
 							<div style="margin-top:10px;">
458
-								<div style="width: 100%;height: 32px;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
460
+								<div style="width: 98%;height: 32px;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
459 461
 							</div>
460 462
 						 </div>
461 463
 						 <div style="width: 30%;">
@@ -481,26 +483,29 @@
481 483
 			<div style="font-size: 12px;" *ngIf="outpatientPathologyLabelSizeType==2 && printData && printData.specimenList && printData.specimenList.length>0">
482 484
 				<div *ngFor="let data of printData.specimenList; let index=index;">
483 485
 					<div style="width: 100%;display: flex;margin-top: 5px;padding: 0 7px;">
484
-					 <div style="width: 46%;">
485
-						 <div style="display: flex;justify-content: center;">
486
+					 <div style="width: 35%;">
487
+						 <div style="display: flex;">
486 488
 							 <div style="width: 50px;height: 50px;">
487 489
 							 		<img style="max-width: 100%;max-height: 100%;position: relative;left: -2px;" [src]="data.barCode" alt="">
488 490
 							 </div>
489
-							 <div style="width: 12px;">申请单</div>
491
+							 <!-- <div style="width: 12px;">申请单</div> -->
490 492
 						 </div>
491 493
 						 <div>{{printData.applyCode}}</div>
492 494
 					 </div>
493
-					 <div style="width: 4%;"></div>
494
-					 <div style="width: 49%;">
495
+					 <div style="width: 5%;"></div>
496
+					 <div style="width: 60%;position: relative;left: -5px;">
495 497
 						<div style="display: flex;flex-wrap: nowrap;">住院号: {{data.residenceNo}}</div>
496 498
 						<div style="margin-top:9px;">患者: {{data.patientName}}</div>
497
-						<div style="margin-top:9px;margin-left: 25px;">性别: {{data.patientGender}}</div>
499
+						<div style="margin-top:9px;margin-left: 30px;">性别: {{data.patientGender}}</div>
498 500
 					 </div>
499 501
 					</div>
500
-					<div style="margin-top:10px;padding-left: 7px;">
501
-						<div style="width: 100%;height: 32px;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
502
+					<div style="margin-top:3px;padding-left: 7px;">
503
+						<div style="width: 98%;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
504
+					</div>
505
+					<div style="margin-top:3px;padding-left: 7px;">
506
+						<div style="width: 98%;">日期: {{data.inVitroTime|date:'yyyy-MM-dd'}}</div>
502 507
 					</div>
503
-				 <div style="height: 11px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1 && index+1 < printData.specimenList.length"></div>
508
+				 <div style="height: 18px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1 && index+1 < printData.specimenList.length"></div>
504 509
 				</div>
505 510
 			</div>
506 511
 		</div>

+ 10 - 2
src/app/share/pathology-add/pathology-add.component.less

@@ -269,11 +269,11 @@
269 269
 						}
270 270
 					}
271 271
 					.beSpecumenEmpty{
272
-						right: 6px;
272
+						right: 10px;
273 273
 						top: 8px;
274 274
 					}
275 275
 					.noSpecumenEmpty{
276
-						right: 6px;
276
+						right: 10px;
277 277
 						top: 8px;
278 278
 					}
279 279
 				}
@@ -307,5 +307,13 @@
307 307
 	  }
308 308
 		.no-width{
309 309
 			width: 33% !important;
310
+			.ant-select{
311
+				width: 100% !important;
312
+			}
313
+			.ant-input-disabled{
314
+				color: rgba(0, 0, 0, 0.65) !important;
315
+				background: #fff !important;
316
+				border: none !important;
317
+			}
310 318
 		}
311 319
 	}

+ 34 - 18
src/app/share/pathology-add/pathology-add.component.ts

@@ -517,8 +517,8 @@ export class PathologyAddComponent implements OnInit {
517 517
 			this.specimenNameId = item.id
518 518
 			this.specimenNameName = item.name
519 519
 			if(this.validateSpecimenForm.value.specimenName && this.validateSpecimenForm.value.specimenName.length){
520
-				if(item.name.length+this.validateSpecimenForm.value.specimenName.length>14){
521
-					this.message.error('字符长度不能超过15个')
520
+				if(item.name.length+this.validateSpecimenForm.value.specimenName.length>19){
521
+					this.message.error('字符长度不能超过20个')
522 522
 					return
523 523
 				}
524 524
 			}
@@ -542,8 +542,8 @@ export class PathologyAddComponent implements OnInit {
542 542
 	fastClick(e,item,index){
543 543
 		this.fastIndex = index
544 544
 			if(this.validateSpecimenForm.value.specimenName && this.validateSpecimenForm.value.specimenName.length){
545
-				if(item.name.length+this.validateSpecimenForm.value.specimenName.length>14){
546
-					this.message.error('字符长度不能超过15个')
545
+				if(item.name.length+this.validateSpecimenForm.value.specimenName.length>19){
546
+					this.message.error('字符长度不能超过20个')
547 547
 					return
548 548
 				}
549 549
 			}
@@ -586,8 +586,8 @@ export class PathologyAddComponent implements OnInit {
586 586
 		  this.validateSpecimenForm.controls[i].updateValueAndValidity();
587 587
 		}
588 588
 		if (this.validateSpecimenForm.invalid) return;
589
-		if(this.validateSpecimenForm.value.specimenName.length>15){
590
-			this.message.error('字符长度不能超过15个')
589
+		if(this.validateSpecimenForm.value.specimenName.length>19){
590
+			this.message.error('字符长度不能超过20个')
591 591
 			return
592 592
 		}
593 593
 		if(type==2){
@@ -705,7 +705,7 @@ export class PathologyAddComponent implements OnInit {
705 705
 	// 监听输入字数
706 706
 	specimenNameLength:any=0;
707 707
 	specimenInput(e){
708
-		if(e.length>15){
708
+		if(e.length>20){
709 709
 			return
710 710
 		}
711 711
 		this.specimenNameLength = e.length
@@ -766,9 +766,13 @@ export class PathologyAddComponent implements OnInit {
766 766
 		this.fixationData = format(result, 'yyyy-MM-dd');
767 767
 		console.log(this.fixationData)
768 768
 	}
769
-	fixationTimeSelect:any;
769
+	fixationTimeSelect:any = null;
770 770
 	fixationTimeChange(result){
771
-		this.fixationTimeSelect = format(result, 'HH:mm');
771
+		if(result){
772
+			this.fixationTimeSelect = format(result, 'HH:mm');
773
+		}else{
774
+			this.fixationTimeSelect = null
775
+		}
772 776
 		console.log(this.fixationData + ' ' + this.fixationTimeSelect)
773 777
 	}
774 778
 	
@@ -779,9 +783,13 @@ export class PathologyAddComponent implements OnInit {
779 783
 		this.inVitroData = format(result, 'yyyy-MM-dd');
780 784
 		console.log(this.inVitroData)
781 785
 	}
782
-	inVitroTimeSelect:any;
786
+	inVitroTimeSelect:any = null;
783 787
 	inVitroTimeChange(result){
784
-		this.inVitroTimeSelect = format(result, 'HH:mm');
788
+		if(result){
789
+			this.inVitroTimeSelect = format(result, 'HH:mm');
790
+		}else{
791
+			this.inVitroTimeSelect = null;
792
+		}
785 793
 		console.log(this.inVitroData + ' ' + this.inVitroTimeSelect)
786 794
 	}
787 795
 	
@@ -789,6 +797,14 @@ export class PathologyAddComponent implements OnInit {
789 797
 	printLoading:boolean = false;
790 798
 	submitPrintForm(): void{
791 799
 		let that = this
800
+		if(this.ifImmobilization && this.detailsData.pathologyFormType==0 && (!this.fixationTimeSelect || this.fixationTimeSelect == null)){
801
+			this.message.error('请选择固定时间')
802
+			return
803
+		}
804
+		if(!this.inVitroTimeSelect || this.inVitroTimeSelect == null){
805
+			this.message.error('请选择离体时间')
806
+			return
807
+		}
792 808
 		for (const i in this.validatePrintForm.controls) {
793 809
 		  this.validatePrintForm.controls[i].markAsDirty();
794 810
 		  this.validatePrintForm.controls[i].updateValueAndValidity();
@@ -828,7 +844,7 @@ export class PathologyAddComponent implements OnInit {
828 844
 			delete data.operation
829 845
 			delete data.pathologySpecimenIds
830 846
 		}
831
-		if(this.ifImmobilization){
847
+		if(this.ifImmobilization && this.detailsData.pathologyFormType==0){
832 848
 			data.pathologyForm.fixationTime = this.fixationData + ' ' + this.fixationTimeSelect +':00'
833 849
 			data.pathologyForm.specimenFixingLiquid.id = this.validatePrintForm.value.fixative
834 850
 		}else{
@@ -969,7 +985,7 @@ export class PathologyAddComponent implements OnInit {
969 985
 				let date = new Date();
970 986
 				
971 987
 				let inVitroDate = format(date, "yyyy-MM-dd")
972
-				if(this.ifImmobilization){
988
+				if(this.ifImmobilization && this.detailsData.pathologyFormType==0){
973 989
 					this.validatePrintForm = this.fb.group({
974 990
 						inVitroTimes: [null, [Validators.required]],
975 991
 						inVitroDate: [null, [Validators.required]],
@@ -985,7 +1001,7 @@ export class PathologyAddComponent implements OnInit {
985 1001
 					this.validatePrintForm.controls.fixationDate.setValue(inVitroDate);
986 1002
 					// this.validatePrintForm.controls.fixationTimes.setValue(date);
987 1003
 					this.fixationData = inVitroDate;
988
-					this.fixationTimeSelect = format(date, 'HH:mm');
1004
+					this.fixationTimeSelect = null;
989 1005
 				}else{
990 1006
 					this.validatePrintForm = this.fb.group({
991 1007
 						inVitroTimes: [null, [Validators.required]],
@@ -1030,7 +1046,7 @@ export class PathologyAddComponent implements OnInit {
1030 1046
 					let date = new Date();
1031 1047
 					
1032 1048
 					let inVitroDate = format(date, "yyyy-MM-dd")
1033
-					if(this.ifImmobilization){
1049
+					if(this.ifImmobilization && this.detailsData.pathologyFormType==0){
1034 1050
 						this.validatePrintForm = this.fb.group({
1035 1051
 							inVitroTimes: [null, [Validators.required]],
1036 1052
 							inVitroDate: [null, [Validators.required]],
@@ -1045,7 +1061,7 @@ export class PathologyAddComponent implements OnInit {
1045 1061
 						this.validatePrintForm.controls.fixationDate.setValue(inVitroDate);
1046 1062
 						// this.validatePrintForm.controls.fixationTimes.setValue(date);
1047 1063
 						this.fixationData = inVitroDate;
1048
-						this.fixationTimeSelect = format(date, 'HH:mm');
1064
+						this.fixationTimeSelect = null;
1049 1065
 					}else{
1050 1066
 						this.validatePrintForm = this.fb.group({
1051 1067
 							inVitroTimes: [null, [Validators.required]],
@@ -1101,7 +1117,7 @@ export class PathologyAddComponent implements OnInit {
1101 1117
 					let date = new Date();
1102 1118
 					
1103 1119
 					let inVitroDate = format(date, "yyyy-MM-dd")
1104
-					if(this.ifImmobilization){
1120
+					if(this.ifImmobilization && this.detailsData.pathologyFormType==0){
1105 1121
 						this.validatePrintForm = this.fb.group({
1106 1122
 							inVitroTimes: [null, [Validators.required]],
1107 1123
 							inVitroDate: [null, [Validators.required]],
@@ -1116,7 +1132,7 @@ export class PathologyAddComponent implements OnInit {
1116 1132
 						this.validatePrintForm.controls.fixationDate.setValue(inVitroDate);
1117 1133
 						// this.validatePrintForm.controls.fixationTimes.setValue(date);
1118 1134
 						this.fixationData = inVitroDate;
1119
-						this.fixationTimeSelect = format(date, 'HH:mm');
1135
+						this.fixationTimeSelect = null;
1120 1136
 					}else{
1121 1137
 						this.validatePrintForm = this.fb.group({
1122 1138
 							inVitroTimes: [null, [Validators.required]],

+ 14 - 11
src/app/share/pathology-detail/pathology-detail.component.html

@@ -5,7 +5,7 @@
5 5
 			<div class="content">
6 6
 				<div class="content-item boder-right">
7 7
 					<nz-form-item class="form-title-box">
8
-						<div class="form-title">申请单类型:{{detailsData.pathologyFormType==1?'术中快速病理检查申请单':'病理检查申请单'}}</div>
8
+						<div class="form-title">申请单类型:{{detailsData.pathologyFormType==1?'术中快速病理检查申请单' : detailsData.pathologyFormType==2 ? '病理细胞学申请单' : '病理检查申请单'}}</div>
9 9
 						<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
10 10
 					</nz-form-item>
11 11
 					<nz-form-item class="form-title-box">
@@ -243,7 +243,7 @@
243 243
 								<div>日期: {{data.inVitroTime|date:'yyyy-MM-dd'}}</div>
244 244
 							</div>
245 245
 							<div style="margin-top:10px;">
246
-								<div style="width: 100%;height: 32px;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
246
+								<div style="width: 98%;height: 32px;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
247 247
 							</div>
248 248
 						 </div>
249 249
 						 <div style="width: 30%;">
@@ -269,26 +269,29 @@
269 269
 			<div style="font-size: 12px;" *ngIf="outpatientPathologyLabelSizeType==2 && printData && printData.specimenList && printData.specimenList.length>0">
270 270
 				<div *ngFor="let data of printData.specimenList; let index=index;">
271 271
 					<div style="width: 100%;display: flex;margin-top: 5px;padding: 0 7px;">
272
-					 <div style="width: 46%;">
273
-						 <div style="display: flex;justify-content: center;">
272
+					 <div style="width: 35%;">
273
+						 <div style="display: flex;">
274 274
 							 <div style="width: 50px;height: 50px;">
275 275
 							 		<img style="max-width: 100%;max-height: 100%;position: relative;left: -2px;" [src]="data.barCode" alt="">
276 276
 							 </div>
277
-							 <div style="width: 12px;">申请单</div>
277
+							 <!-- <div style="width: 12px;">申请单</div> -->
278 278
 						 </div>
279 279
 						 <div>{{printData.applyCode}}</div>
280 280
 					 </div>
281
-					 <div style="width: 4%;"></div>
282
-					 <div style="width: 49%;">
281
+					 <div style="width: 5%;"></div>
282
+					 <div style="width: 60%;position: relative;left: -5px;">
283 283
 						<div style="display: flex;flex-wrap: nowrap;">住院号: {{data.residenceNo}}</div>
284 284
 						<div style="margin-top:9px;">患者: {{data.patientName}}</div>
285
-						<div style="margin-top:9px;margin-left: 25px;">性别: {{data.patientGender}}</div>
285
+						<div style="margin-top:9px;margin-left: 30px;">性别: {{data.patientGender}}</div>
286 286
 					 </div>
287 287
 					</div>
288
-					<div style="margin-top:10px;padding-left: 7px;">
289
-						<div style="width: 100%;height: 32px;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
288
+					<div style="margin-top:3px;padding-left: 7px;">
289
+						<div style="width: 98%;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
290 290
 					</div>
291
-				 <div style="height: 11px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1 && index+1 < printData.specimenList.length"></div>
291
+					<div style="margin-top:3px;padding-left: 7px;">
292
+						<div style="width: 98%;">日期: {{data.inVitroTime|date:'yyyy-MM-dd'}}</div>
293
+					</div>
294
+				 <div style="height: 18px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1 && index+1 < printData.specimenList.length"></div>
292 295
 				</div>
293 296
 			</div>
294 297
 		</div>

+ 24 - 0
src/app/views/batch-distribution/batch-distribution-routing.module.ts

@@ -0,0 +1,24 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { BatchDistributionComponent } from './batch-distribution.component';
4
+
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: '',
9
+    component: BatchDistributionComponent,
10
+    // children: [
11
+    //   {
12
+    //     // 查看详情
13
+    //     path: 'officeDetail/:id',
14
+    //     loadChildren: () => import('../office-detail/office-detail.module').then(m => m.OfficeDetailModule),
15
+    //   }
16
+    // ]
17
+  }
18
+];
19
+
20
+@NgModule({
21
+  imports: [RouterModule.forChild(routes)],
22
+  exports: [RouterModule]
23
+})
24
+export class BatchDistributionRoutingModule { }

+ 255 - 0
src/app/views/batch-distribution/batch-distribution.component.html

@@ -0,0 +1,255 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzLg='20' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">批次号:</span>
7
+          <input nz-input class="formItem" [(ngModel)]="batchNumber" placeholder="请输入批次号" nzSize="default" />
8
+        </div>
9
+        <div class="list-template__searchItem">
10
+          <span class="label">创建时间:</span>
11
+          <nz-range-picker [(ngModel)]="dateRange" nzFormat="yyyy-MM-dd HH:mm:ss"
12
+					(ngModelChange)="changeDate($event)"></nz-range-picker>
13
+        </div>
14
+      </div>
15
+      <div nz-col nzLg="4" class="list-template__btns">
16
+        <button class="btn default" (click)='search()'>搜索</button>
17
+        <button class="btn default ml8" (click)='reset()'>重置</button>
18
+      </div>
19
+    </div>
20
+    <div class="list-template__bottom">
21
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
22
+        [nzLoading]="loading1">
23
+        <thead>
24
+          <tr class="thead">
25
+						<th>批次号</th>
26
+            <th>创建时间</th>
27
+						<th>核对人</th>
28
+						<th>配送人</th>
29
+						<th>申请单数</th>
30
+            <th>标本数</th>
31
+            <th nzWidth="120px">操作</th>
32
+          </tr>
33
+        </thead>
34
+        <tbody v-if="listOfData && listOfData.length>0">
35
+          <tr *ngFor="let data of listOfData">
36
+            <td>{{ data.batchNo || '-' }}</td>
37
+            <td>{{ data.createTime|date:'yyyy-MM-dd HH:mm'}}</td>
38
+            <td>{{ data.checkUserDTO?data.checkUserDTO.name:'' }}</td>
39
+						<td>{{ data.deliverUserDTO?data.deliverUserDTO.name:'' }}</td>
40
+						<td>{{ data.pathologyFormNum||'0' }}</td>
41
+						<td>{{ data.specimenNum||'0' }}</td>
42
+            <td>
43
+              <div class="coop">
44
+                <span *ngIf="coopBtns.look" (click)="viewSingle(data)">查看申请单</span>
45
+              </div>
46
+            </td>
47
+          </tr>
48
+        </tbody>
49
+      </nz-table>
50
+      <div class="list-template__pagination">
51
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
52
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
53
+        </nz-pagination>
54
+      </div>
55
+    </div>
56
+  </div>
57
+
58
+  <!-- 查看申请单 -->
59
+  <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
60
+    <div class="modalBody">
61
+      <div class="title">申请单列表<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
62
+      </div>
63
+      <overlay-scrollbars #osComponentRef1 class="content">
64
+        <div class="list-template__bottom">
65
+        	<nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
66
+        		[nzLoading]="grossLoading">
67
+        		<thead>
68
+        			<tr class="thead">
69
+        				<th>申请单类型</th>
70
+        				<th>申请单号</th>
71
+								<th>申请科室</th>
72
+								<th>操作科室</th>
73
+								<th>患者信息</th>
74
+        				<th nzWidth="20%">检验项目</th>
75
+								<th>部位</th>
76
+        				<th>标本数</th>
77
+        				<th nzWidth="100px">操作</th>
78
+        			</tr>
79
+        		</thead>
80
+        		<tbody>
81
+        			<tr *ngFor="let data of viewData">
82
+        				<td *ngIf="data.pathologyFormType==1" class="red">术中快速</td>
83
+        				<td *ngIf="data.pathologyFormType==0">普通病理</td>
84
+        				<td *ngIf="data.pathologyFormType==2">病理细胞学</td>
85
+        				<td style="text-decoration: underline;cursor: pointer;" (click)="itemClick(data)">{{ data.applyCode}}</td>
86
+        				<td>{{ data.patientDTO? data.patientDTO.department.dept:'-'}}</td>
87
+								<td>{{ data.surgeryDeptDTO? data.surgeryDeptDTO.dept:'-'}}</td>
88
+        				<td>{{ data.patientDTO.patientName}} ({{data.patientDTO.bedNum}}床)</td>
89
+								<td>{{ data.arr ? data.arr.join('、') : '无' }}</td>
90
+								<td>{{ data.takePart}}</td>
91
+								<td>{{ data.specimenNum}}</td>
92
+        				<td>
93
+        				  <div class="coop">
94
+        				    <span (click)="itemClick(data)">查看</span>
95
+        				  </div>
96
+        				</td>
97
+        			</tr>
98
+        		</tbody>
99
+        	</nz-table>
100
+        </div>
101
+      </overlay-scrollbars>
102
+      <div class="display_flex justify-content_flex-center">
103
+        <button class="btn" nz-button nzType="primary" (click)="hideModal()">知道了</button>
104
+      </div>
105
+    </div>
106
+  </div>
107
+</div>
108
+
109
+<!-- 标本查看详情-->
110
+<div class="pathology-box display_flex align-items_center justify-content_flex-center" *ngIf="detailMoadl">
111
+	<div class="pathology-content">
112
+		<div class="title">查看详情
113
+		<i class="icon_transport transport-guanbi" (click)="closeDetailMoadl()"></i></div>
114
+		<div class="content">
115
+			<div class="content-item boder-right">
116
+				<nz-form-item class="form-title-box">
117
+					<div class="form-title">申请单类型:{{detailsData.pathologyFormType==1?'术中快速病理检查申请单' : detailsData.pathologyFormType==2 ? '病理细胞学申请单' : '病理检查申请单'}}</div>
118
+					<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
119
+				</nz-form-item>
120
+				<nz-form-item class="form-title-box">
121
+					<div class="form-title"><span class="font-weight-500">申请单号:</span>{{detailsData.applyCode}}</div>
122
+					<div class="form-title over-class"><span class="font-weight-500">申请科室:</span>{{detailsData.patientDTO.department.dept}}</div>
123
+				</nz-form-item>
124
+				<nz-form-item class="form-title-box">
125
+					<div class="form-title">手术间:{{detailsData.surgeryDeptDTO.dept}}</div>
126
+					<div class="form-title">取材医生:{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
127
+				</nz-form-item>
128
+				<nz-form-item class="form-title-box">
129
+					<div class="form-title"><span class="font-weight-500">患者信息:</span>{{detailsData.patientDTO.patientName}} ({{detailsData.patientDTO.bedNum}}床)</div>
130
+					<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}</div>
131
+					<div class="form-title"><span class="font-weight-500">性别:</span>{{detailsData.patientDTO.gender?detailsData.patientDTO.gender.name:'-'}}</div>
132
+					<div class="form-title"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
133
+				</nz-form-item>
134
+				
135
+				<div class="form-title-box">
136
+					<div class="form-title"><span class="font-weight-500">检验项目:</span>{{project||'无'}}</div>
137
+				</div>
138
+				
139
+				<div class="form-list">
140
+					<div class="form-title font-weight-500">诊断:</div>
141
+					<div class="indent">
142
+						{{detailsData.diagnose||'无'}}
143
+					</div>
144
+				</div>
145
+				
146
+				<div class="form-list">
147
+					<div class="form-title font-weight-500">病历摘要:</div>
148
+					<div class="indent">{{detailsData.medicalRecords||'无'}}</div>
149
+				</div>
150
+				<div class="form-list">
151
+					<div class="form-title font-weight-500">手术方案:</div>
152
+					<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
153
+				</div>
154
+				<div class="form-list">
155
+					<div class="form-title font-weight-500">术中所见:</div>
156
+					<div class="indent">{{detailsData.intraoperativeFindings||'无'}}</div>
157
+				</div>
158
+
159
+				<div class="form-title-box">
160
+					<div class="form-title"><span class="font-weight-500">标本类型:</span>{{detailsData.specimenType.name||'无'}}</div>
161
+					<div class="form-title"><span class="font-weight-500">标本数量:</span>{{detailsData.specimenNum||'无'}}</div>
162
+				</div>
163
+				
164
+				<div class="form-title-box">
165
+					<div class="form-title"><span class="font-weight-500">部位:</span>{{detailsData.takePart||'无'}}</div>
166
+					<!-- <div class="form-title"><span class="font-weight-500">离体时间:</span>{{detailsData.inVitroTime?(detailsData.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div> -->
167
+					<!-- <div class="form-title"><span class="font-weight-500">固定时间:</span>{{detailsData.fixationTime?(detailsData.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div> -->
168
+				</div>
169
+				
170
+				<div class="form-list">
171
+					<div class="form-title font-weight-500">标本:</div>
172
+					<div class="form-title specimen-list">
173
+						<div *ngFor="let item of specimenList" class="specimen-item-class" (click)="specimenView(item)">
174
+							<span *ngIf="item.partSource && item.partSource.value!=1">{{item.partSource?item.partSource.name:''}}</span>{{item.specimenName}}({{item.specimenCode}})
175
+						</div>
176
+					</div>
177
+				</div>
178
+
179
+			</div>
180
+			
181
+			<div class="content-item-right">
182
+				<div class="step-title">病理闭环</div>
183
+				<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
184
+					<ng-container *ngFor="let item of pathologyLogs; let index = index">
185
+							<nz-step
186
+								[nzDescription]="tpl"
187
+							>
188
+							</nz-step>
189
+							<ng-template #tpl>
190
+								<div *ngIf="index==pathologyLogs.length-1" class="step-size">
191
+									<div style="color: #49B856;" *ngIf="item.doctorDTO"> {{item.operationType?item.operationType.name:''}} {{item.doctorDTO?item.doctorDTO.name:''}} {{item.nurseDTO?item.nurseDTO.name:''}} </div>
192
+									<div style="color: #49B856;" *ngIf="!item.doctorDTO">{{item.operationType?item.operationType.name:''}}  {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
193
+									<div style="color:#333;">{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto?item.operationUserDto.name:''}}</div>
194
+								</div>
195
+								<div *ngIf="index!=pathologyLogs.length-1" class="step-size">
196
+									<div *ngIf="item.doctorDTO">{{item.operationType?item.operationType.name:''}}  {{item.doctorDTO?item.doctorDTO.name:''}} {{item.nurseDTO?item.nurseDTO.name:''}}</div>
197
+									<div *ngIf="!item.doctorDTO">{{item.operationType?item.operationType.name:''}}  {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
198
+									<div>{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto?item.operationUserDto.name:''}}</div>
199
+								</div>
200
+							</ng-template>
201
+						</ng-container>
202
+				</nz-steps>
203
+			</div>
204
+		</div>
205
+		<div class="display_flex justify-content_flex-center bottom-btn">
206
+			<button class="btn btn-right" nz-button nzType="primary" (click)="closeDetailMoadl()">知道了</button>
207
+		</div>
208
+	</div>
209
+</div>
210
+
211
+<!-- 查看标本 -->
212
+<div class="look">
213
+	<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="specimenViewDialog">
214
+		<div class="modalBody modalBody-ga">
215
+			<div class="title">查看标本<i class="icon_transport transport-guanbi" (click)="closeSpecimenModal()"></i>
216
+			</div>
217
+			<overlay-scrollbars #osComponentRef1 class="content">
218
+				<div class="list-template__bottom">
219
+					<nz-table class="list-template__nzTable" [nzData]="specimenData" nzSize="middle" [nzShowPagination]="false"
220
+						[nzLoading]="loading1">
221
+						<thead>
222
+							<tr class="thead">
223
+								<th>标本名称</th>
224
+								<th>编码</th>
225
+								<th>备注</th>
226
+								<th>离体时间</th>
227
+								<th>离体操作人</th>
228
+								<th>固定时间</th>
229
+								<th>固定操作人</th>
230
+							</tr>
231
+						</thead>
232
+						<tbody>
233
+							<tr *ngFor="let data of specimenData">
234
+								<td>{{ data.specimenName }}</td>
235
+								<td>{{ data.specimenCode }}</td>
236
+								<td>{{ data.remark ? data.remark : '无' }}</td>
237
+								<td>{{ data.inVitroTime ? (data.inVitroTime|date:'yyyy-MM-dd HH:mm:ss') : '-' }}</td>
238
+								<td>{{ data.inVitroOperator ? data.inVitroOperator.name : '-' }}</td>
239
+								<td>{{ data.fixationTime ? (data.fixationTime|date:'yyyy-MM-dd HH:mm:ss') : '-' }}</td>
240
+								<td>{{ data.fixationOperator ? data.fixationOperator.name : '-' }}</td>
241
+							</tr>
242
+						</tbody>
243
+					</nz-table>
244
+				</div>
245
+			</overlay-scrollbars>
246
+			<div class="display_flex justify-content_flex-center">
247
+				<button class="btn" nz-button nzType="primary" (click)="closeSpecimenModal()">知道了</button>
248
+			</div>
249
+		</div>
250
+	</div>
251
+</div>
252
+<!-- 操作成功/失败提示框 -->
253
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
254
+  [info]="promptInfo"></app-prompt-modal>
255
+

+ 668 - 0
src/app/views/batch-distribution/batch-distribution.component.less

@@ -0,0 +1,668 @@
1
+@import "../../../../src/theme.less";
2
+:host {
3
+  .add-button {
4
+    margin: 0 auto 16px !important;
5
+  }
6
+  .targetDept {
7
+    overflow: hidden;
8
+    // width: 90px;
9
+    text-overflow: ellipsis;
10
+    white-space: nowrap;
11
+  }
12
+  .dynamic {
13
+    margin-bottom: 16px;
14
+    display: flex;
15
+    align-items: center;
16
+    input {
17
+      width: 90%;
18
+    }
19
+    i {
20
+      margin-left: 8px;
21
+      cursor: pointer;
22
+      font-size: 18px;
23
+    }
24
+  }
25
+	
26
+	/* 修改垂直滚动条 */
27
+	::-webkit-scrollbar {
28
+		width: 4px; /* 修改宽度 */
29
+		border-radius: 2px;
30
+	}
31
+	 
32
+	/* 修改滚动条轨道背景色 */
33
+	::-webkit-scrollbar-track {
34
+		background-color: #f1f1f1;
35
+	}
36
+	 
37
+	/* 修改滚动条滑块颜色 */
38
+	::-webkit-scrollbar-thumb {
39
+		background-color: #888;
40
+	}
41
+	 
42
+	/* 修改滚动条滑块悬停时的颜色 */
43
+	::-webkit-scrollbar-thumb:hover {
44
+		background-color: #555;
45
+	}
46
+}
47
+
48
+.save {
49
+  position: fixed;
50
+  left: 0;
51
+  top: 0;
52
+  width: 100%;
53
+  height: 100%;
54
+  background: rgba(0, 0, 0, 0.4);
55
+  z-index: 99;
56
+
57
+  .modalBody {
58
+    width: 350px;
59
+    background: #fff;
60
+    border-radius: 5px;
61
+    padding: 10px 20px;
62
+    color: #333;
63
+
64
+    .title {
65
+      width: 100%;
66
+      text-align: center;
67
+      font-size: 18px;
68
+      position: relative;
69
+
70
+      i {
71
+        position: absolute;
72
+        right: 0;
73
+        top: 0;
74
+        font-size: 20px;
75
+        color: #666;
76
+        cursor: pointer;
77
+        padding: 0 5px;
78
+      }
79
+    }
80
+
81
+    .content {
82
+      width: 100%;
83
+      height: 117px;
84
+      background: #f9fafb;
85
+      border: 1px solid #e5e9ed;
86
+      border-radius: 5px;
87
+      overflow: hidden;
88
+      margin-top: 12px;
89
+
90
+      div {
91
+        text-align: center;
92
+        margin: 0;
93
+
94
+        &.icon {
95
+          margin-top: 17px;
96
+
97
+          i {
98
+            color: #34b349;
99
+            font-size: 30px !important;
100
+
101
+            &.transport-wenhao {
102
+              color: #f5a523;
103
+            }
104
+
105
+            &.transport-shibai {
106
+              color: #ff3a52;
107
+            }
108
+          }
109
+        }
110
+
111
+        &.defeat {
112
+          color: #333;
113
+          font-size: 18px;
114
+        }
115
+
116
+        &:nth-child(3) {
117
+          font-size: 14px;
118
+          color: #666;
119
+        }
120
+      }
121
+    }
122
+
123
+    button {
124
+      margin-top: 10px;
125
+
126
+      &.btn {
127
+        margin-left: 8px;
128
+      }
129
+    }
130
+  }
131
+
132
+  // 新增
133
+  &.add {
134
+    .modalBody {
135
+      width: 80%;
136
+      height: auto;
137
+
138
+      .content {
139
+        width: 100%;
140
+        height: auto;
141
+        padding: 19px 14px 0 14px;
142
+        max-height: 500px;
143
+        overflow-y: auto;
144
+				
145
+				.list-template__bottom {
146
+				  background: #f9fafb;
147
+				  border: 1px solid #e5e9ed;
148
+				  border-radius: 8px;
149
+				  padding-bottom: 56px;
150
+				  position: relative;
151
+				  .list-template__nzTable {
152
+				    padding: 16px 16px 0;
153
+				
154
+				    .thead {
155
+				      background-image: linear-gradient(to right, @bg-start, @bg-end);
156
+				
157
+				      th {
158
+				        background: transparent;
159
+				        color: #fff;
160
+				        text-align: center;
161
+				      }
162
+				    }
163
+				
164
+				    .ant-table-body {
165
+				      border-bottom: 1px solid #e5e9ed;
166
+				    }
167
+				
168
+				    .ant-table-tbody {
169
+				      tr {
170
+				        text-align: center;
171
+				        color: #333;
172
+				
173
+				        td {
174
+				          border: none;
175
+				
176
+				          &.tab_hover:hover{
177
+				            text-decoration: underline;
178
+				            cursor: pointer;
179
+				          }
180
+				
181
+				          .coop {
182
+				            button{
183
+				              color: #333;
184
+				            }
185
+				            span,button {
186
+				              display: inline-block;
187
+				              padding: 0 8px;
188
+				              cursor: pointer;
189
+				              position: relative;
190
+				
191
+				              &::after {
192
+				                content: "|";
193
+				                position: absolute;
194
+				                top: 0;
195
+				                right: 0;
196
+				              }
197
+				
198
+				              &:hover,
199
+				              &:active {
200
+				                color: @primary-color;
201
+				              }
202
+				
203
+				              &:nth-last-child(1) {
204
+				                &::after {
205
+				                  content: "";
206
+				                }
207
+				              }
208
+				            }
209
+				          }
210
+				        }
211
+				      }
212
+				    }
213
+				  }
214
+				  .list-template__pagination {
215
+				    height: 56px;
216
+				    display: flex;
217
+				    align-items: center;
218
+				    position: absolute;
219
+				    right: 8px;
220
+				  }
221
+				}
222
+				
223
+        .addForm {
224
+          .ant-form-item {
225
+            margin-bottom: 14px;
226
+
227
+            .ant-form-item-label {
228
+              line-height: 14px;
229
+              text-align: left;
230
+            }
231
+          }
232
+        }
233
+
234
+        .editForm {
235
+          .ant-form-item {
236
+            margin-bottom: 14px;
237
+
238
+            .ant-form-item-label {
239
+              line-height: 0;
240
+              text-align: left;
241
+            }
242
+          }
243
+        }
244
+      }
245
+
246
+      button {
247
+        &:nth-child(1) {
248
+          margin-right: 20px;
249
+        }
250
+      }
251
+    }
252
+  }
253
+}
254
+
255
+.pathology-box {
256
+  position: fixed;
257
+	left: 0;
258
+	top: 0;
259
+	width: 100%;
260
+	height: 100%;
261
+	background: rgba(0, 0, 0, 0.4);
262
+	z-index: 99;
263
+	.width-80{
264
+		width: 80% !important;
265
+	}
266
+	.pathology-content{
267
+		width: 80%;
268
+		background: #fff;
269
+		border-radius: 5px;
270
+		padding: 10px 20px;
271
+		color: #000;
272
+		.title {
273
+		  width: 100%;
274
+		  text-align: center;
275
+		  font-size: 18px;
276
+		  position: relative;
277
+		
278
+		  i {
279
+		    position: absolute;
280
+		    right: 0;
281
+		    top: 0;
282
+		    font-size: 20px;
283
+		    color: #666;
284
+		    cursor: pointer;
285
+		    padding: 0 5px;
286
+		  }
287
+		}
288
+		.content{
289
+			width: 100%;
290
+			background: #f9fafb;
291
+			border: 1px solid #e5e9ed;
292
+			border-radius: 5px;
293
+			margin-top: 12px;
294
+			display: flex;
295
+			// .addForm{
296
+				// display: flex;
297
+				.font-weight-500{
298
+					color: #000;
299
+					font-weight: 500;
300
+				}
301
+				.ant-select{
302
+					width: 100%;
303
+				}
304
+				.content-item{
305
+					height: auto;
306
+					max-height: 460px;
307
+					overflow-y: auto;
308
+					width: 78%;
309
+					padding: 15px;
310
+					.form-title-box{
311
+						display: flex;
312
+						margin-bottom: 10px;
313
+						.form-title{
314
+							color: #333;
315
+							margin-right: 40px;
316
+						}
317
+						.mar-ri-20{
318
+							margin-right: 20px !important;
319
+						}
320
+						.width-150{
321
+							width: 150px;
322
+						}
323
+						.width-200{
324
+							width: 200px;
325
+						}
326
+					}
327
+					.center{
328
+						text-align: center;
329
+						padding: 10px 0;
330
+					}
331
+					.disp-fl{
332
+						display: flex;
333
+						align-items: center;
334
+						.width-120{
335
+							width: 85px;
336
+						}
337
+						.ant-input{
338
+							width: 300px;
339
+						}
340
+					}
341
+					.error-fix{
342
+						margin-top: 10px;
343
+						color: red;
344
+						text-align: center;
345
+					}
346
+					.form-list{
347
+						margin-bottom: 10px;
348
+						.specimen-list{
349
+							display: flex;
350
+							flex-wrap: wrap;
351
+							.specimen-item-class{
352
+								text-decoration: underline;
353
+								cursor: pointer;
354
+								margin-right: 40px;
355
+								color:#333;
356
+							}
357
+						}
358
+						.indent{
359
+							text-indent: 2ch;
360
+							color: #333;
361
+						}
362
+					}
363
+					.ant-form-item {
364
+					  margin-bottom: 14px;
365
+						display: flex;
366
+						flex-wrap: wrap;
367
+					  .ant-form-item-label {
368
+					    text-align: left;
369
+							font-weight: 500;
370
+					  }
371
+						.ant-form-item-control-wrapper{
372
+							.ant-form-item-control{
373
+								width: 400px;
374
+							}
375
+						}
376
+					}
377
+					.add-icon-class{
378
+						border: 1px solid #e5e9ed;
379
+						border-radius: 3px;
380
+						width: 26px;
381
+						height: 26px;
382
+						line-height: 26px;
383
+						text-align: center;
384
+						position: relative;
385
+						top: 7px;
386
+						cursor: pointer;
387
+						.form-icon{
388
+							
389
+						}
390
+					}
391
+				}
392
+				.content-item-right{
393
+					width: 25%;
394
+					height: auto;
395
+					max-height: 460px;
396
+					overflow-y: auto;
397
+					padding: 10px;
398
+					.step-title{
399
+						font-size: 16px;
400
+						font-weight: 500;
401
+						margin-bottom: 10px;
402
+					}
403
+				}
404
+				.boder-right{
405
+					border-right: 1px solid #e5e9ed;
406
+				}
407
+				.specimen-item{
408
+					display: flex;
409
+					margin-bottom: 10px;
410
+					.specimen-icon{
411
+						color: #64BD7B;
412
+						cursor: pointer;
413
+						font-size: 20px;
414
+						position: relative;
415
+						top: -4px;
416
+						left: 2px;
417
+					}
418
+				}
419
+			// }
420
+		}
421
+		.bottom-btn{
422
+			margin-top: 10px;
423
+			.btn-right{
424
+				margin-right: 10px;
425
+			}
426
+		}
427
+	}
428
+	
429
+}
430
+
431
+.mask-style{
432
+	width: 100%;
433
+	height: 100%;
434
+	position: fixed;
435
+	top: 0;
436
+	left: 0;
437
+	z-index: 999;
438
+	display: flex;
439
+	background: rgba(0,0,0,0.2);
440
+	align-items: center;
441
+	justify-content: center;
442
+}
443
+.spin-style{
444
+	z-index:9999;
445
+}
446
+
447
+.look{
448
+	.save {
449
+	  position: fixed;
450
+	  left: 0;
451
+	  top: 0;
452
+	  width: 100%;
453
+	  height: 100%;
454
+	  background: rgba(0, 0, 0, 0.4);
455
+	  z-index: 999;
456
+		.modalBody-ga{
457
+			width: 80% !important;
458
+			.list-template__searchBox{
459
+				margin-top: 10px;
460
+			}
461
+			.ant-select{
462
+				width: 20%;
463
+			}
464
+		}
465
+	  .modalBody {
466
+	    width: 350px;
467
+	    background: #fff;
468
+	    border-radius: 5px;
469
+	    padding: 10px 20px;
470
+	    color: #333;
471
+	
472
+	    .title {
473
+	      width: 100%;
474
+	      text-align: center;
475
+	      font-size: 18px;
476
+	      position: relative;
477
+	
478
+	      i {
479
+	        position: absolute;
480
+	        right: 0;
481
+	        top: 0;
482
+	        font-size: 20px;
483
+	        color: #666;
484
+	        cursor: pointer;
485
+	        padding: 0 5px;
486
+	      }
487
+	    }
488
+	
489
+	    .content {
490
+	      width: 100%;
491
+	      height: 117px;
492
+	      background: #f9fafb;
493
+	      border: 1px solid #e5e9ed;
494
+	      border-radius: 5px;
495
+	      overflow: hidden;
496
+	      margin-top: 12px;
497
+	
498
+	      div {
499
+	        text-align: center;
500
+	        margin: 0;
501
+	
502
+	        &.icon {
503
+	          margin-top: 17px;
504
+	
505
+	          i {
506
+	            color: #34b349;
507
+	            font-size: 30px !important;
508
+	
509
+	            &.transport-wenhao {
510
+	              color: #f5a523;
511
+	            }
512
+	
513
+	            &.transport-shibai {
514
+	              color: #ff3a52;
515
+	            }
516
+	          }
517
+	        }
518
+	
519
+	        &.defeat {
520
+	          color: #333;
521
+	          font-size: 18px;
522
+	        }
523
+	
524
+	        &:nth-child(3) {
525
+	          font-size: 14px;
526
+	          color: #666;
527
+	        }
528
+	      }
529
+	    }
530
+	
531
+	    button {
532
+	      margin-top: 10px;
533
+	
534
+	      &.btn {
535
+	        margin-left: 8px;
536
+	      }
537
+	    }
538
+	  }
539
+	
540
+	  // 新增
541
+	  &.add {
542
+	    .modalBody {
543
+	      width: 420px;
544
+	      height: auto;
545
+	
546
+	      .content {
547
+	        width: 100%;
548
+	        height: auto;
549
+	        padding: 19px 14px 0 14px;
550
+	        max-height: 500px;
551
+	        overflow-y: auto;
552
+					
553
+					.ant-select{
554
+						width: 100%;
555
+					}
556
+					.ant-calendar-picker{
557
+						width: 100% !important;
558
+					}
559
+					.list-template__bottom {
560
+					  background: #f9fafb;
561
+					  border: 1px solid #e5e9ed;
562
+					  border-radius: 8px;
563
+					  padding-bottom: 56px;
564
+					  position: relative;
565
+					  .list-template__nzTable {
566
+					    padding: 16px 16px 0;
567
+					
568
+					    .thead {
569
+					      background-image: linear-gradient(to right, @bg-start, @bg-end);
570
+					
571
+					      th {
572
+					        background: transparent;
573
+					        color: #fff;
574
+					        text-align: center;
575
+					      }
576
+					    }
577
+					
578
+					    .ant-table-body {
579
+					      border-bottom: 1px solid #e5e9ed;
580
+					    }
581
+					
582
+					    .ant-table-tbody {
583
+					      tr {
584
+					        text-align: center;
585
+					        color: #333;
586
+					
587
+					        td {
588
+					          border: none;
589
+					
590
+					          &.tab_hover:hover{
591
+					            text-decoration: underline;
592
+					            cursor: pointer;
593
+					          }
594
+					
595
+					          .coop {
596
+					            button{
597
+					              color: #333;
598
+					            }
599
+					            span,button {
600
+					              display: inline-block;
601
+					              padding: 0 8px;
602
+					              cursor: pointer;
603
+					              position: relative;
604
+					
605
+					              &::after {
606
+					                content: "|";
607
+					                position: absolute;
608
+					                top: 0;
609
+					                right: 0;
610
+					              }
611
+					
612
+					              &:hover,
613
+					              &:active {
614
+					                color: @primary-color;
615
+					              }
616
+					
617
+					              &:nth-last-child(1) {
618
+					                &::after {
619
+					                  content: "";
620
+					                }
621
+					              }
622
+					            }
623
+					          }
624
+					        }
625
+					      }
626
+					    }
627
+					  }
628
+					  .list-template__pagination {
629
+					    height: 56px;
630
+					    display: flex;
631
+					    align-items: center;
632
+					    position: absolute;
633
+					    right: 8px;
634
+					  }
635
+					}
636
+					
637
+	        .addForm {
638
+	          .ant-form-item {
639
+	            margin-bottom: 14px;
640
+	
641
+	            .ant-form-item-label {
642
+	              line-height: 14px;
643
+	              text-align: left;
644
+	            }
645
+	          }
646
+	        }
647
+	
648
+	        .editForm {
649
+	          .ant-form-item {
650
+	            margin-bottom: 14px;
651
+	
652
+	            .ant-form-item-label {
653
+	              line-height: 0;
654
+	              text-align: left;
655
+	            }
656
+	          }
657
+	        }
658
+	      }
659
+	
660
+	      button {
661
+	        &:nth-child(1) {
662
+	          margin-right: 20px;
663
+	        }
664
+	      }
665
+	    }
666
+	  }
667
+	}
668
+}

+ 238 - 0
src/app/views/batch-distribution/batch-distribution.component.ts

@@ -0,0 +1,238 @@
1
+import { Component, OnInit, ViewChild} from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import {
4
+  FormBuilder,
5
+  Validators,
6
+  FormGroup,
7
+  FormControl,
8
+} from "@angular/forms";
9
+
10
+import { MainService } from "../../services/main.service";
11
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
12
+import { ToolService } from "../../services/tool.service";
13
+import { format, startOfDay, endOfDay } from "date-fns";
14
+import { NzMessageService } from "ng-zorro-antd";
15
+import { Subject } from "rxjs";
16
+import { debounceTime, filter } from "rxjs/operators";
17
+import host from "../../../assets/js/http";
18
+import { HttpRequest, HttpResponse, HttpClient } from '@angular/common/http';
19
+
20
+@Component({
21
+  selector: "app-batch-distribution",
22
+  templateUrl: "./batch-distribution.component.html",
23
+  styleUrls: ["./batch-distribution.component.less"],
24
+})
25
+export class BatchDistributionComponent implements OnInit{
26
+  @ViewChild("osComponentRef1", {
27
+    read: OverlayScrollbarsComponent,
28
+    static: false,
29
+  })
30
+  osComponentRef1: OverlayScrollbarsComponent;
31
+  constructor(
32
+    private message: NzMessageService,
33
+    private fb: FormBuilder,
34
+    private route: ActivatedRoute,
35
+    private router: Router,
36
+    private mainService: MainService,
37
+    private tool: ToolService,
38
+    private http: HttpClient,
39
+  ) {}
40
+
41
+  ngOnInit() {
42
+		this.hosId = this.tool.getCurrentHospital().id;
43
+    this.coopBtns = this.tool.initCoopBtns(this.route);
44
+		this.getList()
45
+  }
46
+	isSpinning:any = false;
47
+  listOfData: any[] = []; //表格数据
48
+  promptContent: string; //操作提示框提示信息
49
+  ifSuccess: boolean; //操作成功/失败
50
+  promptInfo: string; //操作结果提示信息
51
+  promptModalShow: boolean; //操作提示框是否展示
52
+  modal: boolean = false; //新增/编辑模态框
53
+  add: boolean; //true:新增;false:编辑
54
+  validateForm: FormGroup; //新增/编辑表单
55
+  coopId: number; //表格中执行操作的id
56
+  department: ""; //所属科室
57
+	hosId: number;
58
+	dateRange;//时间
59
+  batchNumber; //批次号
60
+  num; //编码
61
+  deptalias; //别名
62
+  type; //类型
63
+  deptHandoverType; //类型
64
+  pageIndex: number = 1; //页码
65
+  listLength: number = 10; //总条数
66
+  pageSize: number = 10; //每页条数
67
+  btnLoading: boolean = false; //确认按钮loading状态
68
+  printLoading: boolean = false; //批量打印按钮loading状态
69
+  deptPhones: any = []; //新添加的科室电话列表
70
+  isAddDeptsPhone = true; //添加新的科室电话是否禁用
71
+  deptsPhoneId = 1; //科室电话自增id
72
+  allParentdepart: any = []; //所有的父级科室列表
73
+  hospitals1: any = []; //科室列表(搜索)
74
+	rowData: object = {}; //打印选择列表
75
+  searchParentDeptSubject = new Subject();
76
+  // 初始化增删改按钮
77
+  coopBtns: any = {};
78
+	viewData: any = []; //科室单查看数据
79
+  // 打开父级科室下拉框baba
80
+  isLoading = false;
81
+
82
+  // 搜索
83
+  search() {
84
+    this.pageIndex = 1;
85
+    this.getList();
86
+  }
87
+  // 重置
88
+  reset() {
89
+    this.pageIndex = 1;
90
+    this.batchNumber = "";
91
+		this.dateRange = [];
92
+		this.startDate = "";
93
+		this.endDate = "";
94
+    this.getList();
95
+  }
96
+  // 表格数据
97
+  loading1 = false;
98
+  getList() {
99
+    let data = {
100
+      idx: this.pageIndex - 1,
101
+      sum: this.pageSize,
102
+      pathologyDeliveryBatch: {
103
+				batchNo:this.batchNumber,
104
+        startTime: this.startDate,
105
+				endTime: this.endDate,
106
+				hosId: this.hosId
107
+      },
108
+    };
109
+		if(this.batchNumber){
110
+			data.pathologyDeliveryBatch.batchNo = this.batchNumber
111
+		}else{
112
+			delete data.pathologyDeliveryBatch.batchNo
113
+		}
114
+    this.loading1 = true;
115
+    this.mainService
116
+      .getFetchDataList("data", "pathologyDeliveryBatch", data)
117
+      .subscribe((data) => {
118
+        this.loading1 = false;
119
+        this.listOfData = data.list;
120
+        this.listLength = data.totalNum;
121
+      });
122
+  }
123
+
124
+	// 日期选择
125
+	startDate: any = null; //发起时间开始
126
+	endDate: any = null; //发起时间结束
127
+	changeDate(result?): void {
128
+	  if (result.length==0) {
129
+	    this.startDate = this.endDate = "";
130
+	  }else{
131
+			this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
132
+			this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
133
+		}
134
+	}
135
+
136
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
137
+  showPromptModal(con, success, promptInfo?) {
138
+    this.promptModalShow = false;
139
+    this.promptContent = con;
140
+    this.ifSuccess = success;
141
+    this.promptInfo = promptInfo;
142
+    setTimeout(() => {
143
+      this.promptModalShow = true;
144
+    }, 100);
145
+    this.getList();
146
+  }
147
+
148
+  // 查看
149
+  viewSingle(item) {
150
+    let query = {
151
+    	idx: 0,
152
+    	sum: 9999,
153
+    	pathologyForm: {
154
+    		batchId: item.id,
155
+    		order:'createTime desc'
156
+    	},
157
+    };
158
+    this.loading1 = true
159
+    this.mainService
160
+    .getFetchDataList("data", "pathologyForm", query)
161
+    .subscribe((data) => {
162
+    	this.loading1 = false
163
+    	this.viewData = data.list
164
+    	for(let i of this.viewData){
165
+    		if(i.pathologyInspectDTOS){
166
+    			i.arr = []
167
+    			for(let x of i.pathologyInspectDTOS){
168
+    				i.arr.push(x.inspectProject.name)
169
+    			}
170
+    		}
171
+    	}
172
+    	this.modal = true
173
+    });
174
+  }
175
+	
176
+	detailMoadl:boolean = false;
177
+	pathologyLogs:any=[];
178
+	specimenList:any=[]
179
+	stepLength:any = 0;
180
+	closeDetailMoadl(){
181
+		this.detailMoadl = false
182
+	}
183
+	
184
+	// 申请单号点击
185
+	detailItem:any = null;
186
+	pathologyDetailModal:any = false;
187
+	grossLoading:any = false;
188
+	itemClick(item){
189
+		this.detailItem = item
190
+		this.grossLoading = true
191
+		this.getSampleData(item)
192
+	}
193
+	
194
+	// 获取标本详情
195
+	project:any = [];
196
+	detailsData:any = null;
197
+	getSampleData(item){
198
+		this.mainService.getFetchData("data", "pathologyForm", item.id)
199
+		.subscribe((data) => {
200
+			this.grossLoading = false
201
+			this.detailsData = data.data
202
+		  this.specimenList = data.data.pathologySpecimenDTOList||[]
203
+			this.pathologyLogs = data.data.formLogDTOS
204
+			this.stepLength = this.pathologyLogs.length
205
+			if(this.detailsData.pathologyInspectDTOS){
206
+				this.project = this.detailsData.pathologyInspectDTOS.map(i=>{
207
+					return i.inspectProject.name
208
+				})
209
+				this.project = this.project.join('、')
210
+			}
211
+		  this.detailMoadl = true
212
+		});
213
+	}
214
+	
215
+	// 关闭查看标本
216
+	closeSpecimenModal(){
217
+		this.specimenViewDialog = false
218
+	}
219
+	
220
+	// 查看标本
221
+	specimenViewDialog:any = false;
222
+	specimenData:any = [];
223
+	specimenItem:any;
224
+	specimenView(item){
225
+		this.specimenData = []
226
+		this.specimenViewDialog = true
227
+		this.specimenItem = item;
228
+		this.specimenData.push(item)
229
+	}
230
+	
231
+	hideModal(){
232
+		this.modal = false
233
+	}
234
+	
235
+	pathologyDetailCancel(){
236
+		this.pathologyDetailModal = false
237
+	}
238
+}

+ 19 - 0
src/app/views/batch-distribution/batch-distribution.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { BatchDistributionRoutingModule } from './batch-distribution-routing.module';
5
+import { BatchDistributionComponent } from './batch-distribution.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    BatchDistributionComponent,
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    BatchDistributionRoutingModule,
16
+    ShareModule
17
+  ]
18
+})
19
+export class BatchDistributionModule { }

+ 10 - 13
src/app/views/hushijiandan/hushijiandan.component.html

@@ -2585,12 +2585,9 @@
2585 2585
 <!-- 多个申请单 -->
2586 2586
 <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="multiDialog">
2587 2587
 	<div class="modalBody modalBody-ga">
2588
-		<div class="title">多条申请单提示<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
2588
+		<div class="new-title"><span class="title-weight">{{viewData[0].patientDTO.patientName}}({{viewData[0].patientDTO.patientCode}})</span>患者申请单列表<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
2589 2589
 		</div>
2590 2590
 		<div class="content">
2591
-			<div class="weight" *ngIf="viewData.length>0">
2592
-				提示:查询到{{viewData[0].patientDTO.patientName}}({{viewData[0].patientDTO.patientCode}})患者有多条申请单,请选择对应申请单
2593
-			</div>
2594 2591
 			<div class="list-template__bottom">
2595 2592
 				<nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
2596 2593
 					[nzLoading]="grossLoading">
@@ -2598,19 +2595,19 @@
2598 2595
 						<tr class="thead">
2599 2596
 							<th>申请单类型</th>
2600 2597
 							<th>申请单号</th>
2601
-							<th nzWidth="15%">检验项目</th>
2598
+							<th nzWidth="20%">检验项目</th>
2602 2599
 							<th>标本类型</th>
2603 2600
 							<th>申请时间</th>
2604 2601
 							<th>申请科室</th>
2605 2602
 							<th>状态</th>
2606
-							<th>作</th>
2603
+							<th>作</th>
2607 2604
 						</tr>
2608 2605
 					</thead>
2609 2606
 					<tbody>
2610 2607
 						<tr *ngFor="let data of viewData">
2611
-							<td *ngIf="data.pathologyFormType==1">术中快速病理检查申请单</td>
2612
-							<td *ngIf="data.pathologyFormType==0">病理检查申请单</td>
2613
-							<td *ngIf="data.pathologyFormType==null">无</td>
2608
+							<td *ngIf="data.pathologyFormType==1" class="red">术中快速</td>
2609
+							<td *ngIf="data.pathologyFormType==0">普通病理</td>
2610
+							<td *ngIf="data.pathologyFormType==2">病理细胞学</td>
2614 2611
 							<td style="text-decoration: underline;cursor: pointer;" (click)="itemClick(data)">{{ data.applyCode}}</td>
2615 2612
 							<td>{{ data.arr ? data.arr.join('、') : '无' }}</td>
2616 2613
 							<td>{{ data.specimenType?data.specimenType.name:'无'}}</td>
@@ -2618,10 +2615,10 @@
2618 2615
 							<td>{{ data.patientDTO.department? data.patientDTO.department.dept:'-'}}</td>
2619 2616
 							<td>{{ data.status?data.status.name:'-'}}</td>
2620 2617
 							<td>
2621
-							  <div class="coop">
2622
-							    <span *ngIf="data.status.value==1 || data.status.value==2
2618
+							  <div class="coop-btn">
2619
+									<button class="btn" *ngIf="data.status.value==1 || data.status.value==2
2623 2620
 									|| data.status.value==3 || data.status.value==4 ||
2624
-									data.status.value==5" (click)="cancellation(data)">作废</span>
2621
+									data.status.value==5" (click)="cancellation(data)" nz-button nzType="primary">作废</button>
2625 2622
 							  </div>
2626 2623
 							</td>
2627 2624
 						</tr>
@@ -2631,7 +2628,7 @@
2631 2628
 		</div>
2632 2629
 		<div class="display_flex justify-content_flex-center mar-20 btns">
2633 2630
 			<button class="btn" style="margin-right: 0;" *ngIf="autoCreate==1" nz-button nzType="primary" (click)="addPathologyType(0)">新增普通病理</button>
2634
-			<button class="btn" *ngIf="autoCreate==1" nz-button nzType="primary" (click)="addPathologyType(1)">新增术中快速病理</button>
2631
+			<button class="btn" *ngIf="autoCreate==1" nz-button nzType="primary" (click)="addPathologyType(1)">新增术中快速</button>
2635 2632
 			<button class="btn cancel" nz-button nzType="default" (click)="hideModal()">知道了</button>
2636 2633
 		</div>
2637 2634
 	</div>

+ 61 - 5
src/app/views/hushijiandan/hushijiandan.component.less

@@ -230,6 +230,15 @@
230 230
 		.list-template__searchBox{
231 231
 			margin-top: 10px;
232 232
 		}
233
+		.list-template__bottom{
234
+			padding-bottom:20px !important;
235
+		}
236
+		.list-template__bottom{
237
+			.list-template__nzTable{
238
+				height: 510px !important;
239
+				overflow-y: auto !important;
240
+			}
241
+		}
233 242
 		.ant-select{
234 243
 			width: 20%;
235 244
 		}
@@ -244,7 +253,6 @@
244 253
     .title {
245 254
       width: 100%;
246 255
       text-align: center;
247
-      font-size: 18px;
248 256
       position: relative;
249 257
 
250 258
       i {
@@ -257,7 +265,27 @@
257 265
         padding: 0 5px;
258 266
       }
259 267
     }
260
-
268
+		
269
+		.new-title {
270
+		  width: 100%;
271
+		  text-align: center;
272
+		  position: relative;
273
+			font-size: 14px;
274
+		  i {
275
+		    position: absolute;
276
+		    right: 0;
277
+		    top: 0;
278
+		    font-size: 20px;
279
+		    color: #666;
280
+		    cursor: pointer;
281
+		    padding: 0 5px;
282
+		  }
283
+		}
284
+		
285
+		.title-weight{
286
+			font-weight: bold;
287
+			font-size: 15px;
288
+		}
261 289
     .content {
262 290
       width: 100%;
263 291
       // height: 117px;
@@ -325,8 +353,8 @@
325 353
         width: 100%;
326 354
         height: auto;
327 355
         padding: 19px 14px 0 14px;
328
-        max-height: 500px;
329
-        overflow-y: auto;
356
+        // max-height: 500px;
357
+        // overflow-y: auto;
330 358
 
331 359
 				.ant-select{
332 360
 					width: 100%;
@@ -369,7 +397,35 @@
369 397
 				            text-decoration: underline;
370 398
 				            cursor: pointer;
371 399
 				          }
372
-
400
+									
401
+									.coop-btn{
402
+										button{
403
+											margin-top: 0 !important;
404
+										  color: #fff;
405
+											&:nth-child(1) {
406
+											  margin-right: 0 !important;
407
+											}
408
+										}
409
+										span,button {
410
+										  display: inline-block;
411
+										  cursor: pointer;
412
+										  position: relative;
413
+										
414
+										  &::after {
415
+										    content: "|";
416
+										    position: absolute;
417
+										    top: 0;
418
+										    right: 0;
419
+										  }
420
+										
421
+										  &:nth-last-child(1) {
422
+										    &::after {
423
+										      content: "";
424
+										    }
425
+										  }
426
+										}
427
+									}
428
+									
373 429
 				          .coop {
374 430
 				            button{
375 431
 				              color: #333;

+ 13 - 61
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -400,9 +400,10 @@ export class HushijiandanComponent implements OnInit {
400 400
 			idx: 0,
401 401
 			sum: 9999,
402 402
 			pathologyForm: {
403
-				// surgeryId: item.id || "",
403
+				surgeryId: item.id || "",
404 404
 				patientId: item.patientDTO.id || "",
405
-				hosId: this.currentHospital.id || "" ,
405
+				surgeryDeptId:this.loginUser.dept.id,
406
+				// hosId: this.currentHospital.id || "" ,
406 407
 				operationType: 'pathologyForm',
407 408
 				order:'createTime desc',
408 409
 			},
@@ -413,39 +414,15 @@ export class HushijiandanComponent implements OnInit {
413 414
 			.subscribe((data) => {
414 415
 				this.isSpinning = false
415 416
 				this.viewData = data.list
416
-				if(this.viewData.pathologyInspectDTOS){
417
-					for(let i of this.viewData.pathologyInspectDTOS){
417
+				for(let i of this.viewData){
418
+					if(i.pathologyInspectDTOS){
418 419
 						i.arr = []
419
-						i.arr.push(i.inspectProject.name)
420
-					}
421
-				}
422
-				this.multiDialog = true
423
-				return
424
-				if(data.list.length==1){
425
-					this.detailId = data.list[0].id
426
-					if(!data.list[0].status){
427
-						this.pathologyModal = true
428
-						return
429
-					}
430
-					if(data.list[0].status &&
431
-					(data.list[0].status.value==1 || data.list[0].status.value==2 ||
432
-					data.list[0].status.value==3 || data.list[0].status.value==4)){
433
-						this.pathologyModal = true
434
-					}else{
435
-						this.pathologyDetailModal = true
436
-					}
437
-				}else if(data.list.length>1){
438
-					this.viewData = data.list
439
-					if(this.viewData.pathologyInspectDTOS){
440
-						for(let i of this.viewData.pathologyInspectDTOS){
441
-							i.arr = []
442
-							i.arr.push(i.inspectProject.name)
420
+						for(let x of i.pathologyInspectDTOS){
421
+							i.arr.push(x.inspectProject.name)
443 422
 						}
444 423
 					}
445
-					this.multiDialog = true
446
-				}else if(data.list.length==0){
447
-					this.message.error('无申请单')
448 424
 				}
425
+				this.multiDialog = true
449 426
 			});
450 427
 	}
451 428
 
@@ -461,9 +438,10 @@ export class HushijiandanComponent implements OnInit {
461 438
 			idx: 0,
462 439
 			sum: 9999,
463 440
 			pathologyForm: {
464
-				// surgeryId: this.surgeryWKOMsg.id || "",
441
+				surgeryId: this.surgeryWKOMsg.id || "",
465 442
 				patientId: this.surgeryWKOMsg.patientDTO.id || "",
466
-				hosId: this.currentHospital.id || "" ,
443
+				surgeryDeptId:this.loginUser.dept.id,
444
+				// hosId: this.currentHospital.id || "" ,
467 445
 				operationType: 'pathologyForm',
468 446
 				order:'createTime desc'
469 447
 			},
@@ -483,34 +461,6 @@ export class HushijiandanComponent implements OnInit {
483 461
 				}
484 462
 			}
485 463
 			this.multiDialog = true
486
-			return
487
-			if(data.list.length==1){
488
-				this.detailId = data.list[0].id
489
-				if(!data.list[0].status){
490
-					this.pathologyModal = true
491
-					return
492
-				}
493
-				if(data.list[0].status &&
494
-				(data.list[0].status.value==1 || data.list[0].status.value==2 ||
495
-					data.list[0].status.value==3 || data.list[0].status.value==4)){
496
-					this.pathologyModal = true
497
-				}else{
498
-					this.pathologyDetailModal = true
499
-				}
500
-			}else if(data.list.length>1){
501
-				this.viewData = data.list
502
-				for(let i of this.viewData){
503
-					if(i.pathologyInspectDTOS){
504
-						i.arr = []
505
-						for(let x of i.pathologyInspectDTOS){
506
-							i.arr.push(x.inspectProject.name)
507
-						}
508
-					}
509
-				}
510
-				this.multiDialog = true
511
-			}else if(data.list.length==0){
512
-				this.message.error('无申请单')
513
-			}
514 464
 		});
515 465
 	}
516 466
 	
@@ -527,8 +477,10 @@ export class HushijiandanComponent implements OnInit {
527 477
 			idx: 0,
528 478
 			sum: 9999,
529 479
 			pathologyForm: {
480
+				surgeryId: this.surgeryDataId || "",
530 481
 				patientId: this.patientDataId || "",
531 482
 				hosId: this.currentHospital.id || "" ,
483
+				surgeryDeptId:this.loginUser.dept.id,
532 484
 				operationType: 'pathologyForm',
533 485
 				order:'createTime desc'
534 486
 			},

+ 5 - 0
src/app/views/main/main-routing.module.ts

@@ -613,6 +613,11 @@ const routes: Routes = [
613 613
 			  path: "deptAllStatistics",
614 614
 			  loadChildren: () => import("../dept-all-statistics/dept-all-statistics.module").then((m) => m.DeptAllStatisticsModule),
615 615
 			},
616
+			// 病理管理-批次配送
617
+			{
618
+			  path: "batchDistribution",
619
+			  loadChildren: () => import("../batch-distribution/batch-distribution.module").then((m) => m.BatchDistributionModule),
620
+			}
616 621
     ],
617 622
   },
618 623
 ];

+ 137 - 106
src/app/views/pathology-communication-book/pathology-communication-book.component.html

@@ -50,6 +50,7 @@
50 50
 	<div class="tabs">
51 51
 		<div class="tabs-item">
52 52
 			<div class="tabs-item-item" [ngClass]="{'activeClass': activeIndex == 0}" (click)="tabClick(0)">交接本</div>
53
+			<div class="tabs-item-item"  *ngIf="coopBtns.print" [ngClass]="{'activeClass': activeIndex == 1}" (click)="tabClick(1)">未打印</div>
53 54
 		</div>
54 55
 		<div class="tabs-btn">
55 56
 			<button class="btn default" nz-button nzType="primary" nzSize="small" (click)='distributionTab()'>配送清点</button>
@@ -57,7 +58,7 @@
57 58
 	</div>
58 59
   <!-- 头部 end -->
59 60
   <div class="pharmacy-main">
60
-    <div *ngIf="activeIndex==0" class="list-template pharmacy-main__list pharmacy-main__print">
61
+    <div class="list-template pharmacy-main__list pharmacy-main__print">
61 62
 			<div class="list-template__content">
62 63
 			  <div class="list-template__top" nz-row>
63 64
 			    <div nz-col nzLg='18' class="list-template__searchBox">
@@ -100,9 +101,10 @@
100 101
 			    <div nz-col nzLg="6" class="list-template__btns">
101 102
 			      <button class="btn default" (click)='search()'>搜索</button>
102 103
 			      <button class="btn default ml8" (click)='reset()'>重置</button>
104
+						<button class="btn default ml8" nz-button *ngIf="coopBtns.batchPrint && activeIndex==1" (click)="print('batchPrint')" [nzLoading]="btnLoading">批量打印</button>
103 105
 			    </div>
104 106
 			  </div>
105
-			  <div class="list-template__bottom">
107
+			  <div class="list-template__bottom" *ngIf="activeIndex==0">
106 108
 			    <nz-table class="list-template__nzTable" [nzData]="listOneData" nzSize="middle" [nzShowPagination]="false"
107 109
 			      [nzLoading]="loading1">
108 110
 			      <thead>
@@ -118,7 +120,7 @@
118 120
 								<th>固定时间</th>
119 121
 			          <th>配送人</th>
120 122
 								<th>配送时间</th>
121
-			          <th nzWidth="80px">操作</th>
123
+			          <th nzWidth="120px">操作</th>
122 124
 			        </tr>
123 125
 			      </thead>
124 126
 			      <tbody>
@@ -137,6 +139,7 @@
137 139
 			          <td>
138 140
 			            <div class="coop">
139 141
 										<span (click)="oneLook($event,data)">查看</span>
142
+										<span *ngIf="coopBtns.print && data.printFlag==1" (click)="print('print',data)">补打</span>
140 143
 			            </div>
141 144
 			          </td>
142 145
 			        </tr>
@@ -148,114 +151,69 @@
148 151
 			      </nz-pagination>
149 152
 			    </div>
150 153
 			  </div>
151
-			</div>
152
-    </div>
153
-
154
-    <div class="pharmacy-main__list pharmacy-main__waitDelivery">
155
-      <div *ngIf="activeIndex==1" class="list-template pharmacy-main__list pharmacy-main__print">
156
-      	<div class="list-template__content">
157
-      	  <div class="list-template__bottom">
158
-      	    <nz-table class="list-template__nzTable" [nzData]="listTwoData" nzSize="middle" [nzShowPagination]="false"
159
-      	      [nzLoading]="loading2">
160
-      	      <thead>
161
-      	        <tr class="thead">
162
-      	          <th>申请单号</th>
163
-      	          <th>患者姓名</th>
164
-      	          <th>住院号</th>
165
-      	          <th>部位</th>
166
-      	          <th>标本数</th>
167
-      	          <th>申请科室</th>
168
-      	          <th>配送人</th>
169
-      	          <th>状态</th>
170
-      	          <th>操作</th>
171
-      	        </tr>
172
-      	      </thead>
173
-      	      <tbody>
174
-      	        <tr *ngFor="let data of listTwoData">
175
-      	         <td><span *ngIf="data.pathologyFormType==1" style="color: red;">速</span>{{ data.applyCode || '-' }}</td>
176
-      	         <td>{{ data.patientDTO?data.patientDTO.patientName : '-' }}</td>
177
-      	         <td>{{ data.patientDTO.patientCode}}</td>
178
-      	         <td>{{ data.takePart}}</td>
179
-      	         <td>{{ data.specimenNum}}</td>
180
-      	         <td>{{ data.patientDTO?data.patientDTO.department.dept : '-'}}</td>
181
-      	         <td>{{ data.deliveryUserDTO?data.deliveryUserDTO.name : '-' }}</td>
182
-      	         <td>{{ data.status?data.status.name:'-' }}</td>
183
-      	         <td>
184
-      	           <div class="coop">
185
-      	         		<span (click)="oneLook($event,data)">查看</span>
186
-      	           </div>
187
-      	         </td>
188
-      	        </tr>
189
-      	      </tbody>
190
-      	    </nz-table>
191
-      	    <div class="list-template__pagination">
192
-      	      <nz-pagination [(nzPageIndex)]="pageTwoIndex" [(nzTotal)]="listTwoLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
193
-      	        (nzPageIndexChange)="getSpeedinessList()" (nzPageSizeChange)="getSpeedinessList()">
194
-      	      </nz-pagination>
195
-      	    </div>
196
-      	  </div>
197
-      	</div>
198
-      </div>
199
-    </div>
200
-
201
-    <div class="pharmacy-main__list pharmacy-main__delivery">
202
-			<div *ngIf="activeIndex==2" class="list-template pharmacy-main__list pharmacy-main__print">
203
-				<div class="list-template__content">
204
-				  <div class="list-template__bottom">
205
-				    <nz-table class="list-template__nzTable" [nzData]="listThreeData" nzSize="middle" [nzShowPagination]="false"
206
-				      [nzLoading]="loading3">
207
-				      <thead>
208
-				        <tr class="thead">
209
-				          <th>包号</th>
210
-				          <th>打包人 | 打包时间</th>
211
-				          <th>申请单数</th>
212
-				          <th>标本数</th>
213
-									<th>配送人 | 配送时间</th>
214
-									<th>接收人 | 接收时间</th>
215
-				          <th>状态</th>
216
-				          <th>操作</th>
217
-				        </tr>
218
-				      </thead>
219
-				      <tbody>
220
-				        <tr *ngFor="let data of listThreeData">
221
-				          <td>{{ data.packCode || '-' }}</td>
222
-									<td>
223
-										<div>{{data.packUserDTO.name }}</div>
224
-										<div>{{data.packTime|date:'yyyy-MM-dd HH:mm' }}</div>
225
-									</td>
226
-				          <td>{{ data.pathologyFormNum }}</td>
227
-				          <td>{{ data.specimenNum }}</td>
228
-				          <td>
229
-				          	<div>{{data.deliveryUserDTO?data.deliveryUserDTO.name:'-' }}</div>
230
-				          	<div>{{data.deliveryTime|date:'yyyy-MM-dd HH:mm' || '-' }}</div>
231
-				          </td>
232
-				          <td>
233
-				          	<div>{{data.receiveUserDTO?data.receiveUserDTO.name:'-' }}</div>
234
-				          	<div>{{data.receiveTime|date:'yyyy-MM-dd HH:mm' || '-' }}</div>
235
-				          </td>
236
-									<td>{{ data.status.name }}</td>
237
-				          <td>
238
-				            <div class="coop">
239
-											<span (click)="threeLook($event,data)">查看标本</span>
240
-											<span (click)="reprint($event,data)">补打</span>
241
-											<span *ngIf="data.status.value==1" (click)="distribution($event,data)">配送</span>
242
-				            </div>
243
-				          </td>
244
-				        </tr>
245
-				      </tbody>
246
-				    </nz-table>
247
-				    <div class="list-template__pagination">
248
-				      <nz-pagination [(nzPageIndex)]="pageThreeIndex" [(nzTotal)]="listThreeLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
249
-				        (nzPageIndexChange)="getPackList()" (nzPageSizeChange)="getPackList()">
250
-				      </nz-pagination>
251
-				    </div>
154
+				
155
+				<div class="list-template__bottom" *ngIf="activeIndex==1">
156
+				  <nz-table class="list-template__nzTable" [nzData]="listOneData" nzSize="middle" [nzShowPagination]="false"
157
+				    [nzLoading]="loading1">
158
+				    <thead>
159
+				      <tr class="thead">
160
+								<th 
161
+								*ngIf="coopBtns.batchPrint"
162
+								nzShowCheckbox
163
+								[(nzChecked)]="isAllDisplayDataChecked"
164
+								[nzIndeterminate]="isIndeterminate"
165
+								(nzCheckedChange)="checkAll($event)"></th>
166
+				        <th>申请单号</th>
167
+								<th>状态</th>
168
+				        <th>患者姓名</th>
169
+				        <th>住院号</th>
170
+				        <th nzWidth="100px">部位</th>
171
+				        <th>标本数</th>
172
+				        <th>申请科室</th>
173
+								<th>离体时间</th>
174
+								<th>固定时间</th>
175
+				        <th>配送人</th>
176
+								<th>配送时间</th>
177
+				        <th nzWidth="120px">操作</th>
178
+				      </tr>
179
+				    </thead>
180
+				    <tbody>
181
+				      <tr *ngFor="let data of listOneData">
182
+								<td
183
+								  *ngIf="coopBtns.batchPrint"
184
+									nzShowCheckbox
185
+									[(nzChecked)]="mapOfCheckedId[data.id]"
186
+									(nzCheckedChange)="refreshStatus()"
187
+								></td>
188
+				        <td><span *ngIf="data.pathologyFormType==1" style="color: red;">速</span>{{ data.applyCode || '-' }}</td>
189
+								<td>{{ data.status?data.status.name : '-' }}</td>
190
+								<td>{{ data.patientDTO.patientName}}</td>
191
+				        <td>{{ data.patientDTO.residenceNo}}</td>
192
+				        <td>{{ data.takePart}}</td>
193
+				        <td>{{ data.specimenNum}}</td>
194
+				        <td>{{ data.patientDTO?data.patientDTO.department.dept : '-'}}</td>
195
+								<td>{{ data.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'  }}</td>
196
+								<td>{{ data.fixationTime|date:'yyyy-MM-dd HH:mm:ss'  }}</td>
197
+								<td>{{ data.deliveryUserDTO?data.deliveryUserDTO.name : '-' }}</td>
198
+								<td>{{ data.leaveDeptTime|date:'yyyy-MM-dd HH:mm:ss'  }}</td>
199
+				        <td>
200
+				          <div class="coop">
201
+										<span (click)="oneLook($event,data)">查看</span>
202
+										<span *ngIf="coopBtns.print" (click)="print('print',data)">打印</span>
203
+				          </div>
204
+				        </td>
205
+				      </tr>
206
+				    </tbody>
207
+				  </nz-table>
208
+				  <div class="list-template__pagination">
209
+				    <nz-pagination [(nzPageIndex)]="pageOneIndex" [(nzTotal)]="listOneLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
210
+				      (nzPageIndexChange)="getConnectList()" (nzPageSizeChange)="getConnectList()">
211
+				    </nz-pagination>
252 212
 				  </div>
253 213
 				</div>
254 214
 			</div>
255 215
     </div>
256 216
   </div>
257
-  <!-- 主体部分 end -->
258
-  <!-- <router-outlet></router-outlet> -->
259 217
 </div>
260 218
 
261 219
 <!-- 科室切换提示框 -->
@@ -453,4 +411,77 @@
453 411
 			</div>
454 412
 		</div>
455 413
 	</div>
414
+</div>
415
+
416
+<!-- 打印 -->
417
+<div id="report" style="display: none;">
418
+	<div class="monad">
419
+		<div style="font-size: 12px;">
420
+			<div style="position: relative;height: 100%;" *ngFor="let data of printData; let index=index;">
421
+				<div style="position: relative;width:96%;margin-left: 2%;padding-bottom: 12px;">
422
+					<div style="height: 80px;line-height: 80px;text-align: center;font-size: 30px;">病理申请单</div>
423
+					<div *ngIf="pathologyBarCode==1" style="position: absolute;right: 0;height: 95%;top: 10px;text-align: right;">
424
+					 <img style="max-width: 75%;height: 50%;" [src]="data.barCode" alt="">
425
+					 <div>申请单号:{{data.applyCode}}</div>
426
+					</div>
427
+					<div *ngIf="pathologyBarCode==2" style="position: absolute;right: 10px;height: 95%;top: 0px;text-align: center;">
428
+					 <img style="max-width: 100%;height: 80%;" [src]="data.barCode" alt="">
429
+					 <div>申请单号:{{data.applyCode}}</div>
430
+					</div>
431
+				</div>
432
+				<div style="border-top: 1px solid #333; width:96%;margin-left: 2%;padding-bottom: 12px;">
433
+					<div style="display: flex; justify-content: space-between; margin-top:12px;">
434
+						<div>姓名: {{data.patientDTO ? data.patientDTO.patientName : ''}}</div>
435
+						<div>性别: {{data.patientDTO && data.patientDTO.gender ? data.patientDTO.gender.name:''}}</div>
436
+						<div>年龄: {{data.patientDTO ? data.patientDTO.age : ''}}</div>
437
+						<div>电话: {{data.patientDTO?data.patientDTO.patientPhone:''}}</div>
438
+					</div>
439
+					<div style="display: flex; justify-content: space-between; margin-top:12px;">
440
+						<div>门诊号: {{data.patientDTO.patientCode}}</div>
441
+						<div>住院号: {{data.patientDTO.residenceNo}}</div>
442
+						<div>床号: {{data.patientDTO.bedNum}}</div>
443
+						<div>科室: {{deptName}}</div>
444
+					</div>
445
+					<div style="display: flex; justify-content: space-between; margin-top:12px;">
446
+						<div style="width: 100%;overflow: hidden;">活检部位: {{data.takePart}}</div>
447
+					</div>
448
+					<div style="display: flex; justify-content: space-between; margin-top:12px;">
449
+						<div>检查时间: {{data.createTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
450
+						<div>离体时间: {{data.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
451
+						<div>固定时间: {{data.fixationTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
452
+					</div>
453
+				</div>
454
+				<div style="border-top: 1px solid #333; width:96%;margin-left: 2%;padding-bottom: 12px;">
455
+					<div style="margin-top:12px;">临床诊断:</div>
456
+					<div style="margin-top:12px;">{{data.diagnose}}</div>
457
+					<div style="margin-top:12px;">检查所见:</div>
458
+					<div style="margin-top:12px;">
459
+						{{data.intraoperativeFindings}}
460
+					</div>
461
+					<div style="margin-top:12px;">手术诊断:</div>
462
+					<div style="margin-top:12px;">{{data.surgicalPlan}}</div>
463
+					<div style="margin-top:12px;">备注:</div>
464
+				</div>
465
+				<div style="width:96%;margin-left: 2%;padding-bottom: 12px; border-top: 1px solid #333;position: absolute;bottom: 0;">
466
+					<div style="display: flex; margin-top:12px;">
467
+						<div style="flex: 1;">取材医生: {{data.surgeryDoctorDTO?data.surgeryDoctorDTO.name:''}}</div>
468
+						<div style="flex: 1;">取材护士: {{data.nurseDTO?data.nurseDTO.name:''}}</div>
469
+					</div>
470
+					<div style="margin-top:12px;">注意事项:</div>
471
+					<div style="margin-top:12px;">
472
+						1、患者姓名、住院号必须在标本瓶上著名。
473
+					</div>
474
+					<div style="margin-top:12px;">
475
+						2、标本必须立即固定10 %福尔马林液体内,瓶口宜大以便取出。
476
+					</div>
477
+					<div style="margin-top:12px;">
478
+						3、手术取下之标本,务请全部送检,如贵科科研需要,请注明,我科检查后商议处理。
479
+					</div>
480
+					<div style="margin-top:12px;">
481
+						4、如发现检查与临床有意见不符之处,请与我科联系
482
+					</div>
483
+				</div>
484
+			 <div style="height: 26px;" *ngIf="printData && printData.length>1 && index+1 < printData.length"></div>
485
+			</div>
486
+		</div>
456 487
 </div>

+ 124 - 1
src/app/views/pathology-communication-book/pathology-communication-book.component.ts

@@ -169,6 +169,8 @@ export class PathologyCommunicationBookComponent implements OnInit, OnDestroy {
169 169
 	toDayTime:any = null;
170 170
 	backType:any = 'list';
171 171
 	mainRole:any = false;
172
+	coopBtns:any = {};
173
+	deptName:any = null;
172 174
 	loginUserDeptId: number = JSON.parse(localStorage.getItem("user")).user.dept
173 175
 	  .id; //登录人所属科室
174 176
   ngOnDestroy() {
@@ -189,9 +191,12 @@ export class PathologyCommunicationBookComponent implements OnInit, OnDestroy {
189 191
 		// 	this.isLoading = true
190 192
 		//   this.getUserData(v[0])
191 193
 		// });
194
+		this.coopBtns = this.tool.initCoopBtns(this.route);
192 195
 		this.hosId = this.tool.getCurrentHospital().id;
193 196
 		this.userId = this.tool.getCurrentUserId()
194 197
 		this.deptId = this.tool.getCurrentUserDept().id
198
+		this.deptName = this.tool.getCurrentUserDept().dept
199
+		this.getTaskTypesId()
195 200
 		this.getConnectList()
196 201
 		if(this.route.snapshot.queryParams && this.route.snapshot.queryParams.type){
197 202
 			this.backType = this.route.snapshot.queryParams.type
@@ -207,13 +212,122 @@ export class PathologyCommunicationBookComponent implements OnInit, OnDestroy {
207 212
 			this.getToday()
208 213
 		},60000)
209 214
   }
215
+	
216
+	isAllDisplayDataChecked:any = false;
217
+	isOperating:any  = false;
218
+	isIndeterminate:any = false;
219
+	listOfAllData: any = [];
220
+	mapOfCheckedId: { [key: string]: boolean } = {};
221
+	numberOfChecked = 0;
222
+	selectedData:any = null;
223
+	
224
+	refreshStatus(): void {
225
+		let arr = [];
226
+		if (this.listOneData.length) {
227
+		  this.isAllDisplayDataChecked = this.listOneData.every(
228
+		    (item) => this.mapOfCheckedId[item.id]
229
+		  );
230
+		} else {
231
+		  this.isAllDisplayDataChecked = false;
232
+		}
233
+		
234
+		for (var m in this.mapOfCheckedId) {
235
+		  if (this.mapOfCheckedId[m]) {
236
+		    arr.push(m);
237
+		  }
238
+		}
239
+		this.selectedData = arr;
240
+	}
210 241
 
242
+	checkAll(value: boolean): void {
243
+		this.listOneData.forEach(item => (this.mapOfCheckedId[item.id] = value));
244
+		this.refreshStatus();
245
+	}
246
+	
247
+	taskTypeData:any;
248
+	getTaskTypesId() {
249
+		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
250
+			this.taskTypeData = data.find(i=>i.value=='pathology')
251
+			this.getConfig();
252
+		});
253
+	}
254
+	
255
+	// 获取配置
256
+	pathologyBarCode:any = 1;
257
+	getConfig() {
258
+		let postData = {
259
+			idx: 0,
260
+			sum: 10,
261
+			taskTypeConfig: {
262
+				hosId:this.hosId,
263
+				taskType:this.taskTypeData.id
264
+			}
265
+		}
266
+	  this.mainService
267
+	    .getFetchDataList("simple/data", "taskTypeConfig", postData)
268
+	    .subscribe((result) => {
269
+	      if (result.status == 200) {
270
+					this.pathologyBarCode = result.list[0].pathologyBarCode?result.list[0].pathologyBarCode:1;
271
+	      }
272
+	    });
273
+	}
274
+	
275
+	// 打印
276
+	btnLoading:any = false;
277
+	printData:any = [];
278
+	print(type, data){
279
+		let ids = null
280
+		if(type=='batchPrint'){
281
+			if(!this.selectedData || this.selectedData.length==0){
282
+				this.message.error('请先选择申请单')
283
+				return
284
+			}
285
+			ids = this.selectedData.join(',')
286
+		}
287
+		this.isSpinning = true
288
+		let query = {
289
+			operation: 'pathologyHandoverBook',
290
+			pathologyFormIds: type=='batchPrint' ? ids : data.id
291
+		}
292
+		this.mainService
293
+			.pathologyPrint(query)
294
+			.subscribe((res:any) => {
295
+				if(res.status==200){
296
+					let arr = res.data;
297
+					for(let i of arr){
298
+						if(i.barCode){
299
+							i.barCode = this.sanitizer.bypassSecurityTrustResourceUrl(i.barCode)
300
+						}
301
+					}
302
+					this.isSpinning = false;
303
+					this.printData = arr;
304
+					this.getConnectList();
305
+					setTimeout(() => {
306
+						const printContent = document.getElementById("report");
307
+						const WindowPrt = window.open("", "", "width=100,height=1000");
308
+						WindowPrt.document.body.innerHTML = printContent.innerHTML;
309
+						setTimeout(_=>{
310
+							WindowPrt.document.close();
311
+							WindowPrt.focus();
312
+							WindowPrt.print();
313
+							WindowPrt.close();
314
+						},500)
315
+					}, 500);
316
+				}else{
317
+					this.message.error(res.msg)
318
+				}
319
+			});
320
+	}
321
+	
211 322
 	//tab切换
212 323
 	tabClick(type){
213 324
 		this.activeIndex = type
214 325
 		localStorage.setItem("pathologyActiveIndex",type)
326
+		this.pageOneIndex = 1;
215 327
 		if(type==0){
216 328
 			this.getConnectList()
329
+		}else{
330
+			this.getConnectList()
217 331
 		}
218 332
 	}
219 333
 	
@@ -286,9 +400,18 @@ export class PathologyCommunicationBookComponent implements OnInit, OnDestroy {
286 400
 				status:{
287 401
 					id:this.status
288 402
 				},
289
-				pathologyFormType:this.pathologyFormType
403
+				pathologyFormType:this.pathologyFormType,
404
+				printFlag:null
290 405
 	    },
291 406
 	  };
407
+		if(this.activeIndex==1){
408
+			data.pathologyForm.printFlag = 0
409
+			this.isAllDisplayDataChecked = false;
410
+			this.mapOfCheckedId = {};
411
+			this.selectedData = null;
412
+		}else{
413
+			delete data.pathologyForm.printFlag
414
+		}
292 415
 	  this.loading1 = true;
293 416
 	  that.mainService
294 417
 	    .getFetchDataList("data", "pathologyForm", data)

+ 57 - 53
src/app/views/pathology-sample/pathology-sample.component.html

@@ -8,7 +8,7 @@
8 8
 			<div class="pharmacy-title">门诊病理采样端</div>
9 9
       <div class="pharmacy-name__total">
10 10
 				<nz-input-group nzSize="large">
11
-					<input type="text" id="Binput" (ngModelChange)="specimenCodeChange($event)" [(ngModel)]="barCode" nz-input placeholder="请输入患者信息" />
11
+					<input type="text" id="Binput" (keydown.enter)="onEnterPress()" (ngModelChange)="specimenCodeChange($event)" [(ngModel)]="barCode" nz-input placeholder="请输入患者信息" />
12 12
 				</nz-input-group>
13 13
 				<!-- <ng-template #suffixButton>
14 14
 					<button nz-button nzType="primary" nzSize="large" nzSearch (click)="searchSpecimen()">搜索</button>
@@ -35,31 +35,30 @@
35 35
   </div>
36 36
   <div class="pharmacy-main">
37 37
 		<div class="left" *ngIf="adviceList">
38
-			<div class="top" *ngIf="adviceList.patientNo">
39
-				<div>{{adviceList.patientName}} {{adviceList.patientGender?adviceList.patientGender.name:'-'}} ({{adviceList.patientAge||'-'}}岁)</div>
40
-				<div class="border">{{adviceList.patientNo}}</div>
38
+			<div class="top" *ngIf="adviceList.patientDTO">
39
+				<div>{{adviceList.patientDTO.patientName}} {{adviceList.patientDTO.gender?adviceList.patientDTO.gender.name:'-'}} ({{adviceList.patientDTO.age||'-'}}岁)</div>
40
+				<div class="border">{{adviceList.patientDTO.residenceNo?adviceList.patientDTO.residenceNo:adviceList.patientDTO.patientCode}}</div>
41 41
 			</div>
42 42
 			<div class="left-content" [ngClass]="{'noAddAppClass': !ifAddapplication, 'beAddAppClass': ifAddapplication}">
43
-				<div class="content" *ngFor="let item of adviceList.pathologyAdviceDTOS;let index=index;" (click)="listClick(item,index)" [ngClass]="{'activeLeftClass': index == leftIndex}">
43
+				<div class="content" *ngFor="let item of adviceList.pathologyFormDTOS;let index=index;" (click)="listClick(item,index)" [ngClass]="{'activeLeftClass': index == leftIndex}">
44 44
 					<div class="list list-df">
45
-						<div class="code">{{item.adviceId ? item.adviceId : '无'}}</div>
46
-						<div class="form-title">{{item.adviceType ? item.adviceType.name : ''}}</div>
45
+						<div class="code">{{item.applyCode ? item.applyCode : '无'}}</div>
46
+						<div class="form-title">{{item.status?item.status.name:'无'}}</div>
47 47
 						<div class="del-class">
48 48
 							<i (click)="delItem($event,item)" class="icon_transport transport-lajitong specimen-icon"></i>
49 49
 						</div>
50 50
 					</div>
51
-					<div class="list">项目:{{item.inspectType?item.inspectType.name:'无'}}</div>
52
-					<div class="list">部位:{{item.inspectPart ? item.inspectPart : '无'}}</div>
53
-					<div class="list">诊断:{{item.diagnosis ? item.diagnosis : '无'}}</div>
54
-					<div class="list">开单时间:{{item.orderTime | date:'yyyy-MM-dd HH:mm:ss'}}</div>
55
-					<!-- <div class="list">状态:{{item.orderStatusName}}</div> -->
51
+					<div class="list">项目:{{item.project.length>0 ? item.project.join('、') :'无'}}</div>
52
+					<div class="list">部位:{{item.takePart ? item.takePart : '无'}}</div>
53
+					<div class="list">诊断:{{item.diagnose ? item.diagnose : '无'}}</div>
54
+					<div class="list">开单时间:{{item.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</div>
56 55
 				</div>
57 56
 			</div>
58 57
 			<div *ngIf="ifAddapplication && adviceList" class="center-box">
59
-				<button nz-button nzType="primary" class="btn txtC mr8" (click)="addPathology(0)">新增病理申请单</button>
58
+				<button nz-button nzType="primary" class="btn txtC mr8" (click)="addPathology(0)" [nzLoading]="addLoading">新增病理申请单</button>
60 59
 			</div>
61 60
 		</div>
62
-		<div class="center" *ngIf="adviceList && adviceList.pathologyAdviceDTOS.length>0 && detailsData && viewType!='add'">
61
+		<div class="center" *ngIf="adviceList && adviceList.pathologyFormDTOS.length>0 && detailsData && viewType!='add'">
63 62
 			<div class="pathology-content" *ngIf="viewType=='edit'">
64 63
 				<div class="title">病理检查申请单</div>
65 64
 				<div class="content">
@@ -70,17 +69,11 @@
70 69
 								<div class="form-title" *ngIf="detailsData.pathologyFormType==null">申请单类型:无</div>
71 70
 								<div class="form-title" *ngIf="detailsData.pathologyFormType==1">申请单类型:术中快速病理检查申请单</div>
72 71
 								<div class="form-title" *ngIf="detailsData.pathologyFormType==0">申请单类型:病理检查申请单</div>
72
+								<div class="form-title" *ngIf="detailsData.pathologyFormType==2">申请单类型:病理细胞学申请单</div>
73 73
 								<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
74 74
 							</nz-form-item>
75 75
 							
76 76
 							<nz-form-item>
77
-								<div class="form-title width-100 font-weight-500">诊断:</div>
78
-								<div>
79
-									{{detailsData.diagnose||'无'}}
80
-								</div>
81
-							</nz-form-item>
82
-							
83
-							<nz-form-item>
84 77
 								<div class="form-title width-100 font-weight-500">病历摘要:</div>
85 78
 								<div class="indent" [ngClass]="{'height-200': isShowMove, 'height-100': !isShowMove && detailsData.medicalRecords}">{{detailsData.medicalRecords||'无'}}</div>
86 79
 								<div (click)="showLook()" class="cursor" *ngIf="medicalRecordsLength>10">
@@ -89,10 +82,17 @@
89 82
 								</div>
90 83
 							</nz-form-item>
91 84
 							
85
+							<nz-form-item>
86
+								<div class="form-title width-100 font-weight-500">临床诊断:</div>
87
+								<div>
88
+									{{detailsData.diagnose||'无'}}
89
+								</div>
90
+							</nz-form-item>
91
+							
92 92
 							<nz-form-item class="form-item">
93
-								<nz-form-label nzFor="surgicalPlan" [nzSm]="24" [nzXs]="24">手术方案</nz-form-label>
94
-								<nz-form-control nzErrorTip="请输入手术方案" [nzSm]="24" [nzXs]="24">
95
-									<input nz-input formControlName="surgicalPlan" placeholder="请输入手术方案"/>
93
+								<nz-form-label nzFor="surgicalPlan" [nzSm]="24" [nzXs]="24">手术诊断</nz-form-label>
94
+								<nz-form-control nzErrorTip="请输入手术诊断" [nzSm]="24" [nzXs]="24">
95
+									<input nz-input formControlName="surgicalPlan" placeholder="请输入手术诊断"/>
96 96
 								</nz-form-control>
97 97
 							</nz-form-item>
98 98
 							
@@ -188,16 +188,10 @@
188 188
 								<div class="form-title" *ngIf="detailsData.pathologyFormType==null">申请单类型:无</div>
189 189
 								<div class="form-title" *ngIf="detailsData.pathologyFormType==1">申请单类型:术中快速病理检查申请单</div>
190 190
 								<div class="form-title" *ngIf="detailsData.pathologyFormType==0">申请单类型:病理检查申请单</div>
191
+								<div class="form-title" *ngIf="detailsData.pathologyFormType==2">申请单类型:病理细胞学申请单</div>
191 192
 								<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
192 193
 							</div>
193
-							
194
-							<div class="form-list">
195
-								<div class="form-title font-weight-500">诊断:</div>
196
-								<div class="indent">
197
-									{{detailsData.diagnose||'无'}}
198
-								</div>
199
-							</div>
200
-							
194
+					
201 195
 							<div class="form-list">
202 196
 								<div class="form-title width-100 font-weight-500">病历摘要:</div>
203 197
 								<div class="indent" [ngClass]="{'height-200': isShowMove, 'height-100': !isShowMove && detailsData.medicalRecords}">{{detailsData.medicalRecords||'无'}}</div>
@@ -207,8 +201,15 @@
207 201
 								</div>
208 202
 							</div>
209 203
 							
204
+							<div class="form-list">
205
+								<div class="form-title font-weight-500">临床诊断:</div>
206
+								<div class="indent">
207
+									{{detailsData.diagnose||'无'}}
208
+								</div>
209
+							</div>
210
+							
210 211
 								<div class="form-list">
211
-									<div class="form-title font-weight-500">手术方案:</div>
212
+									<div class="form-title font-weight-500">手术诊断:</div>
212 213
 									<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
213 214
 								</div>
214 215
 								<div class="form-list">
@@ -243,7 +244,7 @@
243 244
 				</div>
244 245
 			</div>
245 246
 		
246
-		<div class="content-item-right" *ngIf="adviceList && adviceList.pathologyAdviceDTOS.length>0 && pathologyLogs.length && (viewType=='view' || viewType=='edit')">
247
+		<div class="content-item-right" *ngIf="adviceList && adviceList.pathologyFormDTOS.length>0 && pathologyLogs.length && (viewType=='view' || viewType=='edit')">
247 248
 			<div class="step-title">病理闭环</div>
248 249
 			<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
249 250
 				<ng-container *ngFor="let item of pathologyLogs; let index = index">
@@ -380,7 +381,7 @@
380 381
 					</div>
381 382
 				</nz-form-item>
382 383
 				
383
-				<nz-form-item class="form-item">
384
+<!-- 				<nz-form-item class="form-item">
384 385
 					<nz-form-label [nzSm]="4" [nzXs]="24">快捷键入</nz-form-label>
385 386
 					<div class="specimen-list">
386 387
 						<div *ngFor="let item of fastList;let index=index;" class="select-item"
@@ -388,16 +389,16 @@
388 389
 							{{item.name}}
389 390
 						</div>
390 391
 					</div>
391
-				</nz-form-item>
392
+				</nz-form-item> -->
392 393
 				
393 394
 				<nz-form-item class="form-item">
394 395
 					<nz-form-label nzRequired nzFor="specimenName" [nzSm]="3" [nzXs]="24">标本名称</nz-form-label>
395 396
 					<div class="specimen-tip" [ngClass]="{'isSpecumen':placeName}">{{placeName?placeName:''}}</div>
396 397
 					<nz-form-control nzErrorTip="请输入标本名称" [(nzSm)]="nzSmNum" [nzXs]="24">
397
-						<input nz-input maxlength="15" (ngModelChange)="specimenInput($event)" formControlName="specimenName" placeholder="请输入标本名称"/>
398
+						<input nz-input maxlength="20" (ngModelChange)="specimenInput($event)" formControlName="specimenName" placeholder="请输入标本名称"/>
398 399
 					</nz-form-control>
399
-					<div class="empty-box" [ngClass]="{'beSpecumenEmpty':placeName, 'noSpecumenEmpty':placeName==''}">
400
-						<span class="name">{{specimenNameLength}}/15</span>
400
+					<div class="empty-box" [ngClass]="{'beSpecumenEmpty':placeName, 'noSpecumenEmpty':!placeName}">
401
+						<span class="name">{{specimenNameLength}}/20</span>
401 402
 						<span class="empty" (click)="emptData($event)">清空</span>
402 403
 					</div>
403 404
 				</nz-form-item>
@@ -429,9 +430,9 @@
429 430
 <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
430 431
 	(confirmDelEvent)="confirmDel()" content="您确认要删除标本吗?"></app-dialog-delete>
431 432
 
432
-<!-- 删除医嘱 -->
433
-<app-dialog-delete [delModal]="delAdviceModal" (hideDelModalEvent)="hideAdviceModal()" [btnLoading]="btnLoading"
434
-	(confirmDelEvent)="confirmAdvice()" content="您确认要删除医嘱吗?"></app-dialog-delete>
433
+<!-- 删除申请单 -->
434
+<app-dialog-delete [delModal]="delAdviceModal" (hideDelModalEvent)="hideAdviceModal()" [btnLoading]="btnDelLoading"
435
+	(confirmDelEvent)="confirmAdvice()" content="您确认要删除申请单吗?"></app-dialog-delete>
435 436
 		
436 437
 <!-- 查看标本 -->
437 438
 <div class="look">
@@ -575,7 +576,7 @@
575 576
 							<div>日期: {{data.inVitroTime|date:'yyyy-MM-dd'}}</div>
576 577
 						</div>
577 578
 						<div style="margin-top:10px;">
578
-							<div style="width: 100%;height: 32px;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
579
+							<div style="width: 98%;height: 32px;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
579 580
 						</div>
580 581
 					 </div>
581 582
 					 <div style="width: 30%;">
@@ -601,26 +602,29 @@
601 602
 		<div style="font-size: 12px;" *ngIf="outpatientPathologyLabelSizeType==2 && printData && printData.specimenList && printData.specimenList.length>0">
602 603
 			<div *ngFor="let data of printData.specimenList; let index=index;">
603 604
 				<div style="width: 100%;display: flex;margin-top: 5px;padding: 0 7px;">
604
-				 <div style="width: 46%;">
605
-					 <div style="display: flex;justify-content: center;">
605
+				 <div style="width: 35%;">
606
+					 <div style="display: flex;">
606 607
 						 <div style="width: 50px;height: 50px;">
607 608
 						 		<img style="max-width: 100%;max-height: 100%;position: relative;left: -2px;" [src]="data.barCode" alt="">
608 609
 						 </div>
609
-						 <div style="width: 12px;">申请单</div>
610
+						 <!-- <div style="width: 12px;">申请单</div> -->
610 611
 					 </div>
611 612
 					 <div>{{printData.applyCode}}</div>
612 613
 				 </div>
613
-				 <div style="width: 4%;"></div>
614
-				 <div style="width: 49%;">
615
-					<div style="display: flex;flex-wrap: nowrap;">门诊号: {{data.patientNo}}</div>
614
+				 <div style="width: 5%;"></div>
615
+				 <div style="width: 60%;position: relative;left: -5px;">
616
+					<div style="display: flex;flex-wrap: nowrap;">住院号: {{data.residenceNo}}</div>
616 617
 					<div style="margin-top:9px;">患者: {{data.patientName}}</div>
617
-					<div style="margin-top:9px;margin-left: 25px;">性别: {{data.patientGender}}</div>
618
+					<div style="margin-top:9px;margin-left: 30px;">性别: {{data.patientGender}}</div>
618 619
 				 </div>
619 620
 				</div>
620
-				<div style="margin-top:10px;padding-left: 7px;">
621
-					<div style="width: 100%;height: 32px;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
621
+				<div style="margin-top:3px;padding-left: 7px;">
622
+					<div style="width: 98%;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
623
+				</div>
624
+				<div style="margin-top:3px;padding-left: 7px;">
625
+					<div style="width: 98%;">日期: {{data.inVitroTime|date:'yyyy-MM-dd'}}</div>
622 626
 				</div>
623
-			 <div style="height: 11px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1 && index+1 < printData.specimenList.length"></div>
627
+			 <div style="height: 18px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1 && index+1 < printData.specimenList.length"></div>
624 628
 			</div>
625 629
 		</div>
626 630
 	</div>

+ 7 - 2
src/app/views/pathology-sample/pathology-sample.component.less

@@ -915,11 +915,11 @@
915 915
 						}
916 916
 					}
917 917
 					.beSpecumenEmpty{
918
-						right: 6px;
918
+						right: 10px;
919 919
 						top: 8px;
920 920
 					}
921 921
 					.noSpecumenEmpty{
922
-						right: 6px;
922
+						right: 10px;
923 923
 						top: 8px;
924 924
 					}
925 925
 				}
@@ -953,6 +953,11 @@
953 953
 	  }
954 954
 		.no-width{
955 955
 			width: 33% !important;
956
+			.ant-input-disabled{
957
+				color: rgba(0, 0, 0, 0.65) !important;
958
+				background: #fff !important;
959
+				border: none !important;
960
+			}
956 961
 		}
957 962
 	}
958 963
 

+ 74 - 34
src/app/views/pathology-sample/pathology-sample.component.ts

@@ -83,15 +83,19 @@ export class PathologySampleComponent implements OnInit {
83 83
 	project:any;
84 84
 	viewType:any = 'no';
85 85
 	mainRole:any;
86
+	deptId:any = null;
87
+	btnDelLoading:any = false;
86 88
   ngOnInit() {
87 89
 		this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
88 90
 		  this.searchSpecimenData(v[0])
89 91
 		});
90 92
 		this.changeInpSubjectSpecimen.pipe(debounceTime(500)).subscribe((v) => {
91
-		  this.searchSpecimen(v[0],'search')
93
+			this.pressType = false
94
+		  this.searchSpecimen(v[0],'search','new')
92 95
 		});
93 96
 		this.hosId = this.tool.getCurrentHospital().id;
94
-		this.userId = this.tool.getCurrentUserId()
97
+		this.userId = this.tool.getCurrentUserId();
98
+		this.deptId = this.tool.getCurrentUserDept().id;
95 99
 		this.getProDicData()
96 100
 		this.getDicData()
97 101
 		this.getSourceData()
@@ -108,7 +112,7 @@ export class PathologySampleComponent implements OnInit {
108 112
 		});
109 113
 		if(this.route.snapshot.params && this.route.snapshot.params.param){
110 114
 			this.barCode = this.route.snapshot.params.param
111
-			this.searchSpecimen(this.barCode,'search')
115
+			this.searchSpecimen(this.barCode,'search','new')
112 116
 		}
113 117
 		setTimeout(_=>{
114 118
 			document.getElementById('Binput').focus();
@@ -228,8 +232,7 @@ export class PathologySampleComponent implements OnInit {
228 232
 			if(this.leftIndex == null){
229 233
 				this.leftIndex = 0
230 234
 			}
231
-			this.fetchDataList(data.data.id);
232
-			this.searchSpecimen(this.adviceList.patientNo,'add');
235
+			this.searchSpecimen(this.residenceNo,'add','bottom');
233 236
 		});
234 237
 	}
235 238
 	
@@ -278,7 +281,7 @@ export class PathologySampleComponent implements OnInit {
278 281
 	    });
279 282
 	}
280 283
 	
281
-	// 病理医嘱删除
284
+	// 病理申请单删除
282 285
 	itemData:any;
283 286
 	delAdviceModal:any = false;
284 287
 	itemDataType:any = 2;
@@ -291,18 +294,17 @@ export class PathologySampleComponent implements OnInit {
291 294
 	
292 295
 	// 确定删除
293 296
 	confirmAdvice(){
294
-		this.btnLoading = true;
297
+		this.btnDelLoading = true;
295 298
 		this.mainService
296 299
 		  .coopTypeConfig(
297 300
 		    "rmvData",
298
-		    "pathologyAdvice",
301
+		    "pathologyForm",
299 302
 		     [this.itemData.id]
300 303
 		  )
301 304
 		  .subscribe((data) => {
302
-		    this.btnLoading = false;
305
+		    this.btnDelLoading = false;
303 306
 		    this.delAdviceModal = false;
304
-				this.searchSpecimen(this.adviceList.patientNo,'load');
305
-				// this.fetchDataList(this.itemData.pathologyFormId);
307
+				this.searchSpecimen(this.residenceNo,'load', 'new');
306 308
 		    if (data.status==200) {
307 309
 		      this.showSpecimenModal("删除", true, "");
308 310
 		    } else {
@@ -321,8 +323,8 @@ export class PathologySampleComponent implements OnInit {
321 323
 	listClick(item,index){
322 324
 		this.leftIndex = index
323 325
 		this.adviceItem = item
324
-		if(item.pathologyFormId){
325
-			this.fetchDataList(item.pathologyFormId);
326
+		if(item.id){
327
+			this.fetchDataList(item.id);
326 328
 		}else{
327 329
 			this.viewType = 'add'
328 330
 		}
@@ -335,24 +337,28 @@ export class PathologySampleComponent implements OnInit {
335 337
 	
336 338
 	// 标本条码搜索
337 339
 	adviceList:any = null;
338
-	searchSpecimen(e,type){
340
+	residenceNo:any = null;
341
+	searchSpecimen(e,type,optType){
339 342
 		if(type!='add' && type!='load'){
340 343
 			if(!this.barCode){
341 344
 				return
342 345
 			}
343
-			if(this.barCode.length < 10) {
346
+			if(this.barCode.length < 10 && !this.pressType) {
344 347
 				return
345 348
 			}
346 349
 		}
347 350
 		let data:any = {
348 351
 			idx: 0,
349
-			sum: 9999,
350
-			pathologyAdvice:{
351
-				patientNo:this.barCode?this.barCode:e
352
+			sum: 10,
353
+			pathologyForm:{
354
+				order: "createTime desc",
355
+				patientNo:this.barCode?this.barCode:e,
356
+				surgeryDeptId:this.deptId,
357
+				operationType:'outpatientPathologyForm'
352 358
 			}
353 359
 		}
354 360
 		this.isSpinning = true
355
-		this.mainService.getFetchDataList("data", "pathologyAdvice", data)
361
+		this.mainService.getFetchDataList("data", "pathologyForm", data)
356 362
 		.subscribe((res:any) => {
357 363
 			this.isSpinning = false
358 364
 			if(res.status==200){
@@ -369,8 +375,22 @@ export class PathologySampleComponent implements OnInit {
369 375
 					this.viewType = 'no';
370 376
 				}
371 377
 				if(res.list.length>0){
378
+					for(let i of res.list[0].pathologyFormDTOS){
379
+						i.project = []
380
+						if(i.pathologyInspectDTOS){
381
+							for(let x of i.pathologyInspectDTOS){
382
+								i.project.push(x.inspectProject.name)
383
+							}
384
+						}
385
+					}
372 386
 					this.adviceList = res.list[0]
373
-					this.patientId = this.adviceList.patientId
387
+					this.residenceNo = this.adviceList.patientDTO.residenceNo?this.adviceList.patientDTO.residenceNo:this.adviceList.patientDTO.patientCode
388
+					this.patientId = this.adviceList.patientDTO.id
389
+					if(optType=='bottom'){
390
+						this.leftIndex = 0;
391
+						this.adviceItem = this.adviceList.pathologyFormDTOS[0];
392
+						this.fetchDataList(this.adviceList.pathologyFormDTOS[0].id);
393
+					}
374 394
 				}else{
375 395
 					this.adviceList = null
376 396
 					this.viewType = 'no';
@@ -431,22 +451,29 @@ export class PathologySampleComponent implements OnInit {
431 451
 		this.inVitroData = format(result, 'yyyy-MM-dd');
432 452
 		console.log(this.inVitroData)
433 453
 	}
434
-	inVitroTimeSelect:any;
454
+	inVitroTimeSelect:any = null;
435 455
 	inVitroTimeChange(result){
436
-		this.inVitroTimeSelect = format(result, 'HH:mm');
456
+		if(result){
457
+			this.inVitroTimeSelect = format(result, 'HH:mm');
458
+		}else{
459
+			this.inVitroTimeSelect = null;
460
+		}
437 461
 		console.log(this.inVitroData + ' ' + this.inVitroTimeSelect)
438 462
 	}
439
-
440 463
 	
441 464
 	// 提交固定标本接收
442 465
 	startDate:any;
443 466
 	printLoading:any = false;
444 467
 	submitVerificationForm(){
445 468
 		let that = this
446
-		if(!this.fixationTimeSelect && this.fixationTimeSelect == null){
469
+		if(!this.fixationTimeSelect || this.fixationTimeSelect == null){
447 470
 			this.message.error('请选择固定时间')
448 471
 			return
449 472
 		}
473
+		if(!this.inVitroTimeSelect || this.inVitroTimeSelect == null){
474
+			this.message.error('请选择离体时间')
475
+			return
476
+		}
450 477
 		for (const i in this.validatePrintForm.controls) {
451 478
 		  this.validatePrintForm.controls[i].markAsDirty();
452 479
 		  this.validatePrintForm.controls[i].updateValueAndValidity();
@@ -508,7 +535,7 @@ export class PathologySampleComponent implements OnInit {
508 535
 					}
509 536
 					that.printLoading = false;
510 537
 					that.printData = arr;
511
-					this.searchSpecimen(this.adviceList.patientNo,'load');
538
+					this.searchSpecimen(this.residenceNo,'load', 'new');
512 539
 					setTimeout(() => {
513 540
 					  const printContent = document.getElementById("report");
514 541
 					  const WindowPrt = window.open("", "", "width=100,height=1000");
@@ -850,8 +877,8 @@ export class PathologySampleComponent implements OnInit {
850 877
 			this.specimenNameId = item.id
851 878
 			this.specimenNameName = item.name
852 879
 			if(this.validateSpecimenForm.value.specimenName && this.validateSpecimenForm.value.specimenName.length){
853
-				if(item.name.length+this.validateSpecimenForm.value.specimenName.length>14){
854
-					this.message.error('字符长度不能超过15个')
880
+				if(item.name.length+this.validateSpecimenForm.value.specimenName.length>19){
881
+					this.message.error('字符长度不能超过20个')
855 882
 					return
856 883
 				}
857 884
 			}
@@ -875,8 +902,8 @@ export class PathologySampleComponent implements OnInit {
875 902
 	fastClick(e,item,index){
876 903
 		this.fastIndex = index
877 904
 			if(this.validateSpecimenForm.value.specimenName && this.validateSpecimenForm.value.specimenName.length){
878
-				if(item.name.length+this.validateSpecimenForm.value.specimenName.length>14){
879
-					this.message.error('字符长度不能超过15个')
905
+				if(item.name.length+this.validateSpecimenForm.value.specimenName.length>19){
906
+					this.message.error('字符长度不能超过20个')
880 907
 					return
881 908
 				}
882 909
 			}
@@ -919,8 +946,8 @@ export class PathologySampleComponent implements OnInit {
919 946
 		  this.validateSpecimenForm.controls[i].updateValueAndValidity();
920 947
 		}
921 948
 		if (this.validateSpecimenForm.invalid) return;
922
-		if(this.validateSpecimenForm.value.specimenName.length>15){
923
-			this.message.error('字符长度不能超过15个')
949
+		if(this.validateSpecimenForm.value.specimenName.length>19){
950
+			this.message.error('字符长度不能超过20个')
924 951
 			return
925 952
 		}
926 953
 		if(type==2){
@@ -1038,7 +1065,7 @@ export class PathologySampleComponent implements OnInit {
1038 1065
 	// 监听输入字数
1039 1066
 	specimenNameLength:any=0;
1040 1067
 	specimenInput(e){
1041
-		if(e.length>15){
1068
+		if(e.length>20){
1042 1069
 			return
1043 1070
 		}
1044 1071
 		this.specimenNameLength = e.length
@@ -1078,6 +1105,7 @@ export class PathologySampleComponent implements OnInit {
1078 1105
 	
1079 1106
 	// 关闭标本
1080 1107
 	closeSpecimenModel(){
1108
+		this.itemDataType = 2
1081 1109
 		this.hideSpecimenModal()
1082 1110
 	}
1083 1111
 	
@@ -1342,7 +1370,7 @@ export class PathologySampleComponent implements OnInit {
1342 1370
 					}
1343 1371
 					this.btnLoading = false;
1344 1372
 					this.printData = arr;
1345
-					this.searchSpecimen(this.adviceList.patientNo,'load');
1373
+					this.searchSpecimen(this.residenceNo,'load', 'new');
1346 1374
 					setTimeout(() => {
1347 1375
 						const printContent = document.getElementById("report");
1348 1376
 						const WindowPrt = window.open("", "", "width=100,height=1000");
@@ -1465,7 +1493,19 @@ export class PathologySampleComponent implements OnInit {
1465 1493
 		},200)
1466 1494
 	}
1467 1495
 
1468
-
1496
+	// 按了回车键
1497
+	pressType:any = false;
1498
+	onEnterPress(){
1499
+		if(this.barCode.length < 10) {
1500
+			this.pressType = true
1501
+			console.log(1,this.barCode)
1502
+			this.searchSpecimen(this.barCode,'search','new')
1503
+		}else{
1504
+			this.pressType = false
1505
+			console.log(2,this.barCode)
1506
+		}
1507
+	}
1508
+	
1469 1509
 	// 监听标本条码
1470 1510
 	specimenCodeChange(e){
1471 1511
 		this.changeInpSubjectSpecimen.next([e]);

+ 31 - 10
src/app/views/specimen-room-view/specimen-room-view.component.html

@@ -28,7 +28,22 @@
28 28
 			</div>
29 29
 			<button class="right-btn" nz-button nzType="primary" (click)="specimenCheck()">标本核对</button>
30 30
     </div>
31
-    <div class="userInfo">
31
+		<div class="right">
32
+		  <div class="userInfo dropdown">
33
+		    <div class="user" (mouseenter)="showDropdown = true" (mouseleave)="showDropdown = false">
34
+		      <img src="../../assets/images/icon_keshi.png" alt="">
35
+		      <span><ng-container *ngIf="loginUser.dept">{{deptDisplay == 2 ? loginUser.dept.deptalias : loginUser.dept.dept}}-</ng-container>{{loginUser.name}}</span>
36
+		      <i class="icon_transport transport-xiala1 ml8"></i>
37
+		    </div>
38
+		    <div class="dropdown-content r8" [hidden]="!showDropdown" (mouseenter)="showDropdown = true" (mouseleave)="showDropdown = false">
39
+		      <div class="dropdownItem" (click)="setSpecimen()">切换科室</div>
40
+					<div class="dropdownItem" (click)="distributionRecord()">配送记录</div>
41
+					<div class="dropdownItem" (click)="toMain()">回到系统管理</div>
42
+		      <div class="dropdownItem" (click)="logOut()">退出</div>
43
+		    </div>
44
+		  </div>
45
+		</div>
46
+<!--    <div class="userInfo">
32 47
       <div class="wel">欢迎您:</div>
33 48
       <div class="user">
34 49
         <img src="../../assets/images/icon_keshi.png" alt="" />
@@ -40,7 +55,7 @@
40 55
         <div class="logOut" (click)="setSpecimen()">切换科室</div>
41 56
         <div class="logOut" (click)="logOut()">退出</div>
42 57
       </div>
43
-    </div>
58
+    </div> -->
44 59
   </div>
45 60
   <!-- 头部 end -->
46 61
   <!-- 主体部分 start -->
@@ -50,7 +65,7 @@
50 65
       <!-- 标题 start -->
51 66
       <div class="pharmacy-main__title">
52 67
         <strong>手术间标本</strong>
53
-				<span *ngIf="printPharmacyList.length>0">共 {{printPharmacyList.length}} 条</span>
68
+				<span *ngIf="otherData1">{{otherData1.pathologyFormNum}}申请单 {{otherData1.specimenNum}}标本</span>
54 69
         <span class="autoUpdate">{{ logTime }}秒</span>
55 70
       </div>
56 71
       <!-- 标题 end -->
@@ -82,6 +97,7 @@
82 97
                 <span title="住院号" class="weight">
83 98
 									<span class="sign-red" *ngIf="item.pathologyFormType==1">速</span>
84 99
 									<span *ngIf="item.pathologyFormType==0">普</span>
100
+									<span *ngIf="item.pathologyFormType==2">细</span>
85 101
 									{{item.applyCode || '无'}}
86 102
 								</span>
87 103
                 <span title="姓名" class="weight text-right">{{item.patientDTO.patientName || '无'}}</span>
@@ -141,7 +157,7 @@
141 157
       <!-- 标题 start -->
142 158
       <div class="pharmacy-main__title">
143 159
         <strong>标本间标本</strong>
144
-				<span *ngIf="waitPharmacyList.length>0">共 {{waitPharmacyList.length}} 条</span>
160
+				<span *ngIf="otherData2">{{otherData2.pathologyFormNum}}申请单 {{otherData2.specimenNum}}标本</span>
145 161
         <span class="autoUpdate">{{ logTime }}秒</span>
146 162
       </div>
147 163
       <!-- 标题 end -->
@@ -173,6 +189,7 @@
173 189
                 <span title="住院号" class="weight">
174 190
 									<span class="sign-red" *ngIf="item.pathologyFormType==1">速</span>
175 191
 									<span *ngIf="item.pathologyFormType==0">普</span>
192
+									<span *ngIf="item.pathologyFormType==2">细</span>
176 193
 									{{item.applyCode || '无'}}
177 194
             		</span>
178 195
                 <span title="姓名" class="weight text-right">{{item.patientDTO.patientName || '无'}}</span>
@@ -232,7 +249,7 @@
232 249
       <!-- 标题 start -->
233 250
       <div class="pharmacy-main__title">
234 251
         <strong>今日离科标本</strong>
235
-				<span *ngIf="pharmacyList.length>0">共 {{pharmacyList.length}} 条</span>
252
+				<span *ngIf="otherData3">{{otherData3.pathologyFormNum}}申请单 {{otherData3.specimenNum}}标本</span>
236 253
         <span class="autoUpdate">{{ logTime }}秒</span>
237 254
       </div>
238 255
       <!-- 标题 end -->
@@ -264,6 +281,7 @@
264 281
                 <span title="住院号" class="weight">
265 282
             			<span class="sign-red" *ngIf="item.pathologyFormType==1">速</span>
266 283
             			<span *ngIf="item.pathologyFormType==0">普</span>
284
+									<span *ngIf="item.pathologyFormType==2">细</span>
267 285
 									{{item.applyCode || '无'}}
268 286
             		</span>
269 287
                 <span title="姓名" class="weight text-right">{{item.patientDTO.patientName || '无'}}</span>
@@ -463,6 +481,9 @@
463 481
 		</overlay-scrollbars>
464 482
 		<div class="display_flex justify-content_flex-center">
465 483
 			<button class="btn" nz-button nzType="primary" (click)="submitForm()" [nzLoading]="btnLoading">确定</button>
484
+			<button class="btn mar-left" nz-button nzType="primary" nzGhost (click)="hideModal()">
485
+			  取消
486
+			</button>
466 487
 		</div>
467 488
 	</div>
468 489
 </div>
@@ -607,7 +628,7 @@
607 628
 						<input nz-input disabled formControlName="name" placeholder="请输入医生姓名" nzSize="default" />
608 629
 					</nz-form-control>
609 630
 				</nz-form-item>
610
-				<nz-form-item>
631
+<!-- 				<nz-form-item>
611 632
 				  <nz-form-label nzRequired [nzSpan]="6" nzFor="nurseJobNumber">护士工号</nz-form-label>
612 633
 					<nz-form-control [nzSpan]="18" nzErrorTip="请输入护士工号!">
613 634
 						<input nz-input (ngModelChange)="numberChange($event,2)" formControlName="nurseJobNumber" placeholder="请输入护士工号" nzSize="default" />
@@ -618,10 +639,10 @@
618 639
 					<nz-form-control [nzSpan]="18" nzErrorTip="请输入护士姓名!">
619 640
 						<input nz-input disabled formControlName="nurseName" placeholder="请输入护士姓名" nzSize="default" />
620 641
 					</nz-form-control>
621
-				</nz-form-item>
642
+				</nz-form-item> -->
622 643
 				<nz-form-item *ngIf="!ifFixType">
623
-				  <nz-form-label nzRequired [nzSpan]="8" nzFor="fixative">固定液类型</nz-form-label>
624
-				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择固定液类型!">
644
+				  <nz-form-label nzRequired [nzSpan]="6" nzFor="fixative">固定液类型</nz-form-label>
645
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择固定液类型!">
625 646
 				    <nz-input-group>
626 647
 							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择固定液类型" formControlName="fixative">
627 648
 							  <ng-container *ngFor="let option of fixativeData">
@@ -648,7 +669,7 @@
648 669
 		<div class="content">
649 670
 			<div class="content-item boder-right">
650 671
 				<nz-form-item class="form-title-box">
651
-					<div class="form-title">申请单类型:{{detailsData.pathologyFormType==1?'术中快速病理检查申请单':'病理检查申请单'}}</div>
672
+					<div class="form-title">申请单类型:{{detailsData.pathologyFormType==1?'术中快速病理检查申请单' : detailsData.pathologyFormType==2 ? '病理细胞学申请单' : '病理检查申请单'}}</div>
652 673
 					<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
653 674
 				</nz-form-item>
654 675
 				<nz-form-item class="form-title-box">

+ 119 - 36
src/app/views/specimen-room-view/specimen-room-view.component.less

@@ -14,7 +14,11 @@
14 14
     color: @primary-color!important;
15 15
     font-weight: bold !important;
16 16
   }
17
-
17
+	
18
+	.mar-left{
19
+		margin-left: 10px;
20
+	}
21
+	
18 22
   h1,
19 23
   h2,
20 24
   h3,
@@ -163,44 +167,118 @@
163 167
       }
164 168
     }
165 169
   }
166
-  .userInfo {
167
-		width: 260px;
170
+		
171
+	.right {
172
+		width: 20%;
168 173
 		height: 100%;
169
-		padding: 8px 36px 8px 8px;
170
-		box-sizing: border-box;
171
-		font-size: 14px;
172
-		border-left: 1px solid #e5e9ed;
174
+		flex-shrink: 0;
175
+		display: flex;
176
+		align-items: center;
177
+		justify-content: right;
178
+		// box-shadow: 0px 3px 6px 1px rgba(167, 167, 167, 0.16);
179
+		height: 48px;
180
+		.msg {
181
+			float: left;
182
+			width: 50px;
183
+			height: 100%;
184
+			border-left: 1px solid #e5e9ed;
173 185
 
174
-    .wel {
175
-      line-height: 15px;
176
-    }
186
+			.msgBtn {
187
+				width: 100%;
188
+				height: 100%;
177 189
 
178
-    .user {
179
-      font-size: 20px;
180
-      height: 36px;
181
-      display: flex;
182
-      justify-content: center;
183
-      align-items: center;
184
-      line-height: normal;
190
+				i {
191
+					font-size: 30px;
192
+				}
193
+			}
194
+		}
185 195
 
186
-      img {
187
-        height: 100%;
188
-        margin-right: 8px;
189
-      }
190
-    }
191
-    .userInfo-wrap {
192
-      display: flex;
193
-      justify-content: flex-end;
194
-      .logOut {
195
-        display: inline-block;
196
-        text-align: right;
197
-        color: @primary-color;
198
-        line-height: 20px;
199
-        cursor: pointer;
200
-        margin-right: 8px;
201
-      }
202
-    }
203
-  }
196
+		.userInfo {
197
+			height: 100%;
198
+			float: right;
199
+			padding: 0 24px;
200
+			box-sizing: border-box;
201
+			font-size: 14px;
202
+			// border-left: 1px solid #e5e9ed;
203
+
204
+			.wel {
205
+				line-height: 15px;
206
+				white-space: nowrap;
207
+				overflow: hidden;//文本超出隐藏
208
+				text-overflow: ellipsis;//文本超出省略号替代
209
+			}
210
+
211
+			.user {
212
+				overflow: hidden;
213
+				height: 48px;
214
+				display: flex;
215
+				justify-content: center;
216
+				align-items: center;
217
+				font-size: 16px;
218
+				cursor: pointer;
219
+
220
+				img {
221
+					width: 32px;
222
+					height: 32px;
223
+					margin-right: 8px;
224
+				}
225
+
226
+				span, .transport-xiala1 {
227
+					height: 48px;
228
+					line-height: 48px;
229
+				}
230
+			}
231
+
232
+			.logOut {
233
+				text-align: right;
234
+				color: @primary-color;
235
+				line-height: 20px;
236
+
237
+				span {
238
+					cursor: pointer;
239
+					padding: 10px;
240
+				}
241
+			}
242
+		}
243
+	}
244
+	
245
+	// 下拉列表
246
+	.dropdown{
247
+	  position: relative;
248
+	  height: 48px;
249
+	  line-height: 48px;
250
+	  .dropdown-content {
251
+	    position: absolute;
252
+	    top: 48px;
253
+	    background-color: #fff;
254
+	    width: 156px;
255
+	    box-shadow: 0px 2px 4px 1px #D9D9D9;
256
+	    z-index: 999999;
257
+	    border-radius: 4px;
258
+	    border: 1px solid rgba(0,0,0,0.15);
259
+	    color: rgba(0,0,0,0.65);
260
+	    &.ct{
261
+	      left: 50%;
262
+	      transform: translateX(-50%);
263
+	    }
264
+	    &.r8{
265
+	      right: 8px;
266
+	    }
267
+	  }
268
+	
269
+	  .dropdown-content .dropdownItem {
270
+	    height: 40px;
271
+	    cursor: pointer;
272
+	    display: flex;
273
+	    align-items: center;
274
+	    padding: 0 24px;
275
+	  }
276
+	
277
+	  .dropdown-content .dropdownItem:hover {
278
+	    background-color: #e9f7e9;
279
+	  }
280
+	}
281
+	
204 282
   // 头部 end
205 283
   // 主体部分 start
206 284
   .pharmacy-main {
@@ -649,7 +727,12 @@
649 727
 			}
650 728
 	  }
651 729
 		.no-width{
652
-			width: 30% !important;
730
+			width: 33% !important;
731
+			.ant-input-disabled{
732
+				color: rgba(0, 0, 0, 0.65) !important;
733
+				background: #fff !important;
734
+				border: none !important;
735
+			}
653 736
 		}
654 737
 	}
655 738
 

+ 55 - 36
src/app/views/specimen-room-view/specimen-room-view.component.ts

@@ -138,13 +138,14 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
138 138
 		});
139 139
 		this.hosId = this.tool.getCurrentHospital().id;
140 140
 		this.userId = this.tool.getCurrentUserId()
141
+		// 手术间列表
142
+		this.getPharmacyList(this.printPharmacyIdx, 'surgeryDept', this.printPharmacySearchKey);
143
+		// 标本间列表
144
+		this.getPharmacyList(this.waitPharmacyIdx, 'specimenDept', this.waitPharmacySearchKey);
145
+		// 今日离科标本列表
146
+		this.getPharmacyList(this.pharmacyIdx, 'leavedDept', this.pharmacySearchKey);
141 147
     this.runTime();
142
-    // 统计
143
-    // this.total();
144 148
 		this.getDept()
145
-    // 切换科室
146
-    // this.changeKs();
147
-
148 149
     this.initRole();
149 150
     // 自动刷新倒计时 start
150 151
     this.autoUpdate();
@@ -289,7 +290,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
289 290
 		this.fixationData = format(result, 'yyyy-MM-dd');
290 291
 		console.log(this.fixationData)
291 292
 	}
292
-	fixationTimeSelect:any;
293
+	fixationTimeSelect:any = null;
293 294
 	fixationTimeChange(result){
294 295
 		if(result){
295 296
 			this.fixationTimeSelect = format(result, 'HH:mm');
@@ -310,8 +311,8 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
310 311
 		  fixationDate: [null, [Validators.required]],
311 312
 			jobNumber: [null, [Validators.required]],
312 313
 			name:[null, [Validators.required]],
313
-			nurseJobNumber: [null, [Validators.required]],
314
-			nurseName:[null, [Validators.required]],
314
+			// nurseJobNumber: [null, [Validators.required]],
315
+			// nurseName:[null, [Validators.required]],
315 316
 			fixative:[null, [Validators.required]],
316 317
 		});
317 318
 		let date = new Date();
@@ -336,9 +337,9 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
336 337
 				new FormControl(null, Validators.required)
337 338
 			);
338 339
 			this.validateVerificationForm.controls.fixationDate.setValue(inVitroDate);
339
-			// this.validateVerificationForm.controls.fixationTimes.setValue(date);
340
+			this.validateVerificationForm.controls.fixationTimes.setValue(date);
340 341
 			this.fixationData = inVitroDate;
341
-			// this.fixationTimeSelect = format(date, 'HH:mm');
342
+			this.fixationTimeSelect = format(date, 'HH:mm');
342 343
 		}
343 344
 
344 345
 		this.btnLoading = true
@@ -417,7 +418,12 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
417 418
 	
418 419
 	// 获取科室
419 420
 	getDept(){
420
-		this.setSpecimen()
421
+		this.validateForm = this.fb.group({
422
+		  specimen: [null, [Validators.required]],
423
+			operation: [null, [Validators.required]],
424
+			generate:[null, [Validators.required]],
425
+			showFrozen:[null, [Validators.required]],
426
+		});
421 427
 		var that = this;
422 428
 		that.mainService.getDictionary("list", "dept_type").subscribe((res2) => {
423 429
 			let item1 = res2.find(i=>i.name=='手术室科室')
@@ -467,33 +473,28 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
467 473
 					this.validateForm.controls.operation.setValue(deptArr);
468 474
 				}
469 475
 				this.validateForm.controls.specimen.setValue(data.dept.id);
470
-				this.validateForm.controls.showFrozen.setValue(data.showFrozen);
471
-				if(data.autoCreateOrder){
476
+				if(data.showFrozen!=null){
477
+					this.validateForm.controls.showFrozen.setValue(data.showFrozen);
478
+				}else{
479
+					this.validateForm.controls.showFrozen.setValue(0);
480
+				}
481
+				if(data.autoCreateOrder!=null){
472 482
 					this.validateForm.controls.generate.setValue(data.autoCreateOrder);
483
+				}else{
484
+					this.validateForm.controls.generate.setValue(1);
473 485
 				}
474 486
 		  });
475 487
 	}
476 488
 
477 489
 	// 获取是否关联标本间
478 490
 	setSpecimen(){
479
-		if(this.validateForm){
480
-			this.validateForm = this.fb.group({
481
-			  specimen: [this.validateForm.value.specimen, [Validators.required]],
482
-				operation: [this.validateForm.value.operation, [Validators.required]],
483
-				generate:[this.validateForm.value.generate, [Validators.required]],
484
-				showFrozen:[this.validateForm.value.showFrozen, [Validators.required]],
485
-			});
486
-		}else{
487
-			this.validateForm = this.fb.group({
488
-			  specimen: [null, [Validators.required]],
489
-				operation: [null, [Validators.required]],
490
-				generate:[1, [Validators.required]],
491
-				showFrozen:[0, [Validators.required]],
492
-			});
493
-		}
494 491
 		this.relevanceModal = true
495 492
 	}
496
-
493
+	
494
+	hideModal(){
495
+		this.relevanceModal = false
496
+	}
497
+	
497 498
 	// 确定关联科室
498 499
 	btnLoading:boolean = false;
499 500
 	submitForm(){
@@ -568,6 +569,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
568 569
 				this.loginUser = data.data
569 570
 	      let user = JSON.parse(localStorage.getItem("user"));
570 571
 	      user.user.dept = data["data"].dept;
572
+				user.user.autoCreateOrder = data["data"].autoCreateOrder;
571 573
 	      user.user.currentHospital = data["data"].currentHospital;
572 574
 	      localStorage.setItem("user", JSON.stringify(user));
573 575
 	    }
@@ -578,10 +580,10 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
578 580
 	handoverUserId:any = null; //医生工号
579 581
 	nurseId:any = null; //护士工号
580 582
 	numberChange(e,type){
581
-		// if(e.length < 3) {
582
-		// 	this.validateVerificationForm.controls.name.setValue('');
583
-		// 	return
584
-		// }
583
+		if(e.length < 3) {
584
+			this.validateVerificationForm.controls.name.setValue('');
585
+			return
586
+		}
585 587
 		let query = {
586 588
 		  account: e
587 589
 		};
@@ -593,8 +595,8 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
593 595
 						this.validateVerificationForm.controls.name.setValue(data.userName);
594 596
 						this.handoverUserId = data.userId
595 597
 					}else{
596
-						this.validateVerificationForm.controls.nurseName.setValue(data.userName);
597
-						this.nurseId = data.userId
598
+						// this.validateVerificationForm.controls.nurseName.setValue(data.userName);
599
+						// this.nurseId = data.userId
598 600
 					}
599 601
 				}
600 602
 		  });
@@ -777,6 +779,9 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
777 779
   loading3 = false;
778 780
   loading4 = false;
779 781
   loading5 = false;
782
+	otherData1 = null;
783
+	otherData2 = null;
784
+	otherData3 = null;
780 785
   getPharmacyList(idx, type, searchKey) {
781 786
     let hosId = JSON.parse(localStorage.getItem("user")).user.currentHospital.id;
782 787
     switch (type) {
@@ -828,6 +833,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
828 833
               } else {
829 834
                 this.printPharmacyFlag = true;
830 835
               }
836
+							this.otherData1 = result.otherData;
831 837
               // 列表数据合并
832 838
               if (idx === 0) {
833 839
                 this.printPharmacyList = result["list"];
@@ -848,6 +854,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
848 854
               } else {
849 855
                 this.waitPharmacyFlag = true;
850 856
               }
857
+							this.otherData2 = result.otherData;
851 858
               if (idx === 0) {
852 859
                 this.waitPharmacyList = result["list"];
853 860
               } else {
@@ -867,6 +874,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
867 874
               } else {
868 875
                 this.pharmacyFlag = true;
869 876
               }
877
+							this.otherData3 = result.otherData;
870 878
               if (idx === 0) {
871 879
                 this.pharmacyList = result["list"];
872 880
               } else {
@@ -963,6 +971,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
963 971
 
964 972
   // 右侧菜单
965 973
   showLastItems: boolean = false;
974
+	showDropdown:boolean = false;
966 975
   // 下拉
967 976
   fixedMenuXiala() {
968 977
     this.showLastItems = true;
@@ -972,7 +981,17 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
972 981
   fixedMenuShangla() {
973 982
     this.showLastItems = false;
974 983
   }
975
-
984
+	
985
+	// 回到系统管理
986
+	toMain() {
987
+	  this.router.navigateByUrl("main");
988
+	}
989
+	
990
+	// 配送记录
991
+	distributionRecord(){
992
+		this.router.navigateByUrl("main/batchDistribution");
993
+	}
994
+	
976 995
   mainRole: boolean = false; //回到系统管理权限
977 996
   initRole() {
978 997
     let menus = JSON.parse(localStorage.getItem("menu"));