增加商品券限制,过滤不满足使用条件的商品券

This commit is contained in:
2024-11-12 09:49:05 +08:00
parent 7d39bc2bee
commit c41f78fca8
5 changed files with 66 additions and 39 deletions

View File

@@ -37,6 +37,11 @@
custom-style="background-color: #FFF0DF; border-color: #FFF0DF; color: #FF9F2E;">
</uni-tag>
</view>
<view class="u-m-r-20 u-flex " v-if="item.userCouponId">
<uni-tag text="商品券抵扣"
custom-style="background-color: #FFF0DF; border-color: #FFF0DF; color: #FF9F2E;">
</uni-tag>
</view>
<view class="u-m-r-20 u-flex" v-if="item.pack">
<uni-tag
custom-style="background-color: #E6F0FF; border-color: #E6F0FF; color: #318AFE;"
@@ -56,7 +61,7 @@
<view class="line-th color-666 ">{{returnTotalMoney(item)}}
</view>
</template>
<template v-else-if="isGift(item)">
<template v-else-if="isGift(item)||item.userCouponId">
<view>0.00</view>
<view class="line-th color-666 ">{{returnTotalMoney(item)}}
</view>
@@ -149,7 +154,6 @@
<view></view>
<view>
<text>总计</text>
<!-- <text class="font-bold u-font-32">{{numSum([allPrice,seatFeePrice,packFee]) }}</text> -->
<text class="font-bold u-font-32">{{to2(allPrice*1+seatFeePrice*1+packFee*1) }}</text>
</view>
</view>
@@ -276,8 +280,7 @@
return goodsPrice.toFixed(2)
})
const youhuiAllPrice=computed(()=>{
console.log(freePrice.value);
return (freePrice.value*1+vipDiscountPrice.value*1).toFixed(2)
return (freePrice.value*1+vipDiscountPrice.value*1+props.orderInfo.fullCouponDiscountAmount+props.orderInfo.productCouponDiscountAmount+props.orderInfo.pointsDiscountAmount).toFixed(2)
})
const packFee = computed(() => {
const goodsPrice = props.data.reduce((prve, cur) => {
@@ -291,7 +294,7 @@
})
const allPrice = computed(() => {
return (goodsOriginAllPrice.value-freePrice.value-vipDiscountPrice.value).toFixed(2)
return (goodsOriginAllPrice.value-youhuiAllPrice.value).toFixed(2)
})
const goodsNumber = computed(() => {