diff --git a/ln_jq_app/android/app/build.gradle.kts b/ln_jq_app/android/app/build.gradle.kts index 2539bdf..65f652d 100644 --- a/ln_jq_app/android/app/build.gradle.kts +++ b/ln_jq_app/android/app/build.gradle.kts @@ -37,8 +37,8 @@ android { // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion - versionCode = 6 - versionName = "1.2.3" + versionCode = 7 + versionName = "1.2.4" } signingConfigs { diff --git a/ln_jq_app/lib/pages/b_page/site/controller.dart b/ln_jq_app/lib/pages/b_page/site/controller.dart index 30dc70b..c01d166 100644 --- a/ln_jq_app/lib/pages/b_page/site/controller.dart +++ b/ln_jq_app/lib/pages/b_page/site/controller.dart @@ -49,6 +49,7 @@ class ReservationModel { final String addStatusName; bool hasEdit; final String isEdit; // "1" 表示可以修改信息 + final String gunNumber; // 新增附件相关字段 final int isTruckAttachment; // 1为有证件数据 0为缺少 @@ -85,6 +86,7 @@ class ReservationModel { required this.isEdit, required this.drivingAttachments, required this.hydrogenationAttachments, + required this.gunNumber, }); /// 工厂构造函数,用于从JSON创建ReservationModel实例 @@ -160,6 +162,7 @@ class ReservationModel { isEdit: json['isEdit']?.toString() ?? '0', drivingAttachments: drivingList.map((e) => e.toString()).toList(), hydrogenationAttachments: hydrogenationList.map((e) => e.toString()).toList(), + gunNumber: json['gunNumber']?.toString() ?? '', ); } } @@ -377,7 +380,7 @@ class SiteController extends GetxController with BaseControllerMixin { hasHydrogenationAttachment: false, isEdit: "0", drivingAttachments: [], - hydrogenationAttachments: [], + hydrogenationAttachments: [], gunNumber: '', ); } @@ -392,7 +395,17 @@ class SiteController extends GetxController with BaseControllerMixin { text: initialAmount.toStringAsFixed(3), ); - final RxString selectedGun = (gasGunList.isNotEmpty ? gasGunList.first : '').obs; + //枪号回填 + String initialGun = ''; + if (item.gunNumber.isNotEmpty && gasGunList.contains(item.gunNumber)) { + initialGun = item.gunNumber; // 如果接口有返回且在列表中,则反显 + } else if (gasGunList.isNotEmpty) { + initialGun = gasGunList.first; // 否则默认选第一个 + } + final RxString selectedGun = initialGun.obs; + + + final RxBool isOfflineChecked = false.obs; Get.dialog( @@ -818,7 +831,7 @@ class SiteController extends GetxController with BaseControllerMixin { } else { var status = await Permission.photos.request(); if (!status.isGranted) { - showErrorToast("请在系统设置中开启相册权限"); + showErrorToast("请在系统设置中开启存储权限"); return; } } diff --git a/ln_jq_app/lib/pages/c_page/reservation/controller.dart b/ln_jq_app/lib/pages/c_page/reservation/controller.dart index c8599cf..f0d670a 100644 --- a/ln_jq_app/lib/pages/c_page/reservation/controller.dart +++ b/ln_jq_app/lib/pages/c_page/reservation/controller.dart @@ -228,7 +228,7 @@ class C_ReservationController extends GetxController with BaseControllerMixin { hasDrivingAttachment: true, isEdit: '', drivingAttachments: [], - hydrogenationAttachments: [], + hydrogenationAttachments: [], gunNumber: '', ); //打开预约列表 diff --git a/ln_jq_app/pubspec.yaml b/ln_jq_app/pubspec.yaml index 6ef4730..3c56192 100644 --- a/ln_jq_app/pubspec.yaml +++ b/ln_jq_app/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.2.3+6 +version: 1.2.4+7 environment: sdk: ^3.9.0