修复当支付金额为0时,抵扣券选中后会变不可用

This commit is contained in:
2024-11-20 10:12:49 +08:00
parent 0069b7c6fd
commit 61938a6947
4 changed files with 74 additions and 33 deletions

View File

@@ -315,13 +315,21 @@
memberId: option.memberId
})
canDikouGoodsArr = returnNewGoodsList(order.value.detailList || [])
res.fullReductionCoupon = res.fullReductionCoupon.filter((v) => v.use && option.orderPrice * 1 >= v
.fullAmount * 1)
res.fullReductionCoupon = res.fullReductionCoupon.filter((v) => {
if(option.orderPrice<=0){
return false
}else{
return v.use && option.orderPrice * 1 >= v
.fullAmount * 1
}
})
res.productCoupon = res.productCoupon.map(v => {
const calcCoup = returnProductCoupon(v, canDikouGoodsArr, user.value)
return {
...calcCoup,
checked: false
checked: false,
use:option.orderPrice<=0?false:v.use
}
}).filter((v) => v.use);
$fullReductionCoupon = res.fullReductionCoupon