|
|
@ -140,7 +140,9 @@ class _Settlement extends State<Settlement> { |
|
|
|
storeId: storeId, |
|
|
|
storeId: storeId, |
|
|
|
showLoading: false); |
|
|
|
showLoading: false); |
|
|
|
queryMemberInfo(); |
|
|
|
queryMemberInfo(); |
|
|
|
if (widget.arguments["pid"] != null && widget.arguments["pid"] != "" && tableId <= 0) { |
|
|
|
if (widget.arguments["pid"] != null && |
|
|
|
|
|
|
|
widget.arguments["pid"] != "" && |
|
|
|
|
|
|
|
tableId <= 0) { |
|
|
|
queryOrderInfo( |
|
|
|
queryOrderInfo( |
|
|
|
address != null ? address.id : null, |
|
|
|
address != null ? address.id : null, |
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
@ -161,7 +163,9 @@ class _Settlement extends State<Settlement> { |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel, |
|
|
|
payChannel, |
|
|
|
tableId); |
|
|
|
tableId); |
|
|
|
} else if ( widget.arguments["cid"] != null && widget.arguments["cid"] != "" && tableId <= 0) { |
|
|
|
} else if (widget.arguments["cid"] != null && |
|
|
|
|
|
|
|
widget.arguments["cid"] != "" && |
|
|
|
|
|
|
|
tableId <= 0) { |
|
|
|
queryOrderInfo( |
|
|
|
queryOrderInfo( |
|
|
|
address != null ? address.id : null, |
|
|
|
address != null ? address.id : null, |
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
@ -170,7 +174,7 @@ class _Settlement extends State<Settlement> { |
|
|
|
selectedBtn != 2) |
|
|
|
selectedBtn != 2) |
|
|
|
? diningStatus |
|
|
|
? diningStatus |
|
|
|
: selectedBtn, |
|
|
|
: selectedBtn, |
|
|
|
widget.arguments["cid"]??0, |
|
|
|
widget.arguments["cid"] ?? 0, |
|
|
|
0, |
|
|
|
0, |
|
|
|
productId ?? 0, |
|
|
|
productId ?? 0, |
|
|
|
productSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
@ -228,7 +232,9 @@ class _Settlement extends State<Settlement> { |
|
|
|
payChannel, |
|
|
|
payChannel, |
|
|
|
tableId) async { |
|
|
|
tableId) async { |
|
|
|
try { |
|
|
|
try { |
|
|
|
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); |
|
|
|
EasyLoading.show( |
|
|
|
|
|
|
|
status: S.current.zhengzaijiazai, |
|
|
|
|
|
|
|
maskType: EasyLoadingMaskType.black); |
|
|
|
|
|
|
|
|
|
|
|
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({ |
|
|
|
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({ |
|
|
|
"addressId": addressId, |
|
|
|
"addressId": addressId, |
|
|
@ -329,7 +335,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
|
|
|
|
|
|
|
|
///查看订单详情 |
|
|
|
///查看订单详情 |
|
|
|
queryOrderDetails(id) async { |
|
|
|
queryOrderDetails(id) async { |
|
|
|
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); |
|
|
|
EasyLoading.show( |
|
|
|
|
|
|
|
status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); |
|
|
|
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({ |
|
|
|
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({ |
|
|
|
"id": pageType != null ? widget.arguments["orderId"] : id ?? parentId, |
|
|
|
"id": pageType != null ? widget.arguments["orderId"] : id ?? parentId, |
|
|
|
}).catchError((error) {}); |
|
|
|
}).catchError((error) {}); |
|
|
@ -557,129 +564,141 @@ class _Settlement extends State<Settlement> { |
|
|
|
|
|
|
|
|
|
|
|
///小程序下单 |
|
|
|
///小程序下单 |
|
|
|
queryPlaceOrderFirst() async { |
|
|
|
queryPlaceOrderFirst() async { |
|
|
|
// for (int i = 0; i < settleOrderInfo.orderProductList.length; i++) { |
|
|
|
try { |
|
|
|
// settleOrderInfo.orderProductList.forEach((element1) { |
|
|
|
EasyLoading.show( |
|
|
|
// if (settleOrderInfo.orderProductList[i].productId == |
|
|
|
status: S.current.zhengzaijiazai, |
|
|
|
// element1.productId) { |
|
|
|
maskType: EasyLoadingMaskType.black); |
|
|
|
// settleOrderInfo.orderProductList[i].skuId = element1.skuId; |
|
|
|
// for (int i = 0; i < settleOrderInfo.orderProductList.length; i++) { |
|
|
|
// } |
|
|
|
// settleOrderInfo.orderProductList.forEach((element1) { |
|
|
|
// }); |
|
|
|
// if (settleOrderInfo.orderProductList[i].productId == |
|
|
|
// } |
|
|
|
// element1.productId) { |
|
|
|
|
|
|
|
// settleOrderInfo.orderProductList[i].skuId = element1.skuId; |
|
|
|
placeOrderFirst = PlaceOrderFirst(); |
|
|
|
// } |
|
|
|
placeOrderFirst.cartNum = settleOrderInfo.orderNum; |
|
|
|
// }); |
|
|
|
placeOrderFirst.cartSum = settleOrderInfo.price; |
|
|
|
// } |
|
|
|
placeOrderFirst.addressId = address == null ? null : address.id; |
|
|
|
|
|
|
|
placeOrderFirst.isSubscribe = |
|
|
|
|
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true) |
|
|
|
|
|
|
|
? true |
|
|
|
|
|
|
|
: false; //是否预约 |
|
|
|
|
|
|
|
placeOrderFirst.isTakeOut = |
|
|
|
|
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
|
|
|
|
|
(subscribeParam?.isEnableSubscribe ?? false) == false && |
|
|
|
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
|
|
|
selectedBtn != 2) |
|
|
|
|
|
|
|
? diningStatus |
|
|
|
|
|
|
|
: selectedBtn; |
|
|
|
|
|
|
|
placeOrderFirst.notes = remakers + |
|
|
|
|
|
|
|
(reservationTime ?? "") + |
|
|
|
|
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true |
|
|
|
|
|
|
|
? "预约门店:${((subscribeParam?.stores?.length ?? 0) == 1 ? (subscribeParam.stores[0]) : (subscribeStoresName ?? ""))}" |
|
|
|
|
|
|
|
: ""); |
|
|
|
|
|
|
|
placeOrderFirst.numberOfPeople = "$numberOfPeople"; |
|
|
|
|
|
|
|
placeOrderFirst.orderSource = 2; |
|
|
|
|
|
|
|
placeOrderFirst.orderType = "0"; |
|
|
|
|
|
|
|
placeOrderFirst.orderTypeId = 0; |
|
|
|
|
|
|
|
placeOrderFirst.parentCode = parentCode; // 火锅加菜 |
|
|
|
|
|
|
|
placeOrderFirst.parentId = parentId; // 火锅加菜 |
|
|
|
|
|
|
|
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") |
|
|
|
|
|
|
|
? payChannel = 0 |
|
|
|
|
|
|
|
: ((tableId > 0 |
|
|
|
|
|
|
|
? (minOrderInfo?.isRaise ?? false) |
|
|
|
|
|
|
|
: (settleOrderInfo?.isRaise ?? false)) |
|
|
|
|
|
|
|
? 7 |
|
|
|
|
|
|
|
: payChannel)); |
|
|
|
|
|
|
|
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); |
|
|
|
|
|
|
|
placeOrderFirst.promotionInfoDTO.promotionId = |
|
|
|
|
|
|
|
(promotion != null && tableId <= 0) ? promotion.id : ""; |
|
|
|
|
|
|
|
// : widget.arguments["pid"] ?? ""; |
|
|
|
|
|
|
|
placeOrderFirst.promotionInfoDTO.couponId = |
|
|
|
|
|
|
|
(couponListBean != null && tableId <= 0) ? couponListBean.id : ""; |
|
|
|
|
|
|
|
// : 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.recMobile = |
|
|
|
|
|
|
|
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; |
|
|
|
|
|
|
|
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; |
|
|
|
|
|
|
|
placeOrderFirst.skuItemDTOList = []; |
|
|
|
|
|
|
|
placeOrderFirst.source = 1; |
|
|
|
|
|
|
|
placeOrderFirst.storeId = storeInfo.id; |
|
|
|
|
|
|
|
placeOrderFirst.subcribeTime = subTime ?? ""; //预约时间 |
|
|
|
|
|
|
|
placeOrderFirst.tableId = "$tableId"; |
|
|
|
|
|
|
|
for (int i = 0; |
|
|
|
|
|
|
|
i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0); |
|
|
|
|
|
|
|
i++) { |
|
|
|
|
|
|
|
placeOrderFirst.shoppingCartSkuItemList[i].setMealDataList = |
|
|
|
|
|
|
|
shopCarGoods.shoppingCartSkuItemList[i].setMealDataList; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (tableId == 0) { |
|
|
|
placeOrderFirst = PlaceOrderFirst(); |
|
|
|
///正常的商店下单 |
|
|
|
placeOrderFirst.cartNum = settleOrderInfo.orderNum; |
|
|
|
BaseData<dynamic> baseData = await minService |
|
|
|
placeOrderFirst.cartSum = settleOrderInfo.price; |
|
|
|
.placeOrderFirst(placeOrderFirst.toJson()) |
|
|
|
placeOrderFirst.addressId = address == null ? null : address.id; |
|
|
|
.catchError((error) { |
|
|
|
placeOrderFirst.isSubscribe = |
|
|
|
print("error: $error"); |
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true) |
|
|
|
}); |
|
|
|
? true |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
: false; //是否预约 |
|
|
|
EasyLoading.show(status: S.current.zhengzaijiazai,maskType: EasyLoadingMaskType.black); |
|
|
|
placeOrderFirst.isTakeOut = |
|
|
|
placeOrder = true; |
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
|
this.downOrder = DownOrder.fromJson(baseData.data); |
|
|
|
(subscribeParam?.isEnableSubscribe ?? false) == false && |
|
|
|
querySettlement(); |
|
|
|
selectedBtn != 1 && |
|
|
|
} else { |
|
|
|
selectedBtn != 2) |
|
|
|
// orderButton = false; |
|
|
|
? diningStatus |
|
|
|
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center); |
|
|
|
: selectedBtn; |
|
|
|
|
|
|
|
placeOrderFirst.notes = remakers + |
|
|
|
|
|
|
|
(reservationTime ?? "") + |
|
|
|
|
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true |
|
|
|
|
|
|
|
? "预约门店:${((subscribeParam?.stores?.length ?? 0) == 1 ? (subscribeParam.stores[0]) : (subscribeStoresName ?? ""))}" |
|
|
|
|
|
|
|
: ""); |
|
|
|
|
|
|
|
placeOrderFirst.numberOfPeople = "$numberOfPeople"; |
|
|
|
|
|
|
|
placeOrderFirst.orderSource = 2; |
|
|
|
|
|
|
|
placeOrderFirst.orderType = "0"; |
|
|
|
|
|
|
|
placeOrderFirst.orderTypeId = 0; |
|
|
|
|
|
|
|
placeOrderFirst.parentCode = parentCode; // 火锅加菜 |
|
|
|
|
|
|
|
placeOrderFirst.parentId = parentId; // 火锅加菜 |
|
|
|
|
|
|
|
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") |
|
|
|
|
|
|
|
? payChannel = 0 |
|
|
|
|
|
|
|
: ((tableId > 0 |
|
|
|
|
|
|
|
? (minOrderInfo?.isRaise ?? false) |
|
|
|
|
|
|
|
: (settleOrderInfo?.isRaise ?? false)) |
|
|
|
|
|
|
|
? 7 |
|
|
|
|
|
|
|
: payChannel)); |
|
|
|
|
|
|
|
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); |
|
|
|
|
|
|
|
placeOrderFirst.promotionInfoDTO.promotionId = |
|
|
|
|
|
|
|
(promotion != null && tableId <= 0) ? promotion.id : ""; |
|
|
|
|
|
|
|
// : widget.arguments["pid"] ?? ""; |
|
|
|
|
|
|
|
placeOrderFirst.promotionInfoDTO.couponId = |
|
|
|
|
|
|
|
(couponListBean != null && tableId <= 0) ? couponListBean.id : ""; |
|
|
|
|
|
|
|
// : 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.recMobile = |
|
|
|
|
|
|
|
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; |
|
|
|
|
|
|
|
placeOrderFirst.shoppingCartSkuItemList = |
|
|
|
|
|
|
|
settleOrderInfo.orderProductList; |
|
|
|
|
|
|
|
placeOrderFirst.skuItemDTOList = []; |
|
|
|
|
|
|
|
placeOrderFirst.source = 1; |
|
|
|
|
|
|
|
placeOrderFirst.storeId = storeInfo.id; |
|
|
|
|
|
|
|
placeOrderFirst.subcribeTime = subTime ?? ""; //预约时间 |
|
|
|
|
|
|
|
placeOrderFirst.tableId = "$tableId"; |
|
|
|
|
|
|
|
for (int i = 0; |
|
|
|
|
|
|
|
i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0); |
|
|
|
|
|
|
|
i++) { |
|
|
|
|
|
|
|
placeOrderFirst.shoppingCartSkuItemList[i].setMealDataList = |
|
|
|
|
|
|
|
shopCarGoods.shoppingCartSkuItemList[i].setMealDataList; |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
///火锅店下单, 等待结算 |
|
|
|
if (tableId == 0) { |
|
|
|
BaseData<dynamic> baseData; |
|
|
|
///正常的商店下单 |
|
|
|
if (placeOrder) { |
|
|
|
BaseData<dynamic> baseData = await minService |
|
|
|
// 结算 |
|
|
|
.placeOrderFirst(placeOrderFirst.toJson()) |
|
|
|
querySettlement(); |
|
|
|
.catchError((error) { |
|
|
|
return; |
|
|
|
print("error: $error"); |
|
|
|
} else { |
|
|
|
}); |
|
|
|
if (parentId == "") { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
// 下单 |
|
|
|
// EasyLoading.show( |
|
|
|
baseData = await minService |
|
|
|
// status: S.current.zhengzaijiazai, |
|
|
|
.placeOrderFirst(placeOrderFirst.toJson()) |
|
|
|
// maskType: EasyLoadingMaskType.black); |
|
|
|
.catchError((error) { |
|
|
|
placeOrder = true; |
|
|
|
print("error: $error"); |
|
|
|
this.downOrder = DownOrder.fromJson(baseData.data); |
|
|
|
}); |
|
|
|
await querySettlement(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//加菜 |
|
|
|
// orderButton = false; |
|
|
|
baseData = await minService |
|
|
|
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center); |
|
|
|
.addOrder(placeOrderFirst.toJson()) |
|
|
|
|
|
|
|
.catchError((error) { |
|
|
|
|
|
|
|
print("error: $error"); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// orderButton = false; |
|
|
|
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
|
|
|
placeOrder = true; |
|
|
|
|
|
|
|
this.downOrder = DownOrder.fromJson(baseData.data); |
|
|
|
|
|
|
|
parentId = this.downOrder.id ?? this.downOrder.parentId; |
|
|
|
|
|
|
|
queryOrderDetails(parentId); |
|
|
|
|
|
|
|
setState(() {}); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
///火锅店下单, 等待结算 |
|
|
|
|
|
|
|
BaseData<dynamic> baseData; |
|
|
|
|
|
|
|
if (placeOrder) { |
|
|
|
|
|
|
|
// 结算 |
|
|
|
|
|
|
|
querySettlement(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (parentId == "") { |
|
|
|
|
|
|
|
// 下单 |
|
|
|
|
|
|
|
baseData = await minService |
|
|
|
|
|
|
|
.placeOrderFirst(placeOrderFirst.toJson()) |
|
|
|
|
|
|
|
.catchError((error) { |
|
|
|
|
|
|
|
print("error: $error"); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
//加菜 |
|
|
|
|
|
|
|
baseData = await minService |
|
|
|
|
|
|
|
.addOrder(placeOrderFirst.toJson()) |
|
|
|
|
|
|
|
.catchError((error) { |
|
|
|
|
|
|
|
print("error: $error"); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// orderButton = false; |
|
|
|
// orderButton = false; |
|
|
|
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center); |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
|
|
|
placeOrder = true; |
|
|
|
|
|
|
|
this.downOrder = DownOrder.fromJson(baseData.data); |
|
|
|
|
|
|
|
parentId = this.downOrder.id ?? this.downOrder.parentId; |
|
|
|
|
|
|
|
queryOrderDetails(parentId); |
|
|
|
|
|
|
|
setState(() {}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// orderButton = false; |
|
|
|
|
|
|
|
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
// EasyLoading.dismiss(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
///结算 |
|
|
|
///结算 |
|
|
|
querySettlement() async { |
|
|
|
querySettlement() async { |
|
|
|
|
|
|
|
try{ |
|
|
|
placeOrderFirst.id = ((parentId != "") ? parentId : downOrder.id); |
|
|
|
placeOrderFirst.id = ((parentId != "") ? parentId : downOrder.id); |
|
|
|
placeOrderFirst.orderProductVOList = ((downOrder == null) |
|
|
|
placeOrderFirst.orderProductVOList = ((downOrder == null) |
|
|
|
? minOrderInfo.orderProductVOList |
|
|
|
? minOrderInfo.orderProductVOList |
|
|
@ -716,10 +735,10 @@ class _Settlement extends State<Settlement> { |
|
|
|
timeStamp: int.tryParse(wxPay.timeStamp), |
|
|
|
timeStamp: int.tryParse(wxPay.timeStamp), |
|
|
|
sign: wxPay.sign, |
|
|
|
sign: wxPay.sign, |
|
|
|
); |
|
|
|
); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
EasyLoading.dismiss(); |
|
|
|
EasyLoading.dismiss(); |
|
|
|
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
Future.delayed(Duration(seconds:2), () { |
|
|
|
Future.delayed(Duration(seconds: 2), () { |
|
|
|
toOrderDetails(placeOrderFirst.id); |
|
|
|
toOrderDetails(placeOrderFirst.id); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -743,6 +762,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
text: "${baseData?.msg}", |
|
|
|
text: "${baseData?.msg}", |
|
|
|
)); |
|
|
|
)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}}finally{ |
|
|
|
|
|
|
|
EasyLoading.dismiss(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -950,8 +971,10 @@ class _Settlement extends State<Settlement> { |
|
|
|
|
|
|
|
|
|
|
|
///会员优惠选择 |
|
|
|
///会员优惠选择 |
|
|
|
if ((settleOrderInfo != null || |
|
|
|
if ((settleOrderInfo != null || |
|
|
|
minOrderInfo != null) && (placeOrder && tableId <= 0 && |
|
|
|
minOrderInfo != null) && |
|
|
|
!(settleOrderInfo?.isRaise ?? false))) |
|
|
|
(placeOrder && |
|
|
|
|
|
|
|
tableId <= 0 && |
|
|
|
|
|
|
|
!(settleOrderInfo?.isRaise ?? false))) |
|
|
|
VipDiscountsSelect( |
|
|
|
VipDiscountsSelect( |
|
|
|
vipSelectCheck, |
|
|
|
vipSelectCheck, |
|
|
|
settleOrderInfo, |
|
|
|
settleOrderInfo, |
|
|
@ -1534,13 +1557,19 @@ class _Settlement extends State<Settlement> { |
|
|
|
selectedBtn != 2) |
|
|
|
selectedBtn != 2) |
|
|
|
? diningStatus |
|
|
|
? diningStatus |
|
|
|
: selectedBtn, |
|
|
|
: selectedBtn, |
|
|
|
((couponBean?.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? 0: couponBean?.id, |
|
|
|
((couponBean?.id ?? 0) == 0 && (promotion?.id ?? productId ?? 0) != 0) |
|
|
|
|
|
|
|
? 0 |
|
|
|
|
|
|
|
: couponBean?.id, |
|
|
|
0, |
|
|
|
0, |
|
|
|
((couponBean?.id??0) == 0 && (promotion?.id ?? productId ?? 0) !=0) ? promotion?.id ?? productId :0, |
|
|
|
((couponBean?.id ?? 0) == 0 && (promotion?.id ?? productId ?? 0) != 0) |
|
|
|
|
|
|
|
? promotion?.id ?? productId |
|
|
|
|
|
|
|
: 0, |
|
|
|
productSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
(couponBean?.id ?? 0) == 0 ? ((promotion?.id ?? productId ?? 0) !=0 ? "ACTIVITY":"AUTO") : "COUPON", |
|
|
|
(couponBean?.id ?? 0) == 0 |
|
|
|
|
|
|
|
? ((promotion?.id ?? productId ?? 0) != 0 ? "ACTIVITY" : "AUTO") |
|
|
|
|
|
|
|
: "COUPON", |
|
|
|
// useVipPriceSelect, |
|
|
|
// useVipPriceSelect, |
|
|
|
// useBenefitSelect, |
|
|
|
// useBenefitSelect, |
|
|
|
count1, |
|
|
|
count1, |
|
|
@ -1574,13 +1603,21 @@ class _Settlement extends State<Settlement> { |
|
|
|
selectedBtn != 2) |
|
|
|
selectedBtn != 2) |
|
|
|
? diningStatus |
|
|
|
? diningStatus |
|
|
|
: selectedBtn, |
|
|
|
: selectedBtn, |
|
|
|
(((pro?.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0)?couponListBean?.id:0, |
|
|
|
(((pro?.id ?? 0) ?? (productId ?? 0)) == 0 && |
|
|
|
|
|
|
|
(couponListBean?.id ?? 0) != 0) |
|
|
|
|
|
|
|
? couponListBean?.id |
|
|
|
|
|
|
|
: 0, |
|
|
|
0, |
|
|
|
0, |
|
|
|
(((pro?.id ?? 0) ?? (productId ?? 0)) == 0 && (couponListBean?.id ??0) != 0) ? 0 :((pro?.id ?? 0) ?? productId), |
|
|
|
(((pro?.id ?? 0) ?? (productId ?? 0)) == 0 && |
|
|
|
|
|
|
|
(couponListBean?.id ?? 0) != 0) |
|
|
|
|
|
|
|
? 0 |
|
|
|
|
|
|
|
: ((pro?.id ?? 0) ?? productId), |
|
|
|
productSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
(((pro?.id ?? 0) ?? (productId ?? 0)) == 0 ? ((couponListBean?.id ??0) != 0 ? "COUPON":"AUTO") : "ACTIVITY"), |
|
|
|
(((pro?.id ?? 0) ?? (productId ?? 0)) == 0 |
|
|
|
|
|
|
|
? ((couponListBean?.id ?? 0) != 0 ? "COUPON" : "AUTO") |
|
|
|
|
|
|
|
: "ACTIVITY"), |
|
|
|
// useVipPriceSelect, |
|
|
|
// useVipPriceSelect, |
|
|
|
// useBenefitSelect, |
|
|
|
// useBenefitSelect, |
|
|
|
count1, |
|
|
|
count1, |
|
|
|