优化问题修改
This commit is contained in:
@@ -12,11 +12,13 @@ enum ReservationStatus {
|
||||
completed, // 完成 ( addStatus: 1)
|
||||
rejected, // 拒绝 ( -1)
|
||||
unadded, // 未加 ( 2)
|
||||
cancel, // 取消预约
|
||||
unknown, // 未知状态
|
||||
}
|
||||
|
||||
class ReservationModel {
|
||||
final String id;
|
||||
final String stationId;
|
||||
final String plateNumber;
|
||||
String amount;
|
||||
final String time;
|
||||
@@ -40,6 +42,7 @@ class ReservationModel {
|
||||
|
||||
ReservationModel({
|
||||
required this.id,
|
||||
required this.stationId,
|
||||
required this.plateNumber,
|
||||
required this.amount,
|
||||
required this.time,
|
||||
@@ -80,6 +83,9 @@ class ReservationModel {
|
||||
case 2:
|
||||
currentStatus = ReservationStatus.unadded;
|
||||
break;
|
||||
case 6:
|
||||
currentStatus = ReservationStatus.cancel;
|
||||
break;
|
||||
default:
|
||||
currentStatus = ReservationStatus.unknown;
|
||||
}
|
||||
@@ -97,6 +103,7 @@ class ReservationModel {
|
||||
return ReservationModel(
|
||||
// 原始字段,用于UI兼容
|
||||
id: json['id']?.toString() ?? '',
|
||||
stationId: json['stationId']?.toString() ?? '',
|
||||
plateNumber: json['plateNumber']?.toString() ?? '未知车牌',
|
||||
amount: '${json['hydAmount']?.toString() ?? '0'}kg',
|
||||
time: timeRange,
|
||||
@@ -193,6 +200,7 @@ class SiteController extends GetxController with BaseControllerMixin {
|
||||
'pageNum': 1,
|
||||
'pageSize': 50, // 暂时不考虑分页,一次获取30条
|
||||
'keyword': searchText, // 加氢站名称、手机号
|
||||
'stationId': StorageService.to.userId
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user