Showing
4 changed files
with
33 additions
and
3 deletions
| @@ -102,6 +102,28 @@ Page({ | @@ -102,6 +102,28 @@ Page({ | ||
| 102 | detail: this.detail, | 102 | detail: this.detail, |
| 103 | title:title, | 103 | title:title, |
| 104 | }) | 104 | }) |
| 105 | + if(this.detail.order_info && this.detail.order_info.status==3){ | ||
| 106 | + App.Customer.GetOrderInfo({ | ||
| 107 | + rid:this.options.rid | ||
| 108 | + }).then(res=>{ | ||
| 109 | + let discount={pt:0,se:0} | ||
| 110 | + res.data.discount.forEach(q=>{ | ||
| 111 | + if(q.checked){ | ||
| 112 | + if(q.owner==1){//平台 | ||
| 113 | + discount.pt+=parseFloat(q.price) | ||
| 114 | + }else{ | ||
| 115 | + discount.se+=parseFloat(q.price) | ||
| 116 | + } | ||
| 117 | + } | ||
| 118 | + }) | ||
| 119 | + this.setData({ | ||
| 120 | + discount:{ | ||
| 121 | + pt:discount.pt.toFixed(2), | ||
| 122 | + se:discount.se.toFixed(2), | ||
| 123 | + } | ||
| 124 | + }) | ||
| 125 | + }) | ||
| 126 | + } | ||
| 105 | }) | 127 | }) |
| 106 | }, | 128 | }, |
| 107 | formatDatail(detail) { | 129 | formatDatail(detail) { |
| @@ -64,9 +64,13 @@ | @@ -64,9 +64,13 @@ | ||
| 64 | <view class="item-label">应收金额</view> | 64 | <view class="item-label">应收金额</view> |
| 65 | <view class="item-value">¥ {{detail.order_info.price}}</view> | 65 | <view class="item-value">¥ {{detail.order_info.price}}</view> |
| 66 | </view> | 66 | </view> |
| 67 | - <view class="item flex-lr"> | 67 | + <view class="item flex-lr" wx:if="{{discount.pt>0}}"> |
| 68 | <view class="item-label">周到安排补贴</view> | 68 | <view class="item-label">周到安排补贴</view> |
| 69 | - <view class="item-value">¥ {{detail.order_info.subsidy_price}}</view> | 69 | + <view class="item-value">¥ {{discount.pt||0}}</view> |
| 70 | + </view> | ||
| 71 | + <view class="item flex-lr" wx:if="{{discount.se>0}}"> | ||
| 72 | + <view class="item-label">商家优惠</view> | ||
| 73 | + <view class="item-value">¥ {{discount.se||0}}</view> | ||
| 70 | </view> | 74 | </view> |
| 71 | <view class="item flex-lr"> | 75 | <view class="item flex-lr"> |
| 72 | <view class="item-label Medium">实收金额</view> | 76 | <view class="item-label Medium">实收金额</view> |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | <view class="name">{{checkout.sellername}}</view> | 7 | <view class="name">{{checkout.sellername}}</view> |
| 8 | <view class="tip">送您红包</view> | 8 | <view class="tip">送您红包</view> |
| 9 | <view class="money flex-cc" style="align-items: flex-end;"> | 9 | <view class="money flex-cc" style="align-items: flex-end;"> |
| 10 | - <view>{{util.toFixed(card.price,0)}}</view> | 10 | + <view class="Semibold">{{util.toFixed(card.price,0)}}</view> |
| 11 | <view class="dot">元</view> | 11 | <view class="dot">元</view> |
| 12 | </view> | 12 | </view> |
| 13 | <view class="button" bindtap="hide">知道了</view> | 13 | <view class="button" bindtap="hide">知道了</view> |
| @@ -24,6 +24,10 @@ | @@ -24,6 +24,10 @@ | ||
| 24 | color:rgba(255,255,255,1); | 24 | color:rgba(255,255,255,1); |
| 25 | line-height:40rpx; | 25 | line-height:40rpx; |
| 26 | margin-top: 128rpx; | 26 | margin-top: 128rpx; |
| 27 | + overflow: hidden; | ||
| 28 | + text-overflow:ellipsis; | ||
| 29 | + white-space: nowrap; | ||
| 30 | + width: 250rpx; | ||
| 27 | } | 31 | } |
| 28 | .name{ | 32 | .name{ |
| 29 | height:44rpx; | 33 | height:44rpx; |
-
Please register or login to post a comment