|
|
@ -180,7 +180,11 @@ class _Settlement extends State<Settlement> { |
|
|
|
productSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
(isVips == false || !placeOrder ) ? ((vipLevelName == "黄金会员" && placeOrder) ? "MEMBER_RANK" :"NONE"):"VIP", |
|
|
|
(isVips == false || !placeOrder) |
|
|
|
|
|
|
|
? ((vipLevelName == "黄金会员" && placeOrder) |
|
|
|
|
|
|
|
? "MEMBER_RANK" |
|
|
|
|
|
|
|
: "NONE") |
|
|
|
|
|
|
|
: "AUTO", |
|
|
|
// useVipPriceSelect, |
|
|
|
// useVipPriceSelect, |
|
|
|
// (useVipPriceSelect == true && isVips) ? false:useBenefitSelect, |
|
|
|
// (useVipPriceSelect == true && isVips) ? false:useBenefitSelect, |
|
|
|
count1, |
|
|
|
count1, |
|
|
@ -213,72 +217,79 @@ class _Settlement extends State<Settlement> { |
|
|
|
try { |
|
|
|
try { |
|
|
|
EasyLoading.show(status: S.current.zhengzaijiazai); |
|
|
|
EasyLoading.show(status: S.current.zhengzaijiazai); |
|
|
|
|
|
|
|
|
|
|
|
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({ |
|
|
|
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({ |
|
|
|
"addressId": addressId, |
|
|
|
"addressId": addressId, |
|
|
|
"isTake": isTake, |
|
|
|
"isTake": isTake, |
|
|
|
"memberCouponId": memberCouponId, |
|
|
|
"memberCouponId": memberCouponId, |
|
|
|
"orderId": orderId, |
|
|
|
"orderId": orderId, |
|
|
|
"promotionId": promotionId, |
|
|
|
"promotionId": promotionId, |
|
|
|
"productSkuId": productSkuId, |
|
|
|
"productSkuId": productSkuId, |
|
|
|
"actProductId": actProductId, |
|
|
|
"actProductId": actProductId, |
|
|
|
"actProductSkuId": actProductSkuId, |
|
|
|
"actProductSkuId": actProductSkuId, |
|
|
|
"discountType":discountType, |
|
|
|
"discountType": discountType, |
|
|
|
// "useVipPrice":useVipPriceSelect, |
|
|
|
// "useVipPrice":useVipPriceSelect, |
|
|
|
// "useBenefit": useBenefitSelect, |
|
|
|
// "useBenefit": useBenefitSelect, |
|
|
|
"buyNum": buyNum, |
|
|
|
"buyNum": buyNum, |
|
|
|
"payChannel":payChannel, |
|
|
|
"payChannel": payChannel, |
|
|
|
"tableId": tableId |
|
|
|
"tableId": tableId |
|
|
|
}).catchError((error) {}); |
|
|
|
}).catchError((error) {}); |
|
|
|
this.promotion = null; |
|
|
|
this.promotion = null; |
|
|
|
promotions = ""; |
|
|
|
promotions = ""; |
|
|
|
this.couponListBean = null; |
|
|
|
this.couponListBean = null; |
|
|
|
coupons = ""; |
|
|
|
coupons = ""; |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
settleOrderInfo = baseData.data; |
|
|
|
settleOrderInfo = baseData.data; |
|
|
|
if ((settleOrderInfo?.promotionId ?? "") != "") { |
|
|
|
if ((settleOrderInfo?.promotionId ?? "") != "") { |
|
|
|
settleOrderInfo.promotionInfoList.forEach((element) { |
|
|
|
settleOrderInfo.promotionInfoList.forEach((element) { |
|
|
|
if (element.id == settleOrderInfo.promotionId) { |
|
|
|
if (element.id == settleOrderInfo.promotionId) { |
|
|
|
this.promotion = element; |
|
|
|
this.promotion = element; |
|
|
|
promotions = promotion?.name ?? ""; |
|
|
|
promotions = promotion?.name ?? ""; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
if ((settleOrderInfo?.memberCouponId ?? "") != "") { |
|
|
|
if ((settleOrderInfo?.memberCouponId ?? "") != "") { |
|
|
|
settleOrderInfo.couponList.forEach((element) { |
|
|
|
settleOrderInfo.couponList.forEach((element) { |
|
|
|
if (element.id == settleOrderInfo.memberCouponId) { |
|
|
|
if (element.id == settleOrderInfo.memberCouponId) { |
|
|
|
this.couponListBean = element; |
|
|
|
this.couponListBean = element; |
|
|
|
coupons = couponListBean?.promotionName ?? ""; |
|
|
|
coupons = couponListBean?.promotionName ?? ""; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
if (settleOrderInfo.orderProductList == null || |
|
|
|
if (settleOrderInfo.orderProductList == null || |
|
|
|
settleOrderInfo.orderProductList.length == 0) { |
|
|
|
settleOrderInfo.orderProductList.length == 0) { |
|
|
|
placeOrder = true; |
|
|
|
placeOrder = true; |
|
|
|
queryOrderDetails( |
|
|
|
queryOrderDetails( |
|
|
|
pageType != null ? widget.arguments["orderId"] : parentId); |
|
|
|
pageType != null ? widget.arguments["orderId"] : parentId); |
|
|
|
} |
|
|
|
} |
|
|
|
if(!isRaiseChannel && (tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false))){ |
|
|
|
if (!isRaiseChannel && |
|
|
|
isRaiseChannel = true; |
|
|
|
(tableId > 0 |
|
|
|
queryOrderInfo( |
|
|
|
? (minOrderInfo?.isRaise ?? false) |
|
|
|
address?.id, |
|
|
|
: (settleOrderInfo?.isRaise ?? false))) { |
|
|
|
selectedBtn, |
|
|
|
isRaiseChannel = true; |
|
|
|
couponListBean?.id, |
|
|
|
queryOrderInfo( |
|
|
|
0, |
|
|
|
address?.id, |
|
|
|
promotion?.id ?? productId, |
|
|
|
selectedBtn, |
|
|
|
productSkuId ?? "", |
|
|
|
couponListBean?.id, |
|
|
|
actProductId ?? "", |
|
|
|
0, |
|
|
|
actProductSkuId ?? "", |
|
|
|
promotion?.id ?? productId, |
|
|
|
"NONE", |
|
|
|
productSkuId ?? "", |
|
|
|
// useVipPriceSelect, |
|
|
|
actProductId ?? "", |
|
|
|
// useBenefitSelect, |
|
|
|
actProductSkuId ?? "", |
|
|
|
count1, |
|
|
|
"NONE", |
|
|
|
(tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false)) ? 7 :payChannel, |
|
|
|
// useVipPriceSelect, |
|
|
|
tableId); |
|
|
|
// useBenefitSelect, |
|
|
|
|
|
|
|
count1, |
|
|
|
|
|
|
|
(tableId > 0 |
|
|
|
|
|
|
|
? (minOrderInfo?.isRaise ?? false) |
|
|
|
|
|
|
|
: (settleOrderInfo?.isRaise ?? false)) |
|
|
|
|
|
|
|
? 7 |
|
|
|
|
|
|
|
: payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} finally { |
|
|
|
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}finally{ |
|
|
|
|
|
|
|
setState(() {}); |
|
|
|
setState(() {}); |
|
|
|
EasyLoading.dismiss(); |
|
|
|
EasyLoading.dismiss(); |
|
|
|
} |
|
|
|
} |
|
|
@ -343,29 +354,29 @@ class _Settlement extends State<Settlement> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
queryAddress(int selectedBtn) async { |
|
|
|
queryAddress(int selectedBtn) async { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
this.selectedBtn = selectedBtn; |
|
|
|
this.selectedBtn = selectedBtn; |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (address != null) { |
|
|
|
if (address != null) { |
|
|
|
queryOrderInfo( |
|
|
|
queryOrderInfo( |
|
|
|
address.id, |
|
|
|
address.id, |
|
|
|
selectedBtn, |
|
|
|
selectedBtn, |
|
|
|
null, |
|
|
|
null, |
|
|
|
0, |
|
|
|
0, |
|
|
|
productId ?? null, |
|
|
|
productId ?? null, |
|
|
|
productSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
"AUTO", |
|
|
|
"AUTO", |
|
|
|
// useVipPriceSelect, |
|
|
|
// useVipPriceSelect, |
|
|
|
// useBenefitSelect, |
|
|
|
// useBenefitSelect, |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel, |
|
|
|
payChannel, |
|
|
|
tableId); |
|
|
|
tableId); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
BaseData<List<Address>> baseDate = |
|
|
|
BaseData<List<Address>> baseDate = |
|
|
|
await minService.queryAddress().catchError((error) {}); |
|
|
|
await minService.queryAddress().catchError((error) {}); |
|
|
|
|
|
|
|
|
|
|
|
BMFCoordinate bmfCoordinate = BMFCoordinate( |
|
|
|
BMFCoordinate bmfCoordinate = BMFCoordinate( |
|
|
|
double.tryParse(storeInfo.latitude), |
|
|
|
double.tryParse(storeInfo.latitude), |
|
|
@ -393,30 +404,30 @@ class _Settlement extends State<Settlement> { |
|
|
|
fromType: BMF_COORD_TYPE.COMMON, |
|
|
|
fromType: BMF_COORD_TYPE.COMMON, |
|
|
|
toType: BMF_COORD_TYPE.BD09LL); |
|
|
|
toType: BMF_COORD_TYPE.BD09LL); |
|
|
|
|
|
|
|
|
|
|
|
double mi = await BMFCalculateUtils.getLocationDistance( |
|
|
|
double mi = await BMFCalculateUtils.getLocationDistance( |
|
|
|
bmfCoordinate, coordinate); |
|
|
|
bmfCoordinate, coordinate); |
|
|
|
double mi1 = await BMFCalculateUtils.getLocationDistance( |
|
|
|
double mi1 = await BMFCalculateUtils.getLocationDistance( |
|
|
|
bmfCoordinate, coordinate1); |
|
|
|
bmfCoordinate, coordinate1); |
|
|
|
if (mi1 < mi) { |
|
|
|
if (mi1 < mi) { |
|
|
|
address = address1; |
|
|
|
address = address1; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
await queryOrderInfo( |
|
|
|
|
|
|
|
address.id, |
|
|
|
|
|
|
|
selectedBtn, |
|
|
|
|
|
|
|
null, |
|
|
|
|
|
|
|
0, |
|
|
|
|
|
|
|
productId ?? null, |
|
|
|
|
|
|
|
productSkuId ?? "", |
|
|
|
|
|
|
|
actProductId ?? "", |
|
|
|
|
|
|
|
actProductSkuId ?? "", |
|
|
|
|
|
|
|
"AUTO", |
|
|
|
|
|
|
|
// useVipPriceSelect, |
|
|
|
|
|
|
|
// useBenefitSelect, |
|
|
|
|
|
|
|
count1, |
|
|
|
|
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
await queryOrderInfo( |
|
|
|
|
|
|
|
address.id, |
|
|
|
|
|
|
|
selectedBtn, |
|
|
|
|
|
|
|
null, |
|
|
|
|
|
|
|
0, |
|
|
|
|
|
|
|
productId ?? null, |
|
|
|
|
|
|
|
productSkuId ?? "", |
|
|
|
|
|
|
|
actProductId ?? "", |
|
|
|
|
|
|
|
actProductSkuId ?? "", |
|
|
|
|
|
|
|
"AUTO", |
|
|
|
|
|
|
|
// useVipPriceSelect, |
|
|
|
|
|
|
|
// useBenefitSelect, |
|
|
|
|
|
|
|
count1, |
|
|
|
|
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
///选择收货地址 |
|
|
|
///选择收货地址 |
|
|
@ -530,7 +541,13 @@ class _Settlement extends State<Settlement> { |
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true) |
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true) |
|
|
|
? true |
|
|
|
? true |
|
|
|
: false; //是否预约 |
|
|
|
: false; //是否预约 |
|
|
|
placeOrderFirst.isTakeOut = ((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && (subscribeParam?.isEnableSubscribe ?? false) == false && selectedBtn!=1&&selectedBtn!=2) ? diningStatus : selectedBtn; |
|
|
|
placeOrderFirst.isTakeOut = |
|
|
|
|
|
|
|
((storeInfo?.pickupType?.dineInTakeStatus ?? false) == true && |
|
|
|
|
|
|
|
(subscribeParam?.isEnableSubscribe ?? false) == false && |
|
|
|
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
|
|
|
selectedBtn != 2) |
|
|
|
|
|
|
|
? diningStatus |
|
|
|
|
|
|
|
: selectedBtn; |
|
|
|
placeOrderFirst.notes = remakers + |
|
|
|
placeOrderFirst.notes = remakers + |
|
|
|
(reservationTime ?? "") + |
|
|
|
(reservationTime ?? "") + |
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true |
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true |
|
|
@ -542,7 +559,13 @@ class _Settlement extends State<Settlement> { |
|
|
|
placeOrderFirst.orderTypeId = 0; |
|
|
|
placeOrderFirst.orderTypeId = 0; |
|
|
|
placeOrderFirst.parentCode = parentCode; // 火锅加菜 |
|
|
|
placeOrderFirst.parentCode = parentCode; // 火锅加菜 |
|
|
|
placeOrderFirst.parentId = parentId; // 火锅加菜 |
|
|
|
placeOrderFirst.parentId = parentId; // 火锅加菜 |
|
|
|
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") ? payChannel = 0 : ((tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false)) ? 7:payChannel)); |
|
|
|
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") |
|
|
|
|
|
|
|
? payChannel = 0 |
|
|
|
|
|
|
|
: ((tableId > 0 |
|
|
|
|
|
|
|
? (minOrderInfo?.isRaise ?? false) |
|
|
|
|
|
|
|
: (settleOrderInfo?.isRaise ?? false)) |
|
|
|
|
|
|
|
? 7 |
|
|
|
|
|
|
|
: payChannel)); |
|
|
|
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); |
|
|
|
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); |
|
|
|
placeOrderFirst.promotionInfoDTO.promotionId = |
|
|
|
placeOrderFirst.promotionInfoDTO.promotionId = |
|
|
|
(promotion != null && tableId <= 0) ? promotion.id : ""; |
|
|
|
(promotion != null && tableId <= 0) ? promotion.id : ""; |
|
|
@ -552,7 +575,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
// : widget.arguments["cid"] ?? ""; |
|
|
|
// : widget.arguments["cid"] ?? ""; |
|
|
|
// placeOrderFirst.promotionInfoDTO.useVipPrice = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && (settleOrderInfo.usePlateMoney == false))) ) ? false : useVipPriceSelect; |
|
|
|
// 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.useBenefit = (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false : useBenefitSelect; |
|
|
|
placeOrderFirst.promotionInfoDTO.discountType = settleOrderInfo?.discountType ?? ""; |
|
|
|
placeOrderFirst.promotionInfoDTO.discountType = |
|
|
|
|
|
|
|
settleOrderInfo?.discountType ?? ""; |
|
|
|
placeOrderFirst.recMobile = |
|
|
|
placeOrderFirst.recMobile = |
|
|
|
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; |
|
|
|
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; |
|
|
|
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; |
|
|
|
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; |
|
|
@ -561,7 +585,9 @@ class _Settlement extends State<Settlement> { |
|
|
|
placeOrderFirst.storeId = storeInfo.id; |
|
|
|
placeOrderFirst.storeId = storeInfo.id; |
|
|
|
placeOrderFirst.subcribeTime = subTime ?? ""; //预约时间 |
|
|
|
placeOrderFirst.subcribeTime = subTime ?? ""; //预约时间 |
|
|
|
placeOrderFirst.tableId = "$tableId"; |
|
|
|
placeOrderFirst.tableId = "$tableId"; |
|
|
|
for (int i = 0; i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0); i++) { |
|
|
|
for (int i = 0; |
|
|
|
|
|
|
|
i < (shopCarGoods?.shoppingCartSkuItemList?.length ?? 0); |
|
|
|
|
|
|
|
i++) { |
|
|
|
placeOrderFirst.shoppingCartSkuItemList[i].setMealDataList = |
|
|
|
placeOrderFirst.shoppingCartSkuItemList[i].setMealDataList = |
|
|
|
shopCarGoods.shoppingCartSkuItemList[i].setMealDataList; |
|
|
|
shopCarGoods.shoppingCartSkuItemList[i].setMealDataList; |
|
|
|
} |
|
|
|
} |
|
|
@ -803,40 +829,49 @@ class _Settlement extends State<Settlement> { |
|
|
|
child: Container( |
|
|
|
child: Container( |
|
|
|
child: Column( |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
DistributionMode((addressId, isTake, |
|
|
|
DistributionMode( |
|
|
|
memberCouponId, orderId, promotionId) { |
|
|
|
(addressId, isTake, memberCouponId, orderId, |
|
|
|
setState(() { |
|
|
|
promotionId) { |
|
|
|
this.selectedBtn = 0; |
|
|
|
setState(() { |
|
|
|
}); |
|
|
|
this.selectedBtn = 0; |
|
|
|
queryOrderInfo( |
|
|
|
}); |
|
|
|
addressId, |
|
|
|
queryOrderInfo( |
|
|
|
isTake, |
|
|
|
addressId, |
|
|
|
memberCouponId, |
|
|
|
isTake, |
|
|
|
orderId, |
|
|
|
memberCouponId, |
|
|
|
promotionId ?? (productId ?? 0), |
|
|
|
orderId, |
|
|
|
productSkuId ?? "", |
|
|
|
promotionId ?? (productId ?? 0), |
|
|
|
actProductId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
"AUTO", |
|
|
|
actProductSkuId ?? "", |
|
|
|
// useVipPriceSelect, |
|
|
|
"AUTO", |
|
|
|
// useBenefitSelect, |
|
|
|
// useVipPriceSelect, |
|
|
|
count1, |
|
|
|
// useBenefitSelect, |
|
|
|
payChannel, |
|
|
|
count1, |
|
|
|
tableId ?? 0); |
|
|
|
payChannel, |
|
|
|
}, |
|
|
|
tableId ?? 0); |
|
|
|
queryAddress, |
|
|
|
}, |
|
|
|
storeInfo, |
|
|
|
queryAddress, |
|
|
|
address, |
|
|
|
storeInfo, |
|
|
|
selectedAddress, |
|
|
|
address, |
|
|
|
pageType, |
|
|
|
selectedAddress, |
|
|
|
widget.arguments["distance"],), |
|
|
|
pageType, |
|
|
|
|
|
|
|
widget.arguments["distance"], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
height: 16.h, |
|
|
|
height: 16.h, |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
if((storeInfo?.pickupType?.dineInTakeStatus?? false) ==true && (subscribeParam?.isEnableSubscribe ?? false) == false |
|
|
|
if ((storeInfo?.pickupType?.dineInTakeStatus ?? |
|
|
|
&& selectedBtn != 1 && selectedBtn != 2&& settleOrderInfo !=null) |
|
|
|
false) == |
|
|
|
|
|
|
|
true && |
|
|
|
|
|
|
|
(subscribeParam?.isEnableSubscribe ?? |
|
|
|
|
|
|
|
false) == |
|
|
|
|
|
|
|
false && |
|
|
|
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
|
|
|
selectedBtn != 2 && |
|
|
|
|
|
|
|
settleOrderInfo != null) |
|
|
|
takeStatus(), |
|
|
|
takeStatus(), |
|
|
|
|
|
|
|
|
|
|
|
/// 预留的手机号, 可修改 |
|
|
|
/// 预留的手机号, 可修改 |
|
|
@ -857,7 +892,9 @@ class _Settlement extends State<Settlement> { |
|
|
|
(coupons != "" || promotions != "") |
|
|
|
(coupons != "" || promotions != "") |
|
|
|
? false |
|
|
|
? false |
|
|
|
: useVipPriceSelect, |
|
|
|
: useVipPriceSelect, |
|
|
|
this.showVipTips,useBenefitSelect,placeOrder), |
|
|
|
this.showVipTips, |
|
|
|
|
|
|
|
useBenefitSelect, |
|
|
|
|
|
|
|
placeOrder), |
|
|
|
|
|
|
|
|
|
|
|
///优惠券/备注/会员优惠金额 |
|
|
|
///优惠券/备注/会员优惠金额 |
|
|
|
if (settleOrderInfo != null || |
|
|
|
if (settleOrderInfo != null || |
|
|
@ -872,20 +909,20 @@ class _Settlement extends State<Settlement> { |
|
|
|
couponCount(), |
|
|
|
couponCount(), |
|
|
|
placeOrder, |
|
|
|
placeOrder, |
|
|
|
remakers, |
|
|
|
remakers, |
|
|
|
() { |
|
|
|
() { |
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
'/router/edit_remarks_page', |
|
|
|
'/router/edit_remarks_page', |
|
|
|
arguments: { |
|
|
|
arguments: { |
|
|
|
"remake": remakers |
|
|
|
"remake": remakers |
|
|
|
}).then((value) => { |
|
|
|
}).then((value) => { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
if (value != null) remakers = value; |
|
|
|
if (value != null) remakers = value; |
|
|
|
}) |
|
|
|
}) |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
tableId, |
|
|
|
tableId, |
|
|
|
vipPriceSelect, |
|
|
|
vipPriceSelect, |
|
|
|
() { |
|
|
|
() { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
this.showVipTips = true; |
|
|
|
this.showVipTips = true; |
|
|
|
}); |
|
|
|
}); |
|
|
@ -900,9 +937,20 @@ class _Settlement extends State<Settlement> { |
|
|
|
subscribeStoresName, |
|
|
|
subscribeStoresName, |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug) |
|
|
|
if (settleOrderInfo != null && |
|
|
|
///支付方式 |
|
|
|
placeOrder && |
|
|
|
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo,useBenefitSelect,tableId,minOrderInfo), |
|
|
|
joinA != JoinActivity.BargainBug) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///支付方式 |
|
|
|
|
|
|
|
PayMethod( |
|
|
|
|
|
|
|
payChannelCheck, |
|
|
|
|
|
|
|
coupons, |
|
|
|
|
|
|
|
promotions, |
|
|
|
|
|
|
|
useVipPriceSelect, |
|
|
|
|
|
|
|
settleOrderInfo, |
|
|
|
|
|
|
|
useBenefitSelect, |
|
|
|
|
|
|
|
tableId, |
|
|
|
|
|
|
|
minOrderInfo), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@ -970,10 +1018,14 @@ class _Settlement extends State<Settlement> { |
|
|
|
// return; |
|
|
|
// return; |
|
|
|
// } else |
|
|
|
// } else |
|
|
|
// orderButton = true; |
|
|
|
// orderButton = true; |
|
|
|
if (subscribeParam != null && ((subscribeParam.isEnableSubscribe ?? false) == |
|
|
|
if (subscribeParam != null && |
|
|
|
true) && |
|
|
|
((subscribeParam.isEnableSubscribe ?? false) == |
|
|
|
(reservationTime == null || |
|
|
|
true) && |
|
|
|
((subscribeParam.stores.length ==1 ? subscribeParam.stores[0] : subscribeStoresName) == null))) { |
|
|
|
(reservationTime == null || |
|
|
|
|
|
|
|
((subscribeParam.stores.length == 1 |
|
|
|
|
|
|
|
? subscribeParam.stores[0] |
|
|
|
|
|
|
|
: subscribeStoresName) == |
|
|
|
|
|
|
|
null))) { |
|
|
|
SmartDialog.showToast( |
|
|
|
SmartDialog.showToast( |
|
|
|
(reservationTime == null) |
|
|
|
(reservationTime == null) |
|
|
|
? S.of(context).qingxuanzeyuyeushijian |
|
|
|
? S.of(context).qingxuanzeyuyeushijian |
|
|
@ -1006,161 +1058,190 @@ class _Settlement extends State<Settlement> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
///堂食/打包外带选择 |
|
|
|
///堂食/打包外带选择 |
|
|
|
Widget takeStatus(){ |
|
|
|
Widget takeStatus() { |
|
|
|
return Container( |
|
|
|
return Container( |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: Colors.white, |
|
|
|
color: Colors.white, |
|
|
|
boxShadow: [ |
|
|
|
boxShadow: [ |
|
|
|
BoxShadow( |
|
|
|
BoxShadow( |
|
|
|
color: Color(0x0D000000), |
|
|
|
color: Color(0x0D000000), |
|
|
|
offset: Offset(0, 1), |
|
|
|
offset: Offset(0, 1), |
|
|
|
blurRadius: 8, |
|
|
|
blurRadius: 8, |
|
|
|
spreadRadius: 0, |
|
|
|
spreadRadius: 0, |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
borderRadius: BorderRadius.circular(8), |
|
|
|
borderRadius: BorderRadius.circular(8), |
|
|
|
), |
|
|
|
), |
|
|
|
margin: EdgeInsets.only(left: 16.w, right: 16.w,top:6.h,bottom:6.h), |
|
|
|
margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 6.h, bottom: 6.h), |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w,vertical:10.h), |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.h), |
|
|
|
child: |
|
|
|
child: Row( |
|
|
|
Row(children: [ |
|
|
|
children: [ |
|
|
|
Expanded(child:GestureDetector( |
|
|
|
Expanded( |
|
|
|
onTap: (){ |
|
|
|
child: GestureDetector( |
|
|
|
setState((){ |
|
|
|
onTap: () { |
|
|
|
diningStatus = 4; |
|
|
|
setState(() { |
|
|
|
}); |
|
|
|
diningStatus = 4; |
|
|
|
}, |
|
|
|
}); |
|
|
|
child: Container( |
|
|
|
}, |
|
|
|
decoration: BoxDecoration( |
|
|
|
child: Container( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(6)), |
|
|
|
decoration: BoxDecoration( |
|
|
|
border: Border.all( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(6)), |
|
|
|
width: diningStatus == 4? 2.w:1.w, |
|
|
|
border: Border.all( |
|
|
|
color: diningStatus == 4? Color(0xFF32A060):Color(0xFFDEDEDE), |
|
|
|
width: diningStatus == 4 ? 2.w : 1.w, |
|
|
|
style: BorderStyle.solid, |
|
|
|
color: |
|
|
|
), |
|
|
|
diningStatus == 4 ? Color(0xFF32A060) : Color(0xFFDEDEDE), |
|
|
|
color: diningStatus == 4?Color(0xFFEEFFF5):Color(0xFFFFFFFF), |
|
|
|
style: BorderStyle.solid, |
|
|
|
), |
|
|
|
|
|
|
|
padding: EdgeInsets.only(top:11.h,bottom: 14.h), |
|
|
|
|
|
|
|
child: Row( |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Image.asset( |
|
|
|
|
|
|
|
"assets/image/home_he.webp", |
|
|
|
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
|
|
|
width: 21.w, |
|
|
|
|
|
|
|
height: 31.h, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width:10.w,), |
|
|
|
color: |
|
|
|
Column( |
|
|
|
diningStatus == 4 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF), |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
), |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
padding: EdgeInsets.only(top: 11.h, bottom: 14.h), |
|
|
|
children: [ |
|
|
|
child: Row( |
|
|
|
Text( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
S.of(context).tangshi, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
style: TextStyle( |
|
|
|
children: [ |
|
|
|
color: Color(0xFF353535), |
|
|
|
Image.asset( |
|
|
|
fontSize: 14.sp, |
|
|
|
"assets/image/home_he.webp", |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
fit: BoxFit.fill, |
|
|
|
|
|
|
|
width: 21.w, |
|
|
|
|
|
|
|
height: 31.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
width: 10.w, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Column( |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
S.of(context).tangshi, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
SizedBox(height: 6.h,), |
|
|
|
height: 6.h, |
|
|
|
Text( |
|
|
|
|
|
|
|
S.of(context).dianneiyongcan, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
], |
|
|
|
S.of(context).dianneiyongcan, |
|
|
|
) |
|
|
|
style: TextStyle( |
|
|
|
], |
|
|
|
color: Color(0xFF32A060), |
|
|
|
), |
|
|
|
fontSize: 12.sp, |
|
|
|
), |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
)), |
|
|
|
), |
|
|
|
SizedBox(width: 12.w,), |
|
|
|
), |
|
|
|
Expanded(child: GestureDetector( |
|
|
|
], |
|
|
|
onTap: (){ |
|
|
|
) |
|
|
|
setState((){ |
|
|
|
], |
|
|
|
diningStatus = 3; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(6)), |
|
|
|
|
|
|
|
border: Border.all( |
|
|
|
|
|
|
|
width: diningStatus == 3? 2.w : 1.w, |
|
|
|
|
|
|
|
color: diningStatus == 3?Color(0xFF32A060):Color(0xFFDEDEDE), |
|
|
|
|
|
|
|
style: BorderStyle.solid, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
color: diningStatus == 3 ?Color(0xFFEEFFF5):Color(0xFFFFFFFF), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
padding: EdgeInsets.only(top:11.h,bottom: 14.h), |
|
|
|
)), |
|
|
|
child: Row( |
|
|
|
SizedBox( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
width: 12.w, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
), |
|
|
|
children: [ |
|
|
|
Expanded( |
|
|
|
Image.asset( |
|
|
|
child: GestureDetector( |
|
|
|
"assets/image/dining_w.webp", |
|
|
|
onTap: () { |
|
|
|
fit: BoxFit.fill, |
|
|
|
setState(() { |
|
|
|
width: 24.w, |
|
|
|
diningStatus = 3; |
|
|
|
height: 26.h, |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(6)), |
|
|
|
|
|
|
|
border: Border.all( |
|
|
|
|
|
|
|
width: diningStatus == 3 ? 2.w : 1.w, |
|
|
|
|
|
|
|
color: |
|
|
|
|
|
|
|
diningStatus == 3 ? Color(0xFF32A060) : Color(0xFFDEDEDE), |
|
|
|
|
|
|
|
style: BorderStyle.solid, |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width:9.w,), |
|
|
|
color: |
|
|
|
Column( |
|
|
|
diningStatus == 3 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF), |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
), |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
padding: EdgeInsets.only(top: 11.h, bottom: 14.h), |
|
|
|
children: [ |
|
|
|
child: Row( |
|
|
|
Text( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
S.of(context).waidai, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
style: TextStyle( |
|
|
|
children: [ |
|
|
|
color: Color(0xFF353535), |
|
|
|
Image.asset( |
|
|
|
fontSize: 14.sp, |
|
|
|
"assets/image/dining_w.webp", |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
fit: BoxFit.fill, |
|
|
|
|
|
|
|
width: 24.w, |
|
|
|
|
|
|
|
height: 26.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
width: 9.w, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Column( |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
S.of(context).waidai, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
SizedBox(height: 6.h,), |
|
|
|
height: 6.h, |
|
|
|
Text( |
|
|
|
|
|
|
|
S.of(context).dabaodaodianqu, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
], |
|
|
|
S.of(context).dabaodaodianqu, |
|
|
|
) |
|
|
|
style: TextStyle( |
|
|
|
], |
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
)), |
|
|
|
], |
|
|
|
],), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
payChannelCheck(int payChannel) { |
|
|
|
payChannelCheck(int payChannel) { |
|
|
|
this.payChannel = payChannel; |
|
|
|
this.payChannel = payChannel; |
|
|
|
if (tableId > 0) { |
|
|
|
if (tableId > 0) { |
|
|
|
queryOrderDetails(parentId); |
|
|
|
queryOrderDetails(parentId); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
queryOrderInfo( |
|
|
|
queryOrderInfo( |
|
|
|
address?.id, |
|
|
|
address?.id, |
|
|
|
selectedBtn, |
|
|
|
selectedBtn, |
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) ? "" :couponListBean?.id, |
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) |
|
|
|
0, |
|
|
|
? "" |
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) ? "" :promotion?.id ?? productId, |
|
|
|
: couponListBean?.id, |
|
|
|
productSkuId ?? "", |
|
|
|
0, |
|
|
|
actProductId ?? "", |
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) |
|
|
|
actProductSkuId ?? "", |
|
|
|
? "" |
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) ?"NONE" : ((useVipPriceSelect == false && couponListBean?.id!="" && ((promotion?.id ?? productId )!= "")) ? "MEMBER_RANK" : (isVips == false &&vipLevelName == "黄金会员")?"MEMBER_RANK":"AUTO"), |
|
|
|
: promotion?.id ?? productId, |
|
|
|
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false :useVipPriceSelect, |
|
|
|
productSkuId ?? "", |
|
|
|
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false)) || useVipPriceSelect == true) ? false :useBenefitSelect, |
|
|
|
actProductId ?? "", |
|
|
|
count1, |
|
|
|
actProductSkuId ?? "", |
|
|
|
payChannel, |
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) |
|
|
|
tableId);} |
|
|
|
? "NONE" |
|
|
|
|
|
|
|
: ((useVipPriceSelect == false && |
|
|
|
|
|
|
|
couponListBean?.id != "" && |
|
|
|
|
|
|
|
((promotion?.id ?? productId) != "")) |
|
|
|
|
|
|
|
? "MEMBER_RANK" |
|
|
|
|
|
|
|
: (isVips == false && vipLevelName == "黄金会员") |
|
|
|
|
|
|
|
? "MEMBER_RANK" |
|
|
|
|
|
|
|
: "AUTO"), |
|
|
|
|
|
|
|
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? false :useVipPriceSelect, |
|
|
|
|
|
|
|
// (settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false)) || useVipPriceSelect == true) ? false :useBenefitSelect, |
|
|
|
|
|
|
|
count1, |
|
|
|
|
|
|
|
payChannel, |
|
|
|
|
|
|
|
tableId); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
vipPriceSelect(bool useVipPriceSelect) { |
|
|
|
vipPriceSelect(bool useVipPriceSelect) { |
|
|
@ -1177,12 +1258,13 @@ class _Settlement extends State<Settlement> { |
|
|
|
productSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
(useVipPriceSelect == true) ? "VIP": "MEMBER_RANK", |
|
|
|
(useVipPriceSelect == true) ? "VIP" : "MEMBER_RANK", |
|
|
|
// useVipPriceSelect, |
|
|
|
// useVipPriceSelect, |
|
|
|
// useVipPriceSelect == true ? false :useBenefitSelect, |
|
|
|
// useVipPriceSelect == true ? false :useBenefitSelect, |
|
|
|
count1, |
|
|
|
count1, |
|
|
|
payChannel, |
|
|
|
payChannel, |
|
|
|
tableId);} |
|
|
|
tableId); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
///会员等级选择 |
|
|
|
///会员等级选择 |
|
|
@ -1258,7 +1340,11 @@ class _Settlement extends State<Settlement> { |
|
|
|
productSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
(couponBean?.id ?? 0) == 0 ?((isVips == false &&vipLevelName == "黄金会员") ? "MEMBER_RANK" :"AUTO"):"COUPON", |
|
|
|
(couponBean?.id ?? 0) == 0 |
|
|
|
|
|
|
|
? ((isVips == false && vipLevelName == "黄金会员") |
|
|
|
|
|
|
|
? "MEMBER_RANK" |
|
|
|
|
|
|
|
: "AUTO") |
|
|
|
|
|
|
|
: "COUPON", |
|
|
|
// useVipPriceSelect, |
|
|
|
// useVipPriceSelect, |
|
|
|
// useBenefitSelect, |
|
|
|
// useBenefitSelect, |
|
|
|
count1, |
|
|
|
count1, |
|
|
@ -1293,7 +1379,11 @@ class _Settlement extends State<Settlement> { |
|
|
|
productSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
((pro?.id ?? 0) ?? productId) == 0 ?((isVips == false &&vipLevelName == "黄金会员") ? "MEMBER_RANK" :"AUTO"):"ACTIVITY", |
|
|
|
((pro?.id ?? 0) ?? productId) == 0 |
|
|
|
|
|
|
|
? ((isVips == false && vipLevelName == "黄金会员") |
|
|
|
|
|
|
|
? "MEMBER_RANK" |
|
|
|
|
|
|
|
: "AUTO") |
|
|
|
|
|
|
|
: "ACTIVITY", |
|
|
|
// useVipPriceSelect, |
|
|
|
// useVipPriceSelect, |
|
|
|
// useBenefitSelect, |
|
|
|
// useBenefitSelect, |
|
|
|
count1, |
|
|
|
count1, |
|
|
@ -1324,7 +1414,7 @@ class _Settlement extends State<Settlement> { |
|
|
|
date.timeZoneOffset.inHours.toString()); |
|
|
|
date.timeZoneOffset.inHours.toString()); |
|
|
|
}, onConfirm: (date) { |
|
|
|
}, onConfirm: (date) { |
|
|
|
reservationTime = date.toString().substring(0, 16); |
|
|
|
reservationTime = date.toString().substring(0, 16); |
|
|
|
subTime = date.add(Duration(hours:8)).toUtc().toIso8601String(); |
|
|
|
subTime = date.add(Duration(hours: 8)).toUtc().toIso8601String(); |
|
|
|
setState(() {}); |
|
|
|
setState(() {}); |
|
|
|
}, currentTime: minTime, locale: LocaleType.zh); |
|
|
|
}, currentTime: minTime, locale: LocaleType.zh); |
|
|
|
} |
|
|
|
} |
|
|
@ -1358,17 +1448,17 @@ class _Settlement extends State<Settlement> { |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Expanded( |
|
|
|
Expanded( |
|
|
|
child: Container( |
|
|
|
child: Container( |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
margin: EdgeInsets.symmetric(vertical:5.h), |
|
|
|
margin: EdgeInsets.symmetric(vertical: 5.h), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
S.of(context).qingxuanzeyuyuemendian, |
|
|
|
S.of(context).qingxuanzeyuyuemendian, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
fontWeight: MyFontWeight.bold, |
|
|
|
fontSize: 15.sp, |
|
|
|
fontSize: 15.sp, |
|
|
|
color: Color(0xFF353535), |
|
|
|
color: Color(0xFF353535), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
)), |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
@ -1399,9 +1489,10 @@ class _Settlement extends State<Settlement> { |
|
|
|
}), |
|
|
|
}), |
|
|
|
), |
|
|
|
), |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
onTap: (){ |
|
|
|
onTap: () { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
subscribeStoresName = subscribeParam.stores[storesIndex]; |
|
|
|
subscribeStoresName = |
|
|
|
|
|
|
|
subscribeParam.stores[storesIndex]; |
|
|
|
}); |
|
|
|
}); |
|
|
|
Navigator.of(context).pop(); |
|
|
|
Navigator.of(context).pop(); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -1410,10 +1501,12 @@ class _Settlement extends State<Settlement> { |
|
|
|
height: 40.h, |
|
|
|
height: 40.h, |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(100), |
|
|
|
borderRadius: BorderRadius.circular(100), |
|
|
|
color:Color(0xFF32A060), |
|
|
|
color: Color(0xFF32A060), |
|
|
|
), |
|
|
|
), |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
margin: EdgeInsets.only(bottom: 10.h,), |
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
|
|
|
bottom: 10.h, |
|
|
|
|
|
|
|
), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
S.of(context).queding, |
|
|
|
S.of(context).queding, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
@ -1436,17 +1529,17 @@ class _Settlement extends State<Settlement> { |
|
|
|
Widget storesNameItem(index) { |
|
|
|
Widget storesNameItem(index) { |
|
|
|
return Container( |
|
|
|
return Container( |
|
|
|
width: double.infinity, |
|
|
|
width: double.infinity, |
|
|
|
margin: EdgeInsets.symmetric(vertical:8.h), |
|
|
|
margin: EdgeInsets.symmetric(vertical: 8.h), |
|
|
|
padding: EdgeInsets.symmetric(vertical: 10.h), |
|
|
|
padding: EdgeInsets.symmetric(vertical: 10.h), |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius:BorderRadius.circular(6), |
|
|
|
borderRadius: BorderRadius.circular(6), |
|
|
|
border: Border.all( |
|
|
|
border: Border.all( |
|
|
|
color: storesIndex == index ? Color(0xFF32A060):Color(0xFFF7F7F7), |
|
|
|
color: storesIndex == index ? Color(0xFF32A060) : Color(0xFFF7F7F7), |
|
|
|
width: storesIndex == index ? 1 :0, |
|
|
|
width: storesIndex == index ? 1 : 0, |
|
|
|
), |
|
|
|
|
|
|
|
color: storesIndex == index ? Color(0xFFF0FAF4) :Color(0xFFF7F7F7), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
color: storesIndex == index ? Color(0xFFF0FAF4) : Color(0xFFF7F7F7), |
|
|
|
|
|
|
|
), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
subscribeParam.stores[index], |
|
|
|
subscribeParam.stores[index], |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|