|
@@ -235,6 +235,16 @@ export class ShortcutBuildOrdersComponent implements OnInit {
|
235
|
235
|
this.isLoading = true;
|
236
|
236
|
this.changeInpSubject.next([dept, type]);
|
237
|
237
|
}
|
|
238
|
+ // 修改起点科室院区
|
|
239
|
+ changeStartHospital(e){
|
|
240
|
+ console.log(e);
|
|
241
|
+ this.validateForm.controls.startDepartment.setValue(null);
|
|
242
|
+ }
|
|
243
|
+ // 修改终点科室院区
|
|
244
|
+ changeEndHospital(e){
|
|
245
|
+ console.log(e);
|
|
246
|
+ this.validateForm.controls.endDepartment.setValue(null);
|
|
247
|
+ }
|
238
|
248
|
// 搜索科室
|
239
|
249
|
snum = 0;
|
240
|
250
|
searchDepartment(dept, type) {
|
|
@@ -249,9 +259,25 @@ export class ShortcutBuildOrdersComponent implements OnInit {
|
249
|
259
|
idx: 0,
|
250
|
260
|
sum: 20,
|
251
|
261
|
};
|
|
262
|
+ if (type === "form") {
|
|
263
|
+ if(this.validateForm.value.startDepartmentHospital){
|
|
264
|
+ data.department.hospital.id = this.validateForm.value.startDepartmentHospital;
|
|
265
|
+ }else{
|
|
266
|
+ this.department = [];
|
|
267
|
+ this.isLoading = false;
|
|
268
|
+ return;
|
|
269
|
+ }
|
|
270
|
+ }
|
252
|
271
|
// 终点科室的科室类型为检验科
|
253
|
272
|
if (type === "formEnd") {
|
254
|
273
|
data.department.type.id = 282;
|
|
274
|
+ if(this.validateForm.value.endDepartmentHospital){
|
|
275
|
+ data.department.hospital.id = this.validateForm.value.endDepartmentHospital;
|
|
276
|
+ }else{
|
|
277
|
+ this.department1 = [];
|
|
278
|
+ this.isLoading = false;
|
|
279
|
+ return;
|
|
280
|
+ }
|
255
|
281
|
}
|
256
|
282
|
this.snum++;
|
257
|
283
|
this.mainService
|
|
@@ -348,7 +374,9 @@ export class ShortcutBuildOrdersComponent implements OnInit {
|
348
|
374
|
this.validateForm = this.fb.group({
|
349
|
375
|
roundRobinName: [null, [Validators.required]],
|
350
|
376
|
roundRobinType: [null, [Validators.required]],
|
|
377
|
+ startDepartmentHospital: [null, [Validators.required]],
|
351
|
378
|
startDepartment: [null, [Validators.required]],
|
|
379
|
+ endDepartmentHospital: [null, [Validators.required]],
|
352
|
380
|
endDepartment: [null, [Validators.required]],
|
353
|
381
|
});
|
354
|
382
|
this.validateForm.controls.roundRobinType.setValue(
|
|
@@ -417,6 +445,8 @@ export class ShortcutBuildOrdersComponent implements OnInit {
|
417
|
445
|
this.coopId = data.id;
|
418
|
446
|
this.createUser = data.createUserName; //创建人
|
419
|
447
|
this.validateForm.controls.roundRobinName.setValue(data.title); //名称
|
|
448
|
+ this.validateForm.controls.startDepartmentHospital.setValue(data.startDeptHosId.toString());//起点科室院区
|
|
449
|
+ this.validateForm.controls.endDepartmentHospital.setValue(data.targetDeptHosId.toString());//终点科室院区
|
420
|
450
|
let taskType$ = this.mainService.getFetchDataList(
|
421
|
451
|
"configuration",
|
422
|
452
|
"taskType",
|
|
@@ -437,7 +467,7 @@ export class ShortcutBuildOrdersComponent implements OnInit {
|
437
|
467
|
startDeptArr.push({ id: startDept, dept: startDeptShow });
|
438
|
468
|
let startDept$ = this.mainService.getFetchDataList("data", "department", {
|
439
|
469
|
department: {
|
440
|
|
- hospital: { id: data.hospital },
|
|
470
|
+ hospital: { id: data.startDeptHosId },
|
441
|
471
|
type: { id: 383 }, //科室类型为中转科室
|
442
|
472
|
},
|
443
|
473
|
idx: 0,
|
|
@@ -453,7 +483,7 @@ export class ShortcutBuildOrdersComponent implements OnInit {
|
453
|
483
|
});
|
454
|
484
|
let targetDept$ = this.mainService.getFetchDataList("data", "department", {
|
455
|
485
|
department: {
|
456
|
|
- hospital: { id: data.hospital },
|
|
486
|
+ hospital: { id: data.targetDeptHosId },
|
457
|
487
|
type: { id: 282 },
|
458
|
488
|
},
|
459
|
489
|
idx: 0,
|