-
Status changed to merged
-
mentioned in commit caecfc5e1d9393fc877aee53eb31a9f44ede80ba
Showing
4 changed files
pages/user/order_detail/order_detail.js
... | ... | @@ -122,29 +122,32 @@ Page({ |
122 | 122 | r['is_all_return'] = 0; |
123 | 123 | var rt_ok_num=0; |
124 | 124 | |
125 | - if(r['order_status'] == 1 && r['pay_status'] == 1) { | |
125 | + //if(r['order_status'] == 1 && r['pay_status'] == 1) { | |
126 | 126 | goodslist.forEach(function (eeb, iii) { |
127 | - goodslist[iii]['return_btn'] = 1; | |
127 | + if(r['order_status'] == 1 && r['pay_status'] == 1) | |
128 | + goodslist[iii]['return_btn'] = 1; //申请退款 | |
128 | 129 | ttd.data.data.pageData.forEach(function (eea, ii) { |
129 | 130 | var st = eea.status; |
130 | 131 | if (eea.goods_id == eeb.goods_id){ |
131 | - r['has_rt'] = 1; //有部分退 | |
132 | + | |
132 | 133 | switch (eea.status){ |
133 | 134 | case 0: |
134 | 135 | case 1://退款处理中 |
136 | + r['has_rt'] = 1; //有部分退 | |
135 | 137 | goodslist[iii]['return_btn'] = 2; break; |
136 | 138 | case 2://退款完成 |
137 | 139 | goodslist[iii]['return_btn'] = 4;rt_ok_num++; break; |
138 | 140 | case 3://已拒绝,重新退款 |
139 | 141 | goodslist[iii]['return_btn'] = 3; break; |
140 | 142 | default: |
141 | - goodslist[iii]['return_btn'] = 1; //申请退款 | |
143 | + if(r['order_status'] == 1 && r['pay_status'] == 1) | |
144 | + goodslist[iii]['return_btn'] = 1; //申请退款 | |
142 | 145 | } |
143 | 146 | return; |
144 | 147 | } |
145 | 148 | }); |
146 | 149 | }); |
147 | - } | |
150 | + //} | |
148 | 151 | } |
149 | 152 | } |
150 | 153 | ... | ... |
pages/user/order_detail/order_detail.wxml
... | ... | @@ -131,7 +131,11 @@ |
131 | 131 | |
132 | 132 | <view bindtap="zfwk" class="tips-btn" wx:if="{{order.pt_tail_money>0 && order.pt_status==2 }}">支付尾款</view> |
133 | 133 | <view bindtap="jumpToCart4" class="tips-btn" hidden="{{!order.pay_btn}}">立即付款</view> |
134 | - <navigator bindtap="confirmOrder" class="tips-btn" hidden="{{!order.receive_btn}}">收货确认</navigator> | |
134 | + | |
135 | + <block wx:if="{{!(order.has_rt || order.return_btn==2 || order.return_btn==4)}}"> | |
136 | + <navigator bindtap="confirmOrder" class="tips-btn" hidden="{{!order.receive_btn}}">收货确认</navigator> | |
137 | + </block> | |
138 | + | |
135 | 139 | <navigator class="tips-btn" hidden="{{!order.shipping_btn}}" url="/pages/user/express/express?order_id={{order.order_id}}">查看物流</navigator> |
136 | 140 | |
137 | 141 | <!---has_rt部分退----> | ... | ... |
pages/user/order_list/order_list.js
... | ... | @@ -137,29 +137,31 @@ Page({ |
137 | 137 | data[ind]['is_all_return'] = 0; |
138 | 138 | var rt_ok_num=0; |
139 | 139 | |
140 | - if(data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) { | |
140 | + //if(data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) { | |
141 | 141 | goodslist.forEach(function (eeb, iii) { |
142 | - goodslist[iii]['return_btn'] = 1; | |
142 | + if(data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) | |
143 | + goodslist[iii]['return_btn'] = 1; //申请退款 | |
143 | 144 | ttd.data.data.pageData.forEach(function (eea, ii) { |
144 | 145 | var st = eea.status; |
145 | 146 | if (eea.goods_id == eeb.goods_id){ |
146 | - data[ind]['has_rt'] = 1; //有部分退 | |
147 | 147 | switch (eea.status){ |
148 | 148 | case 0: |
149 | 149 | case 1://退款处理中 |
150 | + data[ind]['has_rt'] = 1; //有部分退 | |
150 | 151 | goodslist[iii]['return_btn'] = 2; break; |
151 | 152 | case 2://退款完成 |
152 | 153 | goodslist[iii]['return_btn'] = 4; rt_ok_num++; break; |
153 | 154 | case 3://已拒绝,重新退款 |
154 | 155 | goodslist[iii]['return_btn'] = 3; break; |
155 | 156 | default: |
156 | - goodslist[iii]['return_btn'] = 1; //申请退款 | |
157 | + if(data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1) | |
158 | + goodslist[iii]['return_btn'] = 1; //申请退款 | |
157 | 159 | } |
158 | 160 | return; |
159 | 161 | } |
160 | 162 | }); |
161 | 163 | }); |
162 | - } | |
164 | + //} | |
163 | 165 | } |
164 | 166 | } |
165 | 167 | |
... | ... | @@ -223,7 +225,7 @@ Page({ |
223 | 225 | if(t.data.code==0) |
224 | 226 | { |
225 | 227 | 0 == e.data.activeCategoryId ? |
226 | - (e.resetData(), e.requestOrderList(e.data.activeCategoryId)) : e.deleteOrderData(a); | |
228 | + (e.resetData(), e.requestOrderList(e.data.activeCategoryId)) : e.deleteOrderData2(a); | |
227 | 229 | } |
228 | 230 | else |
229 | 231 | { |
... | ... | @@ -250,14 +252,7 @@ Page({ |
250 | 252 | order_id: a,order_status:2 |
251 | 253 | }, |
252 | 254 | success: function(t) { |
253 | - //e.deleteOrderData(a); | |
254 | - for (var e = 0; e < th.data.orderList.length; e++) if (th.data.orderList[e].order_id ==a ) { | |
255 | - th.data.orderList.splice(e, 1), th.setData({ | |
256 | - orderList: th.data.orderList | |
257 | - }); | |
258 | - break; | |
259 | - } | |
260 | - | |
255 | + e.deleteOrderData2(a); | |
261 | 256 | //如果是会员团订单 |
262 | 257 | if(is_zsorder==3){ |
263 | 258 | getApp().request.post("/api/weshop/order/vipTuanTebate/"+os.stoid+"/"+a,{ |
... | ... | @@ -293,6 +288,16 @@ Page({ |
293 | 288 | }); |
294 | 289 | }, |
295 | 290 | |
291 | + deleteOrderData2:function(order_id){ | |
292 | + var th=this; | |
293 | + for (var e = 0; e < th.data.orderList.length; e++) if (th.data.orderList[e].order_id == order_id) { | |
294 | + th.data.orderList.splice(e, 1), th.setData({ | |
295 | + orderList: this.data.orderList | |
296 | + }); | |
297 | + break; | |
298 | + } | |
299 | + }, | |
300 | + | |
296 | 301 | //---判断是不是有退款----- |
297 | 302 | checkReturnGoodsStatus: function(t) { |
298 | 303 | var e = t.currentTarget.dataset.recid; | ... | ... |
pages/user/order_list/order_list.wxml
... | ... | @@ -88,11 +88,13 @@ |
88 | 88 | <navigator class="order-btn" wx:if="{{item.is_all_return_status==0 || item.is_all_return_status==1}}" |
89 | 89 | url="/pages/user/return_goods_info/return_goods_info?order_id={{item.order_id}}">退款详情</navigator> |
90 | 90 | </block> |
91 | - | |
92 | 91 | |
93 | - <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="order-btn white red-b" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">确认收货</view> | |
94 | - <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="order-btn white red-b" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==2)}}">确认收货</view> | |
95 | - <navigator redirect class="order-btn white red-b" hidden="{{!(item.order_status==2)}}" url="/pages/user/comment/comment?status=0">评价</navigator> | |
92 | + <block wx:if="{{!(item.has_rt || item.return_btn==2 || item.return_btn==4)}}"> | |
93 | + <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="order-btn white red-b" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==1)}}">确认收货</view> | |
94 | + <view bindtap="confirmOrder" data-zsorder="{{item.is_zsorder}}" class="order-btn white red-b" data-id="{{item.order_id}}" hidden="{{!(item.order_status==1&&item.pay_status==1&&item.shipping_status==2)}}">确认收货</view> | |
95 | + </block> | |
96 | + | |
97 | + <navigator redirect class="order-btn white red-b" hidden="{{!(item.order_status==2)}}" url="/pages/user/comment/comment?status=0">评价</navigator> | |
96 | 98 | <navigator class="order-btn" hidden="{{!(item.exp_type==0&&item.pay_status==1&&item.shipping_status==1)}}" url="/pages/user/express/express?order_id={{item.order_id}}">查看物流</navigator> |
97 | 99 | <navigator class="order-btn" hidden="{{!(item.exp_type==0&&item.pay_status==1&&item.shipping_status==2)}}" url="/pages/user/express/express?order_id={{item.order_id}}">查看物流</navigator> |
98 | 100 | <navigator class="order-btn" url="/pages/user/order_detail/order_detail?order_id={{item.order_id}}">订单详情</navigator> | ... | ... |