Browse Source

1.助农积分支付选择更改;

dart3_last
wurong 2 years ago
parent
commit
fdcbc21046
  1. 23
      lib/settlement/settlement.dart
  2. 4
      lib/settlement/settlement_view/pay_method.dart

23
lib/settlement/settlement.dart

@ -84,6 +84,7 @@ class _Settlement extends State<Settlement> {
bool orderButton = false; bool orderButton = false;
bool useVipPriceSelect = false; bool useVipPriceSelect = false;
bool showVipTips = false; bool showVipTips = false;
bool isRaiseChannel = false;
@override @override
void initState() { void initState() {
@ -187,6 +188,7 @@ class _Settlement extends State<Settlement> {
tableId) async { tableId) async {
try { try {
EasyLoading.show(status: S.current.zhengzaijiazai); EasyLoading.show(status: S.current.zhengzaijiazai);
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({ BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId, "addressId": addressId,
"isTake": isTake, "isTake": isTake,
@ -229,6 +231,22 @@ class _Settlement extends State<Settlement> {
queryOrderDetails( queryOrderDetails(
pageType != null ? widget.arguments["orderId"] : parentId); pageType != null ? widget.arguments["orderId"] : parentId);
} }
if(!isRaiseChannel && settleOrderInfo.isRaise){
isRaiseChannel = true;
queryOrderInfo(
address?.id,
selectedBtn,
couponListBean?.id,
0,
promotion?.id ?? productId,
productSkuId ?? "",
actProductId ?? "",
actProductSkuId ?? "",
useVipPriceSelect,
count1,
settleOrderInfo.isRaise ? 7 :payChannel,
tableId);
}
} else { } else {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center); SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
} }
@ -466,7 +484,7 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.orderTypeId = 0; placeOrderFirst.orderTypeId = 0;
placeOrderFirst.parentCode = parentCode; // placeOrderFirst.parentCode = parentCode; //
placeOrderFirst.parentId = parentId; // placeOrderFirst.parentId = parentId; //
placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") ? payChannel = 0 : payChannel); placeOrderFirst.payChannel = ((placeOrderFirst.cartSum == "0.00") ? payChannel = 0 : (settleOrderInfo.isRaise ? 7:payChannel));
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean(); placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean();
placeOrderFirst.promotionInfoDTO.promotionId = placeOrderFirst.promotionInfoDTO.promotionId =
(promotion != null && tableId <= 0) ? promotion.id : ""; (promotion != null && tableId <= 0) ? promotion.id : "";
@ -544,6 +562,7 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.orderProductVOList = (downOrder == null) placeOrderFirst.orderProductVOList = (downOrder == null)
? minOrderInfo.orderProductVOList ? minOrderInfo.orderProductVOList
: downOrder.orderProductVOList; : downOrder.orderProductVOList;
if (placeOrderFirst.payChannel == 1) { if (placeOrderFirst.payChannel == 1) {
if (Platform.isAndroid) { if (Platform.isAndroid) {
if (!(await Min.isInitialize())) { if (!(await Min.isInitialize())) {
@ -790,7 +809,7 @@ class _Settlement extends State<Settlement> {
} }
), ),
if (placeOrder && joinA != JoinActivity.BargainBug) if (settleOrderInfo != null && placeOrder && joinA != JoinActivity.BargainBug)
/// ///
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo), PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect,settleOrderInfo),
], ],

4
lib/settlement/settlement_view/pay_method.dart

@ -34,6 +34,7 @@ class _PayMethod extends State<PayMethod> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
checkIndex = (widget?.settleOrderInfo?.isRaise ?? false) ? 4:5;
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
Map<String, dynamic> memberInfo = Map<String, dynamic> memberInfo =
jsonDecode(value.getString("minMember")); jsonDecode(value.getString("minMember"));
@ -41,7 +42,6 @@ class _PayMethod extends State<PayMethod> {
money = memberInfo["money"]; money = memberInfo["money"];
mGreenMoney = memberInfo["greenMoney"]; mGreenMoney = memberInfo["greenMoney"];
mRaiseMoney = memberInfo["raiseMoney"]; mRaiseMoney = memberInfo["raiseMoney"];
checkIndex = (widget?.settleOrderInfo?.isRaise ?? false) ? 5:4;
setState(() {}); setState(() {});
}); });
} }
@ -268,7 +268,7 @@ class _PayMethod extends State<PayMethod> {
width: 10, width: 10,
), ),
Text( Text(
"助农积分", S.of(context).zhunongjifen,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xff353535), color: Color(0xff353535),

Loading…
Cancel
Save