|
|
|
@ -180,7 +180,11 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
productSkuId ?? "", |
|
|
|
|
actProductId ?? "", |
|
|
|
|
actProductSkuId ?? "", |
|
|
|
|
(isVips == false || !placeOrder ) ? ((vipLevelName == "黄金会员" && placeOrder) ? "MEMBER_RANK" :"NONE"):"VIP", |
|
|
|
|
(isVips == false || !placeOrder) |
|
|
|
|
? ((vipLevelName == "黄金会员" && placeOrder) |
|
|
|
|
? "MEMBER_RANK" |
|
|
|
|
: "NONE") |
|
|
|
|
: "VIP", |
|
|
|
|
// useVipPriceSelect, |
|
|
|
|
// (useVipPriceSelect == true && isVips) ? false:useBenefitSelect, |
|
|
|
|
count1, |
|
|
|
@ -257,7 +261,10 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
queryOrderDetails( |
|
|
|
|
pageType != null ? widget.arguments["orderId"] : parentId); |
|
|
|
|
} |
|
|
|
|
if(!isRaiseChannel && (tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false))){ |
|
|
|
|
if (!isRaiseChannel && |
|
|
|
|
(tableId > 0 |
|
|
|
|
? (minOrderInfo?.isRaise ?? false) |
|
|
|
|
: (settleOrderInfo?.isRaise ?? false))) { |
|
|
|
|
isRaiseChannel = true; |
|
|
|
|
queryOrderInfo( |
|
|
|
|
address?.id, |
|
|
|
@ -272,7 +279,11 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
// useVipPriceSelect, |
|
|
|
|
// useBenefitSelect, |
|
|
|
|
count1, |
|
|
|
|
(tableId > 0 ? (minOrderInfo?.isRaise ?? false) : (settleOrderInfo?.isRaise ?? false)) ? 7 :payChannel, |
|
|
|
|
(tableId > 0 |
|
|
|
|
? (minOrderInfo?.isRaise ?? false) |
|
|
|
|
: (settleOrderInfo?.isRaise ?? false)) |
|
|
|
|
? 7 |
|
|
|
|
: payChannel, |
|
|
|
|
tableId); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
@ -530,7 +541,13 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true) |
|
|
|
|
? true |
|
|
|
|
: 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 + |
|
|
|
|
(reservationTime ?? "") + |
|
|
|
|
((subscribeParam?.isEnableSubscribe ?? false) == true |
|
|
|
@ -542,7 +559,13 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
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.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 : ""; |
|
|
|
@ -552,7 +575,8 @@ 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 = settleOrderInfo?.discountType ?? ""; |
|
|
|
|
placeOrderFirst.promotionInfoDTO.discountType = |
|
|
|
|
settleOrderInfo?.discountType ?? ""; |
|
|
|
|
placeOrderFirst.recMobile = |
|
|
|
|
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile; |
|
|
|
|
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList; |
|
|
|
@ -561,7 +585,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
placeOrderFirst.storeId = storeInfo.id; |
|
|
|
|
placeOrderFirst.subcribeTime = subTime ?? ""; //预约时间 |
|
|
|
|
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 = |
|
|
|
|
shopCarGoods.shoppingCartSkuItemList[i].setMealDataList; |
|
|
|
|
} |
|
|
|
@ -803,8 +829,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
child: Container( |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
DistributionMode((addressId, isTake, |
|
|
|
|
memberCouponId, orderId, promotionId) { |
|
|
|
|
DistributionMode( |
|
|
|
|
(addressId, isTake, memberCouponId, orderId, |
|
|
|
|
promotionId) { |
|
|
|
|
setState(() { |
|
|
|
|
this.selectedBtn = 0; |
|
|
|
|
}); |
|
|
|
@ -829,14 +856,22 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
address, |
|
|
|
|
selectedAddress, |
|
|
|
|
pageType, |
|
|
|
|
widget.arguments["distance"],), |
|
|
|
|
widget.arguments["distance"], |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
height: 16.h, |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
if((storeInfo?.pickupType?.dineInTakeStatus?? false) ==true && (subscribeParam?.isEnableSubscribe ?? false) == false |
|
|
|
|
&& selectedBtn != 1 && selectedBtn != 2&& settleOrderInfo !=null) |
|
|
|
|
if ((storeInfo?.pickupType?.dineInTakeStatus ?? |
|
|
|
|
false) == |
|
|
|
|
true && |
|
|
|
|
(subscribeParam?.isEnableSubscribe ?? |
|
|
|
|
false) == |
|
|
|
|
false && |
|
|
|
|
selectedBtn != 1 && |
|
|
|
|
selectedBtn != 2 && |
|
|
|
|
settleOrderInfo != null) |
|
|
|
|
takeStatus(), |
|
|
|
|
|
|
|
|
|
/// 预留的手机号, 可修改 |
|
|
|
@ -857,7 +892,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
(coupons != "" || promotions != "") |
|
|
|
|
? false |
|
|
|
|
: useVipPriceSelect, |
|
|
|
|
this.showVipTips,useBenefitSelect,placeOrder), |
|
|
|
|
this.showVipTips, |
|
|
|
|
useBenefitSelect, |
|
|
|
|
placeOrder), |
|
|
|
|
|
|
|
|
|
///优惠券/备注/会员优惠金额 |
|
|
|
|
if (settleOrderInfo != null || |
|
|
|
@ -900,9 +937,20 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
subscribeStoresName, |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug) |
|
|
|
|
if (settleOrderInfo != null && |
|
|
|
|
placeOrder && |
|
|
|
|
joinA != JoinActivity.BargainBug) |
|
|
|
|
|
|
|
|
|
///支付方式 |
|
|
|
|
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo,useBenefitSelect,tableId,minOrderInfo), |
|
|
|
|
PayMethod( |
|
|
|
|
payChannelCheck, |
|
|
|
|
coupons, |
|
|
|
|
promotions, |
|
|
|
|
useVipPriceSelect, |
|
|
|
|
settleOrderInfo, |
|
|
|
|
useBenefitSelect, |
|
|
|
|
tableId, |
|
|
|
|
minOrderInfo), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
@ -970,10 +1018,14 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
// return; |
|
|
|
|
// } else |
|
|
|
|
// orderButton = true; |
|
|
|
|
if (subscribeParam != null && ((subscribeParam.isEnableSubscribe ?? false) == |
|
|
|
|
if (subscribeParam != null && |
|
|
|
|
((subscribeParam.isEnableSubscribe ?? false) == |
|
|
|
|
true) && |
|
|
|
|
(reservationTime == null || |
|
|
|
|
((subscribeParam.stores.length ==1 ? subscribeParam.stores[0] : subscribeStoresName) == null))) { |
|
|
|
|
((subscribeParam.stores.length == 1 |
|
|
|
|
? subscribeParam.stores[0] |
|
|
|
|
: subscribeStoresName) == |
|
|
|
|
null))) { |
|
|
|
|
SmartDialog.showToast( |
|
|
|
|
(reservationTime == null) |
|
|
|
|
? S.of(context).qingxuanzeyuyeushijian |
|
|
|
@ -1022,9 +1074,10 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
), |
|
|
|
|
margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 6.h, bottom: 6.h), |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.h), |
|
|
|
|
child: |
|
|
|
|
Row(children: [ |
|
|
|
|
Expanded(child:GestureDetector( |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
diningStatus = 4; |
|
|
|
@ -1035,10 +1088,12 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(6)), |
|
|
|
|
border: Border.all( |
|
|
|
|
width: diningStatus == 4 ? 2.w : 1.w, |
|
|
|
|
color: diningStatus == 4? Color(0xFF32A060):Color(0xFFDEDEDE), |
|
|
|
|
color: |
|
|
|
|
diningStatus == 4 ? Color(0xFF32A060) : Color(0xFFDEDEDE), |
|
|
|
|
style: BorderStyle.solid, |
|
|
|
|
), |
|
|
|
|
color: diningStatus == 4?Color(0xFFEEFFF5):Color(0xFFFFFFFF), |
|
|
|
|
color: |
|
|
|
|
diningStatus == 4 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF), |
|
|
|
|
), |
|
|
|
|
padding: EdgeInsets.only(top: 11.h, bottom: 14.h), |
|
|
|
|
child: Row( |
|
|
|
@ -1051,7 +1106,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
width: 21.w, |
|
|
|
|
height: 31.h, |
|
|
|
|
), |
|
|
|
|
SizedBox(width:10.w,), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 10.w, |
|
|
|
|
), |
|
|
|
|
Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
@ -1064,7 +1121,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 6.h,), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 6.h, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).dianneiyongcan, |
|
|
|
|
style: TextStyle( |
|
|
|
@ -1079,8 +1138,11 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
SizedBox(width: 12.w,), |
|
|
|
|
Expanded(child: GestureDetector( |
|
|
|
|
SizedBox( |
|
|
|
|
width: 12.w, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
diningStatus = 3; |
|
|
|
@ -1092,10 +1154,12 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(6)), |
|
|
|
|
border: Border.all( |
|
|
|
|
width: diningStatus == 3 ? 2.w : 1.w, |
|
|
|
|
color: diningStatus == 3?Color(0xFF32A060):Color(0xFFDEDEDE), |
|
|
|
|
color: |
|
|
|
|
diningStatus == 3 ? Color(0xFF32A060) : Color(0xFFDEDEDE), |
|
|
|
|
style: BorderStyle.solid, |
|
|
|
|
), |
|
|
|
|
color: diningStatus == 3 ?Color(0xFFEEFFF5):Color(0xFFFFFFFF), |
|
|
|
|
color: |
|
|
|
|
diningStatus == 3 ? Color(0xFFEEFFF5) : Color(0xFFFFFFFF), |
|
|
|
|
), |
|
|
|
|
padding: EdgeInsets.only(top: 11.h, bottom: 14.h), |
|
|
|
|
child: Row( |
|
|
|
@ -1108,7 +1172,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
width: 24.w, |
|
|
|
|
height: 26.h, |
|
|
|
|
), |
|
|
|
|
SizedBox(width:9.w,), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 9.w, |
|
|
|
|
), |
|
|
|
|
Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
@ -1121,7 +1187,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 6.h,), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 6.h, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).dabaodaodianqu, |
|
|
|
|
style: TextStyle( |
|
|
|
@ -1136,7 +1204,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
],), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1148,19 +1217,31 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
queryOrderInfo( |
|
|
|
|
address?.id, |
|
|
|
|
selectedBtn, |
|
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) ? "" :couponListBean?.id, |
|
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) |
|
|
|
|
? "" |
|
|
|
|
: couponListBean?.id, |
|
|
|
|
0, |
|
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) ? "" :promotion?.id ?? productId, |
|
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) |
|
|
|
|
? "" |
|
|
|
|
: promotion?.id ?? productId, |
|
|
|
|
productSkuId ?? "", |
|
|
|
|
actProductId ?? "", |
|
|
|
|
actProductSkuId ?? "", |
|
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) ?"NONE" : ((useVipPriceSelect == false && couponListBean?.id!="" && ((promotion?.id ?? productId )!= "")) ? "MEMBER_RANK" : (isVips == false &&vipLevelName == "黄金会员")?"MEMBER_RANK":"AUTO"), |
|
|
|
|
(settleOrderInfo.isRaise || payChannel == 5) |
|
|
|
|
? "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);} |
|
|
|
|
|
|
|
|
|
tableId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
vipPriceSelect(bool useVipPriceSelect) { |
|
|
|
@ -1182,7 +1263,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
// useVipPriceSelect == true ? false :useBenefitSelect, |
|
|
|
|
count1, |
|
|
|
|
payChannel, |
|
|
|
|
tableId);} |
|
|
|
|
tableId); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///会员等级选择 |
|
|
|
@ -1258,7 +1340,11 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
productSkuId ?? "", |
|
|
|
|
actProductId ?? "", |
|
|
|
|
actProductSkuId ?? "", |
|
|
|
|
(couponBean?.id ?? 0) == 0 ?((isVips == false &&vipLevelName == "黄金会员") ? "MEMBER_RANK" :"AUTO"):"COUPON", |
|
|
|
|
(couponBean?.id ?? 0) == 0 |
|
|
|
|
? ((isVips == false && vipLevelName == "黄金会员") |
|
|
|
|
? "MEMBER_RANK" |
|
|
|
|
: "AUTO") |
|
|
|
|
: "COUPON", |
|
|
|
|
// useVipPriceSelect, |
|
|
|
|
// useBenefitSelect, |
|
|
|
|
count1, |
|
|
|
@ -1293,7 +1379,11 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
productSkuId ?? "", |
|
|
|
|
actProductId ?? "", |
|
|
|
|
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, |
|
|
|
|
// useBenefitSelect, |
|
|
|
|
count1, |
|
|
|
@ -1401,7 +1491,8 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
subscribeStoresName = subscribeParam.stores[storesIndex]; |
|
|
|
|
subscribeStoresName = |
|
|
|
|
subscribeParam.stores[storesIndex]; |
|
|
|
|
}); |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
}, |
|
|
|
@ -1413,7 +1504,9 @@ class _Settlement extends State<Settlement> {
|
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only(bottom: 10.h,), |
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
bottom: 10.h, |
|
|
|
|
), |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).queding, |
|
|
|
|
style: TextStyle( |
|
|
|
|