枪号回填,v1.2.4

This commit is contained in:
2026-03-04 13:38:26 +08:00
parent 8df16f0787
commit 572c416827
4 changed files with 20 additions and 7 deletions

View File

@@ -37,8 +37,8 @@ android {
// For more information, see: https://flutter.dev/to/review-gradle-config. // For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion targetSdk = flutter.targetSdkVersion
versionCode = 6 versionCode = 7
versionName = "1.2.3" versionName = "1.2.4"
} }
signingConfigs { signingConfigs {

View File

@@ -49,6 +49,7 @@ class ReservationModel {
final String addStatusName; final String addStatusName;
bool hasEdit; bool hasEdit;
final String isEdit; // "1" 表示可以修改信息 final String isEdit; // "1" 表示可以修改信息
final String gunNumber;
// 新增附件相关字段 // 新增附件相关字段
final int isTruckAttachment; // 1为有证件数据 0为缺少 final int isTruckAttachment; // 1为有证件数据 0为缺少
@@ -85,6 +86,7 @@ class ReservationModel {
required this.isEdit, required this.isEdit,
required this.drivingAttachments, required this.drivingAttachments,
required this.hydrogenationAttachments, required this.hydrogenationAttachments,
required this.gunNumber,
}); });
/// 工厂构造函数用于从JSON创建ReservationModel实例 /// 工厂构造函数用于从JSON创建ReservationModel实例
@@ -160,6 +162,7 @@ class ReservationModel {
isEdit: json['isEdit']?.toString() ?? '0', isEdit: json['isEdit']?.toString() ?? '0',
drivingAttachments: drivingList.map((e) => e.toString()).toList(), drivingAttachments: drivingList.map((e) => e.toString()).toList(),
hydrogenationAttachments: hydrogenationList.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, hasHydrogenationAttachment: false,
isEdit: "0", isEdit: "0",
drivingAttachments: [], drivingAttachments: [],
hydrogenationAttachments: [], hydrogenationAttachments: [], gunNumber: '',
); );
} }
@@ -392,7 +395,17 @@ class SiteController extends GetxController with BaseControllerMixin {
text: initialAmount.toStringAsFixed(3), 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; final RxBool isOfflineChecked = false.obs;
Get.dialog( Get.dialog(
@@ -818,7 +831,7 @@ class SiteController extends GetxController with BaseControllerMixin {
} else { } else {
var status = await Permission.photos.request(); var status = await Permission.photos.request();
if (!status.isGranted) { if (!status.isGranted) {
showErrorToast("请在系统设置中开启相册权限"); showErrorToast("请在系统设置中开启存储权限");
return; return;
} }
} }

View File

@@ -228,7 +228,7 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
hasDrivingAttachment: true, hasDrivingAttachment: true,
isEdit: '', isEdit: '',
drivingAttachments: [], drivingAttachments: [],
hydrogenationAttachments: [], hydrogenationAttachments: [], gunNumber: '',
); );
//打开预约列表 //打开预约列表

View File

@@ -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 # 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 # 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. # 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: environment:
sdk: ^3.9.0 sdk: ^3.9.0