Browse Source

Merge remote-tracking branch 'origin/new_revision_app' into new_revision_app

dart3_last
boom 2 years ago
parent
commit
92573a9250
  1. BIN
      assets/image/2x/vip_price.webp
  2. BIN
      assets/image/2x/vip_unprice.webp
  3. BIN
      assets/image/3x/vip_price.webp
  4. BIN
      assets/image/3x/vip_unprice.webp
  5. BIN
      assets/image/vip_price.webp
  6. BIN
      assets/image/vip_unprice.webp
  7. 191
      lib/settlement/settlement_view/activity_coupon_remarks.dart

BIN
assets/image/2x/vip_price.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/vip_unprice.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/3x/vip_price.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/3x/vip_unprice.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/vip_price.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

BIN
assets/image/vip_unprice.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

191
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@ -24,20 +26,19 @@ class ActivityCouponRemarks extends StatefulWidget {
final Function showVipTips; final Function showVipTips;
ActivityCouponRemarks( ActivityCouponRemarks(
this.couponCart, this.couponCart,
this.activityCart, this.activityCart,
this.settleOrderInfo, this.settleOrderInfo,
this.minOrderInfo, this.minOrderInfo,
this.coupons, this.coupons,
this.promotions, this.promotions,
this.couponCount, this.couponCount,
this.placeOrder, this.placeOrder,
this.remark, this.remark,
this.editRemark, this.editRemark,
this.tableId, this.tableId,
this.vipPriceSelect, this.vipPriceSelect,
this.showVipTips this.showVipTips);
);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -64,12 +65,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
// height: 122.h / (!widget.placeOrder ? 2 : 1), // height: 122.h / (!widget.placeOrder ? 2 : 1),
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 16, right: 16, top: 15, bottom: 14),
left: 16,
right: 16,
top: 15,
bottom: 14
),
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 16, left: 16,
right: 16, right: 16,
@ -81,70 +77,98 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
// if(widget?.settleOrderInfo?.memberVO?.isVip ?? false) // if(widget?.settleOrderInfo?.memberVO?.isVip ?? false)
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
flex: 1, flex: 1,
child: Text( child: Text(
"VIP价格", "VIP价格",
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF353535), color: Color(0xFF353535),
),
), ),
), ),
Switch.adaptive( ),
value: (widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect, Platform.isAndroid ?
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, Switch.adaptive(
activeColor: Color(0xff32A060), value: (widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect,
onChanged: (bool value) { materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
setState(() { activeColor: Color(0xff32A060),
if((widget?.settleOrderInfo?.memberVO?.isVip ?? false)){ onChanged: (bool value) {
vipSelect = !vipSelect; setState(() {
widget.vipPriceSelect(vipSelect); if((widget?.settleOrderInfo?.memberVO?.isVip ?? false)){
}else{ vipSelect = !vipSelect;
widget.showVipTips(); widget.vipPriceSelect(vipSelect);
return; }else{
} widget.showVipTips();
}); return;
}, }
});
},
):
GestureDetector(
onTap: () {
setState(() {
// (widget.coupons != null && widget.coupons != ""||widget.promotions != null && widget.promotions != "") ? false:vipSelect,
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(
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") ),
Container( if (widget.placeOrder &&
margin:EdgeInsets.only(bottom: 13), widget?.settleOrderInfo?.benefitDiscountAmount != null &&
child:Row( widget?.settleOrderInfo?.benefitDiscountAmount != "0")
mainAxisAlignment: MainAxisAlignment.center, Container(
crossAxisAlignment: CrossAxisAlignment.center, margin: EdgeInsets.only(bottom: 13),
children: [ child: Row(
Expanded( mainAxisAlignment: MainAxisAlignment.center,
flex: 1, crossAxisAlignment: CrossAxisAlignment.center,
child: Text( children: [
"会员优惠金额", Expanded(
flex: 1,
child: Text(
"会员优惠金额",
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
),
Text(
widget.settleOrderInfo.benefitDiscountAmount,
textAlign: TextAlign.end,
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF353535), color: Color(0xFF32A060),
fontWeight: MyFontWeight.semi_bold,
), ),
), ),
), ],
Text( ),
widget.settleOrderInfo.benefitDiscountAmount,
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF32A060),
fontWeight: MyFontWeight.semi_bold,
),
),
],
), ),
), if (widget.placeOrder && widget.tableId <= 0)
if (widget.placeOrder && widget.tableId <=0)
InkWell( InkWell(
onTap: () { onTap: () {
widget.activityCart(); widget.activityCart();
@ -245,7 +269,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
), ),
Expanded( Expanded(
child: Text( child: Text(
widget.remark != "" ? widget.remark:"点击添加备注", widget.remark != "" ? widget.remark : "点击添加备注",
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
@ -286,13 +310,12 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
String coupon = ""; String coupon = "";
if (widget.coupons == null || widget.coupons == "") { if (widget.coupons == null || widget.coupons == "") {
coupon = "未选择任何优惠券"; coupon = "未选择任何优惠券";
if(widget.placeOrder) if (widget.placeOrder) if (widget.minOrderInfo == null ||
if(widget.minOrderInfo == null || widget.minOrderInfo.orderInfoVo.couponList == null) {
widget.minOrderInfo.orderInfoVo.couponList == null) coupon = "未选择任何优惠券";
{coupon = "未选择任何优惠券";} } else if (widget.promotions != null && widget.promotions != "") {
else if(widget.promotions != null && widget.promotions != ""){ coupon = "优惠券与活动不可同享";
coupon = "优惠券与活动不可同享"; }
}
if (widget.settleOrderInfo == null || if (widget.settleOrderInfo == null ||
widget.settleOrderInfo.couponList == null) { widget.settleOrderInfo.couponList == null) {
coupon = "暂无可选优惠券"; coupon = "暂无可选优惠券";

Loading…
Cancel
Save