优化结算

This commit is contained in:
gyq
2025-10-14 13:34:28 +08:00
parent 125365f3dc
commit 25ae5a7b80
10 changed files with 78 additions and 40 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="选择会员">
@@ -443,7 +443,7 @@ function upadatePayData() {
vipPrice: store.shopInfo.isMemberPrice ? goodsStore.showVipPrice : 0, // 是否使用会员价
allPack: goodsStore.allSelected, // 是否整单打包
userId: goodsStore.vipUserInfo.userId || '',
seatNum: goodsStore.tableInfo.num, // 用餐人数
seatNum: goodsStore.allSelected ? 0 : goodsStore.tableInfo.num, // 用餐人数
originAmount: formatDecimal(goodsStore.cartInfo.costSummary.goodsRealAmount), // 订单原金额(包含打包费+餐位费) 不含折扣价格
discountRatio: 1, // 折扣比例(计算时 向上取整保留 两位小数)
discountAmount: discountRateNumber.value, // 手动优惠金额