Browse Source

登录页ui高度更改;

店铺轮播时间更改;
增加新字段(useBenefit),是否使用会员等级价格的优惠;
修改绿币,助农,平台余额包含赠送活动赠送余额时,不能跟该活动共享;
会员等级的优惠:不与任何活动共享;不与特殊支付余额共享;
new_revision_app
wurong 2 years ago
parent
commit
81dc9e3cb0
  1. 2
      lib/login/new_login_page.dart
  2. 2
      lib/order/order_view/order_commodity.dart
  3. 7
      lib/retrofit/data/placeOrderFirst.dart
  4. 79
      lib/settlement/settlement.dart
  5. 212
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  6. 67
      lib/settlement/settlement_view/coupon.dart
  7. 7
      lib/settlement/settlement_view/pay_method.dart
  8. 12
      lib/settlement/settlement_view/settlement_order_commodity.dart
  9. 4
      lib/store/store_order.dart

2
lib/login/new_login_page.dart

@ -416,7 +416,7 @@ class _NewLoginPage extends State<NewLoginPage> {
Container(
height: 30.h,
width: MediaQuery.of(context).size.width - 100.w,
margin: EdgeInsets.only(bottom:10.h),
margin: EdgeInsets.only(bottom: Platform.isIOS ? 10.h : 5.h),
child: TextField(
style: TextStyle(
height: 1.h,

2
lib/order/order_view/order_commodity.dart

@ -93,7 +93,7 @@ class _OrderCommodity extends State<OrderCommodity> {
vipItem(
Color(0xFFFF7A1A),
"会员优惠金额",
widget?.orderInfo?.benefitDiscountAmount ?? "0.00",
"- ${widget?.orderInfo?.benefitDiscountAmount ?? "0.00"}",
),
);
}

7
lib/retrofit/data/placeOrderFirst.dart

@ -119,8 +119,9 @@ class PromotionInfoDTOBean {
String couponId;
String promotionId;
bool useVipPrice;
bool useBenefit;
PromotionInfoDTOBean({this.couponId, this.promotionId,this.useVipPrice});
PromotionInfoDTOBean({this.couponId, this.promotionId,this.useVipPrice,this.useBenefit});
static PromotionInfoDTOBean fromJson(Map<String, dynamic> json) {
if (json == null) return null;
@ -128,12 +129,14 @@ class PromotionInfoDTOBean {
promotionInfoDTOBean.couponId = json['couponId'];
promotionInfoDTOBean.promotionId = json['promotionId'];
promotionInfoDTOBean.useVipPrice = json['useVipPrice'];
promotionInfoDTOBean.useBenefit = json['useBenefit'];
return promotionInfoDTOBean;
}
Map<String, dynamic> toJson() => {
"couponId": couponId,
"promotionId": promotionId,
"useVipPrice":useVipPrice
"useVipPrice":useVipPrice,
"useBenefit":useBenefit
};
}

79
lib/settlement/settlement.dart

@ -83,8 +83,11 @@ class _Settlement extends State<Settlement> {
bool orderButton = false;
bool useVipPriceSelect = true;
bool showVipTips = false;
bool useBenefitSelect = true;
bool isRaiseChannel = false;
ShoppingCart shopCarGoods;
String vipName;
@override
void initState() {
@ -136,6 +139,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId);
@ -150,6 +154,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId);
@ -164,6 +169,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId);
@ -186,6 +192,7 @@ class _Settlement extends State<Settlement> {
actProductId,
actProductSkuId,
useVipPriceSelect,
useBenefitSelect,
buyNum,
payChannel,
tableId) async {
@ -202,6 +209,7 @@ class _Settlement extends State<Settlement> {
"actProductId": actProductId,
"actProductSkuId": actProductSkuId,
"useVipPrice":useVipPriceSelect,
"useBenefit": useBenefitSelect,
"buyNum": buyNum,
"payChannel":payChannel,
"tableId": tableId
@ -246,6 +254,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
settleOrderInfo.isRaise ? 7 :payChannel,
tableId);
@ -270,6 +279,7 @@ class _Settlement extends State<Settlement> {
value.setString('minMember', jsonEncode(baseData.data)),
},
);
//json里面的某个字段赋值
}
}
@ -329,6 +339,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId);
@ -381,6 +392,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId);
@ -409,6 +421,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId);
@ -509,7 +522,8 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.promotionInfoDTO.couponId =
(couponListBean != null && tableId <= 0) ? couponListBean.id : "";
// : widget.arguments["cid"] ?? "";
placeOrderFirst.promotionInfoDTO.useVipPrice = useVipPriceSelect;
placeOrderFirst.promotionInfoDTO.useVipPrice = settleOrderInfo.isRaise ? false : useVipPriceSelect;
placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.benefitDiscountAmount == "0") ? false : useBenefitSelect;
placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
@ -774,6 +788,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId ?? 0);
@ -798,8 +813,9 @@ class _Settlement extends State<Settlement> {
minOrderInfo,
tableId,
pageType,
(coupons != "" || promotions!="") ? false :useVipPriceSelect,
this.showVipTips
(coupons != "" || promotions!="") ? false : useVipPriceSelect,
this.showVipTips,
(coupons != "" || promotions!="") ? false : useBenefitSelect,
),
/////
@ -829,12 +845,14 @@ class _Settlement extends State<Settlement> {
setState(() {
this.showVipTips = true;
});
}
},
vipBenefitSelect,
payChannel,
),
if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo),
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo,useBenefitSelect),
],
),
),
@ -902,13 +920,23 @@ class _Settlement extends State<Settlement> {
// return;
// } else
// orderButton = true;
pageType != null
? bargainOrderId != null
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
: queryPlaceOrderFirst();
// if(payChannel == 7 || payChannel == 5 && (couponListBean?.id != null || promotion?.id != null || productId!=null || useVipPriceSelect == true ||useBenefitSelect == true)){
// SmartDialog.show(
// widget: SettlementTips(
// () {
// },
// text:"该支付方式不参与任何活动优惠,请重新选择支付方式",
// ));
// }else{
pageType != null
? bargainOrderId != null
? activityPay()
: joinA == JoinActivity.GoJoin
? queryJoinAct()
: queryLaunchAct()
: queryPlaceOrderFirst();
// }
},
),
SizedBox(
@ -940,7 +968,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
(payChannel == 5 || payChannel == 7) ? false : useVipPriceSelect,
(payChannel == 5 || payChannel == 7)? false : useBenefitSelect,
count1,
payChannel,
tableId);}
@ -962,6 +991,28 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId);}
}
vipBenefitSelect(bool useBenefitSelect) {
this.useBenefitSelect = useBenefitSelect;
if (tableId > 0) {
queryOrderDetails(parentId);
} else {
queryOrderInfo(
address?.id,
selectedBtn,
null,
0,
productId ?? null,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId);}
@ -1019,6 +1070,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId);
@ -1052,6 +1104,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
count1,
payChannel,
tableId);

212
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -24,6 +24,8 @@ class ActivityCouponRemarks extends StatefulWidget {
final int tableId;
final Function(bool useVipPriceSelect) vipPriceSelect;
final Function showVipTips;
final Function(bool useBenefitSelect) vipBenefitSelect;
final int payChannell;
ActivityCouponRemarks(
this.couponCart,
@ -38,7 +40,9 @@ class ActivityCouponRemarks extends StatefulWidget {
this.editRemark,
this.tableId,
this.vipPriceSelect,
this.showVipTips);
this.showVipTips,
this.vipBenefitSelect,
this.payChannell);
@override
State<StatefulWidget> createState() {
@ -48,6 +52,7 @@ class ActivityCouponRemarks extends StatefulWidget {
class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
bool vipSelect = true;
bool vipBenefit = true;
@override
Widget build(BuildContext context) {
@ -76,70 +81,88 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
if( !(widget?.settleOrderInfo?.isRaise ?? false) && (widget?.settleOrderInfo?.memberVO?.isVip ?? false) && widget.placeOrder)
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
flex: 1,
child: Text(
"VIP权益",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
),
Platform.isAndroid ?
Switch.adaptive(
value: (widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
activeColor: Color(0xff32A060),
onChanged: (bool value) {
setState(() {
if((widget?.settleOrderInfo?.memberVO?.isVip ?? false)){
vipSelect = !vipSelect;
widget.vipPriceSelect(vipSelect);
}else{
widget.showVipTips();
return;
}
});
},
):
GestureDetector(
onTap: () {
setState(() {
if ((widget?.settleOrderInfo?.memberVO?.isVip ?? false)) {
vipSelect = !vipSelect;
widget.vipPriceSelect(vipSelect);
} else {
widget.showVipTips();
return;
}
});
},
child: Container(
padding: EdgeInsets.only(bottom: 18.w),
alignment: Alignment.center,
child: Image.asset(
((widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect)
? "assets/image/vip_price.webp"
: "assets/image/vip_unprice.webp",
width: 38.w,
height: 20.h,
if (!(widget?.settleOrderInfo?.isRaise ?? false) &&
(widget?.settleOrderInfo?.memberVO?.isVip ?? false) &&
widget.placeOrder)
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
flex: 1,
child: Text(
"VIP权益",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
),
)
],
),
Platform.isAndroid
? Switch.adaptive(
value:
(widget.coupons != null && widget.coupons != "" ||
widget.promotions != null &&
widget.promotions != "" ||
widget.payChannell == 5 ||
widget.payChannell == 7 ||(widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false
: vipSelect,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
activeColor: Color(0xff32A060),
onChanged: (bool value) {
setState(() {
if ((widget?.settleOrderInfo?.memberVO?.isVip ??
false)) {
vipSelect = !vipSelect;
widget.vipPriceSelect(vipSelect);
} else {
widget.showVipTips();
return;
}
});
},
)
: GestureDetector(
onTap: () {
setState(() {
if ((widget?.settleOrderInfo?.memberVO?.isVip ??
false)) {
vipSelect = !vipSelect;
widget.vipPriceSelect(vipSelect);
} else {
widget.showVipTips();
return;
}
});
},
child: Container(
padding: EdgeInsets.only(bottom: 18.w),
alignment: Alignment.center,
child: Image.asset(
((widget.coupons != null && widget.coupons != "" ||
widget.promotions != null &&
widget.promotions != "" ||
widget.payChannell == 5 ||
widget.payChannell == 7 || (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false
: vipSelect)
? "assets/image/vip_price.webp"
: "assets/image/vip_unprice.webp",
width: 38.w,
height: 20.h,
),
),
)
],
),
if (widget.placeOrder &&
widget?.settleOrderInfo?.benefitDiscountAmount != null &&
widget?.settleOrderInfo?.benefitDiscountAmount != "0")
widget.settleOrderInfo.memberVO.memberRankVo.rankName == "黄金会员")
Container(
margin: EdgeInsets.only(bottom: 13),
margin: EdgeInsets.only(
bottom: 13,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -155,19 +178,66 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
),
),
),
Text(
widget.settleOrderInfo.benefitDiscountAmount,
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF32A060),
fontWeight: MyFontWeight.semi_bold,
),
),
// Text(
// "${widget.settleOrderInfo.benefitDiscountAmount}",
// textAlign: TextAlign.end,
// style: TextStyle(
// fontSize: 14.sp,
// color: Color(0xFF32A060),
// fontFamily: 'JDZhengHT',
// fontWeight: MyFontWeight.regular,
// ),
// ),
Platform.isAndroid
? Switch.adaptive(
value:
(widget.coupons != null && widget.coupons != "" ||
widget.promotions != null &&
widget.promotions != "" ||
widget.payChannell == 5 ||
widget.payChannell == 7 || (widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false
: vipBenefit,
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
activeColor: Color(0xff32A060),
onChanged: (bool value) {
setState(() {
vipBenefit = !vipBenefit;
widget.vipBenefitSelect(vipBenefit);
});
},
)
: GestureDetector(
onTap: () {
setState(() {
vipBenefit = !vipBenefit;
widget.vipBenefitSelect(vipBenefit);
});
},
child: Container(
padding: EdgeInsets.only(bottom: 18.w),
alignment: Alignment.center,
child: Image.asset(
(((widget.coupons != null && widget.coupons != "") ||
(widget.promotions != null && widget.promotions != "" )||
widget.payChannell == 5 || widget.payChannell == 7||
(widget.payChannell == 4 && widget.settleOrderInfo.promotionInfoList.length <=0 && widget.settleOrderInfo.couponList.length <= 0))
? false
: vipSelect)
? "assets/image/vip_price.webp"
: "assets/image/vip_unprice.webp",
width: 38.w,
height: 20.h,
),
),
)
],
),
),
if (widget.placeOrder && widget.tableId <= 0 && !(widget?.settleOrderInfo?.isRaise ?? false))
if (widget.placeOrder &&
widget.tableId <= 0 &&
!(widget?.settleOrderInfo?.isRaise ?? false))
InkWell(
onTap: () {
widget.activityCart();

67
lib/settlement/settlement_view/coupon.dart

@ -24,9 +24,9 @@ class CouponWidget extends StatefulWidget {
}
}
class _CouponWidget extends State<CouponWidget> {
bool selectIndex = false;
@override
Widget build(BuildContext context) {
return Container(
@ -101,9 +101,13 @@ class _CouponWidget extends State<CouponWidget> {
// ),
// flex: 1,
// ),
SizedBox(width:8,),
SizedBox(
width: 8,
),
couponListWidget(context),
SizedBox(width:5,),
SizedBox(
width: 5,
),
Expanded(
flex: 2,
child: Column(
@ -172,7 +176,13 @@ class _CouponWidget extends State<CouponWidget> {
margin: EdgeInsets.only(right: 23.w),
child: GestureDetector(
onTap: () {
Navigator.of(context).pop(widget.couponList);
if(widget.selected == true){
Navigator.of(context)
.pop();
}else{
Navigator.of(context)
.pop(widget.couponList);
}
},
child: Image.asset(
widget.selected
@ -233,7 +243,7 @@ class _CouponWidget extends State<CouponWidget> {
onTap: () {
setState(() {
widget.couponList.isEx =
!(widget.couponList.isEx ?? false);
!(widget.couponList.isEx ?? false);
});
},
),
@ -262,18 +272,21 @@ class _CouponWidget extends State<CouponWidget> {
),
],
),
if ((widget.couponList?.isEx ?? false) && (widget.couponList.usableReason != null))
if ((widget.couponList?.isEx ?? false) &&
(widget.couponList.usableReason != null))
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(child: Text(
Expanded(
child: Text(
"不可用原因:",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 10.sp,
),
)),
Expanded(child: Align(
Expanded(
child: Align(
alignment: Alignment.centerRight,
child: Text(
widget.couponList.usableReason ?? "",
@ -283,8 +296,7 @@ class _CouponWidget extends State<CouponWidget> {
fontSize: 10.sp,
),
),
))
,
)),
],
),
],
@ -312,7 +324,7 @@ class _CouponWidget extends State<CouponWidget> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xff32A060),
color: Color(0xff32A060),
),
),
SizedBox(
@ -325,20 +337,19 @@ class _CouponWidget extends State<CouponWidget> {
style: TextStyle(
fontSize: 30.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
color: Color(0xff32A060),
),
),
],
),
Text(
S.of(context).manyuankeyong(widget.couponList != null
? ("${widget.couponList.fullAmount}" ?? "0")
.toString()
? ("${widget.couponList.fullAmount}" ?? "0").toString()
: ""),
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
color: Color(0xff32A060),
),
),
],
@ -349,13 +360,13 @@ class _CouponWidget extends State<CouponWidget> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.only(bottom:10,top: 7,left: 12),
padding: EdgeInsets.only(bottom: 10, top: 7, left: 12),
child: Text(
S.of(context).duihuanquan,
style: TextStyle(
fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
color: Color(0xff32A060),
),
),
),
@ -364,7 +375,7 @@ class _CouponWidget extends State<CouponWidget> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
color: Color(0xff32A060),
),
),
],
@ -375,7 +386,7 @@ class _CouponWidget extends State<CouponWidget> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.only(bottom:10,top: 7,left: 12),
padding: EdgeInsets.only(bottom: 10, top: 7, left: 12),
child: Text(
S.of(context).duihuanquan,
style: TextStyle(
@ -410,27 +421,29 @@ class _CouponWidget extends State<CouponWidget> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: widget.couponList.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
color: widget.couponList.status == 3
? Color(0xFFB3B3B3)
: Color(0xff32A060),
),
),
SizedBox(
height: 4.h,
),
Text(
widget.couponList != null
widget.couponList != null
? "${AppUtils.calculateDouble(double.tryParse(widget.couponList.limitAmount) ?? 0)}"
: "",
style: TextStyle(
fontSize: 28.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
color: Color(0xff32A060),
),
),
],
),
],
);
}else{
} else {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -441,14 +454,14 @@ class _CouponWidget extends State<CouponWidget> {
textBaseline: TextBaseline.alphabetic,
children: [
Text(
widget.couponList != null
widget.couponList != null
? "${(widget.couponList.discountPercent / 10.0 >= 10) ? 10 : widget.couponList.discountPercent / 10.0}" ??
"0"
"0"
: "",
style: TextStyle(
fontSize: 30.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
color: Color(0xff32A060),
),
),
SizedBox(

7
lib/settlement/settlement_view/pay_method.dart

@ -16,8 +16,9 @@ class PayMethod extends StatefulWidget {
final String promotions;
final bool useVipPriceSelect;
final SettleOrderInfo settleOrderInfo;
final bool useBenefitSelect;
PayMethod(this.payChannelCheck,this.coupons,this.promotions,this.useVipPriceSelect,this.settleOrderInfo);
PayMethod(this.payChannelCheck,this.coupons,this.promotions,this.useVipPriceSelect,this.settleOrderInfo,this.useBenefitSelect);
@override
State<StatefulWidget> createState() {
@ -184,7 +185,7 @@ class _PayMethod extends State<PayMethod> {
onTap: () {
setState(() {
checkIndex = 3;
if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect){
if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){
SmartDialog.show(
widget: SettlementTips(
() {
@ -238,7 +239,7 @@ class _PayMethod extends State<PayMethod> {
onTap: () {
setState(() {
checkIndex = 4;
if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect){
if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect || widget.useBenefitSelect){
SmartDialog.show(
widget: SettlementTips(
() {

12
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -19,6 +19,7 @@ class SettlementOrderCommodity extends StatefulWidget {
final String pageType;
final bool useVipPriceSelect;
final bool showVipTips;
final bool useBenefitSelect;
SettlementOrderCommodity(
this.isTakeOut,
@ -27,7 +28,8 @@ class SettlementOrderCommodity extends StatefulWidget {
this.tableId,
this.pageType,
this.useVipPriceSelect,
this.showVipTips);
this.showVipTips,
this.useBenefitSelect,);
@override
State<StatefulWidget> createState() {
@ -118,6 +120,12 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
widget?.settleOrderInfo?.discountAmount ?? ""));
}
if (widget.useBenefitSelect &&
(widget?.settleOrderInfo?.benefitDiscountAmount != "0")) {
widgets.add(vipItem(Color(0xFFFF7A1A), "VIP优惠金额",
widget?.settleOrderInfo?.benefitDiscountAmount ?? ""));
}
if (widget.showVipTips) {
widgets.add(GestureDetector(
child: Container(
@ -503,7 +511,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
} else if (widget.tableId < 0) {
return "0";
} else {
return widget?.settleOrderInfo?.discountAmount ?? "0";
return AppUtils.calculateDouble(double.tryParse(widget?.settleOrderInfo?.discountAmount ?? "0") + double.tryParse(widget?.settleOrderInfo?.benefitDiscountAmount ?? "0"));
}
}

4
lib/store/store_order.dart

@ -677,8 +677,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
),
),
autoplay: true,
duration: 1500,
autoplayDelay: 2500,
duration: 1000,
autoplayDelay: 2000,
itemBuilder: (context, position) {
return Container(
child: MImage(

Loading…
Cancel
Save