|
@@ -87,6 +87,9 @@ class MaternalHealthFormValue extends BaseFormValueChange {
|
|
|
case "Last_Period_Date":
|
|
|
onLastPeriodDateChange(e);
|
|
|
break;
|
|
|
+ case "Health_History":
|
|
|
+ onHealthHistoryChange(e);
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -268,8 +271,6 @@ class MaternalHealthFormValue extends BaseFormValueChange {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
void onLastPeriodDateChange(UpdateFormArgs e) {
|
|
|
var targetValue = calculateDueDateString(e.sourceValue);
|
|
|
FormInfo.instance.formValue["EstimatedDeliveryDate"] = targetValue;
|
|
@@ -314,4 +315,59 @@ class MaternalHealthFormValue extends BaseFormValueChange {
|
|
|
|
|
|
return dueDateString;
|
|
|
}
|
|
|
+
|
|
|
+ void onHealthHistoryChange(UpdateFormArgs e) {
|
|
|
+ UpdateFormType type = e.type;
|
|
|
+ bool isDisabledValue = false;
|
|
|
+ if (type == UpdateFormType.Add && e.sourceValue == "Health_History_1") {
|
|
|
+ ///选中了无,则禁用其他选项
|
|
|
+ isDisabledValue = true;
|
|
|
+ } else if (type == UpdateFormType.Remove &&
|
|
|
+ e.sourceValue == "Health_History_1") {
|
|
|
+ ///取消选中无,则取消禁用其他选项
|
|
|
+ isDisabledValue = false;
|
|
|
+ }
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Health_History_2",
|
|
|
+ isDisabledValue: isDisabledValue,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Health_History_3",
|
|
|
+ isDisabledValue: isDisabledValue,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Health_History_4",
|
|
|
+ isDisabledValue: isDisabledValue,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Health_History_5",
|
|
|
+ isDisabledValue: isDisabledValue,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Health_History_6",
|
|
|
+ isDisabledValue: isDisabledValue,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ FormInfo.instance.onChangeTargetValue.emit(
|
|
|
+ this,
|
|
|
+ TargetFormArgs(
|
|
|
+ "Health_History_7",
|
|
|
+ isDisabledValue: isDisabledValue,
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|