修复优化

This commit is contained in:
gyq 2025-04-07 09:37:08 +08:00
parent 429283e542
commit ebf912ecd8
3 changed files with 9 additions and 7 deletions

View File

@ -164,9 +164,10 @@ export function commOrderPrintData(orderInfo) {
carts: [],
amount: formatDecimal(orderInfo.payAmount),
originAmount: formatDecimal(orderInfo.originAmount),
discountAmount: formatDecimal(
orderInfo.originAmount - orderInfo.orderAmount
),
discountAmount:
orderInfo.status == "unpaid"
? "0.00"
: formatDecimal(orderInfo.originAmount - orderInfo.orderAmount),
discount: orderInfo.discountRatio,
remark: orderInfo.remark,
orderInfo: orderInfo,

View File

@ -499,8 +499,8 @@ const noteList = ref([
//
function showDiscountModalHandle() {
let item = goodsStore.cartList[goodsStore.cartActiveIndex]
if ((item && item.id) && (!item.is_temporary || !item.is_gift)) {
//
if ((item && item.id) && (!item.is_temporary && !item.is_gift)) {
//
showDiscountModal.value = true
}
}

View File

@ -60,8 +60,9 @@
</div>
<div class="row between">
<span>折扣</span>
<span>
{{ formatDecimal(orderInfo.originAmount - orderInfo.orderAmount) }}
<span>-{{ orderInfo.status == "unpaid"
? "0.00"
: formatDecimal(orderInfo.originAmount - orderInfo.orderAmount) }}
</span>
</div>
<div class="line"></div>