Commit 8676ca210757b128c0c4154a6ea2237a3debbc72
1 parent
08006c50
1. 订单列表显示积分值
2. 再退款的时候,要把积分值带入
Showing
2 changed files
with
24 additions
and
12 deletions
pages/order/refund_order/refund_order.js
@@ -11,6 +11,7 @@ Page({ | @@ -11,6 +11,7 @@ Page({ | ||
11 | orderId: 0, | 11 | orderId: 0, |
12 | order_sn:"", | 12 | order_sn:"", |
13 | back_money: 0, | 13 | back_money: 0, |
14 | + back_integral: 0, | ||
14 | reasonSelect: 0, | 15 | reasonSelect: 0, |
15 | reasonList: [ "订单不能按预计时间送达", "操作有误(商品、地址等选错)", "重复下单/误下单", "其他渠道价格更低", "该商品降价了", "不想买了", "其他原因" ], | 16 | reasonList: [ "订单不能按预计时间送达", "操作有误(商品、地址等选错)", "重复下单/误下单", "其他渠道价格更低", "该商品降价了", "不想买了", "其他原因" ], |
16 | refund_type:0, | 17 | refund_type:0, |
@@ -42,6 +43,11 @@ Page({ | @@ -42,6 +43,11 @@ Page({ | ||
42 | order_sn: ed.data.data.order_sn, | 43 | order_sn: ed.data.data.order_sn, |
43 | back_money: bm | 44 | back_money: bm |
44 | }) | 45 | }) |
46 | + //如果有积分的话 | ||
47 | + if( ed.data.data.integral>0){ | ||
48 | + th.setData({back_integral:ed.data.data.integral}); | ||
49 | + } | ||
50 | + | ||
45 | wx.hideLoading(); | 51 | wx.hideLoading(); |
46 | } | 52 | } |
47 | }) | 53 | }) |
@@ -77,19 +83,24 @@ Page({ | @@ -77,19 +83,24 @@ Page({ | ||
77 | 83 | ||
78 | glist = glist.substring(0, glist.length-1); | 84 | glist = glist.substring(0, glist.length-1); |
79 | console.log(glist); | 85 | console.log(glist); |
86 | + var r_data={ | ||
87 | + order_id: th.data.orderId, | ||
88 | + order_sn: th.data.order_sn, | ||
89 | + store_id:os.stoid, | ||
90 | + user_id: th.data.user.user_id, | ||
91 | + back_money: th.data.back_money, | ||
92 | + reason: th.data.reasonList[th.data.reasonSelect], | ||
93 | + goods_id_list: glist, | ||
94 | + addtime: ut.gettimestamp(), | ||
95 | + type:2, | ||
96 | + refund_type: th.data.refund_type, | ||
97 | + }; | ||
98 | + | ||
99 | + if(th.data.back_integral){ | ||
100 | + r_data.back_integral=th.data.back_integral; | ||
101 | + } | ||
80 | rq.post("/api/weshop/order/returngoods/saveReturnGoods", { | 102 | rq.post("/api/weshop/order/returngoods/saveReturnGoods", { |
81 | - data: { | ||
82 | - order_id: th.data.orderId, | ||
83 | - order_sn: th.data.order_sn, | ||
84 | - store_id:os.stoid, | ||
85 | - user_id: th.data.user.user_id, | ||
86 | - back_money: th.data.back_money, | ||
87 | - reason: th.data.reasonList[th.data.reasonSelect], | ||
88 | - goods_id_list: glist, | ||
89 | - addtime: ut.gettimestamp(), | ||
90 | - type:2, | ||
91 | - refund_type: th.data.refund_type, | ||
92 | - }, | 103 | + data: r_data, |
93 | success: function (e) { | 104 | success: function (e) { |
94 | wx.showToast({ | 105 | wx.showToast({ |
95 | title: "已提交申请", | 106 | title: "已提交申请", |
pages/user/order_list/order_list.wxml
@@ -117,6 +117,7 @@ | @@ -117,6 +117,7 @@ | ||
117 | <view class="fs24 xc-wc">¥</view> | 117 | <view class="fs24 xc-wc">¥</view> |
118 | <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money,2)}} | 118 | <view class="xc-wc">{{filters.toFix(item.order_amount+item.user_money,2)}} |
119 | <text wx:if="{{item.coupon_price}}">+{{item.coupon_price}}元优惠券</text> | 119 | <text wx:if="{{item.coupon_price}}">+{{item.coupon_price}}元优惠券</text> |
120 | + <text wx:if="{{item.integral}}">+{{item.integral}}积分</text> | ||
120 | </view> | 121 | </view> |
121 | </view> | 122 | </view> |
122 | <view wx:if="{{item.pt_tail_money>0}}" class="commodity_money flex baseline"> | 123 | <view wx:if="{{item.pt_tail_money>0}}" class="commodity_money flex baseline"> |