Browse Source

fixed : 0018320: 【孕产妇健康管理】第一次产前检查服务记录表,“个人史”缺少“无特殊”项

loki.wu 11 tháng trước cách đây
mục cha
commit
e2a2669330
1 tập tin đã thay đổi với 58 bổ sung2 xóa
  1. 58 2
      lib/pages/form/maternal_health_form.dart

+ 58 - 2
lib/pages/form/maternal_health_form.dart

@@ -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,
+      ),
+    );
+  }
 }