修改可退款金额计算公式
This commit is contained in:
@@ -347,27 +347,48 @@
|
||||
}
|
||||
|
||||
const canTuiKuanPrice = computed(() => {
|
||||
return props.data.reduce((prve, cur) => {
|
||||
// const curTotal=cur.info.filter(v=>!v.userCouponId).reduce((a,b)=>{
|
||||
// return a+b.priceAmount*1
|
||||
// },0)
|
||||
const curTotal = cur.info.filter(v => !v.userCouponId)
|
||||
.reduce((a, b) => {
|
||||
return a + b.priceAmount * 1
|
||||
}, 0)
|
||||
return prve + curTotal
|
||||
}, 0)
|
||||
})
|
||||
const TuiKuanPrice = computed(() => {
|
||||
return props.data.reduce((prve, cur) => {
|
||||
// const curTotal=cur.info.filter(v=>!v.userCouponId).reduce((a,b)=>{
|
||||
// return a+b.priceAmount*1
|
||||
// },0)
|
||||
const curTotal = cur.info.filter(v => isTui(v)&&!v.userCouponId)
|
||||
.reduce((a, b) => {
|
||||
return a + b.priceAmount * 1
|
||||
}, 0)
|
||||
return prve + curTotal
|
||||
}, 0)
|
||||
})
|
||||
const noTuiKuanPrice=computed(()=>{
|
||||
return props.data.reduce((prve, cur) => {
|
||||
// const curTotal=cur.info.filter(v=>!v.userCouponId).reduce((a,b)=>{
|
||||
// return a+b.priceAmount*1
|
||||
// },0)
|
||||
const curTotal = cur.info.filter(v => canTuiKuan(props.orderInfo, v) && !v.userCouponId)
|
||||
const curTotal = cur.info.filter(v => !isTui(v)&&!v.userCouponId)
|
||||
.reduce((a, b) => {
|
||||
return a + b.priceAmount * 1
|
||||
}, 0)
|
||||
return prve + curTotal
|
||||
}, 0)
|
||||
})
|
||||
|
||||
function returnCanTuiMoney(item) {
|
||||
console.log(canTuiKuanPrice.value);
|
||||
if (props.orderInfo.status == 'unpaid') {
|
||||
return returnTotalMoney(item)
|
||||
} else {
|
||||
if(props.orderInfo.pointsDiscountAmount>0||props.orderInfo.fullCouponDiscountAmount>0){
|
||||
|
||||
return (item.priceAmount / (canTuiKuanPrice.value + seatFeePrice.value * 1) * canTuiKuanPrice.value).toFixed(
|
||||
2)
|
||||
const bili=(item.priceAmount/canTuiKuanPrice.value*100).toFixed(2)/100
|
||||
console.log(bili);
|
||||
return ((props.orderInfo.amount)*bili).toFixed(2)
|
||||
// return (item.priceAmount / (canTuiKuanPrice.value + seatFeePrice.value * 1) * props.orderInfo.amount).toFixed(
|
||||
// 2)
|
||||
}else{
|
||||
return item.priceAmount
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user