Browse Source

登录页ui高度更改;

店铺轮播时间更改;
增加新字段(useBenefit),是否使用会员等级价格的优惠;
修改绿币,助农,平台余额包含赠送活动赠送余额时,不能跟该活动共享;
会员等级的优惠:不与任何活动共享;不与特殊支付余额共享;
火锅店vip权益,等级会员优惠选择,显示待更改;
火锅店数据显示的是getOrderDetail接口中数据;普通店铺数据显示的都是getOrderInfo接口中数据;
new_revision_app
wurong 2 years ago
parent
commit
6c89629059
  1. 1
      lib/login/new_login_page.dart
  2. 14
      lib/retrofit/data/min_order_info.dart
  3. 63
      lib/settlement/settlement.dart
  4. 201
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  5. 25
      lib/settlement/settlement_view/pay_method.dart
  6. 21
      lib/settlement/settlement_view/settlement_order_commodity.dart
  7. 6
      lib/store/store_order.dart
  8. 2
      lib/union/union_list.dart

1
lib/login/new_login_page.dart

@ -284,6 +284,7 @@ class _NewLoginPage extends State<NewLoginPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset:false,
body: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {

14
lib/retrofit/data/min_order_info.dart

@ -60,7 +60,8 @@ class MinOrderInfo {
String finalPayPrice,
String activityNoPrice,
String activityDiscountPrice,
String totalDiscountPrice,
String totalDiscountPrice,
String benefitDiscountAmount,
int orderSource,
dynamic address,
dynamic discountPercent,
@ -84,7 +85,8 @@ class MinOrderInfo {
bool onCredit,
OrderInfoVo orderInfoVo,
String endPayTime,
String orderSumPrice,}){
String orderSumPrice,
bool isRaise,}){
this.id = id;
this.createTime = createTime;
this.createUser = createUser;
@ -143,6 +145,7 @@ class MinOrderInfo {
this.activityNoPrice = activityNoPrice;
this.activityDiscountPrice = activityDiscountPrice;
this.totalDiscountPrice = totalDiscountPrice;
this.benefitDiscountAmount = benefitDiscountAmount;
this.orderSource = orderSource;
this.address = address;
this.discountPercent = discountPercent;
@ -167,6 +170,7 @@ class MinOrderInfo {
this.orderInfoVo = orderInfoVo;
this.endPayTime = endPayTime;
this.orderSumPrice = orderSumPrice;
this.isRaise = isRaise;
}
MinOrderInfo.fromJson(dynamic json) {
@ -228,6 +232,7 @@ class MinOrderInfo {
this.activityNoPrice = json['activityNoPrice'];
this.activityDiscountPrice = json['activityDiscountPrice'];
this.totalDiscountPrice = json['totalDiscountPrice'];
this.benefitDiscountAmount = json['benefitDiscountAmount'];
this.orderSource = json['orderSource'];
this.address = json['address'];
this.discountPercent = json['discountPercent'];
@ -257,6 +262,7 @@ class MinOrderInfo {
this.orderInfoVo = json['orderInfoVo'] != null ? OrderInfoVo.fromJson(json['orderInfoVo']) : null;
this.endPayTime = json['endPayTime'];
this.orderSumPrice = json['orderSumPrice'];
this.isRaise = json['isRaise'];
}
String id;
String createTime;
@ -316,6 +322,7 @@ class MinOrderInfo {
String activityNoPrice;
String activityDiscountPrice;
String totalDiscountPrice;
String benefitDiscountAmount;
int orderSource;
dynamic address;
dynamic discountPercent;
@ -340,6 +347,7 @@ class MinOrderInfo {
OrderInfoVo orderInfoVo;
String endPayTime;
String orderSumPrice;
bool isRaise;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
@ -401,6 +409,7 @@ class MinOrderInfo {
map['activityNoPrice'] = this.activityNoPrice;
map['activityDiscountPrice'] = this.activityDiscountPrice;
map['totalDiscountPrice'] = this.totalDiscountPrice;
map['benefitDiscountAmount'] = this.benefitDiscountAmount;
map['orderSource'] = this.orderSource;
map['address'] = this.address;
map['discountPercent'] = this.discountPercent;
@ -429,6 +438,7 @@ class MinOrderInfo {
}
map['endPayTime'] = this.endPayTime;
map['orderSumPrice'] = this.orderSumPrice;
map['isRaise'] = this.isRaise;
return map;
}

63
lib/settlement/settlement.dart

@ -86,8 +86,8 @@ class _Settlement extends State<Settlement> {
bool useBenefitSelect = true;
bool isRaiseChannel = false;
ShoppingCart shopCarGoods;
String vipName;
String vipLevelName;
bool isVips = false;
@override
void initState() {
@ -111,6 +111,8 @@ class _Settlement extends State<Settlement> {
count1 = widget.arguments["buyNum"];
productId = widget.arguments["productId"];
shopCarGoods = widget.arguments["shoppingCart"];
vipLevelName = widget.arguments["vipLevelName"];
isVips = widget.arguments["isVips"];
if (tableId == 0) {
placeOrder = true;
@ -168,8 +170,8 @@ class _Settlement extends State<Settlement> {
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
useVipPriceSelect,
(useVipPriceSelect == true && isVips) ? false:useBenefitSelect,
count1,
payChannel,
tableId);
@ -242,7 +244,7 @@ class _Settlement extends State<Settlement> {
queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId);
}
if(!isRaiseChannel && settleOrderInfo.isRaise){
if(!isRaiseChannel && ((tableId > 0 ? (minOrderInfo?.isRaise ??false): settleOrderInfo.isRaise))){
isRaiseChannel = true;
queryOrderInfo(
address?.id,
@ -256,7 +258,7 @@ class _Settlement extends State<Settlement> {
useVipPriceSelect,
useBenefitSelect,
count1,
settleOrderInfo.isRaise ? 7 :payChannel,
(tableId > 0 ? minOrderInfo.isRaise : settleOrderInfo.isRaise) ? 7 :payChannel,
tableId);
}
} else {
@ -279,12 +281,12 @@ class _Settlement extends State<Settlement> {
value.setString('minMember', jsonEncode(baseData.data)),
},
);
//json里面的某个字段赋值
}
}
///
queryOrderDetails(id) async {
EasyLoading.show(status: S.current.zhengzaijiazai);
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({
"id": pageType != null ? widget.arguments["orderId"] : id ?? parentId,
}).catchError((error) {});
@ -293,8 +295,10 @@ class _Settlement extends State<Settlement> {
minOrderInfo = baseData.data;
coupons = minOrderInfo?.couponName ?? "";
});
EasyLoading.dismiss();
} else {
SmartDialog.showToast(baseData.msg ?? "", alignment: Alignment.center);
EasyLoading.dismiss();
}
}
@ -514,7 +518,7 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.orderTypeId = 0;
placeOrderFirst.parentCode = parentCode; //
placeOrderFirst.parentId = parentId; //
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") ? payChannel = 0 : (settleOrderInfo.isRaise ? 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 : "";
@ -522,8 +526,8 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.promotionInfoDTO.couponId =
(couponListBean != null && tableId <= 0) ? couponListBean.id : "";
// : widget.arguments["cid"] ?? "";
placeOrderFirst.promotionInfoDTO.useVipPrice = settleOrderInfo.isRaise ? false : useVipPriceSelect;
placeOrderFirst.promotionInfoDTO.useBenefit = (settleOrderInfo.benefitDiscountAmount == "0") ? false : useBenefitSelect;
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.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
@ -576,7 +580,7 @@ class _Settlement extends State<Settlement> {
});
}
}
// orderButton = false;
orderButton = false;
if (baseData != null && baseData.isSuccess) {
placeOrder = true;
this.downOrder = DownOrder.fromJson(baseData.data);
@ -584,7 +588,7 @@ class _Settlement extends State<Settlement> {
queryOrderDetails(parentId);
setState(() {});
} else {
// orderButton = false;
orderButton = false;
SmartDialog.showToast(baseData?.msg, alignment: Alignment.center);
}
}
@ -592,10 +596,10 @@ class _Settlement extends State<Settlement> {
///
querySettlement() async {
placeOrderFirst.id = parentId != "" ? parentId : downOrder.id;
placeOrderFirst.orderProductVOList = (downOrder == null)
placeOrderFirst.id = ((parentId != "") ? parentId : downOrder.id);
placeOrderFirst.orderProductVOList = ((downOrder == null)
? minOrderInfo.orderProductVOList
: downOrder.orderProductVOList;
: downOrder.orderProductVOList);
if (placeOrderFirst.payChannel == 1) {
if (Platform.isAndroid) {
@ -816,6 +820,7 @@ class _Settlement extends State<Settlement> {
(coupons != "" || promotions!="") ? false : useVipPriceSelect,
this.showVipTips,
(coupons != "" || promotions!="") ? false : useBenefitSelect,
placeOrder
),
/////
@ -848,11 +853,12 @@ class _Settlement extends State<Settlement> {
},
vipBenefitSelect,
payChannel,
vipLevelName,
),
if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo,useBenefitSelect),
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo,useBenefitSelect,tableId,minOrderInfo),
],
),
),
@ -914,21 +920,6 @@ class _Settlement extends State<Settlement> {
vertical: 5.h,
),
callback: () {
// if (orderButton) {
// SmartDialog.showToast("订单正在提交中...",
// alignment: Alignment.center);
// return;
// } else
// orderButton = true;
// 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()
@ -962,14 +953,14 @@ class _Settlement extends State<Settlement> {
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
(settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? "" :couponListBean?.id,
0,
promotion?.id ?? productId,
(settleOrderInfo.isRaise || payChannel == 5 || ((payChannel == 4 && settleOrderInfo.usePlateMoney == false))) ? "" :promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
(payChannel == 5 || payChannel == 7) ? false : useVipPriceSelect,
(payChannel == 5 || payChannel == 7)? false : useBenefitSelect,
(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);}
@ -991,7 +982,7 @@ class _Settlement extends State<Settlement> {
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
useBenefitSelect,
useVipPriceSelect == true ? false :useBenefitSelect,
count1,
payChannel,
tableId);}

201
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -9,6 +9,8 @@ import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../view_widget/settlement_tips_dialog.dart';
class ActivityCouponRemarks extends StatefulWidget {
final Function() couponCart;
final Function() activityCart;
@ -26,6 +28,7 @@ class ActivityCouponRemarks extends StatefulWidget {
final Function showVipTips;
final Function(bool useBenefitSelect) vipBenefitSelect;
final int payChannell;
final String vipLevelName;
ActivityCouponRemarks(
this.couponCart,
@ -42,7 +45,8 @@ class ActivityCouponRemarks extends StatefulWidget {
this.vipPriceSelect,
this.showVipTips,
this.vipBenefitSelect,
this.payChannell);
this.payChannell,
this.vipLevelName);
@override
State<StatefulWidget> createState() {
@ -105,14 +109,23 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
(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))
widget.payChannell == 5 || widget.payChannell == 7||
(widget.payChannell == 4 && widget.settleOrderInfo.usePlateMoney == false))
? false
: vipSelect,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
activeColor: Color(0xff32A060),
onChanged: (bool value) {
setState(() {
if(widget.settleOrderInfo.usePlateMoney == false || widget.payChannell == 5){
SmartDialog.show(
widget: SettlementTips(
() {
},
text: widget.payChannell == 5 ? "该支付余额为特殊活动充值, 不可参与任何活动" :"该用户平台余额为特殊活动充值, 不可参与任何活动",
));
return;
}
if ((widget?.settleOrderInfo?.memberVO?.isVip ??
false)) {
vipSelect = !vipSelect;
@ -157,89 +170,106 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
)
],
),
if (widget.placeOrder &&
widget.settleOrderInfo.memberVO.memberRankVo.rankName == "黄金会员")
Container(
margin: EdgeInsets.only(
bottom: 13,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
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(
// 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?.settleOrderInfo?.isRaise ?? false))
// Container(
// margin: EdgeInsets.only(
// bottom: 13,
// ),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// 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(
// // 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.usePlateMoney == false) )
// ? false
// : vipBenefit,
// materialTapTargetSize:
// MaterialTapTargetSize.shrinkWrap,
// activeColor: Color(0xff32A060),
// onChanged: (bool value) {
// setState(() {
// if(widget.settleOrderInfo.usePlateMoney == false || widget.payChannell == 5){
// SmartDialog.show(
// widget: SettlementTips(
// () {
// },
// text: widget.payChannell == 5 ? "该支付余额为特殊活动充值, 不可参与任何活动" :"该用户平台余额为特殊活动充值, 不可参与任何活动",
// ));
// return;
// }
// 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))
InkWell(
onTap: () {
if(widget.payChannell == 5){
SmartDialog.show(
widget: SettlementTips(
() {
},
text: "该支付余额为特殊活动充值, 不可参与任何活动",
));
return;
}
widget.activityCart();
},
child: Row(
@ -280,6 +310,15 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
if (widget.placeOrder && !(widget?.settleOrderInfo?.isRaise ?? false))
InkWell(
onTap: () {
if(widget.payChannell == 5){
SmartDialog.show(
widget: SettlementTips(
() {
},
text: "该支付余额为特殊活动充值, 不可参与任何活动",
));
return;
}
widget.couponCart();
},
child: Row(

25
lib/settlement/settlement_view/pay_method.dart

@ -6,6 +6,7 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../retrofit/data/min_order_info.dart';
import '../../retrofit/data/settleOrderInfo.dart';
import '../../view_widget/settlement_tips_dialog.dart';
import '../../view_widget/tips_dialog.dart';
@ -17,8 +18,10 @@ class PayMethod extends StatefulWidget {
final bool useVipPriceSelect;
final SettleOrderInfo settleOrderInfo;
final bool useBenefitSelect;
final int tableId;
final MinOrderInfo minOrderInfo;
PayMethod(this.payChannelCheck,this.coupons,this.promotions,this.useVipPriceSelect,this.settleOrderInfo,this.useBenefitSelect);
PayMethod(this.payChannelCheck,this.coupons,this.promotions,this.useVipPriceSelect,this.settleOrderInfo,this.useBenefitSelect,this.tableId,this.minOrderInfo);
@override
State<StatefulWidget> createState() {
@ -35,7 +38,7 @@ class _PayMethod extends State<PayMethod> {
@override
void initState() {
super.initState();
checkIndex = (widget?.settleOrderInfo?.isRaise ?? false) ? 4:5;
checkIndex = ((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)) ? 4:5;
SharedPreferences.getInstance().then((value) {
Map<String, dynamic> memberInfo =
jsonDecode(value.getString("minMember"));
@ -89,7 +92,7 @@ class _PayMethod extends State<PayMethod> {
),
),
),
if(!(widget.settleOrderInfo?.isRaise ?? false))
if(!((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)))
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
@ -130,11 +133,11 @@ class _PayMethod extends State<PayMethod> {
],
),
),
if(!(widget.settleOrderInfo?.isRaise ?? false))
if(!((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)))
SizedBox(
height: 10,
),
if(!(widget.settleOrderInfo?.isRaise ?? false))
if(!((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)))
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
@ -175,11 +178,11 @@ class _PayMethod extends State<PayMethod> {
],
),
),
if(!(widget.settleOrderInfo?.isRaise ?? false))
if(!((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)))
SizedBox(
height: 10,
),
if(mGreenMoney!="0.00" && !(widget.settleOrderInfo?.isRaise ?? false))
if(mGreenMoney!="0.00" && !((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)))
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
@ -229,11 +232,11 @@ class _PayMethod extends State<PayMethod> {
],
),
),
if(mGreenMoney!="0.00" && !(widget.settleOrderInfo?.isRaise ?? false))
if(mGreenMoney!="0.00" && !((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)))
SizedBox(
height: 10,
),
if(mRaiseMoney!="0" && (widget.settleOrderInfo?.isRaise ?? false))
if(mRaiseMoney!="0" && ((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)))
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
@ -283,11 +286,11 @@ class _PayMethod extends State<PayMethod> {
],
),
),
if(mRaiseMoney!="0" && (widget.settleOrderInfo?.isRaise ?? false))
if(mRaiseMoney!="0" && ((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)))
SizedBox(
height: 10,
),
if(!(widget.settleOrderInfo?.isRaise ?? false))
if(!((widget.minOrderInfo != null) ? (widget?.minOrderInfo?.isRaise??false) : (widget?.settleOrderInfo?.isRaise ?? false)))
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {

21
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -20,6 +20,7 @@ class SettlementOrderCommodity extends StatefulWidget {
final bool useVipPriceSelect;
final bool showVipTips;
final bool useBenefitSelect;
final bool placeOrder;
SettlementOrderCommodity(
this.isTakeOut,
@ -29,7 +30,8 @@ class SettlementOrderCommodity extends StatefulWidget {
this.pageType,
this.useVipPriceSelect,
this.showVipTips,
this.useBenefitSelect,);
this.useBenefitSelect,
this.placeOrder);
@override
State<StatefulWidget> createState() {
@ -114,16 +116,16 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
if (widget.useVipPriceSelect &&
widget.settleOrderInfo.memberVO.isVip &&
(!widget.settleOrderInfo.isRaise) &&
(widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)) &&
(widget?.settleOrderInfo?.discountAmount != "0")) {
widgets.add(vipItem(Color(0xFFFF7A1A), "VIP优惠",
widget?.settleOrderInfo?.discountAmount ?? ""));
(widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.discountAmount ?? ""):(widget?.settleOrderInfo?.discountAmount ?? "")));
}
if (widget.useBenefitSelect &&
(widget?.settleOrderInfo?.benefitDiscountAmount != "0")) {
widgets.add(vipItem(Color(0xFFFF7A1A), "VIP优惠金额",
widget?.settleOrderInfo?.benefitDiscountAmount ?? ""));
(widget?.settleOrderInfo?.benefitDiscountAmount != "0") && ((widget.tableId > 0 ? !(widget?.minOrderInfo?.isRaise ?? false) : !(widget?.settleOrderInfo?.isRaise ?? false)))) {
widgets.add(vipItem(Color(0xFFFF7A1A), "会员优惠金额",
(widget.minOrderInfo != null && widget.minOrderInfo.orderProductVOList != null) ? (widget.minOrderInfo?.benefitDiscountAmount ?? "") :(widget?.settleOrderInfo?.benefitDiscountAmount ?? "")));
}
if (widget.showVipTips) {
@ -462,7 +464,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
),
Container(
child: Text(
"已优惠:¥${discountPrice()}",
"已优惠:¥${(widget.tableId > 0 ? (widget?.minOrderInfo?.isRaise ?? false) : (widget?.settleOrderInfo?.isRaise ?? false)) ? "0": discountPrice()}",
style: TextStyle(
fontSize: 12.sp,
fontFamily: 'JDZhengHT',
@ -504,10 +506,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
String discountPrice() {
if (widget.minOrderInfo != null) {
return AppUtils.calculateDouble(
double.tryParse(widget.minOrderInfo?.couponSubPrice ?? "0") +
double.tryParse(
widget.settleOrderInfo?.benefitDiscountAmount ?? "0"));
return AppUtils.calculateDouble(double.tryParse(widget.minOrderInfo?.totalDiscountPrice ?? "0"));
} else if (widget.tableId < 0) {
return "0";
} else {

6
lib/store/store_order.dart

@ -34,6 +34,7 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../retrofit/data/settleOrderInfo.dart';
import '../view_widget/border_text.dart';
import '../view_widget/request_permission.dart';
@ -66,6 +67,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
String tenant = "";
String storeId = "";
int numberOfPeople = 0;
String vipLevelName;
MemberVo memberVo;
///token
String minToken;
@ -155,6 +158,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
value.setString('minMember', jsonEncode(baseData.data)),
},
);
memberVo = MemberVo.fromJson(baseData.data);
}
}
@ -650,6 +654,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
"shoppingCart": shopCarGoods,
"numberOfPeople": numberOfPeople,
"distance":widget.arguments["distance"],
"vipLevelName":memberVo.memberRankVo.rankName,
"isVips":memberVo.isVip,
},
);
if (tableId > 0) {

2
lib/union/union_list.dart

@ -229,7 +229,7 @@ class _UnionList extends State<UnionList> {
height: 40.h,
),
Text(
store.storeName,
store?.storeName ?? "",
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF0D0D0D),

Loading…
Cancel
Save