|
@@ -1941,6 +1941,19 @@ export class HushijiandanComponent implements OnInit {
|
1941
|
1941
|
}
|
1942
|
1942
|
// 是否加急
|
1943
|
1943
|
allowUrgentChange(e) {
|
|
1944
|
+ // this.urgentReasonValidator = (control: FormControl): { [s: string]: boolean } => {
|
|
1945
|
+ // if (e == 1) {
|
|
1946
|
+ // return { required: true };
|
|
1947
|
+ // }
|
|
1948
|
+ // };
|
|
1949
|
+ if (e == 0) {
|
|
1950
|
+ this.patientForm.get('urgentReason')!.clearValidators();
|
|
1951
|
+ this.patientForm.get('urgentReason')!.markAsPristine();
|
|
1952
|
+ } else {
|
|
1953
|
+ this.patientForm.get('urgentReason')!.setValidators(Validators.required);
|
|
1954
|
+ this.patientForm.get('urgentReason')!.markAsDirty();
|
|
1955
|
+ }
|
|
1956
|
+ this.patientForm.get('urgentReason')!.updateValueAndValidity();
|
1944
|
1957
|
if (this.isYyInspect) {
|
1945
|
1958
|
this.isYyInspect = e == 0;
|
1946
|
1959
|
if (!this.isYyInspect) {
|