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

This commit is contained in:
YeMingfei666 2024-11-25 16:23:27 +08:00
parent c9caed9579
commit e59a18ca52
1 changed files with 4 additions and 2 deletions

View File

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