|
@@ -87,6 +87,8 @@ export class QuickCombinationComponent implements OnInit {
|
87
|
87
|
this.currentHospital = this.tool.getCurrentHospital();
|
88
|
88
|
this.initForm();
|
89
|
89
|
this.getList(1);
|
|
90
|
+ this.getDispatchMethods();
|
|
91
|
+ this.getDispatchTypes();
|
90
|
92
|
}
|
91
|
93
|
// 重置
|
92
|
94
|
reset() {
|
|
@@ -466,7 +468,12 @@ export class QuickCombinationComponent implements OnInit {
|
466
|
468
|
this.validateForm.get("quickCombinationDispatchMethod")!.markAsDirty();
|
467
|
469
|
}
|
468
|
470
|
this.validateForm.get("quickCombinationDispatchMethod")!.updateValueAndValidity();
|
469
|
|
- this.validateForm.controls.quickCombinationDispatchMethod.setValue(null);
|
|
471
|
+ if(this.add){
|
|
472
|
+ this.validateForm.controls.quickCombinationDispatchMethod.setValue(null);
|
|
473
|
+ }else{
|
|
474
|
+ this.validateForm.controls.quickCombinationDispatchMethod.setValue(this.info.dispatchMethod ? this.info.dispatchMethod.value : null);
|
|
475
|
+ }
|
|
476
|
+
|
470
|
477
|
// ------
|
471
|
478
|
if (!(this.queryParamsType == 1 && this.quickCombinationModel == 1 && this.validateForm.value.quickCombinationDispatchMethod == 2)) {
|
472
|
479
|
this.validateForm.get("quickCombinationDispatchType")!.clearValidators();
|
|
@@ -482,10 +489,32 @@ export class QuickCombinationComponent implements OnInit {
|
482
|
489
|
this.validateForm.get("quickCombinationDispatchWeight")!.markAsDirty();
|
483
|
490
|
}
|
484
|
491
|
this.validateForm.get("quickCombinationDispatchType")!.updateValueAndValidity();
|
485
|
|
- this.validateForm.controls.quickCombinationDispatchType.setValue(null);
|
|
492
|
+ if(this.add){
|
|
493
|
+ this.validateForm.controls.quickCombinationDispatchType.setValue(null);
|
|
494
|
+ }else{
|
|
495
|
+ this.validateForm.controls.quickCombinationDispatchType.setValue(this.info.dispatchType ? this.info.dispatchType.value : null);
|
|
496
|
+ }
|
486
|
497
|
|
487
|
498
|
this.validateForm.get("quickCombinationDispatchWeight")!.updateValueAndValidity();
|
488
|
|
- this.validateForm.controls.quickCombinationDispatchWeight.setValue(0);
|
|
499
|
+ if(this.add){
|
|
500
|
+ this.validateForm.controls.quickCombinationDispatchWeight.setValue(0);
|
|
501
|
+ }else{
|
|
502
|
+ this.validateForm.controls.quickCombinationDispatchWeight.setValue(this.info.maxWeight || null);
|
|
503
|
+ }
|
|
504
|
+ }
|
|
505
|
+ //获取派单方式
|
|
506
|
+ dispatchMethods:any[] = [];
|
|
507
|
+ getDispatchMethods() {
|
|
508
|
+ this.mainService.getDictionary("list", "dispatchMethod").subscribe((data) => {
|
|
509
|
+ this.dispatchMethods = data;
|
|
510
|
+ });
|
|
511
|
+ }
|
|
512
|
+ //获取派单类型
|
|
513
|
+ dispatchTypes:any[] = [];
|
|
514
|
+ getDispatchTypes() {
|
|
515
|
+ this.mainService.getDictionary("list", "dispatchType").subscribe((data) => {
|
|
516
|
+ this.dispatchTypes = data;
|
|
517
|
+ });
|
489
|
518
|
}
|
490
|
519
|
// 选择派单方式
|
491
|
520
|
radioDispatchMethod(){
|
|
@@ -1026,6 +1055,9 @@ export class QuickCombinationComponent implements OnInit {
|
1026
|
1055
|
taskTypes: taskTypesIds,
|
1027
|
1056
|
ruleType: this.quickCombinationModelComputed,
|
1028
|
1057
|
workSchemeId: this.queryParamsId,
|
|
1058
|
+ dispatchMethod: this.dispatchMethods.find(v => v.value == this.validateForm.value.quickCombinationDispatchMethod),
|
|
1059
|
+ dispatchType: this.validateForm.value.quickCombinationDispatchMethod == 2 ? (this.dispatchTypes.find(v => v.value == this.validateForm.value.quickCombinationDispatchType)) : undefined,
|
|
1060
|
+ maxWeight: this.validateForm.value.quickCombinationDispatchMethod == 2 ? this.validateForm.value.quickCombinationDispatchWeight : undefined,
|
1029
|
1061
|
},
|
1030
|
1062
|
};
|
1031
|
1063
|
//添加科室字段,绑定人字段
|