订单管理详情,支付价格计算逻辑修改
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</view>
|
||||
<template v-if="option.productId=='-999'">
|
||||
<view class="u-flex">
|
||||
<view class="color-red">¥{{item.priceAmount}}</view>
|
||||
<view class="color-red" >¥{{item.priceAmount}}</view>
|
||||
<view class="u-flex u-m-l-32 u-col-center">
|
||||
<view class="u-m-l-28 u-m-r-28">x{{item.number}}</view>
|
||||
</view>
|
||||
@@ -28,7 +28,7 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="u-flex">
|
||||
<view class="color-red">¥{{item.priceAmount}}</view>
|
||||
<view class="color-red" v-if="!option.userCouponId">¥{{item.priceAmount}}</view>
|
||||
<view class="u-flex u-m-l-32 u-col-center">
|
||||
<up-icon @click="changeItem(item,-1)" :size="20" name="minus-circle"></up-icon>
|
||||
<view class="u-m-l-28 u-m-r-28">{{item.number}}</view>
|
||||
@@ -39,21 +39,24 @@
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-fff u-m-t-32 u-p-24 border-r-12 u-flex u-row-between">
|
||||
<view>支付金额</view>
|
||||
<view>
|
||||
{{to2(totalPrice)}}元
|
||||
<template v-if="!option.userCouponId">
|
||||
<view class="bg-fff u-m-t-32 u-p-24 border-r-12 u-flex u-row-between" >
|
||||
<view>支付金额</view>
|
||||
<view>
|
||||
{{to2(totalPrice)}}元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bg-fff u-m-t-32 u-p-24 border-r-12 u-flex u-row-between">
|
||||
<view>退款金额</view>
|
||||
<view class="color-red">
|
||||
{{to2(tuikuanPrice)}}元
|
||||
<view class="bg-fff u-m-t-32 u-p-24 border-r-12 u-flex u-row-between" >
|
||||
<view>退款金额</view>
|
||||
<view class="color-red">
|
||||
{{to2(tuikuanPrice)}}元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="bg-fff u-p-24 border-r-12 u-m-t-32">
|
||||
<view>退回优惠券</view>
|
||||
<view class="u-font-24 color-999 u-m-t-16">
|
||||
<view class="u-font-24 color-999 u-m-t-16" v-if="!option.userCouponId">
|
||||
该订单未使用优惠券
|
||||
</view>
|
||||
</view>
|
||||
@@ -143,7 +146,8 @@
|
||||
})
|
||||
const tuikuanPrice = computed(() => {
|
||||
return orderDetail.goodsList.reduce((prve, cur) => {
|
||||
return prve + cur.number * cur.price
|
||||
const n=(cur.number/cur.num*100) * cur.priceAmount
|
||||
return prve + (n/100).toFixed(2)
|
||||
}, 0)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user