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,7 +13,11 @@ App({ | ||
| 13 | config2: null, | 13 | config2: null, |
| 14 | code: null, | 14 | code: null, |
| 15 | heigth:0, | 15 | heigth:0, |
| 16 | +<<<<<<< HEAD | ||
| 16 | user_id: null,// 4379287,// null,// 5682068, | 17 | user_id: null,// 4379287,// null,// 5682068, |
| 18 | +======= | ||
| 19 | + user_id: null,// 4379287,// null,// 5682068, | ||
| 20 | +>>>>>>> 05be2e3b599969d92db349a2724ac4567ebc2987 | ||
| 17 | buy_now:null, | 21 | buy_now:null, |
| 18 | picklist:null, //门店列表 | 22 | picklist:null, //门店列表 |
| 19 | wuliuprice: null, //物流价格表 | 23 | 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 | //--------整单退-------- |
| @@ -224,9 +240,7 @@ Page({ | @@ -224,9 +240,7 @@ Page({ | ||
| 224 | confirmOrder: function(t) { | 240 | confirmOrder: function(t) { |
| 225 | var e = this, a = t.currentTarget.dataset.id; | 241 | var e = this, a = t.currentTarget.dataset.id; |
| 226 | var is_zsorder=t.currentTarget.dataset.zsorder; | 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 | wx.showModal({ | 245 | wx.showModal({ |
| 232 | title: "是否确认收货?", | 246 | title: "是否确认收货?", |
| @@ -236,7 +250,14 @@ Page({ | @@ -236,7 +250,14 @@ Page({ | ||
| 236 | order_id: a,order_status:2 | 250 | order_id: a,order_status:2 |
| 237 | }, | 251 | }, |
| 238 | success: function(t) { | 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 | if(is_zsorder==3){ | 262 | if(is_zsorder==3){ |
| 242 | getApp().request.post("/api/weshop/order/vipTuanTebate/"+os.stoid+"/"+a,{ | 263 | getApp().request.post("/api/weshop/order/vipTuanTebate/"+os.stoid+"/"+a,{ |
| @@ -367,5 +388,36 @@ Page({ | @@ -367,5 +388,36 @@ Page({ | ||
| 367 | url: "/pages/cart/cart_wk/cart_wk?order_id=" + order_id, | 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 | \ No newline at end of file | 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 | <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}}"> |