|
|
@ -172,9 +172,29 @@ class _Settlement extends State<Settlement> { |
|
|
|
"buyNum": buyNum, |
|
|
|
"buyNum": buyNum, |
|
|
|
"payChannel": payChannel |
|
|
|
"payChannel": payChannel |
|
|
|
}).catchError((error) {}); |
|
|
|
}).catchError((error) {}); |
|
|
|
|
|
|
|
this.promotion = null; |
|
|
|
|
|
|
|
promotions = ""; |
|
|
|
|
|
|
|
this.couponListBean = null; |
|
|
|
|
|
|
|
coupons = ""; |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
settleOrderInfo = baseData.data; |
|
|
|
settleOrderInfo = baseData.data; |
|
|
|
|
|
|
|
if((settleOrderInfo?.promotionId??"")!=""){ |
|
|
|
|
|
|
|
settleOrderInfo.promotionInfoList.forEach((element) { |
|
|
|
|
|
|
|
if(element.id == settleOrderInfo.promotionId){ |
|
|
|
|
|
|
|
this.promotion = element; |
|
|
|
|
|
|
|
promotions = promotion?.name ?? ""; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if((settleOrderInfo?.memberCouponId??"")!=""){ |
|
|
|
|
|
|
|
settleOrderInfo.couponList.forEach((element) { |
|
|
|
|
|
|
|
if(element.id == settleOrderInfo.memberCouponId){ |
|
|
|
|
|
|
|
this.couponListBean = element; |
|
|
|
|
|
|
|
coupons = couponListBean?.promotionName ?? ""; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
if (settleOrderInfo.orderProductList == null || |
|
|
|
if (settleOrderInfo.orderProductList == null || |
|
|
|
settleOrderInfo.orderProductList.length == 0) { |
|
|
|
settleOrderInfo.orderProductList.length == 0) { |
|
|
|
placeOrder = true; |
|
|
|
placeOrder = true; |
|
|
@ -668,8 +688,8 @@ class _Settlement extends State<Settlement> { |
|
|
|
couponCart, |
|
|
|
couponCart, |
|
|
|
activityCart, |
|
|
|
activityCart, |
|
|
|
settleOrderInfo, |
|
|
|
settleOrderInfo, |
|
|
|
payChannel == 4 ? null : coupons, |
|
|
|
coupons, |
|
|
|
payChannel == 4 ? null : promotions, |
|
|
|
promotions, |
|
|
|
couponCount(), |
|
|
|
couponCount(), |
|
|
|
placeOrder, |
|
|
|
placeOrder, |
|
|
|
remakers, |
|
|
|
remakers, |
|
|
@ -778,9 +798,9 @@ class _Settlement extends State<Settlement> { |
|
|
|
queryOrderInfo( |
|
|
|
queryOrderInfo( |
|
|
|
address?.id, |
|
|
|
address?.id, |
|
|
|
selectedBtn, |
|
|
|
selectedBtn, |
|
|
|
payChannel == 4 ? null : couponListBean?.id, |
|
|
|
couponListBean?.id, |
|
|
|
0, |
|
|
|
0, |
|
|
|
payChannel == 4 ? null : promotion?.id, |
|
|
|
promotion?.id, |
|
|
|
productSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
@ -819,10 +839,10 @@ class _Settlement extends State<Settlement> { |
|
|
|
}, |
|
|
|
}, |
|
|
|
); |
|
|
|
); |
|
|
|
// if (couponBean != null) { |
|
|
|
// if (couponBean != null) { |
|
|
|
this.couponListBean = couponBean; |
|
|
|
// this.couponListBean = couponBean; |
|
|
|
coupons = couponListBean?.promotionName ?? ""; |
|
|
|
// coupons = couponListBean?.promotionName ?? ""; |
|
|
|
promotions = ""; |
|
|
|
// promotions = ""; |
|
|
|
this.promotion = null; |
|
|
|
// this.promotion = null; |
|
|
|
queryOrderInfo( |
|
|
|
queryOrderInfo( |
|
|
|
address?.id, |
|
|
|
address?.id, |
|
|
|
selectedBtn, |
|
|
|
selectedBtn, |
|
|
@ -848,16 +868,16 @@ class _Settlement extends State<Settlement> { |
|
|
|
}, |
|
|
|
}, |
|
|
|
); |
|
|
|
); |
|
|
|
// if (pro != null) { |
|
|
|
// if (pro != null) { |
|
|
|
this.promotion = pro; |
|
|
|
// this.promotion = pro; |
|
|
|
promotions = promotion?.name ?? ""; |
|
|
|
// promotions = promotion?.name ?? ""; |
|
|
|
coupons = ""; |
|
|
|
// coupons = ""; |
|
|
|
this.couponListBean = null; |
|
|
|
// this.couponListBean = null; |
|
|
|
queryOrderInfo( |
|
|
|
queryOrderInfo( |
|
|
|
address?.id, |
|
|
|
address?.id, |
|
|
|
selectedBtn, |
|
|
|
selectedBtn, |
|
|
|
null, |
|
|
|
null, |
|
|
|
0, |
|
|
|
0, |
|
|
|
promotion != null ? promotion.id : (productId ?? null), |
|
|
|
promotion != null ? pro.id : (productId ?? null), |
|
|
|
productSkuId ?? "", |
|
|
|
productSkuId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|
actProductSkuId ?? "", |
|
|
|