diff --git a/components/my-components/edit-discount.vue b/components/my-components/edit-discount.vue index d450c04..2e2c5ac 100644 --- a/components/my-components/edit-discount.vue +++ b/components/my-components/edit-discount.vue @@ -69,6 +69,10 @@ price: { type: [Number,String], default: 0 + }, + nowPrice:{ + type: [Number,String], + default: 0 } }) function currentPriceInput(newval){ diff --git a/pagesOrder/detail/components/list.vue b/pagesOrder/detail/components/list.vue index 1a529a3..f670809 100644 --- a/pagesOrder/detail/components/list.vue +++ b/pagesOrder/detail/components/list.vue @@ -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 } diff --git a/pagesOrder/pay-order/pay-order.vue b/pagesOrder/pay-order/pay-order.vue index 93eb161..5c50e1f 100644 --- a/pagesOrder/pay-order/pay-order.vue +++ b/pagesOrder/pay-order/pay-order.vue @@ -1,7 +1,7 @@