Commit ded290a76c08998a223b52bf6cda4f1484297f9c
Merge branch 'dev' into 'test'
Dev See merge request !53
Showing
7 changed files
with
110 additions
and
13 deletions
app.js
pages/goods/goodsInfo/goodsInfo.wxml
... | ... | @@ -329,9 +329,10 @@ |
329 | 329 | </view> |
330 | 330 | |
331 | 331 | <view class="xc_comment"> |
332 | - <view class="xc_comment-have-pictures"id="2" data-val="5" bindtap="clik_evaluate">有图({{categories3[1].num}}) </view> | |
333 | - <view class="xc_comment-discuss"id="2" data-val="2" bindtap="clik_evaluate">好评({{categories3[2].num}}) </view> | |
334 | - <view class="xc_comment-discuss" id="2"data-val="4"bindtap="clik_evaluate">差评({{categories3[4].num}}) </view> | |
332 | + <view class="xc_comment-have-pictures" data-val="5" bindtap="clik_evaluate">有图({{categories3[1].num}}) </view> | |
333 | + <view class="xc_comment-discuss" data-val="2" bindtap="clik_evaluate">好评({{categories3[2].num}}) </view> | |
334 | + <view class="xc_comment-discuss" data-val="3" bindtap="clik_evaluate">中评({{categories3[3].num}}) </view> | |
335 | + <view class="xc_comment-discuss" data-val="4"bindtap="clik_evaluate">差评({{categories3[4].num}}) </view> | |
335 | 336 | </view> |
336 | 337 | |
337 | 338 | <scroll-view scroll-x="true" class="pj_scroll"> | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxss
... | ... | @@ -1143,7 +1143,7 @@ left:31rpx;} |
1143 | 1143 | |
1144 | 1144 | } |
1145 | 1145 | .xc_comment-have-pictures{ |
1146 | - width: 154rpx; | |
1146 | + width: 153rpx; | |
1147 | 1147 | height: 42rpx; |
1148 | 1148 | line-height: 42rpx; |
1149 | 1149 | text-align: center; |
... | ... | @@ -1153,7 +1153,7 @@ left:31rpx;} |
1153 | 1153 | font-size: 28rpx; |
1154 | 1154 | } |
1155 | 1155 | .xc_comment-discuss{ |
1156 | - width: 154rpx; | |
1156 | + width: 152rpx; | |
1157 | 1157 | height: 42rpx; |
1158 | 1158 | line-height: 42rpx; |
1159 | 1159 | text-align: center; | ... | ... |
pages/user/member/bring/bring.js
pages/user/order_detail/order_detail.js
... | ... | @@ -8,10 +8,17 @@ Page({ |
8 | 8 | iurl: os.imghost, |
9 | 9 | order: null, |
10 | 10 | optionIsGoup: !1, |
11 | - user_note: "" | |
11 | + user_note: "", | |
12 | + conf:null, | |
12 | 13 | }, |
13 | 14 | onLoad: function(e) { |
15 | + var th=this; | |
14 | 16 | var r = void 0 !== e.isGoup && e.isGoup; |
17 | + | |
18 | + getApp().getConfig2(function (e) { | |
19 | + th.setData({conf:e}); | |
20 | + }) | |
21 | + | |
15 | 22 | this.setData({ |
16 | 23 | optionIsGoup: r |
17 | 24 | }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update"); |
... | ... | @@ -21,7 +28,7 @@ Page({ |
21 | 28 | this.requestOrderDetail(this.data.order.order_id)); |
22 | 29 | }, |
23 | 30 | requestOrderDetail: function(e) { |
24 | - var o = this,oid=e; | |
31 | + var o = this,oid=e,th=this; | |
25 | 32 | r.get(o.data.url + "/api/weshop/order/get/"+os.stoid+"/"+e, { |
26 | 33 | success: function(e) { |
27 | 34 | var r = e.data.data; |
... | ... | @@ -75,9 +82,14 @@ Page({ |
75 | 82 | //----没有相关的退款记录---- |
76 | 83 | if (ttd.data.data.total==0){ |
77 | 84 | r['is_all_return'] = 0; |
85 | + | |
78 | 86 | goodslist.forEach(function (ee, ii) { |
79 | - if (r['order_status'] == 1 && r['pay_status'] == 1 && gtype_num>1) | |
80 | - goodslist[ii]['return_btn']=1; | |
87 | + if (r['order_status'] == 1 && r['pay_status'] == 1 && gtype_num>1){ | |
88 | + //是不是可以单个商品退款 | |
89 | + if(th.check_for_return_btn(r) ) { | |
90 | + goodslist[ii]['return_btn']=1; | |
91 | + } | |
92 | + } | |
81 | 93 | }); |
82 | 94 | }else{ |
83 | 95 | //--------整单退-------- |
... | ... | @@ -348,6 +360,34 @@ Page({ |
348 | 360 | }); |
349 | 361 | }, |
350 | 362 | |
363 | + //--判断是不是可以单个商品退-- | |
364 | + check_for_return_btn:function (item) { | |
365 | + if(item.coupon_no) return false; //有用优惠券 | |
366 | + if(item.order_prom_id) return false; //有订单优惠 | |
367 | + if(item.order_status>=2) return false; //订单状态>2 | |
368 | + var istrue=true; | |
369 | + //----判断是不是有优惠活动和赠送商品---- | |
370 | + for (var g in item.order_goods) { | |
371 | + var g_item=item.order_goods[g]; | |
372 | + if ((g_item.prom_type == 3 && g_item.discount_amount> 0) | |
373 | + || (g_item.prom_type== 3 && g_item.goods_price <= 0) | |
374 | + ) { | |
375 | + istrue=false; break | |
376 | + } | |
377 | + if (g_item.prom_type== 5) { | |
378 | + istrue=false; break | |
379 | + } | |
380 | + } | |
381 | + if(!istrue) return false; | |
382 | + var conf=this.data.conf; | |
383 | + //判断是不是原路退回 | |
384 | + if(conf.refund_type==1) return true; | |
385 | + else{ | |
386 | + if(item.order_amount==0 || item.user_money==0) return true; | |
387 | + } | |
388 | + return false; | |
389 | + } | |
390 | + | |
351 | 391 | |
352 | 392 | |
353 | 393 | }); |
354 | 394 | \ No newline at end of file | ... | ... |
pages/user/order_list/order_list.js
... | ... | @@ -28,12 +28,17 @@ Page({ |
28 | 28 | |
29 | 29 | //已经读取过接口 |
30 | 30 | is_get:0, |
31 | + conf:null, | |
31 | 32 | }, |
32 | 33 | onLoad: function(t) { |
34 | + var th=this; | |
33 | 35 | //var e = void 0 === t.type ? this.data.activeCategoryId : t.type; |
34 | 36 | if(t.type!=undefined) this.setData({activeCategoryId:t.type}) |
35 | 37 | s.init(this, "", "orderList"); |
36 | 38 | //this.requestOrderList(e), wx.removeStorageSync("order:order_list:update"); |
39 | + getApp().getConfig2(function (e) { | |
40 | + th.setData({conf:e}); | |
41 | + }) | |
37 | 42 | }, |
38 | 43 | onShow: function() { |
39 | 44 | //wx.getStorageSync("order:order_list:update") && (wx.setStorageSync("order:order_list:update", !1), |
... | ... | @@ -60,6 +65,7 @@ Page({ |
60 | 65 | case "4": |
61 | 66 | r +="&order_status=2"; break; |
62 | 67 | } |
68 | + | |
63 | 69 | this.setData({ activeCategoryId: t }); r = r + "&page=" + e.data.currentPage; |
64 | 70 | s.request(r, function(t) { |
65 | 71 | |
... | ... | @@ -83,12 +89,22 @@ Page({ |
83 | 89 | var gtype_num = tt.data.data.total; |
84 | 90 | if(ttd.data.data.pageData == undefined) return false; |
85 | 91 | var goodslist = tt.data.data.pageData; |
92 | + | |
86 | 93 | //----没有相关的退款记录---- |
87 | 94 | if (ttd.data.data.total==0){ |
88 | 95 | data[ind]['is_all_return'] = 0; |
89 | 96 | goodslist.forEach(function (ee, ii) { |
90 | - if (data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1 && gtype_num>1) | |
91 | - goodslist[ii]['return_btn']=1; | |
97 | + if (data[ind]['order_status'] == 1 && data[ind]['pay_status'] == 1 && gtype_num>1){ | |
98 | + | |
99 | + //empty($list.coupon_no) && empty($list.order_prom_id) && $list.order_status lt 2 && empty($list.is_prom) | |
100 | + //&& ($tpshop_config['refund_type'] eq 0 || ($tpshop_config['refund_type'] eq 1 && ($list['order_amount'] eq 0 | |
101 | + // || $list['user_money'] eq 0))) | |
102 | + item.goodslist=goodslist; | |
103 | + if(th.check_for_return_btn(item) ) { | |
104 | + goodslist[ii]['return_btn'] = 1; | |
105 | + } | |
106 | + } | |
107 | + | |
92 | 108 | }); |
93 | 109 | }else{ |
94 | 110 | //--------整单退-------- |
... | ... | @@ -367,5 +383,36 @@ Page({ |
367 | 383 | url: "/pages/cart/cart_wk/cart_wk?order_id=" + order_id, |
368 | 384 | }); |
369 | 385 | |
386 | + }, | |
387 | + | |
388 | + //--判断是不是可以单个商品退-- | |
389 | + check_for_return_btn:function (item) { | |
390 | + if(item.coupon_no) return false; //有用优惠券 | |
391 | + if(item.order_prom_id) return false; //有订单优惠 | |
392 | + if(item.order_status>=2) return false; //订单状态>2 | |
393 | + var istrue=true; | |
394 | + //----判断是不是有优惠活动和赠送商品---- | |
395 | + for (var g in item.goodslist) { | |
396 | + var g_item=item.goodslist[g]; | |
397 | + if ((g_item.prom_type == 3 && g_item.discount_amount> 0) | |
398 | + || (g_item.prom_type== 3 && g_item.goods_price <= 0) | |
399 | + ) { | |
400 | + istrue=false; break | |
401 | + } | |
402 | + if (g_item.prom_type== 5) { | |
403 | + istrue=false; break | |
404 | + } | |
405 | + } | |
406 | + if(!istrue) return false; | |
407 | + var conf=this.data.conf; | |
408 | + //判断是不是原路退回 | |
409 | + if(conf.refund_type==1) return true; | |
410 | + else{ | |
411 | + if(item.order_amount==0 || item.user_money==0) return true; | |
412 | + } | |
413 | + return false; | |
370 | 414 | } |
415 | + | |
416 | + | |
417 | + | |
371 | 418 | }); |
372 | 419 | \ No newline at end of file | ... | ... |
pages/user/return_goods_info/return_goods_info.wxml
1 | +<wxs module="filters" src="../../../utils/filter.wxs"></wxs> | |
1 | 2 | <view class="order-mes"> |
2 | 3 | <view class="order-name"> |
3 | 4 | <view>订单编号:{{return_goods.order_sn}}</view> |
... | ... | @@ -10,9 +11,14 @@ |
10 | 11 | </view> |
11 | 12 | <view class="goods-des"> |
12 | 13 | <view class="goods-name ellipsis-1">{{item.goods_name}}</view> |
13 | - <view class="now-price co-red">退款金额 : ¥{{return_goods.back_money}}</view> | |
14 | + <view class="now-price co-red" wx:if="{{return_goods.goods_id}}">退款金额 : ¥{{return_goods.back_money}}</view> | |
14 | 15 | </view> |
15 | 16 | </view> |
17 | + | |
18 | +<view wx:if="{{return_goods.goods_id_list}}" class="now-price co-red" style="margin-left:30rpx; font-size:26rpx"> | |
19 | + 退款金额 : ¥{{return_goods.back_money}} | |
20 | +</view> | |
21 | + | |
16 | 22 | <view class="apply-mes pd-bg-fff"> |
17 | 23 | <view class="apply-item"> |
18 | 24 | <view class="apply-til">售后信息</view> |
... | ... | @@ -51,10 +57,12 @@ |
51 | 57 | </view> |
52 | 58 | <view class="item-wrap" wx:if="{{return_goods.status==2}}"> |
53 | 59 | <view class="state-title">亲爱的客户,您的服务正在处理中</view> |
60 | + <view class="state-time">{{filters.format_time(return_goods.handle_time,1)}}</view> | |
54 | 61 | <view class="state-user">操作人:卖家</view> |
55 | 62 | </view> |
56 | 63 | <view class="item-wrap" wx:if="{{return_goods.status==2}}"> |
57 | 64 | <view class="state-title">亲爱的客户,您的服务单已完成</view> |
65 | + <view class="state-time">{{filters.format_time(return_goods.ok_time,1)}}</view> | |
58 | 66 | <view class="state-user">操作人:卖家</view> |
59 | 67 | </view> |
60 | 68 | <view class="item-wrap" wx:if="{{return_goods.status==3}}"> | ... | ... |