Commit 91b33569b654b855a19e60788958639fff95631e
1 parent
3bb8a9fd
尾款的金额正确显示
Showing
2 changed files
with
13 additions
and
1 deletions
packageE/pages/cart/cart_wk/cart_wk.js
| ... | ... | @@ -290,11 +290,19 @@ Page({ |
| 290 | 290 | teamgroup = null, |
| 291 | 291 | teamlist=null, |
| 292 | 292 | th = this; |
| 293 | + | |
| 294 | + let ord_m=null; | |
| 293 | 295 | //---获取订单--- |
| 294 | 296 | await getApp().request.promiseGet("/api/weshop/order/get/" + oo.stoid + "/" + ord, {}).then(res => { |
| 295 | 297 | order = res.data.data; |
| 296 | 298 | }); |
| 297 | 299 | |
| 300 | + //-- 如果有数据的话 -- | |
| 301 | + let od_m=await getApp().request.promiseGet("/api/weshop/orderMore/get/" + os.stoid + "/" + order.order_sn, {}) | |
| 302 | + if(od_m && od_m.data.code==0 && od_m.data.data){ | |
| 303 | + ord_m=od_m.data.data; | |
| 304 | + } | |
| 305 | + | |
| 298 | 306 | //---获取订单从表--- |
| 299 | 307 | await getApp().request.promiseGet("/api/weshop/ordergoods/page", { |
| 300 | 308 | data: { |
| ... | ... | @@ -368,6 +376,10 @@ Page({ |
| 368 | 376 | |
| 369 | 377 | var tail_money = (price * order_goods.goods_num - order['order_amount'] - order['user_money']).toFixed(2); |
| 370 | 378 | |
| 379 | + if(ord_m && ord_m.pre_cut){ | |
| 380 | + tail_money-=ord_m.pre_cut; | |
| 381 | + } | |
| 382 | + | |
| 371 | 383 | tail_money = parseFloat(tail_money); |
| 372 | 384 | order.tail_money = tail_money; |
| 373 | 385 | ... | ... |
pages/user/order_list/order_list.wxml
| ... | ... | @@ -239,7 +239,7 @@ |
| 239 | 239 | <view wx:if="{{item.pt_tail_money>0}}" class="commodity_money flex baseline"> |
| 240 | 240 | <view>待支付尾款:</view> |
| 241 | 241 | <view class="fs24 c-r">¥</view> |
| 242 | - <view class="c-r">{{filters.toFix(item.pt_tail_money+item.use_commission-item.shipping_price,2)}} | |
| 242 | + <view class="c-r">{{filters.toFix(item.pt_tail_money+item.use_commission,2)}} | |
| 243 | 243 | </view> |
| 244 | 244 | </view> |
| 245 | 245 | ... | ... |