优化新客立减不生效的问题

This commit is contained in:
gyq
2025-11-25 16:46:00 +08:00
parent bb06553701
commit c1ee82ee8a
2 changed files with 15 additions and 13 deletions

View File

@@ -15,9 +15,9 @@
<div class="t2">
<span>商品原价:{{ goodsStore.cartInfo.costSummary.goodsRealAmount || 0 }}</span>
<span>餐位费:{{ formatDecimal(goodsStore.cartInfo.costSummary.seatFee || 0)
}}</span>
}}</span>
<span>打包费:{{ formatDecimal(goodsStore.cartInfo.costSummary.packFee || 0)
}}</span>
}}</span>
<span>优惠:{{ formatDecimal(goodsStore.cartInfo.costSummary.totalDiscountAmount || 0) }}</span>
<!-- <span v-if="goodsStore.cartInfo.costSummary.goodsDiscountAmount">
<span>折扣:{{ goodsStore.cartInfo.costSummary.goodsDiscountAmount }}</span>
@@ -123,8 +123,8 @@
:total="Number(buyerTable.total)" v-model:current-page="buyerTable.page" @current-change="getBuyerList" />
</el-dialog>
<el-dialog v-model="showCoupon"
:title="`添加优惠(商品原价:¥${formatDecimal(goodsStore.cartInfo.costSummary.goodsRealAmount || 0)}`" top="5vh" width="80%"
@open="couponDialogOpen">
:title="`添加优惠(商品原价:¥${formatDecimal(goodsStore.cartInfo.costSummary.goodsRealAmount || 0)}`" top="5vh"
width="80%" @open="couponDialogOpen">
<div class="coupom_dialog">
<el-form ref="couponFormRef" :model="couponForm" label-width="100" label-position="left">
<el-form-item label="选择用户">
@@ -463,8 +463,8 @@ function upadatePayData() {
userId: goodsStore.vipUserInfo.userId || '',
allPack: goodsStore.allSelected,
limitRate: goodsStore.limitDiscountRes,
newCustomerDiscountId: goodsStore.newCustomerDiscount !== null ? goodsStore.newCustomerDiscount.id : '', // 新客立减Id
newCustomerDiscountAmount: goodsStore.newCustomerDiscount !== null ? goodsStore.newCustomerDiscount.amount : 0, // 新客立减金额
newCustomerDiscountId: goodsStore.newUserDiscount !== null ? goodsStore.newUserDiscount.id : goodsStore.newUserDiscount !== null ? goodsStore.newUserDiscount.id : '', // 新客立减Id
newCustomerDiscountAmount: goodsStore.newUserDiscount !== null ? goodsStore.newUserDiscount.amount : 0, // 新客立减金额
vipDiscountAmount: goodsStore.cartInfo.costSummary.vipDiscountAmount, // 超级会员折扣
}
}