bugfix
This commit is contained in:
@@ -16,7 +16,7 @@ enum ReservationStatus {
|
||||
class ReservationModel {
|
||||
final String id;
|
||||
final String plateNumber;
|
||||
final String amount;
|
||||
String amount;
|
||||
final String time;
|
||||
final String contactPerson;
|
||||
final String contactPhone;
|
||||
@@ -481,20 +481,26 @@ class SiteController extends GetxController with BaseControllerMixin {
|
||||
showLoading("确认中");
|
||||
|
||||
try {
|
||||
var responseData = await HttpService.to.post(
|
||||
'appointment/orderAddHyd/completeOrder',
|
||||
data: status == 0
|
||||
? {
|
||||
var responseData;
|
||||
if (addStatus == -1) {
|
||||
responseData = await HttpService.to.post(
|
||||
'appointment/orderAddHyd/rejectOrder',
|
||||
data: {
|
||||
'id': id,
|
||||
'addStatus': addStatus, //完成使用 完成1,未加2
|
||||
"addHydAmount": addHydAmount,
|
||||
}
|
||||
: {
|
||||
'id': id,
|
||||
'state': addStatus, //拒绝使用 -1
|
||||
'state': -1, //拒绝使用
|
||||
"rejectReason": rejectReason,
|
||||
},
|
||||
);
|
||||
} else {
|
||||
responseData = await HttpService.to.post(
|
||||
'appointment/orderAddHyd/completeOrder',
|
||||
data: {
|
||||
'id': id,
|
||||
'addStatus': addStatus, //完成使用 完成1,未加2
|
||||
"addHydAmount": addHydAmount,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
if (responseData == null && responseData!.data == null) {
|
||||
dismissLoading();
|
||||
@@ -507,11 +513,13 @@ class SiteController extends GetxController with BaseControllerMixin {
|
||||
}
|
||||
dismissLoading();
|
||||
|
||||
//addStatus 1完成 2未加 -1拒绝
|
||||
if (addStatus == 1) {
|
||||
item.status = ReservationStatus.completed;
|
||||
item.amount = "${addHydAmount}kg";
|
||||
} else if (addStatus == -1) {
|
||||
item.status = ReservationStatus.rejected;
|
||||
} else if (addStatus == -2) {
|
||||
} else if (addStatus == 2) {
|
||||
item.status = ReservationStatus.pending;
|
||||
}
|
||||
updateUi();
|
||||
|
||||
@@ -559,7 +559,6 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
|
||||
}),
|
||||
preventDuplicates: false,
|
||||
);
|
||||
showToast("555$result");
|
||||
if (result == true) {
|
||||
Get.back();
|
||||
getReservationList();
|
||||
|
||||
Reference in New Issue
Block a user