修改订单详情价格展示
This commit is contained in:
parent
70933ce1e4
commit
75161519f2
|
|
@ -47,6 +47,10 @@
|
|||
custom-style="background-color: #E6F0FF; border-color: #E6F0FF; color: #318AFE;"
|
||||
size="small" text="打包" inverted type="success" />
|
||||
</view>
|
||||
<view class="u-m-r-20 u-font-24 u-flex" v-if="item.returnAmount">
|
||||
<view class="color-666">退款金额:</view>
|
||||
<view class="color-999 u-m-l-6">{{item.returnAmount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="color-999 u-font-24 u-m-t-8">{{item.productSkuName||''}}</view>
|
||||
|
||||
|
|
@ -192,7 +196,7 @@
|
|||
<view class="u-p-30" style="width: 80vw;">
|
||||
<view class="font-bold u-text-center">优惠详情</view>
|
||||
<view class="u-m-t-32">
|
||||
<view class="u-flex u-row-between u-m-b-18">
|
||||
<view class="u-flex u-row-between u-m-b-18" v-if="vipDiscountPrice*1>0">
|
||||
<view>会员优惠</view>
|
||||
<view class="color-red">
|
||||
<text>¥</text>
|
||||
|
|
@ -336,17 +340,22 @@
|
|||
|
||||
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=>canTuiKuan(props.orderInfo,v)&&!v.userCouponId).reduce((a,b)=>{
|
||||
// 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).reduce((a,b)=>{
|
||||
return a+b.priceAmount*1
|
||||
},0)
|
||||
return prve+curTotal
|
||||
},0)
|
||||
})
|
||||
function returnCanTuiMoney(item) {
|
||||
return (item.priceAmount/canTuiKuanPrice.value*props.orderInfo.amount).toFixed(2)
|
||||
console.log(canTuiKuanPrice.value);
|
||||
if(props.orderInfo.status=='unpaid'){
|
||||
return returnTotalMoney(item)
|
||||
}else{
|
||||
return (item.priceAmount/canTuiKuanPrice.value*props.orderInfo.amount).toFixed(2)
|
||||
}
|
||||
}
|
||||
|
||||
function to2(n) {
|
||||
|
|
@ -454,8 +463,9 @@
|
|||
|
||||
})
|
||||
const packFee = computed(() => {
|
||||
//不是退菜只要有打包费的都计算,包括赠送
|
||||
const goodsPrice = props.data.reduce((prve, cur) => {
|
||||
const curTotal = cur.info.filter(v => v.gift != true && v.status !== "return").reduce((a,
|
||||
const curTotal = cur.info.filter(v => v.status !== "return").reduce((a,
|
||||
b) => {
|
||||
return a + b.packAmount
|
||||
}, 0)
|
||||
|
|
@ -465,12 +475,14 @@
|
|||
|
||||
})
|
||||
const allPrice = computed(() => {
|
||||
|
||||
if (props.orderInfo.status == 'unpaid') {
|
||||
const n = goodsOriginAllPrice.value - youhuiAllPrice.value
|
||||
return (n < 0 ? 0 : n).toFixed(2)
|
||||
}
|
||||
return props.orderInfo.amount
|
||||
const n = goodsOriginAllPrice.value - youhuiAllPrice.value
|
||||
return (n < 0 ? 0 : n).toFixed(2)
|
||||
|
||||
// if (props.orderInfo.status == 'unpaid') {
|
||||
// const n = goodsOriginAllPrice.value - youhuiAllPrice.value
|
||||
// return (n < 0 ? 0 : n).toFixed(2)
|
||||
// }
|
||||
// return props.orderInfo.amount
|
||||
})
|
||||
|
||||
const goodsNumber = computed(() => {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@
|
|||
<text class="u-m-l-10 no-wrap">{{item.payName}}</text>
|
||||
</view>
|
||||
<view class="u-flex color-999 u-font-24">
|
||||
<view class="u-m-r-20" v-if="item.payType=='vipPay'&&user.id">
|
||||
<view class="u-m-r-20" v-if="item.payType=='vipPay'&&user.id" @click.stop="chooseUser">
|
||||
<view>
|
||||
<text>会员:</text>
|
||||
<text class="u-m-r-4">{{user.telephone||user.nickName}}</text>
|
||||
|
|
@ -553,7 +553,7 @@
|
|||
return infoBox.showToast(item.payName + '不可用')
|
||||
}
|
||||
pays.payTypes.selIndex = i
|
||||
if (item.payType == 'vipPay') {
|
||||
if (item.payType == 'vipPay'&&!user.value.id) {
|
||||
chooseUser()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue