Commit ded290a76c08998a223b52bf6cda4f1484297f9c

Authored by 后端研发-苏明海
2 parents dad70a80 3b278963

Merge branch 'dev' into 'test'

Dev

See merge request !53
@@ -13,7 +13,7 @@ App({ @@ -13,7 +13,7 @@ App({
13 config2: null, 13 config2: null,
14 code: null, 14 code: null,
15 heigth:0, 15 heigth:0,
16 - user_id: 5682068,// 4379287,// null,// 5682068, 16 + user_id: null,// 4379287,// null,// 5682068,
17 buy_now:null, 17 buy_now:null,
18 picklist:null, //门店列表 18 picklist:null, //门店列表
19 wuliuprice: null, //物流价格表 19 wuliuprice: null, //物流价格表
pages/goods/goodsInfo/goodsInfo.wxml
@@ -329,9 +329,10 @@ @@ -329,9 +329,10 @@
329 </view> 329 </view>
330 330
331 <view class="xc_comment"> 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 </view> 336 </view>
336 337
337 <scroll-view scroll-x="true" class="pj_scroll"> 338 <scroll-view scroll-x="true" class="pj_scroll">
pages/goods/goodsInfo/goodsInfo.wxss
@@ -1143,7 +1143,7 @@ left:31rpx;} @@ -1143,7 +1143,7 @@ left:31rpx;}
1143 1143
1144 } 1144 }
1145 .xc_comment-have-pictures{ 1145 .xc_comment-have-pictures{
1146 - width: 154rpx; 1146 + width: 153rpx;
1147 height: 42rpx; 1147 height: 42rpx;
1148 line-height: 42rpx; 1148 line-height: 42rpx;
1149 text-align: center; 1149 text-align: center;
@@ -1153,7 +1153,7 @@ left:31rpx;} @@ -1153,7 +1153,7 @@ left:31rpx;}
1153 font-size: 28rpx; 1153 font-size: 28rpx;
1154 } 1154 }
1155 .xc_comment-discuss{ 1155 .xc_comment-discuss{
1156 - width: 154rpx; 1156 + width: 152rpx;
1157 height: 42rpx; 1157 height: 42rpx;
1158 line-height: 42rpx; 1158 line-height: 42rpx;
1159 text-align: center; 1159 text-align: center;
pages/user/member/bring/bring.js
@@ -223,6 +223,7 @@ Page({ @@ -223,6 +223,7 @@ Page({
223 delete user_infor.distribut_min; 223 delete user_infor.distribut_min;
224 delete user_infor.type; 224 delete user_infor.type;
225 225
  226 + user_infor.source_type=1;
226 var str = JSON.stringify(user_infor); 227 var str = JSON.stringify(user_infor);
227 // wx.showLoading({ title: "加载中" }); 228 // wx.showLoading({ title: "加载中" });
228 wx.request({ 229 wx.request({
pages/user/order_detail/order_detail.js
@@ -8,10 +8,17 @@ Page({ @@ -8,10 +8,17 @@ Page({
8 iurl: os.imghost, 8 iurl: os.imghost,
9 order: null, 9 order: null,
10 optionIsGoup: !1, 10 optionIsGoup: !1,
11 - user_note: "" 11 + user_note: "",
  12 + conf:null,
12 }, 13 },
13 onLoad: function(e) { 14 onLoad: function(e) {
  15 + var th=this;
14 var r = void 0 !== e.isGoup && e.isGoup; 16 var r = void 0 !== e.isGoup && e.isGoup;
  17 +
  18 + getApp().getConfig2(function (e) {
  19 + th.setData({conf:e});
  20 + })
  21 +
15 this.setData({ 22 this.setData({
16 optionIsGoup: r 23 optionIsGoup: r
17 }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update"); 24 }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update");
@@ -21,7 +28,7 @@ Page({ @@ -21,7 +28,7 @@ Page({
21 this.requestOrderDetail(this.data.order.order_id)); 28 this.requestOrderDetail(this.data.order.order_id));
22 }, 29 },
23 requestOrderDetail: function(e) { 30 requestOrderDetail: function(e) {
24 - var o = this,oid=e; 31 + var o = this,oid=e,th=this;
25 r.get(o.data.url + "/api/weshop/order/get/"+os.stoid+"/"+e, { 32 r.get(o.data.url + "/api/weshop/order/get/"+os.stoid+"/"+e, {
26 success: function(e) { 33 success: function(e) {
27 var r = e.data.data; 34 var r = e.data.data;
@@ -75,9 +82,14 @@ Page({ @@ -75,9 +82,14 @@ Page({
75 //----没有相关的退款记录---- 82 //----没有相关的退款记录----
76 if (ttd.data.data.total==0){ 83 if (ttd.data.data.total==0){
77 r['is_all_return'] = 0; 84 r['is_all_return'] = 0;
  85 +
78 goodslist.forEach(function (ee, ii) { 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 }else{ 94 }else{
83 //--------整单退-------- 95 //--------整单退--------
@@ -348,6 +360,34 @@ Page({ @@ -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 \ No newline at end of file 394 \ No newline at end of file
pages/user/order_list/order_list.js
@@ -28,12 +28,17 @@ Page({ @@ -28,12 +28,17 @@ Page({
28 28
29 //已经读取过接口 29 //已经读取过接口
30 is_get:0, 30 is_get:0,
  31 + conf:null,
31 }, 32 },
32 onLoad: function(t) { 33 onLoad: function(t) {
  34 + var th=this;
33 //var e = void 0 === t.type ? this.data.activeCategoryId : t.type; 35 //var e = void 0 === t.type ? this.data.activeCategoryId : t.type;
34 if(t.type!=undefined) this.setData({activeCategoryId:t.type}) 36 if(t.type!=undefined) this.setData({activeCategoryId:t.type})
35 s.init(this, "", "orderList"); 37 s.init(this, "", "orderList");
36 //this.requestOrderList(e), wx.removeStorageSync("order:order_list:update"); 38 //this.requestOrderList(e), wx.removeStorageSync("order:order_list:update");
  39 + getApp().getConfig2(function (e) {
  40 + th.setData({conf:e});
  41 + })
37 }, 42 },
38 onShow: function() { 43 onShow: function() {
39 //wx.getStorageSync("order:order_list:update") && (wx.setStorageSync("order:order_list:update", !1), 44 //wx.getStorageSync("order:order_list:update") && (wx.setStorageSync("order:order_list:update", !1),
@@ -60,6 +65,7 @@ Page({ @@ -60,6 +65,7 @@ Page({
60 case "4": 65 case "4":
61 r +="&order_status=2"; break; 66 r +="&order_status=2"; break;
62 } 67 }
  68 +
63 this.setData({ activeCategoryId: t }); r = r + "&page=" + e.data.currentPage; 69 this.setData({ activeCategoryId: t }); r = r + "&page=" + e.data.currentPage;
64 s.request(r, function(t) { 70 s.request(r, function(t) {
65 71
@@ -83,12 +89,22 @@ Page({ @@ -83,12 +89,22 @@ Page({
83 var gtype_num = tt.data.data.total; 89 var gtype_num = tt.data.data.total;
84 if(ttd.data.data.pageData == undefined) return false; 90 if(ttd.data.data.pageData == undefined) return false;
85 var goodslist = tt.data.data.pageData; 91 var goodslist = tt.data.data.pageData;
  92 +
86 //----没有相关的退款记录---- 93 //----没有相关的退款记录----
87 if (ttd.data.data.total==0){ 94 if (ttd.data.data.total==0){
88 data[ind]['is_all_return'] = 0; 95 data[ind]['is_all_return'] = 0;
89 goodslist.forEach(function (ee, ii) { 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 }else{ 109 }else{
94 //--------整单退-------- 110 //--------整单退--------
@@ -367,5 +383,36 @@ Page({ @@ -367,5 +383,36 @@ Page({
367 url: "/pages/cart/cart_wk/cart_wk?order_id=" + order_id, 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 \ No newline at end of file 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 <view class="order-mes"> 2 <view class="order-mes">
2 <view class="order-name"> 3 <view class="order-name">
3 <view>订单编号:{{return_goods.order_sn}}</view> 4 <view>订单编号:{{return_goods.order_sn}}</view>
@@ -10,9 +11,14 @@ @@ -10,9 +11,14 @@
10 </view> 11 </view>
11 <view class="goods-des"> 12 <view class="goods-des">
12 <view class="goods-name ellipsis-1">{{item.goods_name}}</view> 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 </view> 15 </view>
15 </view> 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 <view class="apply-mes pd-bg-fff"> 22 <view class="apply-mes pd-bg-fff">
17 <view class="apply-item"> 23 <view class="apply-item">
18 <view class="apply-til">售后信息</view> 24 <view class="apply-til">售后信息</view>
@@ -51,10 +57,12 @@ @@ -51,10 +57,12 @@
51 </view> 57 </view>
52 <view class="item-wrap" wx:if="{{return_goods.status==2}}"> 58 <view class="item-wrap" wx:if="{{return_goods.status==2}}">
53 <view class="state-title">亲爱的客户,您的服务正在处理中</view> 59 <view class="state-title">亲爱的客户,您的服务正在处理中</view>
  60 + <view class="state-time">{{filters.format_time(return_goods.handle_time,1)}}</view>
54 <view class="state-user">操作人:卖家</view> 61 <view class="state-user">操作人:卖家</view>
55 </view> 62 </view>
56 <view class="item-wrap" wx:if="{{return_goods.status==2}}"> 63 <view class="item-wrap" wx:if="{{return_goods.status==2}}">
57 <view class="state-title">亲爱的客户,您的服务单已完成</view> 64 <view class="state-title">亲爱的客户,您的服务单已完成</view>
  65 + <view class="state-time">{{filters.format_time(return_goods.ok_time,1)}}</view>
58 <view class="state-user">操作人:卖家</view> 66 <view class="state-user">操作人:卖家</view>
59 </view> 67 </view>
60 <view class="item-wrap" wx:if="{{return_goods.status==3}}"> 68 <view class="item-wrap" wx:if="{{return_goods.status==3}}">