|
|
@ -642,7 +642,7 @@ class _Settlement extends State<Settlement> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
toOrderDetails(String orderId) { |
|
|
|
toOrderDetails(String orderId) { |
|
|
|
Navigator.of(context).popAndPushNamed( |
|
|
|
Navigator.of(context).pushReplacementNamed( |
|
|
|
'/router/order_details', |
|
|
|
'/router/order_details', |
|
|
|
arguments: { |
|
|
|
arguments: { |
|
|
|
"id": orderId, |
|
|
|
"id": orderId, |
|
|
@ -654,7 +654,7 @@ class _Settlement extends State<Settlement> { |
|
|
|
///去砍价详情页面 |
|
|
|
///去砍价详情页面 |
|
|
|
toBargain() async { |
|
|
|
toBargain() async { |
|
|
|
await Navigator.of(context) |
|
|
|
await Navigator.of(context) |
|
|
|
.popAndPushNamed('/router/bargain_details', arguments: { |
|
|
|
.pushReplacementNamed('/router/bargain_details', arguments: { |
|
|
|
"actRecordId": launchJoinAct.actRecordId, |
|
|
|
"actRecordId": launchJoinAct.actRecordId, |
|
|
|
// "limitNumber": limitNumber, |
|
|
|
// "limitNumber": limitNumber, |
|
|
|
"storeInfo": storeInfo, |
|
|
|
"storeInfo": storeInfo, |
|
|
@ -663,194 +663,198 @@ class _Settlement extends State<Settlement> { |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
|
return Stack( |
|
|
|
return Container( |
|
|
|
children: [ |
|
|
|
color: Colors.white, |
|
|
|
Container( |
|
|
|
child: Stack( |
|
|
|
// height: 175.h, |
|
|
|
children: [ |
|
|
|
// color: Color(0xFF3A405A), |
|
|
|
Container( |
|
|
|
// width: MediaQuery.of(context).size.width, |
|
|
|
// height: 175.h, |
|
|
|
decoration: BoxDecoration( |
|
|
|
// color: Color(0xFF3A405A), |
|
|
|
image: DecorationImage( |
|
|
|
// width: MediaQuery.of(context).size.width, |
|
|
|
fit: BoxFit.fill, |
|
|
|
decoration: BoxDecoration( |
|
|
|
image: AssetImage("assets/image/settlement_bg.webp"), |
|
|
|
image: DecorationImage( |
|
|
|
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
|
|
|
image: AssetImage("assets/image/settlement_bg.webp"), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
width: double.infinity, |
|
|
|
|
|
|
|
height: 375.h, |
|
|
|
), |
|
|
|
), |
|
|
|
width: double.infinity, |
|
|
|
Scaffold( |
|
|
|
height: 375.h, |
|
|
|
backgroundColor: Colors.transparent, |
|
|
|
), |
|
|
|
appBar: MyAppBar( |
|
|
|
Scaffold( |
|
|
|
background: Colors.transparent, |
|
|
|
backgroundColor: Colors.transparent, |
|
|
|
leadingColor: Colors.white, |
|
|
|
appBar: MyAppBar( |
|
|
|
title: S.of(context).dingdanjiesuan, |
|
|
|
background: Colors.transparent, |
|
|
|
titleColor: Colors.white, |
|
|
|
leadingColor: Colors.white, |
|
|
|
brightness: Brightness.dark, |
|
|
|
title: S.of(context).dingdanjiesuan, |
|
|
|
titleSize: 18.sp, |
|
|
|
titleColor: Colors.white, |
|
|
|
), |
|
|
|
brightness: Brightness.dark, |
|
|
|
body: Container( |
|
|
|
titleSize: 18.sp, |
|
|
|
child: Column( |
|
|
|
), |
|
|
|
children: [ |
|
|
|
body: Container( |
|
|
|
Expanded( |
|
|
|
child: Column( |
|
|
|
child: Container( |
|
|
|
children: [ |
|
|
|
child: SingleChildScrollView( |
|
|
|
Expanded( |
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
child: Container( |
|
|
|
child: Container( |
|
|
|
child: SingleChildScrollView( |
|
|
|
child: Column( |
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
children: [ |
|
|
|
child: Container( |
|
|
|
DistributionMode((addressId, isTake, memberCouponId, |
|
|
|
child: Column( |
|
|
|
orderId, promotionId) { |
|
|
|
children: [ |
|
|
|
setState(() { |
|
|
|
DistributionMode((addressId, isTake, memberCouponId, |
|
|
|
this.selectedBtn = 0; |
|
|
|
orderId, promotionId) { |
|
|
|
}); |
|
|
|
setState(() { |
|
|
|
queryOrderInfo( |
|
|
|
this.selectedBtn = 0; |
|
|
|
addressId, |
|
|
|
}); |
|
|
|
isTake, |
|
|
|
queryOrderInfo( |
|
|
|
memberCouponId, |
|
|
|
addressId, |
|
|
|
orderId, |
|
|
|
isTake, |
|
|
|
promotionId ?? (productId ?? ""), |
|
|
|
memberCouponId, |
|
|
|
productSkuId ?? "", |
|
|
|
orderId, |
|
|
|
actProductId ?? "", |
|
|
|
promotionId ?? (productId ?? ""), |
|
|
|
actProductSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
count1, |
|
|
|
actProductId ?? "", |
|
|
|
payChannel, |
|
|
|
actProductSkuId ?? "", |
|
|
|
tableId ?? 0); |
|
|
|
count1, |
|
|
|
}, queryAddress, storeInfo, address, |
|
|
|
payChannel, |
|
|
|
selectedAddress, pageType), |
|
|
|
tableId ?? 0); |
|
|
|
|
|
|
|
}, queryAddress, storeInfo, address, |
|
|
|
SizedBox( |
|
|
|
selectedAddress, pageType), |
|
|
|
height: 16, |
|
|
|
|
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
|
|
|
|
height: 16, |
|
|
|
/// 预留的手机号, 可修改 |
|
|
|
), |
|
|
|
// EditPhoneWidget( |
|
|
|
|
|
|
|
// storeInfo, |
|
|
|
/// 预留的手机号, 可修改 |
|
|
|
// mobileChange, |
|
|
|
// EditPhoneWidget( |
|
|
|
// ), |
|
|
|
// storeInfo, |
|
|
|
|
|
|
|
// mobileChange, |
|
|
|
///订单商品 |
|
|
|
// ), |
|
|
|
if(settleOrderInfo != null || minOrderInfo != null) |
|
|
|
|
|
|
|
SettlementOrderCommodity( |
|
|
|
///订单商品 |
|
|
|
selectedBtn, |
|
|
|
SettlementOrderCommodity( |
|
|
|
settleOrderInfo, |
|
|
|
selectedBtn, |
|
|
|
minOrderInfo, |
|
|
|
settleOrderInfo, |
|
|
|
tableId, |
|
|
|
minOrderInfo, |
|
|
|
pageType, |
|
|
|
tableId, |
|
|
|
), |
|
|
|
pageType, |
|
|
|
|
|
|
|
), |
|
|
|
///优惠券/备注/会员优惠金额 |
|
|
|
|
|
|
|
ActivityCouponRemarks( |
|
|
|
///优惠券/备注/会员优惠金额 |
|
|
|
couponCart, |
|
|
|
ActivityCouponRemarks( |
|
|
|
activityCart, |
|
|
|
couponCart, |
|
|
|
settleOrderInfo, |
|
|
|
activityCart, |
|
|
|
minOrderInfo, |
|
|
|
settleOrderInfo, |
|
|
|
coupons, |
|
|
|
minOrderInfo, |
|
|
|
promotions, |
|
|
|
coupons, |
|
|
|
couponCount(), |
|
|
|
promotions, |
|
|
|
placeOrder, |
|
|
|
couponCount(), |
|
|
|
remakers, |
|
|
|
placeOrder, |
|
|
|
() { |
|
|
|
remakers, |
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
() { |
|
|
|
'/router/edit_remarks_page', |
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
arguments: {}, |
|
|
|
'/router/edit_remarks_page', |
|
|
|
).then((value) => { |
|
|
|
arguments: {}, |
|
|
|
setState(() { |
|
|
|
).then((value) => { |
|
|
|
if (value != null) remakers = value; |
|
|
|
setState(() { |
|
|
|
}) |
|
|
|
if (value != null) remakers = value; |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
}); |
|
|
|
tableId, |
|
|
|
}, |
|
|
|
), |
|
|
|
tableId, |
|
|
|
|
|
|
|
), |
|
|
|
if (placeOrder && joinA != JoinActivity.BargainBug) |
|
|
|
|
|
|
|
|
|
|
|
if (placeOrder && joinA != JoinActivity.BargainBug) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///支付方式 |
|
|
|
///支付方式 |
|
|
|
PayMethod(payChannelCheck), |
|
|
|
PayMethod(payChannelCheck), |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
flex: 1, |
|
|
|
), |
|
|
|
), |
|
|
|
flex: 1, |
|
|
|
Container( |
|
|
|
), |
|
|
|
height: 54.h, |
|
|
|
Container( |
|
|
|
decoration: BoxDecoration( |
|
|
|
height: 54.h, |
|
|
|
color: Colors.white, |
|
|
|
decoration: BoxDecoration( |
|
|
|
boxShadow: [ |
|
|
|
color: Colors.white, |
|
|
|
BoxShadow( |
|
|
|
boxShadow: [ |
|
|
|
color: Color(0x08213303).withAlpha(12), |
|
|
|
BoxShadow( |
|
|
|
offset: Offset(0, -1), |
|
|
|
color: Color(0x08213303).withAlpha(12), |
|
|
|
blurRadius: 8, |
|
|
|
offset: Offset(0, -1), |
|
|
|
spreadRadius: 0, |
|
|
|
blurRadius: 8, |
|
|
|
|
|
|
|
spreadRadius: 0, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
child: Row( |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Spacer(), |
|
|
|
|
|
|
|
Text( |
|
|
|
|
|
|
|
S.of(context).heji, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
|
|
|
color: Colors.black, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
Text( |
|
|
|
), |
|
|
|
(minOrderInfo != null |
|
|
|
child: Row( |
|
|
|
? "¥${minOrderInfo.finalPayPrice}" |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
: "¥${settleOrderInfo == null ? "0" : settleOrderInfo.price}"), |
|
|
|
children: [ |
|
|
|
style: TextStyle( |
|
|
|
Spacer(), |
|
|
|
fontSize: 20.sp, |
|
|
|
Text( |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
S.of(context).heji, |
|
|
|
color: Color(0xFF32A060), |
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
|
|
|
color: Colors.black, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
SizedBox( |
|
|
|
(minOrderInfo != null |
|
|
|
width: 28, |
|
|
|
? "¥${minOrderInfo.finalPayPrice}" |
|
|
|
), |
|
|
|
: "¥${settleOrderInfo == null ? "0" : settleOrderInfo.price}"), |
|
|
|
RoundButton( |
|
|
|
style: TextStyle( |
|
|
|
width: 88.w, |
|
|
|
fontSize: 20.sp, |
|
|
|
height: 32.h, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
radius: 16, |
|
|
|
color: Color(0xFF32A060), |
|
|
|
text: joinA == JoinActivity.BargainBug |
|
|
|
), |
|
|
|
? "发起砍价" |
|
|
|
|
|
|
|
: (placeOrder ? "提交订单" : "下单"), |
|
|
|
|
|
|
|
textColor: Colors.white, |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
|
|
|
backgroup: Color(0xFF32A060), |
|
|
|
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
|
|
|
vertical: 5.h, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
callback: () { |
|
|
|
SizedBox( |
|
|
|
if (orderButton) { |
|
|
|
width: 28, |
|
|
|
SmartDialog.showToast("订单正在提交中...", |
|
|
|
), |
|
|
|
alignment: Alignment.center); |
|
|
|
RoundButton( |
|
|
|
return; |
|
|
|
width: 88.w, |
|
|
|
} else |
|
|
|
height: 32.h, |
|
|
|
orderButton = true; |
|
|
|
radius: 16, |
|
|
|
pageType != null |
|
|
|
text: joinA == JoinActivity.BargainBug |
|
|
|
? bargainOrderId != null |
|
|
|
? "发起砍价" |
|
|
|
? activityPay() |
|
|
|
: (placeOrder ? "提交订单" : "下单"), |
|
|
|
: joinA == JoinActivity.GoJoin |
|
|
|
textColor: Colors.white, |
|
|
|
? queryJoinAct() |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
: queryLaunchAct() |
|
|
|
backgroup: Color(0xFF32A060), |
|
|
|
: queryPlaceOrderFirst(); |
|
|
|
fontSize: 16.sp, |
|
|
|
}, |
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
), |
|
|
|
vertical: 5.h, |
|
|
|
SizedBox( |
|
|
|
), |
|
|
|
width: 17, |
|
|
|
callback: () { |
|
|
|
) |
|
|
|
if (orderButton) { |
|
|
|
], |
|
|
|
SmartDialog.showToast("订单正在提交中...", |
|
|
|
|
|
|
|
alignment: Alignment.center); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
orderButton = true; |
|
|
|
|
|
|
|
pageType != null |
|
|
|
|
|
|
|
? bargainOrderId != null |
|
|
|
|
|
|
|
? activityPay() |
|
|
|
|
|
|
|
: joinA == JoinActivity.GoJoin |
|
|
|
|
|
|
|
? queryJoinAct() |
|
|
|
|
|
|
|
: queryLaunchAct() |
|
|
|
|
|
|
|
: queryPlaceOrderFirst(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
width: 17, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
) |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|