Quellcode durchsuchen

一键建单科室类型优化

maotao vor 1 Monat
Ursprung
Commit
29077db6e1

+ 4 - 4
src/app/components/build-quick-confirm/build-quick-confirm.component.html

@@ -37,7 +37,7 @@
37 37
                       <nz-form-item nz-row>
38 38
                         <nz-form-label [nzSpan]="6" nzRequired nzFor="originOffice">起点科室</nz-form-label>
39 39
                         <nz-form-control [nzSpan]="14" nzErrorTip="请选择起点科室!">
40
-                          <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" nzPlaceHolder="请选择起点科室">
40
+                          <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" [nzServerSearch]="isStartFixedType"  (nzOnSearch)="searchDept('start', buildMsg, $event)" nzPlaceHolder="请选择起点科室">
41 41
                             <ng-container *ngFor="let option of buildMsg.start.start.list">
42 42
                               <nz-option *ngIf="!isLoading" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id">
43 43
                               </nz-option>
@@ -71,7 +71,7 @@
71 71
                       <nz-form-item nz-row>
72 72
                         <nz-form-label [nzSpan]="6" nzRequired nzFor="targetOffice">目标科室</nz-form-label>
73 73
                         <nz-form-control [nzSpan]="14" nzErrorTip="请选择目标科室!">
74
-                          <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" nzAllowClear nzPlaceHolder="请选择目标科室">
74
+                          <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" [nzServerSearch]="isEndFixedType"  (nzOnSearch)="searchDept('target', buildMsg, $event)" nzAllowClear nzPlaceHolder="请选择目标科室">
75 75
                             <ng-container *ngFor="let option of buildMsg.end.end.list">
76 76
                               <nz-option *ngIf="!isLoading" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id">
77 77
                               </nz-option>
@@ -93,7 +93,7 @@
93 93
                       <nz-form-item nz-row>
94 94
                         <nz-form-label [nzSpan]="6" nzRequired nzFor="originOffice">起点科室</nz-form-label>
95 95
                         <nz-form-control [nzSpan]="14" nzErrorTip="请选择起点科室!">
96
-                          <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" nzPlaceHolder="请选择起点科室">
96
+                          <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" [nzServerSearch]="isStartFixedType"  (nzOnSearch)="searchDept('start', buildMsg, $event)" nzPlaceHolder="请选择起点科室">
97 97
                             <ng-container *ngFor="let option of buildMsg.start.start.list">
98 98
                               <nz-option *ngIf="!isLoading" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id">
99 99
                               </nz-option>
@@ -108,7 +108,7 @@
108 108
                       <nz-form-item nz-row>
109 109
                         <nz-form-label [nzSpan]="6" nzRequired nzFor="targetOffice">目标科室</nz-form-label>
110 110
                         <nz-form-control [nzSpan]="14" nzErrorTip="请选择目标科室!">
111
-                          <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" nzPlaceHolder="请选择目标科室">
111
+                          <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" [nzServerSearch]="isEndFixedType"  (nzOnSearch)="searchDept('target', buildMsg, $event)" nzPlaceHolder="请选择目标科室">
112 112
                             <ng-container *ngFor="let option of buildMsg.end.end.list">
113 113
                               <nz-option *ngIf="!isLoading" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id">
114 114
                               </nz-option>

+ 37 - 2
src/app/components/build-quick-confirm/build-quick-confirm.component.ts

@@ -58,6 +58,7 @@ export class BuildQuickConfirmComponent implements OnInit {
58 58
   nLoading = false;
59 59
 	isEndFixedType: boolean = false;
60 60
 	isStartFixedType: boolean = false;
61
+	msgId:any;
61 62
   newShortcutOrder(data, type) {
62 63
     this.workOrderRemark = "";
63 64
     this.customRemarks = [];
@@ -67,6 +68,7 @@ export class BuildQuickConfirmComponent implements OnInit {
67 68
     this.shortcutMsg = data;
68 69
     this.initForm();
69 70
     this.buildMsg = {};
71
+		this.msgId = data.id;
70 72
     let postData:any = {
71 73
       taskTypeId: data.id,
72 74
     };
@@ -79,14 +81,18 @@ export class BuildQuickConfirmComponent implements OnInit {
79 81
       .subscribe((result) => {
80 82
         this.buildMsg = result;
81 83
 				if(result.end){
82
-					if(result.end.end.departmentStrategy==202){
84
+					if(result.end.end.departmentStrategy==202 ||
85
+					result.end.end.departmentStrategy==204 ||
86
+					result.end.end.departmentStrategy==205){
83 87
 						this.isEndFixedType = true
84 88
 					}else{
85 89
 						this.isEndFixedType = false
86 90
 					}
87 91
 				}
88 92
 				if(result.start){
89
-					if(result.start.start.departmentStrategy==202){
93
+					if(result.start.start.departmentStrategy==202 ||
94
+					result.start.start.departmentStrategy==204 ||
95
+					result.start.start.departmentStrategy==205){
90 96
 						this.isStartFixedType = true
91 97
 					}else{
92 98
 						this.isStartFixedType = false
@@ -164,6 +170,35 @@ export class BuildQuickConfirmComponent implements OnInit {
164 170
       (type == "start" && msg.start.start.departmentStrategy == 202) ||
165 171
       (type == "target" && msg.end.end.departmentStrategy == 202)
166 172
     ) {
173
+			let data = [];
174
+			let postData = {
175
+			  taskTypeId: this.msgId
176
+			};
177
+			if(type == "start"){
178
+				this.mainService
179
+				.postCustom("nurse", "workOrder/buildTrip", postData)
180
+				.subscribe((result) => {
181
+					let arr = result.start.start.list;
182
+					if(key!=''){
183
+						data = arr.filter(i=>i.dept.indexOf(key) !=-1)
184
+						msg.start.start.list = data
185
+					}else{
186
+						msg.start.start.list = arr
187
+					}
188
+				});
189
+			}else{
190
+				this.mainService
191
+				.postCustom("nurse", "workOrder/buildTrip", postData)
192
+				.subscribe((result) => {
193
+					let arr = result.end.end.list;
194
+					if(key!=''){
195
+						data = arr.filter(i=>i.dept.indexOf(key) !=-1)
196
+						msg.end.end.list = data
197
+					}else{
198
+						msg.end.end.list = arr
199
+					}
200
+				});
201
+			}
167 202
       return; //固定科室范围禁用搜索
168 203
     }
169 204
     let postData: any = {

+ 4 - 4
src/app/views/fuwutai/fuwutai.component.html

@@ -1136,7 +1136,7 @@
1136 1136
                           <nz-form-item>
1137 1137
                             <nz-form-label class="label" [nzSm]="24" [nzXs]="24" nzRequired nzFor="startDept">起点科室</nz-form-label>
1138 1138
                             <nz-form-control class="control" [nzSm]="24" [nzXs]="24" nzErrorTip="请选择起点科室!">
1139
-                              <nz-select formControlName="startDept" [nzDisabled]="deptZyList.startStatus == 201 || deptZyList.startStatus == 203 || deptZyList.startStatus == 206" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" nzAllowClear nzPlaceHolder="请选择起点科室" [(ngModel)]="startDeptZy">
1139
+                              <nz-select formControlName="startDept" [nzDisabled]="deptZyList.startStatus == 201 || deptZyList.startStatus == 203 || deptZyList.startStatus == 206" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" [nzServerSearch]="isStartFixedType" (nzOnSearch)="searchHosDepartment(checkedHos, 'start', $event)" nzAllowClear nzPlaceHolder="请选择起点科室" [(ngModel)]="startDeptZy">
1140 1140
                                 <ng-container *ngFor="let option of deptZyList.startDept">
1141 1141
                                   <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
1142 1142
                                 </ng-container>
@@ -1152,7 +1152,7 @@
1152 1152
                           <nz-form-item>
1153 1153
                             <nz-form-label class="label" [nzSm]="24" [nzXs]="24" nzRequired nzFor="endDepts">终点科室</nz-form-label>
1154 1154
                             <nz-form-control class="control" [nzSm]="24" [nzXs]="24" nzErrorTip="请选择终点科室!">
1155
-                              <nz-select formControlName="endDepts" [nzDisabled]="deptZyList.endStatus == 201 || deptZyList.endStatus == 203 || deptZyList.endStatus == 206" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" nzAllowClear nzPlaceHolder="请选择终点科室" [(ngModel)]="endDeptZy" (ngModelChange)="endDeptZyChange()">
1155
+                              <nz-select formControlName="endDepts" [nzDisabled]="deptZyList.endStatus == 201 || deptZyList.endStatus == 203 || deptZyList.endStatus == 206" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" [nzServerSearch]="isEndFixedType" (nzOnSearch)="searchHosDepartment(checkedHos, 'end', $event)" nzAllowClear nzPlaceHolder="请选择终点科室" [(ngModel)]="endDeptZy" (ngModelChange)="endDeptZyChange()">
1156 1156
                                 <ng-container *ngFor="let option of deptZyList.endDept">
1157 1157
                                   <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
1158 1158
                                 </ng-container>
@@ -1247,7 +1247,7 @@
1247 1247
                           <nz-form-item>
1248 1248
                             <nz-form-label class="label" [nzSm]="24" [nzXs]="24" nzRequired nzFor="startDeptQt">起点科室</nz-form-label>
1249 1249
                             <nz-form-control class="control" [nzSm]="24" [nzXs]="24" nzErrorTip="请选择起点科室!">
1250
-                              <nz-select formControlName="startDeptQt" [nzDisabled]="deptQtList.startStatus == 201 || deptQtList.startStatus == 203" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" nzAllowClear nzPlaceHolder="请选择起点科室" [(ngModel)]="startDeptQt">
1250
+                              <nz-select formControlName="startDeptQt" [nzDisabled]="deptQtList.startStatus == 201 || deptQtList.startStatus == 203" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" [nzServerSearch]="isStartFixedType" (nzOnSearch)="searchHosDepartmentQt(checkedHos, 'start', $event)" nzAllowClear nzPlaceHolder="请选择起点科室" [(ngModel)]="startDeptQt">
1251 1251
                                 <ng-container *ngFor="let option of deptQtList.startDept">
1252 1252
                                   <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
1253 1253
                                 </ng-container>
@@ -1263,7 +1263,7 @@
1263 1263
                           <nz-form-item>
1264 1264
                             <nz-form-label class="label" [nzSm]="24" [nzXs]="24" nzRequired nzFor="endDeptsQt">终点科室</nz-form-label>
1265 1265
                             <nz-form-control class="control" [nzSm]="24" [nzXs]="24" nzErrorTip="请选择终点科室!">
1266
-                              <nz-select formControlName="endDeptsQt" [nzDisabled]="deptQtList.endStatus == 201 || deptQtList.endStatus == 203" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType"
1266
+                              <nz-select formControlName="endDeptsQt" [nzDisabled]="deptQtList.endStatus == 201 || deptQtList.endStatus == 203" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" [nzServerSearch]="isEndFixedType" (nzOnSearch)="searchHosDepartmentQt(checkedHos, 'end', $event)"
1267 1267
                                 nzAllowClear nzPlaceHolder="请选择终点科室" [(ngModel)]="endDeptQt">
1268 1268
                                 <ng-container *ngFor="let option of deptQtList.endDept">
1269 1269
                                   <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>

+ 49 - 11
src/app/views/fuwutai/fuwutai.component.ts

@@ -4202,13 +4202,31 @@ export class FuwutaiComponent implements OnInit {
4202 4202
     if (dept) {
4203 4203
       value = dept;
4204 4204
     }
4205
-    if (type === "start" && this.deptZyList["startStatus"] == 202) {
4206
-      //固定科室范围,禁止搜索
4207
-      return;
4208
-    } else if (type === "end" && this.deptZyList["endStatus"] == 202) {
4209
-      //固定科室范围,禁止搜索
4210
-      return;
4211
-    }
4205
+		if (type === "start" && this.deptZyList["startStatus"] == 202) {
4206
+		  //固定科室范围,禁止搜索
4207
+			this.mainService.getdeptList(this.radioValueZy).subscribe((data:any) => {
4208
+				let arr = data;
4209
+				if(value!=''){
4210
+					data = arr.startDept.filter(i=>i.dept.indexOf(value) !=-1)
4211
+					this.deptZyList.startDept = data
4212
+				}else{
4213
+					this.deptZyList.startDept = arr.startDept
4214
+				}
4215
+			})
4216
+		  return;
4217
+		} else if (type === "end" && this.deptZyList["endStatus"] == 202) {
4218
+		  //固定科室范围,禁止搜索
4219
+			this.mainService.getdeptList(this.radioValueZy).subscribe((data:any) => {
4220
+				let arr = data;
4221
+				if(value!=''){
4222
+					data = arr.endDept.filter(i=>i.dept.indexOf(value) !=-1)
4223
+					this.deptZyList.endDept = data
4224
+				}else{
4225
+					this.deptZyList.endDept = arr.endDept
4226
+				}
4227
+			})
4228
+		  return;
4229
+		}
4212 4230
     let postData = {
4213 4231
       idx: 0,
4214 4232
       sum: 10,
@@ -4253,9 +4271,27 @@ export class FuwutaiComponent implements OnInit {
4253 4271
     }
4254 4272
     if (type === "start" && this.deptQtList["startStatus"] == 202) {
4255 4273
       //固定科室范围,禁止搜索
4274
+			this.mainService.getdeptList(this.psValue).subscribe((data:any) => {
4275
+				let arr = data;
4276
+				if(value!=''){
4277
+					data = arr.startDept.filter(i=>i.dept.indexOf(value) !=-1)
4278
+					this.deptQtList.startDept = data
4279
+				}else{
4280
+					this.deptQtList.startDept = arr.startDept
4281
+				}
4282
+			})
4256 4283
       return;
4257 4284
     } else if (type === "end" && this.deptQtList["endStatus"] == 202) {
4258 4285
       //固定科室范围,禁止搜索
4286
+			this.mainService.getdeptList(this.psValue).subscribe((data:any) => {
4287
+				let arr = data;
4288
+				if(value!=''){
4289
+					data = arr.endDept.filter(i=>i.dept.indexOf(value) !=-1)
4290
+					this.deptQtList.endDept = data
4291
+				}else{
4292
+					this.deptQtList.endDept = arr.endDept
4293
+				}
4294
+			})
4259 4295
       return;
4260 4296
     }
4261 4297
     let postData = {
@@ -4572,12 +4608,12 @@ export class FuwutaiComponent implements OnInit {
4572 4608
     // 返回值的status是206 则是默认患者所在科室,把患者所在科室作为值
4573 4609
     this.mainService.getdeptList(value, patientCode, (taskType.associationTypeValue === 'inspect' ? format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined), (taskType.associationTypeValue === 'inspect' ? format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined)).subscribe((data:any) => {
4574 4610
       this.deptZyList = data;
4575
-			if(data.startStatus==202){
4611
+			if(data.startStatus==202 || data.startStatus==204 || data.startStatus==205){
4576 4612
 				this.isStartFixedType = true
4577 4613
 			}else{
4578 4614
 				this.isStartFixedType = false
4579 4615
 			}
4580
-			if(data.endStatus==202){
4616
+			if(data.endStatus==202 || data.endStatus==204 || data.endStatus==205){
4581 4617
 				this.isEndFixedType = true
4582 4618
 			}else{
4583 4619
 				this.isEndFixedType = false
@@ -4671,11 +4707,13 @@ export class FuwutaiComponent implements OnInit {
4671 4707
       }
4672 4708
     }, 0)
4673 4709
   }
4710
+	psValue:any;
4674 4711
   radioChangeQt(value) {
4675 4712
     //任务类型id
4676 4713
     if (value === "" || value === null) {
4677 4714
       return;
4678 4715
     }
4716
+		this.psValue = value
4679 4717
     this.startDeptQt = null;
4680 4718
     this.endDeptQt = null;
4681 4719
     // 返回值的status是201 则是默认发起科室,把申请科室作为值
@@ -4685,12 +4723,12 @@ export class FuwutaiComponent implements OnInit {
4685 4723
     // 返回值的status是205 则是固定科室类型,会返回科室列表
4686 4724
     this.mainService.getdeptList(value).subscribe((data:any) => {
4687 4725
       this.deptQtList = data;
4688
-			if(data.startStatus==202){
4726
+			if(data.startStatus==202 || data.startStatus==204 || data.startStatus==205){
4689 4727
 				this.isStartFixedType = true
4690 4728
 			}else{
4691 4729
 				this.isStartFixedType = false
4692 4730
 			}
4693
-			if(data.endStatus==202){
4731
+			if(data.endStatus==202 || data.endStatus==204 || data.endStatus==205){
4694 4732
 				this.isEndFixedType = true
4695 4733
 			}else{
4696 4734
 				this.isEndFixedType = false

+ 6 - 6
src/app/views/hushijiandan/hushijiandan.component.html

@@ -585,7 +585,7 @@
585 585
                                             <nz-form-item>
586 586
                                               <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="originOffice">起点科室</nz-form-label>
587 587
                                               <nz-form-control nzErrorTip="请选择起点科室!">
588
-                                                <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" nzPlaceHolder="请选择起点科室">
588
+                                                <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" [nzServerSearch]="isStartFixedType"  (nzOnSearch)="searchDept('start', buildMsg, $event)" nzPlaceHolder="请选择起点科室">
589 589
                                                   <ng-container *ngFor="let option of buildMsg.start.start.list">
590 590
                                                     <nz-option *ngIf="true" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id">
591 591
                                                     </nz-option>
@@ -607,7 +607,7 @@
607 607
                                             <nz-form-item>
608 608
                                               <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="targetOffice">目标科室</nz-form-label>
609 609
                                               <nz-form-control nzErrorTip="请选择目标科室!">
610
-                                                <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" nzAllowClear nzPlaceHolder="请选择目标科室">
610
+                                                <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" [nzServerSearch]="isEndFixedType"  (nzOnSearch)="searchDept('target', buildMsg, $event)" nzAllowClear nzPlaceHolder="请选择目标科室">
611 611
                                                   <ng-container *ngFor="let option of buildMsg.end.end.list">
612 612
                                                     <nz-option *ngIf="true" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id">
613 613
                                                     </nz-option>
@@ -629,7 +629,7 @@
629 629
                                             <nz-form-item>
630 630
                                               <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="originOffice">起点科室</nz-form-label>
631 631
                                               <nz-form-control nzErrorTip="请选择起点科室!">
632
-                                                <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" nzPlaceHolder="请选择起点科室">
632
+                                                <nz-select class="w100" formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" [nzServerSearch]="isStartFixedType"  (nzOnSearch)="searchDept('start', buildMsg, $event)" nzPlaceHolder="请选择起点科室">
633 633
                                                   <ng-container *ngFor="let option of buildMsg.start.start.list">
634 634
                                                     <nz-option *ngIf="true" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id">
635 635
                                                     </nz-option>
@@ -644,7 +644,7 @@
644 644
                                             <nz-form-item>
645 645
                                               <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="targetOffice">目标科室</nz-form-label>
646 646
                                               <nz-form-control nzErrorTip="请选择目标科室!">
647
-                                                <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" nzPlaceHolder="请选择目标科室">
647
+                                                <nz-select class="w100" formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType" [nzServerSearch]="isEndFixedType"  (nzOnSearch)="searchDept('target', buildMsg, $event)" nzPlaceHolder="请选择目标科室">
648 648
                                                   <ng-container *ngFor="let option of buildMsg.end.end.list">
649 649
                                                     <nz-option *ngIf="true" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id">
650 650
                                                     </nz-option>
@@ -1543,7 +1543,7 @@
1543 1543
             <nz-form-item class="top16bottom0" nz-row *ngIf="checkedShowMsg.status == 100015 || checkedShowMsg.status == 100013">
1544 1544
               <nz-form-label [nzSpan]="3" nzRequired nzFor="originOffice">起点科室</nz-form-label>
1545 1545
               <nz-form-control [nzSpan]="21" nzErrorTip="请选择起点科室!">
1546
-                <nz-select formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" nzPlaceHolder="请选择起点科室">
1546
+                <nz-select formControlName="originOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isStartFixedType" [nzServerSearch]="isStartFixedType"  (nzOnSearch)="searchDept('start', checkedShowMsg, $event)" nzPlaceHolder="请选择起点科室">
1547 1547
                   <ng-container *ngFor="let option of checkedShowMsg.start.start.list">
1548 1548
                     <nz-option *ngIf="true" [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id"></nz-option>
1549 1549
                   </ng-container>
@@ -1571,7 +1571,7 @@
1571 1571
             <nz-form-item class="top16bottom0" nz-row *ngIf="checkedShowMsg.status == 100014 || checkedShowMsg.status == 100015">
1572 1572
               <nz-form-label [nzSpan]="3" nzRequired nzFor="targetOffice">目标科室</nz-form-label>
1573 1573
               <nz-form-control [nzSpan]="21" nzErrorTip="请选择目标科室!">
1574
-                <nz-select formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="isEndFixedType"  nzPlaceHolder="请选择目标科室">
1574
+                <nz-select formControlName="targetOffice" [nzDropdownMatchSelectWidth]="false"  [nzShowSearch]="isEndFixedType" [nzServerSearch]="isEndFixedType"  (nzOnSearch)="searchDept('target', checkedShowMsg, $event)" nzPlaceHolder="请选择目标科室">
1575 1575
                   <ng-container *ngFor="let option of checkedShowMsg.end.end.list">
1576 1576
                     <nz-option [nzLabel]="deptDisplay == 2 ? option.deptalias : option.dept" [nzValue]="option.id"></nz-option>
1577 1577
                   </ng-container>

+ 52 - 7
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1904,7 +1904,7 @@ export class HushijiandanComponent implements OnInit {
1904 1904
 
1905 1905
   // 目标科室输入搜索
1906 1906
   searchDept(type, msg, e) {
1907
-    this.getDeptList(type, msg, e);
1907
+		this.getDeptList(type, msg, e)
1908 1908
   }
1909 1909
   // 获取科室
1910 1910
   getDeptList(type, msg, key?): void {
@@ -1917,6 +1917,40 @@ export class HushijiandanComponent implements OnInit {
1917 1917
       (type == "start" && msg.start.start.departmentStrategy == 202) ||
1918 1918
       (type == "target" && msg.end.end.departmentStrategy == 202)
1919 1919
     ) {
1920
+			let data = [];
1921
+			let postData = null
1922
+			if(this.patientModal){
1923
+				postData = this.patientQuery
1924
+			}else{
1925
+				postData = {
1926
+				  taskTypeId: this.msgId
1927
+				};
1928
+			}
1929
+			if(type == "start"){
1930
+				this.mainService
1931
+				.postCustom("nurse", "workOrder/buildTrip", postData)
1932
+				.subscribe((result) => {
1933
+					let arr = result.start.start.list;
1934
+					if(key!=''){
1935
+						data = arr.filter(i=>i.dept.indexOf(key) !=-1)
1936
+						msg.start.start.list = data
1937
+					}else{
1938
+						msg.start.start.list = arr
1939
+					}
1940
+				});
1941
+			}else{
1942
+				this.mainService
1943
+				.postCustom("nurse", "workOrder/buildTrip", postData)
1944
+				.subscribe((result) => {
1945
+					let arr = result.end.end.list;
1946
+					if(key!=''){
1947
+						data = arr.filter(i=>i.dept.indexOf(key) !=-1)
1948
+						msg.end.end.list = data
1949
+					}else{
1950
+						msg.end.end.list = arr
1951
+					}
1952
+				});
1953
+			}
1920 1954
       return; //固定科室范围禁用搜索
1921 1955
     }
1922 1956
     let postData: any = {
@@ -3060,6 +3094,7 @@ export class HushijiandanComponent implements OnInit {
3060 3094
   historyCustomRemarks2 = [];
3061 3095
 	isStartFixedType:boolean = false;
3062 3096
 	isEndFixedType:boolean = false;
3097
+	patientQuery:any={};
3063 3098
   changeCheckedType(isInit = false) {
3064 3099
     isInit && (this.inspectToday = new Date());
3065 3100
     this.customRemarks2 = [];
@@ -3108,7 +3143,7 @@ export class HushijiandanComponent implements OnInit {
3108 3143
     // 判断这个任务类型是否允许加急 end
3109 3144
     let that = this;
3110 3145
     let isInpect = this.checkTypeLis.some((item) => item.id == this.patientForm.controls.checkedType.value && item.associationType.value == "inspect");
3111
-    let postData = {
3146
+    this.patientQuery = {
3112 3147
       taskTypeId: that.patientForm.controls.checkedType.value,
3113 3148
       patientCode: that.patientMsg.patientCode,
3114 3149
       startTime: isInpect ? format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined,
@@ -3116,7 +3151,7 @@ export class HushijiandanComponent implements OnInit {
3116 3151
     };
3117 3152
     this.cLoading = true;
3118 3153
     that.mainService
3119
-      .postCustom("nurse", "workOrder/buildTrip", postData)
3154
+      .postCustom("nurse", "workOrder/buildTrip", this.patientQuery)
3120 3155
       .subscribe((data) => {
3121 3156
         this.cLoading = false;
3122 3157
         this.message.remove(this.maskFlag);
@@ -3124,14 +3159,18 @@ export class HushijiandanComponent implements OnInit {
3124 3159
         this.patientModal = true;
3125 3160
         that.checkedShowMsg = data;
3126 3161
 				if(data.end){
3127
-					if(data.end.end.departmentStrategy==202){
3162
+					if(data.end.end.departmentStrategy==202 || 
3163
+					data.end.end.departmentStrategy==204 ||
3164
+					data.end.end.departmentStrategy==205){
3128 3165
 						this.isEndFixedType = true
3129 3166
 					}else{
3130 3167
 						this.isEndFixedType = false
3131 3168
 					}
3132 3169
 				}
3133 3170
 				if(data.start){
3134
-					if(data.start.start.departmentStrategy==202){
3171
+					if(data.start.start.departmentStrategy==202 ||
3172
+					data.start.start.departmentStrategy==204 ||
3173
+					data.start.start.departmentStrategy==205){
3135 3174
 						this.isStartFixedType = true
3136 3175
 					}else{
3137 3176
 						this.isStartFixedType = false
@@ -3385,6 +3424,7 @@ export class HushijiandanComponent implements OnInit {
3385 3424
   buildMsg: any = {}; //一键发起返回信息
3386 3425
   buildType: string = ""; //快捷建单类型
3387 3426
   historyCustomRemarks = []; //历史快捷输入
3427
+	msgId:any;
3388 3428
   // 打开一键发起建单模态框
3389 3429
   newShortcutOrder(msg, type) {
3390 3430
     this.workOrderRemark = "";
@@ -3395,6 +3435,7 @@ export class HushijiandanComponent implements OnInit {
3395 3435
     this.shortcutMsg = msg;
3396 3436
     this.initForm();
3397 3437
     this.buildMsg = {};
3438
+		this.msgId = msg.id;
3398 3439
     let postData = {
3399 3440
       taskTypeId: msg.id,
3400 3441
     };
@@ -3404,14 +3445,18 @@ export class HushijiandanComponent implements OnInit {
3404 3445
       .subscribe((result) => {
3405 3446
         this.buildMsg = result;
3406 3447
 				if(result.end){
3407
-					if(result.end.end.departmentStrategy==202){
3448
+					if(result.end.end.departmentStrategy==202 ||
3449
+					result.end.end.departmentStrategy==204 ||
3450
+					result.end.end.departmentStrategy==205){
3408 3451
 						this.isEndFixedType = true
3409 3452
 					}else{
3410 3453
 						this.isEndFixedType = false
3411 3454
 					}
3412 3455
 				}
3413 3456
 				if(result.start){
3414
-					if(result.start.start.departmentStrategy==202){
3457
+					if(result.start.start.departmentStrategy==202 ||
3458
+					result.start.start.departmentStrategy==204 ||
3459
+					result.start.start.departmentStrategy==205){
3415 3460
 						this.isStartFixedType = true
3416 3461
 					}else{
3417 3462
 						this.isStartFixedType = false

+ 2 - 1
src/app/views/task-type-management/task-type-management.component.html

@@ -1244,7 +1244,8 @@
1244 1244
         <div>
1245 1245
           <nz-form-label class="label" nzRequired>固定科室</nz-form-label>
1246 1246
           <nz-select class="mb8 w100" [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false" nzShowSearch
1247
-            nzAllowClear nzPlaceHolder="请选择固定科室" nzShowSearch  
1247
+            nzAllowClear nzPlaceHolder="请选择固定科室" nzShowSearch 
1248
+
1248 1249
              [(ngModel)]="departments">
1249 1250
             <ng-container *ngFor="let data of courseListDataAll">
1250 1251
               <nz-option *ngIf="!loading1" [nzLabel]="data.dept" [nzValue]="data"></nz-option>

+ 4 - 3
src/app/views/task-type-management/task-type-management.component.ts

@@ -1131,7 +1131,6 @@ export class TaskTypeManagementComponent implements OnInit {
1131 1131
         this.loading1 = false;
1132 1132
         if (data.status == 200) {
1133 1133
           this.courseListDataAll = data.list;
1134
-					
1135 1134
         }
1136 1135
       });
1137 1136
   }
@@ -2093,8 +2092,10 @@ export class TaskTypeManagementComponent implements OnInit {
2093 2092
       );
2094 2093
     });
2095 2094
   }
2095
+	clysData:any;
2096 2096
   //处理运送过程字段
2097 2097
   ysgcData(data) {
2098
+		this.clysData = data;
2098 2099
     console.log(data, "---运送过程自动建单字段(包含各个班次的信息)-----");
2099 2100
     console.log(this.indexs, "----索引(起点科室,终点科室对应数组的索引)----");
2100 2101
     if (data.departmentStrategy) {
@@ -2126,8 +2127,8 @@ export class TaskTypeManagementComponent implements OnInit {
2126 2127
 					result.push(arr[i]);
2127 2128
 				}
2128 2129
 			}
2129
-			console.log(1234,arr)
2130
-			console.log(89898,result)
2130
+			// console.log(1234,arr)
2131
+			// console.log(89898,result)
2131 2132
 			this.courseListDataAll = result
2132 2133
       this.departmentIds = data.departmentIds;
2133 2134
     } else {