修改订单支付详情优惠券积分等逻辑

This commit is contained in:
2024-11-22 14:41:13 +08:00
parent b69159d965
commit 70933ce1e4
6 changed files with 149 additions and 82 deletions

View File

@@ -315,12 +315,15 @@
memberId: option.memberId
})
canDikouGoodsArr = returnNewGoodsList(order.value.detailList || [])
res.fullReductionCoupon = res.fullReductionCoupon.filter((v) => {
res.fullReductionCoupon = res.fullReductionCoupon.map((v) => {
if(option.orderPrice<=0){
return false
return {...v,use:false}
}else{
return v.use && option.orderPrice * 1 >= v
.fullAmount * 1
return{
...v,
use:v.use && option.orderPrice * 1 >= v
.fullAmount * 1
}
}
})
@@ -340,8 +343,7 @@
const option = reactive({
orderId: '',
memberId: '',
orderPrice: 0,
discuount:100
orderPrice: 0
})
function toEmitChooseQuan(item) {
@@ -362,7 +364,7 @@
const goodsQuan = myQuan.res.productCoupon.filter(v => v.checked)
const fullReductionCoupon = myQuan.fullReductionCouponSel.id ? [myQuan.fullReductionCouponSel] : []
let coupArr = [...fullReductionCoupon, ...goodsQuan]
return returnCouponAllPrice(coupArr, canDikouGoodsArr, user.value,option.discuount)
return returnCouponAllPrice(coupArr, canDikouGoodsArr, user.value)
})
const payPrice = computed(() => {
const pay = option.orderPrice - discountAmount.value