|
|
@@ -42,6 +42,14 @@
|
|
|
<view class="tui-title">商品金额</view>
|
|
|
<view class="detail-price_box" style="font-size: 28upx;">¥{{itemPrice}}</view>
|
|
|
</tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title">运费</view>
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;">¥{{sendCost}}</view>
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title">打包费</view>
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;">¥{{packCost}}</view>
|
|
|
+ </tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">总计</view>
|
|
|
<view class="detail-price_box red" style="font-size: 28upx;">¥{{allPrice}}</view>
|
|
|
@@ -53,8 +61,12 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">结账</view>
|
|
|
- <view class="detail-price_box" style="font-size: 28upx;color:green;" v-if="settlePrice > 0">退 ¥{{settlePrice}},确认后自动退款</view>
|
|
|
- <view class="detail-price_box" style="font-size: 28upx;color:red;" v-else-if="settlePrice < 0">欠 ¥{{Math.abs(settlePrice)}},确认后变成欠款单</view>
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;color:green;" v-if="settlePrice > 0">
|
|
|
+ 退 ¥{{settlePrice}},确认后自动退款
|
|
|
+ </view>
|
|
|
+ <view class="detail-price_box" style="font-size: 28upx;color:red;" v-else-if="settlePrice < 0">
|
|
|
+ 欠 ¥{{Math.abs(settlePrice)}},确认后变成欠款单
|
|
|
+ </view>
|
|
|
<view class="detail-price_box" style="font-size: 28upx;" v-else>0</view>
|
|
|
</tui-list-cell>
|
|
|
</view>
|
|
|
@@ -80,7 +92,9 @@ export default {
|
|
|
return {
|
|
|
detailInfo: {},
|
|
|
itemPrice:0,
|
|
|
- settlePrice:0
|
|
|
+ settlePrice:0,
|
|
|
+ sendCost:0,
|
|
|
+ packCost:0
|
|
|
};
|
|
|
},
|
|
|
onShow() {
|
|
|
@@ -104,6 +118,12 @@ export default {
|
|
|
}
|
|
|
this.itemPrice = parseFloat(this.itemPrice.toFixed(2))
|
|
|
price = Number(this.itemPrice)
|
|
|
+ if(Number(this.sendCost)>0){
|
|
|
+ price = price + Number(this.sendCost)
|
|
|
+ }
|
|
|
+ if(Number(this.packCost)>0){
|
|
|
+ price = price + Number(this.packCost)
|
|
|
+ }
|
|
|
price = parseFloat(price.toFixed(2))
|
|
|
this.settlePrice = Number(this.detailInfo.bookPrice) - Number(price)
|
|
|
this.settlePrice = parseFloat(this.settlePrice.toFixed(2))
|
|
|
@@ -115,10 +135,10 @@ export default {
|
|
|
uni.navigateBack({ delta: 1 })
|
|
|
},
|
|
|
async init() {
|
|
|
- const res = await getArrivalDetail({
|
|
|
- id: this.option.id
|
|
|
- });
|
|
|
+ const res = await getArrivalDetail({ id: this.option.id })
|
|
|
this.detailInfo = res.data;
|
|
|
+ this.sendCost = res.data.sendCost ? res.data.sendCost : 0
|
|
|
+ this.packCost = res.data.packCost ? res.data.packCost : 0
|
|
|
},
|
|
|
commitItem(){
|
|
|
let product = []
|