订单详情,退菜,小计和优惠

This commit is contained in:
duan
2024-12-20 14:01:33 +08:00
parent db6b1af326
commit 13a4e21be5
2 changed files with 8 additions and 4 deletions

View File

@@ -541,12 +541,12 @@
const goodsPrice = props.data.reduce((prve, cur) => {
const curTotal = cur.info.reduce((a,
b) => {
return a + (props.orderInfo.status == 'unpaid' ? b.priceAmount : b
.canReturnAmount * 1)
return a + (b.status == 'unpaid' ? b.priceAmount : b.status == 'return' ? 0 : b.canReturnAmount * 1)
}, 0)
return prve + curTotal
}, 0)
return goodsPrice.toFixed(2)
if (props.orderInfo.status == 'unpaid') {
const n = goodsOriginAllPrice.value - youhuiAllPrice.value
return (n < 0 ? 0 : n).toFixed(2)