Commit be02eca2b0558c95a6c8e0ba044b1ff9babcc925
Merge branch 'qa' of ssh://git.vipzhuang.cn:22032/wxd/MShopWeApp
# Conflicts: # app.js
Showing
7 changed files
with
122 additions
and
16 deletions
app.js
... | ... | @@ -13,7 +13,11 @@ App({ |
13 | 13 | config2: null, |
14 | 14 | code: null, |
15 | 15 | heigth:0, |
16 | +<<<<<<< HEAD | |
16 | 17 | user_id: null,// 4379287,// null,// 5682068, |
18 | +======= | |
19 | + user_id: null,// 4379287,// null,// 5682068, | |
20 | +>>>>>>> 05be2e3b599969d92db349a2724ac4567ebc2987 | |
17 | 21 | buy_now:null, |
18 | 22 | picklist:null, //门店列表 |
19 | 23 | wuliuprice: null, //物流价格表 | ... | ... |
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 | //--------整单退-------- |
... | ... | @@ -224,9 +240,7 @@ Page({ |
224 | 240 | confirmOrder: function(t) { |
225 | 241 | var e = this, a = t.currentTarget.dataset.id; |
226 | 242 | var is_zsorder=t.currentTarget.dataset.zsorder; |
227 | - | |
228 | - console.log("confirmOrder"); | |
229 | - console.log(is_zsorder); | |
243 | + var th=this; | |
230 | 244 | |
231 | 245 | wx.showModal({ |
232 | 246 | title: "是否确认收货?", |
... | ... | @@ -236,7 +250,14 @@ Page({ |
236 | 250 | order_id: a,order_status:2 |
237 | 251 | }, |
238 | 252 | success: function(t) { |
239 | - e.deleteOrderData(a); | |
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 | + | |
240 | 261 | //如果是会员团订单 |
241 | 262 | if(is_zsorder==3){ |
242 | 263 | getApp().request.post("/api/weshop/order/vipTuanTebate/"+os.stoid+"/"+a,{ |
... | ... | @@ -367,5 +388,36 @@ Page({ |
367 | 388 | url: "/pages/cart/cart_wk/cart_wk?order_id=" + order_id, |
368 | 389 | }); |
369 | 390 | |
391 | + }, | |
392 | + | |
393 | + //--判断是不是可以单个商品退-- | |
394 | + check_for_return_btn:function (item) { | |
395 | + if(item.coupon_no) return false; //有用优惠券 | |
396 | + if(item.order_prom_id) return false; //有订单优惠 | |
397 | + if(item.order_status>=2) return false; //订单状态>2 | |
398 | + var istrue=true; | |
399 | + //----判断是不是有优惠活动和赠送商品---- | |
400 | + for (var g in item.goodslist) { | |
401 | + var g_item=item.goodslist[g]; | |
402 | + if ((g_item.prom_type == 3 && g_item.discount_amount> 0) | |
403 | + || (g_item.prom_type== 3 && g_item.goods_price <= 0) | |
404 | + ) { | |
405 | + istrue=false; break | |
406 | + } | |
407 | + if (g_item.prom_type== 5) { | |
408 | + istrue=false; break | |
409 | + } | |
410 | + } | |
411 | + if(!istrue) return false; | |
412 | + var conf=this.data.conf; | |
413 | + //判断是不是原路退回 | |
414 | + if(conf.refund_type==1) return true; | |
415 | + else{ | |
416 | + if(item.order_amount==0 || item.user_money==0) return true; | |
417 | + } | |
418 | + return false; | |
370 | 419 | } |
420 | + | |
421 | + | |
422 | + | |
371 | 423 | }); |
372 | 424 | \ 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}}"> | ... | ... |