Browse Source

0018683: 【新建档案】登录账号后立即点击“新建档案-手动录入“,点击姓名和身份证,未弹出输入框,无法手动录入

finlay 11 months ago
parent
commit
e41fd41537
2 changed files with 20 additions and 8 deletions
  1. 12 0
      lib/pages/patient_info/view.dart
  2. 8 8
      lib/routes/routes.dart

+ 12 - 0
lib/pages/patient_info/view.dart

@@ -50,6 +50,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
 
 
   List<Widget> _buildBaseInfo(BuildContext context) {
   List<Widget> _buildBaseInfo(BuildContext context) {
     final state = controller.state;
     final state = controller.state;
+
     return [
     return [
       Obx(
       Obx(
         () => VListFormCell(
         () => VListFormCell(
@@ -57,6 +58,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
           content: controller.state.name,
           content: controller.state.name,
           isRequired: isRequiredName,
           isRequired: isRequiredName,
           onTap: () async {
           onTap: () async {
+            Get.lazyPut(() => PatientInfomationController());
             final result = await VDialogInput(
             final result = await VDialogInput(
               title: "姓名",
               title: "姓名",
               initialValue: controller.state.name,
               initialValue: controller.state.name,
@@ -77,6 +79,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
           onTap: () async {
           onTap: () async {
             if (isCanEditId) {
             if (isCanEditId) {
               print("点击修改证件号");
               print("点击修改证件号");
+              Get.lazyPut(() => PatientInfomationController());
               final result = await VDialogInput(
               final result = await VDialogInput(
                 title: "证件号",
                 title: "证件号",
                 initialValue: controller.state.cardNo,
                 initialValue: controller.state.cardNo,
@@ -110,6 +113,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
             label: "人群分类",
             label: "人群分类",
             content: controller.state.labels.join("、"),
             content: controller.state.labels.join("、"),
             onTap: () async {
             onTap: () async {
+              Get.lazyPut(() => PatientInfomationController());
               var allLabels = await Get.find<ILabelManager>().getAllLabels();
               var allLabels = await Get.find<ILabelManager>().getAllLabels();
               final result = await Get.dialog(
               final result = await Get.dialog(
                 VDialogLabelSelect(
                 VDialogLabelSelect(
@@ -129,6 +133,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
           label: "联系电话",
           label: "联系电话",
           content: controller.state.phoneNo,
           content: controller.state.phoneNo,
           onTap: () async {
           onTap: () async {
+            Get.lazyPut(() => PatientInfomationController());
             final result = await VDialogInput(
             final result = await VDialogInput(
               title: "联系电话",
               title: "联系电话",
               initialValue: controller.state.phoneNo,
               initialValue: controller.state.phoneNo,
@@ -155,6 +160,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
           label: "联系人姓名",
           label: "联系人姓名",
           content: controller.state.emergencyName,
           content: controller.state.emergencyName,
           onTap: () async {
           onTap: () async {
+            Get.lazyPut(() => PatientInfomationController());
             final result = await VDialogInput(
             final result = await VDialogInput(
               title: "联系人姓名",
               title: "联系人姓名",
               initialValue: controller.state.emergencyName,
               initialValue: controller.state.emergencyName,
@@ -172,6 +178,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
           label: "联系人电话",
           label: "联系人电话",
           content: controller.state.emergencyPhone,
           content: controller.state.emergencyPhone,
           onTap: () async {
           onTap: () async {
+            Get.lazyPut(() => PatientInfomationController());
             final result = await VDialogInput(
             final result = await VDialogInput(
               title: "联系人电话",
               title: "联系人电话",
               initialValue: controller.state.emergencyPhone,
               initialValue: controller.state.emergencyPhone,
@@ -198,6 +205,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
           label: "性别",
           label: "性别",
           content: RpcEnumLabels.gender[state.gender],
           content: RpcEnumLabels.gender[state.gender],
           onTap: () async {
           onTap: () async {
+            Get.lazyPut(() => PatientInfomationController());
             final result = await VDialogSelect<GenderEnum, GenderEnum>(
             final result = await VDialogSelect<GenderEnum, GenderEnum>(
               title: "选择性别",
               title: "选择性别",
               source: const [
               source: const [
@@ -222,6 +230,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
           label: "民族",
           label: "民族",
           content: state.nation,
           content: state.nation,
           onTap: () async {
           onTap: () async {
+            Get.lazyPut(() => PatientInfomationController());
             final result = await VDialogSelect<String, String>(
             final result = await VDialogSelect<String, String>(
               title: "选择民族",
               title: "选择民族",
               source: Nations.china,
               source: Nations.china,
@@ -245,6 +254,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
               ? DataTimeUtils.formatDateString(controller.state.birthday!)
               ? DataTimeUtils.formatDateString(controller.state.birthday!)
               : "",
               : "",
           onTap: () async {
           onTap: () async {
+            Get.lazyPut(() => PatientInfomationController());
             bool _isLocalStation = AppParameters.data.isLocalStation;
             bool _isLocalStation = AppParameters.data.isLocalStation;
             DateTime? result;
             DateTime? result;
             if (kIsWeb || _isLocalStation) {
             if (kIsWeb || _isLocalStation) {
@@ -296,6 +306,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
           label: "户籍地址",
           label: "户籍地址",
           content: controller.state.permanentResidenceAddress,
           content: controller.state.permanentResidenceAddress,
           onTap: () async {
           onTap: () async {
+            Get.lazyPut(() => PatientInfomationController());
             final result = await VDialogInput(
             final result = await VDialogInput(
               title: "户籍地址",
               title: "户籍地址",
               initialValue: controller.state.permanentResidenceAddress,
               initialValue: controller.state.permanentResidenceAddress,
@@ -313,6 +324,7 @@ class PatientInfomationPage extends GetView<PatientInfomationController> {
           label: "现住地址",
           label: "现住地址",
           content: controller.state.address,
           content: controller.state.address,
           onTap: () async {
           onTap: () async {
+            Get.lazyPut(() => PatientInfomationController());
             final result = await VDialogInput(
             final result = await VDialogInput(
               title: "现住地址",
               title: "现住地址",
               initialValue: controller.state.address,
               initialValue: controller.state.address,

+ 8 - 8
lib/routes/routes.dart

@@ -190,16 +190,16 @@ class Routes {
       // preventDuplicates: true,
       // preventDuplicates: true,
       () => const QuickCreatePatientPage(),
       () => const QuickCreatePatientPage(),
       binding: BindingsBuilder(
       binding: BindingsBuilder(
-        () {
+        () async {
           if (Get.isRegistered<PatientInfomationController>()) {
           if (Get.isRegistered<PatientInfomationController>()) {
-            Get.delete<PatientInfomationController>();
+            await Get.delete<PatientInfomationController>();
           }
           }
-          Get.put(PatientInfomationController());
+          Get.put<PatientInfomationController>(PatientInfomationController());
 
 
           Get.lazyPut(() => CrowdLabelsController());
           Get.lazyPut(() => CrowdLabelsController());
 
 
           if (Get.isRegistered<CreatePatientController>()) {
           if (Get.isRegistered<CreatePatientController>()) {
-            Get.delete<CreatePatientController>();
+            await Get.delete<CreatePatientController>();
           }
           }
           Get.put(CreatePatientController());
           Get.put(CreatePatientController());
         },
         },
@@ -211,9 +211,9 @@ class Routes {
       // preventDuplicates: true,
       // preventDuplicates: true,
       () => const PatientListPage(),
       () => const PatientListPage(),
       binding: BindingsBuilder(
       binding: BindingsBuilder(
-        () {
+        () async {
           if (Get.isRegistered<PatientInfomationController>()) {
           if (Get.isRegistered<PatientInfomationController>()) {
-            Get.delete<PatientInfomationController>();
+            await Get.delete<PatientInfomationController>();
           }
           }
           Get.put(PatientInfomationController());
           Get.put(PatientInfomationController());
           Get.lazyPut(() => CrowdLabelsController());
           Get.lazyPut(() => CrowdLabelsController());
@@ -237,9 +237,9 @@ class Routes {
       "/patient/info",
       "/patient/info",
       () => const PatientInfoPage(),
       () => const PatientInfoPage(),
       binding: BindingsBuilder(
       binding: BindingsBuilder(
-        () {
+        () async {
           if (Get.isRegistered<PatientInfomationController>()) {
           if (Get.isRegistered<PatientInfomationController>()) {
-            Get.delete<PatientInfomationController>();
+            await Get.delete<PatientInfomationController>();
             Get.put(PatientInfomationController());
             Get.put(PatientInfomationController());
           } else {
           } else {
             Get.put(PatientInfomationController());
             Get.put(PatientInfomationController());