修复当支付金额为0时,抵扣券选中后会变不可用
This commit is contained in:
@@ -230,4 +230,20 @@ export function returnCanUseFullReductionCoupon(coupArr, payPrice, selCoup) {
|
||||
use: v.use && isfullAmount
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//根据商品数量还有商品券数量返回优惠券可以使用的数量数组
|
||||
export function returnCanUseNumProductCoup(coupArr,){
|
||||
let productCoup = coupArr.filter(v => v.type == 2)
|
||||
//商品券分组
|
||||
let coupMap={}
|
||||
for(let i in productCoup){
|
||||
const coup=productCoup[i]
|
||||
if(coupMap.hasOwnProperty(coup.proId)){
|
||||
coupMap[coup.proId].push(coup)
|
||||
}else{
|
||||
coupMap[coup.proId]=[coup]
|
||||
}
|
||||
}
|
||||
return arr
|
||||
}
|
||||
Reference in New Issue
Block a user