代码更新
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-m-t-8">
|
||||
<view class="u-m-r-20 u-flex " v-if="item.payAmount<=0">
|
||||
<view class="u-m-r-20 u-flex" v-if="item.isGift">
|
||||
<uni-tag text="赠送"
|
||||
custom-style="background-color: #FFF0DF; border-color: #FFF0DF; color: #FF9F2E;">
|
||||
</uni-tag>
|
||||
@@ -57,8 +57,12 @@
|
||||
<view class="color-666">退款金额:</view>
|
||||
<view class="color-999 u-m-l-6">{{item.returnAmount}}</view>
|
||||
</view>
|
||||
<view class="u-m-r-20 u-font-24 u-flex" v-if="item.returnNum">
|
||||
<view class="color-666">退菜数量:</view>
|
||||
<view class="color-999 u-m-l-6">{{item.returnNum}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="color-999 u-font-24 u-m-t-8">{{item.productSkuName||''}}</view>
|
||||
<view class="color-999 u-font-24 u-m-t-8">{{item.skuName||''}}</view>
|
||||
|
||||
|
||||
<view class="u-m-t-12 color-666 u-font-24" v-if="item.remark">
|
||||
@@ -66,21 +70,20 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-text-right u-m-t-28">
|
||||
{{isTui(item)}}
|
||||
<template v-if="isTui(item)">
|
||||
<view>¥0.00</view>
|
||||
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}
|
||||
</view>
|
||||
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}</view>
|
||||
</template>
|
||||
<template v-else-if="isGift(item)||item.userCouponId">
|
||||
<template v-else-if="item.userCouponId">
|
||||
<view>¥0.00</view>
|
||||
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}
|
||||
</view>
|
||||
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="returnCanTuiMoney(item)*1!=returnTotalMoney(item)*1">
|
||||
<view>¥{{returnCanTuiMoney(item)}}</view>
|
||||
<view>¥{{returnTotalMoney(item)}}</view>
|
||||
<view class=" color-666 line-th">
|
||||
¥{{returnTotalMoney(item)}}</view>
|
||||
¥{{returnCanTuiMoney(item)}}</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view>¥{{returnTotalMoney(item)}}</view>
|
||||
@@ -353,7 +356,7 @@
|
||||
}
|
||||
|
||||
function returnTotalMoney(item) {
|
||||
return (item.payAmount * item.num).toFixed(2)
|
||||
return (item.payAmount).toFixed(2)
|
||||
}
|
||||
|
||||
const canTuiKuanPrice = computed(() => {
|
||||
@@ -394,12 +397,13 @@
|
||||
})
|
||||
|
||||
function returnCanTuiMoney(item) {
|
||||
return props.orderInfo.status == 'unpaid' ? item.payAmount : item.payAmount
|
||||
if (props.orderInfo.status == 'unpaid') {
|
||||
return returnTotalMoney(item)
|
||||
} else {
|
||||
if (props.orderInfo.pointsDiscountAmount > 0 || props.orderInfo.fullCouponDiscountAmount > 0) {
|
||||
return item.canReturnAmount
|
||||
} else if (item.price != item.unitPrice) {
|
||||
return item.price*item.num
|
||||
} else {
|
||||
return item.payAmount
|
||||
}
|
||||
@@ -476,8 +480,8 @@
|
||||
return 0
|
||||
}
|
||||
const goodsPrice = props.data.reduce((prve, cur) => {
|
||||
const curTotal = cur.info.filter(v => v.gift != true && v.status !== "return" && (v.isMember &&
|
||||
v.memberPrice) && (v.memberPrice != v.price)).reduce((
|
||||
const curTotal = cur.info.filter(v => v.discountSaleAmount <= 0 && v.isGift != 1 && v.status !== "return" && (v.price !=
|
||||
v.unitPrice) && (v.memberPrice != v.price)).reduce((
|
||||
a,
|
||||
b) => {
|
||||
return a + (b.num * (b.price - b.memberPrice))
|
||||
@@ -504,20 +508,15 @@
|
||||
}, 0)
|
||||
return goodsPrice.toFixed(2)
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* 已优惠金额
|
||||
*/
|
||||
const youhuiAllPrice = computed(() => {
|
||||
const n = props.orderInfo.originAmount - props.orderInfo.amount + vipDiscountPrice.value * 1
|
||||
const n = props.orderInfo.orderAmount - props.orderInfo.payAmount + vipDiscountPrice.value * 1
|
||||
return (n < 0 ? 0 : n).toFixed(2)
|
||||
// if(props.orderInfo.status!='unpaid'){
|
||||
// const seatfee=(props.orderInfo.amount==0&&allPrice.value==0)?seatFeePrice.value:0
|
||||
// return (goodsOriginAllPrice.value-allPrice.value+seatfee*1).toFixed(2)
|
||||
// }
|
||||
// return (freePrice.value * 1 + vipDiscountPrice.value * 1 + props.orderInfo.fullCouponDiscountAmount + props
|
||||
// .orderInfo.pointsDiscountAmount + (props.orderInfo.status == 'unpaid' ? productCoupPrice.value :
|
||||
// productCouponDiscountAmount.value) * 1 + (props.orderInfo.discountAmount ||
|
||||
// 0)).toFixed(2)
|
||||
|
||||
})
|
||||
|
||||
const packFee = computed(() => {
|
||||
//不是退菜只要有打包费的都计算,包括赠送
|
||||
const goodsPrice = props.data.reduce((prve, cur) => {
|
||||
|
||||
Reference in New Issue
Block a user