订单管理详情,支付价格计算逻辑修改
This commit is contained in:
@@ -47,9 +47,16 @@
|
||||
<view class="u-m-l-18 color-999">x{{item.num}}</view>
|
||||
</view>
|
||||
<view class="u-flex">
|
||||
<view class="color-red">
|
||||
-¥{{item.discountAmount}}
|
||||
</view>
|
||||
<template v-if="item.type==1">
|
||||
<view class="color-red">
|
||||
-¥{{item.discountAmount}}
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="item.type==2">
|
||||
<view class="color-red">
|
||||
-¥{{(item.discountAmount*discount.discount/100).toFixed(2)}}
|
||||
</view>
|
||||
</template>
|
||||
<view class="u-m-l-12" @click="delQuan(index)">
|
||||
<up-icon :size="16" name="minus-circle-fill" color="rgb(255, 0, 0)"></up-icon>
|
||||
</view>
|
||||
@@ -359,7 +366,8 @@
|
||||
go.to('PAGES_ORDER_QUAN', {
|
||||
orderId: order.id,
|
||||
memberId: order.memberId,
|
||||
orderPrice: payPrice.value * 1 + coupAllPrice.value * 1
|
||||
orderPrice: (payPrice.value * 1 + coupAllPrice.value * 1).toFixed(2),
|
||||
discuount:discount.discount
|
||||
})
|
||||
}
|
||||
async function discountShow() {
|
||||
@@ -472,6 +480,7 @@
|
||||
coup.num = num
|
||||
coup.discountAmount = returnProductCoupAllPrice($goodsPayPriceMap[coup.proId],
|
||||
proCoupStartIndex, num).toFixed(2)
|
||||
console.log(coup.discountAmount);
|
||||
}
|
||||
}
|
||||
productCoup = productCoup.filter(v => v.num >= 1)
|
||||
@@ -674,7 +683,11 @@
|
||||
}
|
||||
const coupAllPrice = computed(() => {
|
||||
return pays.quan.reduce((prve, cur) => {
|
||||
return prve + cur.discountAmount * 1
|
||||
if(cur.type==1){
|
||||
return prve + cur.discountAmount * 1
|
||||
}else{
|
||||
return prve + (cur.discountAmount * discount.discount/100)
|
||||
}
|
||||
}, 0)
|
||||
})
|
||||
const payPrice = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user