修改订单详情未支付时按照订单返回priceAmount展示

This commit is contained in:
2024-11-25 16:23:27 +08:00
parent c9caed9579
commit e59a18ca52

View File

@@ -389,7 +389,7 @@
return seatFee return seatFee
}) })
function returnCanTuiMoney(item) { function returnCanTuiMoney(item) {
return item.canReturnAmount return props.orderInfo.status == 'unpaid'? item.priceAmount: item.canReturnAmount
if (props.orderInfo.status == 'unpaid') { if (props.orderInfo.status == 'unpaid') {
return returnTotalMoney(item) return returnTotalMoney(item)
} else { } else {
@@ -528,10 +528,12 @@
}) })
const allPrice = computed(() => { const allPrice = computed(() => {
const goodsPrice = props.data.reduce((prve, cur) => { const goodsPrice = props.data.reduce((prve, cur) => {
const curTotal = cur.info.reduce((a, const curTotal = cur.info.reduce((a,
b) => { b) => {
return a + b.canReturnAmount*1 return a +(props.orderInfo.status == 'unpaid'?b.priceAmount:b.canReturnAmount*1)
}, 0) }, 0)
return prve + curTotal return prve + curTotal
}, 0) }, 0)