Browse Source

app订单结算页面更改;

dev
wurong 1 year ago
parent
commit
0ba7841499
  1. 21
      lib/settlement/settlement.dart

21
lib/settlement/settlement.dart

@ -557,6 +557,9 @@ class _Settlement extends State<Settlement> {
///
queryPlaceOrderFirst() async {
try {
EasyLoading.show(status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
// for (int i = 0; i < settleOrderInfo.orderProductList.length; i++) {
// settleOrderInfo.orderProductList.forEach((element1) {
// if (settleOrderInfo.orderProductList[i].productId ==
@ -584,7 +587,9 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.notes = remakers +
(reservationTime ?? "") +
((subscribeParam?.isEnableSubscribe ?? false) == true
? "预约门店:${((subscribeParam?.stores?.length ?? 0) == 1 ? (subscribeParam.stores[0]) : (subscribeStoresName ?? ""))}"
? "预约门店:${((subscribeParam?.stores?.length ?? 0) == 1
? (subscribeParam.stores[0])
: (subscribeStoresName ?? ""))}"
: "");
placeOrderFirst.numberOfPeople = "$numberOfPeople";
placeOrderFirst.orderSource = 2;
@ -608,10 +613,12 @@ class _Settlement extends State<Settlement> {
// : widget.arguments["cid"] ?? "";
// placeOrderFirst.promotionInfoDTO.useVipPrice = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && (settleOrderInfo.usePlateMoney == false))) ) ? false : useVipPriceSelect;
// placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false : useBenefitSelect;
placeOrderFirst.promotionInfoDTO.discountType = (!placeOrder) ? "AUTO" :settleOrderInfo?.discountType ?? "";
placeOrderFirst.promotionInfoDTO.discountType =
(!placeOrder) ? "AUTO" : settleOrderInfo?.discountType ?? "";
placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
placeOrderFirst.shoppingCartSkuItemList =
settleOrderInfo.orderProductList;
placeOrderFirst.skuItemDTOList = [];
placeOrderFirst.source = 1;
placeOrderFirst.storeId = storeInfo.id;
@ -632,10 +639,11 @@ class _Settlement extends State<Settlement> {
print("error: $error");
});
if (baseData != null && baseData.isSuccess) {
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black);
// EasyLoading.show(status: S.current.zhengzaijiazai,
// maskType: EasyLoadingMaskType.black);
placeOrder = true;
this.downOrder = DownOrder.fromJson(baseData.data);
querySettlement();
await querySettlement();
} else {
// orderButton = false;
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center);
@ -676,6 +684,9 @@ class _Settlement extends State<Settlement> {
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center);
}
}
}finally{
EasyLoading.dismiss();
}
}
///

Loading…
Cancel
Save