Commit d8956ba0cdb365f2a4ad3af4136b265b7b4fea7f

Authored by season
2 parents 567437e9 0db5dca9

Merge branch 'qa' of http://git.vipzhuang.cn/wxd/MShopWeApp

components/diy_goodsGroup/diy_goodsGroup.js
... ... @@ -449,8 +449,10 @@ Component({
449 449 var url = "/api/weshop/activitylist/getGoodActInfo";
450 450 var req_data = {
451 451 store_id: os.stoid, goodsidlist: val.goods_id, is_detail: 1, user_id: user_id
452   - };
453   -
  452 + };
  453 +
  454 + item.prom_type = 0;
  455 + item.prom_id = 0;
454 456 //获取商品的实际活动
455 457 await getApp().request.promiseGet(url, { data: req_data }).then(res => {
456 458 if (res.data.code == 0 && res.data.data && res.data.data.length == 1) {
... ... @@ -469,12 +471,12 @@ Component({
469 471 item.cardprice1 = val.cardprice1;
470 472 item.cardprice2 = val.cardprice2;
471 473 item.cardprice3 = val.cardprice3;
472   - item.prom_type = val.prom_type;
473   - item.prom_id = val.prom_id;
  474 + // item.prom_type = val.prom_type;
  475 + // item.prom_id = val.prom_id;
474 476 if (val.prom_price) item.prom_price = val.prom_price;
475 477 if (val.prom_integral) item.prom_integral = val.prom_integral;
476 478  
477   - prom_id = val.prom_id;
  479 + prom_id = item.prom_id;
478 480  
479 481 var prom_type = item.prom_type; //0普通商品 1秒杀 6拼单 2团购 4积分购
480 482  
... ...
components/diy_goodsGroup/diy_goodsGroup.wxml
... ... @@ -11,8 +11,8 @@
11 11 <view class="{{'tabBox ' + (object.menu_style==2 ? 'tab2' :'')}}">
12 12 <!--样式一-->
13 13 <block wx:if="{{object.menu_style==1}}">
14   - <view wx:if="{{object.show_all==1}}" style="padding: 0 35rpx;font-size: {{object.title_font_size*2}}rpx;color: {{object.title_color}};" class="{{'tab ' + (title_index == 10 ? 'clor ' :'')}}" >全部<span class="tab1" wx:if="{{10==title_index}}"></span></view>
15   - <view wx:for="{{object.nav_list}}" style="padding: 0 35rpx;font-size: {{object.title_font_size*2}}rpx;color: {{object.title_color}};" data-index="{{index}}" bindtap="gr_set_nav" data-idlist="{{item.idlist}}" data-wgroup="{{item.wgroup}}" data-classstyle="{{item.classstyle}}" class="{{'tab ' + (index==title_index ? 'clor ' :'')}}">{{item.title}}<span class="tab1" wx:if="{{index==title_index}}"></span></view>
  14 + <view wx:if="{{object.show_all==1}}" style="padding: 0 35rpx;font-size: {{object.title_font_size*2}}rpx;color: {{title_index==10 ? (object.title_color_action ? object.title_color_action : '#ff0000') : object.title_color}};" class="{{'tab ' }}" >全部<span class="tab1" wx:if="{{10==title_index}}"></span></view>
  15 + <view wx:for="{{object.nav_list}}" style="padding: 0 35rpx;font-size: {{object.title_font_size*2}}rpx;color: {{index==title_index ? (object.title_color_action ? object.title_color_action : '#ff0000') : object.title_color}};" data-index="{{index}}" bindtap="gr_set_nav" data-idlist="{{item.idlist}}" data-wgroup="{{item.wgroup}}" data-classstyle="{{item.classstyle}}" class="{{'tab ' }}">{{item.title}}<span class="tab1" style="background-color: {{(object.title_color_action ? object.title_color_action : '#ff0000')}};" wx:if="{{index==title_index}}"></span></view>
16 16 </block>
17 17 <!--样式二-->
18 18 <block wx:if="{{object.menu_style==2}}">
... ... @@ -33,14 +33,14 @@
33 33 <mp-sticky wx:if="{{sticky == 1}}" container="{{container}}">
34 34 <view class="flex gr_title_list" style="overflow-x: auto;">
35 35 <view class="gr_title_item" wx:for="{{nav_list}}" data-index="{{index}}" bindtap="gr_set_nav" data-idlist="{{item.idlist}}" data-wgroup="{{item.wgroup}}" data-classstyle="{{item.classstyle}}">
36   - <text class="{{index==title_index?'t_red':''}}" style="{{title_class}}">{{item.title}}</text>
  36 + <text style="{{title_class + (index==title_index ? ('color:'+object.title_color_action) : '')}}">{{item.title}}</text>
37 37 </view>
38 38 </view>
39 39 </mp-sticky>
40 40  
41 41 <view class="flex gr_title_list" style="overflow-x: auto;" wx:else>
42 42 <view class="gr_title_item" wx:for="{{nav_list}}" data-index="{{index}}" bindtap="gr_set_nav" data-idlist="{{item.idlist}}" data-wgroup="{{item.wgroup}}" data-classstyle="{{item.classstyle}}">
43   - <text class="{{index==title_index?'t_red':''}}" style="{{title_class}}">{{item.title}}</text>
  43 + <text style="{{title_class + (index==title_index ? ('color:'+object.title_color_action) : '')}}">{{item.title}}</text>
44 44 </view>
45 45 </view>
46 46 </block>
... ...
components/diy_luckyGo/diy_luckyGo.js
... ... @@ -106,7 +106,7 @@ Component({
106 106 var user_id=getApp().globalData.user_id;
107 107 if(!user_id){ user_id=0;}
108 108 // var req={ store_id: os.stoid, is_end: 0, is_show: 1, timetype: 2,user_id:user_id}; 原来的
109   - var req={ store_id: os.stoid, is_end: 0, timetype: 1};
  109 + var req={ store_id: os.stoid, is_end: 0, timetype: 1,user_id:user_id};
110 110 getApp().request.promiseGet("/api/weshop/prom/luckyActivity/page",
111 111 { isShowLoading: 1, data:req }
112 112 ).then(res => {
... ...
components/diy_public/diy_public.js
... ... @@ -265,9 +265,9 @@ Component({
265 265 store_id:os.stoid,
266 266 is_end:0,
267 267 timetype:1,
  268 + user_id:user_id,
268 269 // isuse:1,
269 270 // page:1,
270   - // user_id:user_id,
271 271 // pageSize:9
272 272 }
273 273 }
... ...
packageA/pages/activity_share/activity_share.js
... ... @@ -572,7 +572,8 @@ Page({
572 572  
573 573 case 7: //幸运购
574 574 url = '/api/weshop/prom/luckyActivity/page';
575   - req_data.is_end = 0;
  575 + req_data.is_end = 0;
  576 + req_data.user_id = user_id;
576 577 req_data.timetype = 1;
577 578 if(th.data.key_str && th.data.key_str.trim()){
578 579 req_data.key_str = th.data.key_str.trim();
... ...
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js
... ... @@ -69,7 +69,8 @@ Page({
69 69 self.getData(true, '/api/weshop/prom/luckyActivity/page', {
70 70 store_id: app.globalData.setting.stoid,
71 71 is_end: 0,
72   - timetype: 1,
  72 + timetype: 1,
  73 + user_id: user ? user.user_id : '0'
73 74 });
74 75  
75 76  
... ... @@ -97,10 +98,12 @@ Page({
97 98 * 页面上拉触底事件的处理函数
98 99 */
99 100 onReachBottom: function () {
  101 + let user = this.data.user
100 102 this.scrollToLower('/api/weshop/prom/luckyActivity/page', {
101 103 store_id: app.globalData.setting.stoid,
102 104 is_end: 0,
103   - timetype: 1,
  105 + timetype: 1,
  106 + user_id: user ? user.user_id : '0'
104 107 });
105 108 },
106 109  
... ...
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
... ... @@ -2167,8 +2167,8 @@ Page({
2167 2167 var th=this;
2168 2168 let aid = options.aid;
2169 2169 let store_id = options.store_id;
2170   - let user_id = options.user_id;
2171   - let url = `/api/weshop/prom/luckyActivity/page?store_id=${store_id}&is_end=0&timetype=1&id=${aid}`;
  2170 + let user_id = options.user_id || '0';
  2171 + let url = `/api/weshop/prom/luckyActivity/page?store_id=${store_id}&is_end=0&timetype=1&id=${aid}&user_id=${user_id}`;
2172 2172 getApp().request.get(url, {
2173 2173 success: function (res) {
2174 2174 if (res.data.code == 0) {
... ...
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
... ... @@ -1166,7 +1166,9 @@ Page({
1166 1166 var team_id;
1167 1167 var luckyGoInfo;
1168 1168 var user_id = getApp().globalData.user_id;
1169   -
  1169 + if (!user_id) {
  1170 + user_id=0
  1171 + }
1170 1172  
1171 1173  
1172 1174 // 邀请链接待完善
... ... @@ -1177,6 +1179,7 @@ Page({
1177 1179 is_end: 0,
1178 1180 timetype: 1,
1179 1181 id: th.data.param.group_id,
  1182 + user_id,
1180 1183 }
1181 1184 }).then(res => {
1182 1185 if(res.data.code == 0) {
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... ... @@ -976,6 +976,7 @@ Page({
976 976 is_end: 0,
977 977 timetype: 1,
978 978 id: this.data.group_id,
  979 + user_id:getApp().globalData.user_id?getApp().globalData.user_id:0
979 980 }
980 981 }).then(res => {
981 982 // console.log()
... ... @@ -1018,10 +1019,11 @@ Page({
1018 1019 if (this.data.isTimeUp) {
1019 1020 wx.showModal({
1020 1021 title: '提示',
1021   - content: '活动已经暂停',
  1022 + content: '活动已经暂停或者当前会员身份不符,无法参与',
1022 1023 showCancel: false,
1023 1024 success: function () {
1024   - wx.navigateBack();
  1025 + // wx.navigateBack();
  1026 + ut.wx_back();
1025 1027 }
1026 1028 })
1027 1029 return false;
... ...
packageE/pages/cart/cart2/cart2.js
... ... @@ -1454,7 +1454,7 @@ Page({
1454 1454 isnew:1
1455 1455 },
1456 1456 }).then(res => {
1457   - debugger
  1457 + // debugger
1458 1458 if(res.data.code==0 && res.data.data && res.data.data.promgoodsbuynum){
1459 1459 item1.promgoodsbuynum = res.data.data.promgoodsbuynum;
1460 1460 }
... ... @@ -2929,14 +2929,16 @@ Page({
2929 2929 cart_item.g_monthlb_num = [{
2930 2930 'month_id': item_map.monthlibao,
2931 2931 "monthnum": item_map.monthlb_num,
2932   - 'monthlbtitle': item_map.monthlbtitle
  2932 + 'monthlbtitle': item_map.monthlbtitle,
  2933 + 'prom_id':item_map.prom_id
2933 2934 }];
2934 2935 } else {
2935 2936 cart_item.monthlibao += "," + item_map.monthlibao;
2936 2937 cart_item.g_monthlb_num.push({
2937 2938 'month_id': item_map.monthlibao,
2938 2939 "monthnum": item_map.monthlb_num,
2939   - 'monthlbtitle': item_map.monthlbtitle
  2940 + 'monthlbtitle': item_map.monthlbtitle,
  2941 + 'prom_id':item_map.prom_id
2940 2942 })
2941 2943 }
2942 2944 }
... ... @@ -5431,7 +5433,8 @@ Page({
5431 5433 let obj = {
5432 5434 num: ite.monthnum,
5433 5435 l_id: ite.month_id,
5434   - monthlbtitle: ite.monthlbtitle
  5436 + monthlbtitle: ite.monthlbtitle,
  5437 + prom_id: ite.prom_id,
5435 5438 }
5436 5439 marr.push(obj)
5437 5440 })
... ... @@ -5886,8 +5889,12 @@ Page({
5886 5889 }
5887 5890 var str = JSON.stringify(pdata);
5888 5891  
  5892 + console.log("--str--");
  5893 + console.log(str);
5889 5894  
5890 5895  
  5896 + // return false;
  5897 +
5891 5898 wx.showLoading({ title: "加载中" });
5892 5899 th.setData({ submit: 1, })
5893 5900 wx.request({
... ...
pages/index/index/index.js
... ... @@ -513,6 +513,7 @@ Page({
513 513 store_id: getApp().globalData.setting.stoid,
514 514 is_end: 0,
515 515 timetype: 1,
  516 + user_id:getApp().globalData.user_id?getApp().globalData.user_id:0
516 517 }
517 518 }).then(res => {
518 519 if (res.data.code == 0) {
... ...
pages/user/index/filter.wxs
1   -var is_close = function (name,c_list) {
  1 +var is_close = function (name,c_list,map) {
2 2 if(!c_list) return 0;
3   - var map={};
4   - map['我的分销']="1";
5   - map['我的拼单']="2";
6   - map['秒杀活动']="3";
7   - map['PLUS会员']="4";
8   - map['我的权益']="5";
9   - map['联系客服']="6";
10   - map['收藏夹']="7";
11   - map['我的地址']="8";
12   - map['收入卡包']="9";
13   - map['专享礼包']="10";
14   - map['我的服务']="12";
15   - map['我的评价']="13";
16   - map['我的礼包']="14";
17   - map['助力活动']="15";
18   - map['充值有礼']="16";
19   - map['幸运大转盘']="17";
20   - map['幸运购']="18";
21   - map['套盒商品']="19";
22   - map['AI测肤']="20";
23   - map['附近门店']="21";
24   - map['积分签到']="22";
25   - map['瘦身日记']="23";
26   - map['每月礼包']="24";
  3 + if(!map){
  4 + return 0;
  5 + }
27 6 var index=map[name];
28 7  
29 8 //我的权益要判断5,和11
... ...
pages/user/index/index.js
... ... @@ -1118,6 +1118,17 @@ Page({
1118 1118 })
1119 1119  
1120 1120 if (!d_list) return false;
  1121 +
  1122 + let t_map={};
  1123 + for (let i in d_list) {
  1124 + let ite=d_list[i];
  1125 + t_map[ite.name]=ite.id+'';
  1126 + }
  1127 + this.setData({
  1128 + tool_map:t_map
  1129 + })
  1130 +
  1131 +
1121 1132 //过滤掉分销关闭的
1122 1133 let distribut_end_time = await getApp().user_tools_endTime(2);//过滤掉分销到期的
1123 1134 await getApp().promiseGet("/api/weshop/storeDistribut/get/" + os.stoid, {}).then(rs => {
... ...
pages/user/index/index.wxml
... ... @@ -316,7 +316,7 @@
316 316 <!-- 循环使用自定义菜单,显示和掩藏 -->
317 317 <block wx:for="{{user_tool}}">
318 318 <!-- 判断系统配置中有没有把菜单关闭 -->
319   - <block wx:if="{{!util.is_close(item.name,c_list)}}">
  319 + <block wx:if="{{!util.is_close(item.name,c_list,tool_map)}}">
320 320 <!-- 有链接地址的时候 -->
321 321 <block wx:if="{{item.new_weappurl}}">
322 322 <block wx:if="{{item.name=='PLUS会员'}}">
... ...
pages/user/order_list/ofilter.wxs
... ... @@ -4,5 +4,24 @@ module.exports = {
4 4 if(item.presell && item.presell.presell_type==0 && item.order_status<3 && item.presell.deposit_pay_time>0 && item.presell.tail_pay_state==0)
5 5 url='/packageC/pages/presell/cart/cart?is_fwk=1&order_id='+item.order_id
6 6 return url;
7   - }
  7 + },
  8 + for_mat_val:function (e){
  9 + if(e===undefined) return '-';
  10 + if(e===null) return '-';
  11 + if(e==="null") return '-';
  12 + if(e==="") return '-';
  13 + return e;
  14 + },
  15 + toFix: function (val, count) {
  16 +
  17 + if(val===undefined) return '-';
  18 + if(val===null) return '-';
  19 + if(val==="null") return '-';
  20 + if(val==="") return '-';
  21 + if (!val) {
  22 + return "0";
  23 + }
  24 + val = parseFloat(val);
  25 + return parseFloat(val.toFixed(count))
  26 + },
8 27 }
9 28 \ No newline at end of file
... ...
pages/user/order_list/order_list.js
... ... @@ -80,19 +80,19 @@ Page({
80 80 searchContent: '',
81 81  
82 82 ser_paying:0,
  83 + have_get_nor:0, //看一下普通订单有没有获取
83 84 },
84 85 onLoad: function (t) {
85 86  
86 87 self = this;
87 88 // 设置日期选择器的结束时间为当前日期
88 89 var now = new Date();
89   - var nowDate = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate();
  90 + var nowDate = now.getFullYear() + '-' + this.check_is_big(now.getMonth() + 1) + '-' + this.check_is_big(now.getDate());
90 91 var date = new Date(now.getTime() - 7 * 24 * 3600 * 1000);
91   - var startDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
92   -
  92 + var startDate = date.getFullYear() + '-' + this.check_is_big(date.getMonth() + 1) + '-' + this.check_is_big(date.getDate());
93 93  
94 94 if (t.index) {
95   - if(t.tabindex) t.tabindex=0;
  95 + if(!t.tabindex) t.tabindex=0;
96 96 this.setData({
97 97 currentIndex: t.index,
98 98 tabIndex: t.tabindex,
... ... @@ -126,6 +126,14 @@ Page({
126 126  
127 127  
128 128 },
  129 +
  130 +
  131 + //判断是不是大于10补0
  132 + check_is_big(num){
  133 + if(num<10) num='0'+num;
  134 + return num;
  135 + },
  136 +
129 137 onShow: function () {
130 138 wx.showLoading();
131 139 var th=this;
... ... @@ -252,7 +260,12 @@ Page({
252 260 r = r + "&page=" + e.data.currentPage;
253 261 s.request(r, function (t) {
254 262  
255   - th.setData({ is_get: 1 });
  263 + th.data.have_get_nor=1;
  264 +
  265 + if(t.data.data.page*t.data.data.pageSize>=t.data.data.total){
  266 + th.setData({ iscodeall: 1 });
  267 + }
  268 +
256 269 var data = e.data.orderList;
257 270  
258 271 //-- 如果有值的时候 --
... ... @@ -437,6 +450,8 @@ Page({
437 450 wx.hideLoading();
438 451 }
439 452  
  453 + th.setData({ is_get: 1 });
  454 +
440 455  
441 456  
442 457  
... ... @@ -445,19 +460,30 @@ Page({
445 460  
446 461 //滑倒底部
447 462 onReachBottom: function () {
  463 +
  464 +
  465 +
448 466 if (this.data.currentIndex == 0) {
449 467 if (s.data.goodsLoadFinishFlag) {
450 468 this.setData({
451 469 iscodeall: 1
452 470 })
453 471 }
454   - s.canloadMore() && this.requestOrderList(this.data.activeCategoryId);
  472 +
  473 + if(!this.data.iscodeall){
  474 + wx.showLoading();
  475 + s.canloadMore() && this.requestOrderList(this.data.activeCategoryId);
  476 + }
  477 +
  478 +
455 479 } else {
456 480 if (this.data.currentIndex == 1) {
457 481 this.request_list({
458 482 store_id: os.stoid,
459 483 user_id: oo.user_id,
460 484 page: this.data.currentPage2,
  485 + BeginDate: this.data.startDate,
  486 + EndDate: this.data.endDate
461 487 });
462 488 } else { // 卡项订单
463 489 this.request_list({
... ... @@ -1643,6 +1669,7 @@ Page({
1643 1669 is_end: 0,
1644 1670 timetype: 1,
1645 1671 id: goodsinfo.prom_id,
  1672 + user_id:getApp().globalData.user_id?getApp().globalData.user_id:0
1646 1673 }
1647 1674 });
1648 1675  
... ... @@ -2646,26 +2673,60 @@ Page({
2646 2673 url = '/api/weshop/recharge/user/page';
2647 2674 };
2648 2675  
  2676 + wx.showLoading({
  2677 + title: '',
  2678 + })
  2679 +
2649 2680 app.request.promiseGet(url, {
2650 2681 data: data
2651 2682 }).then(async res => {
2652 2683 wx.hideLoading();
2653 2684 // 关闭加载状态
2654 2685 th.data.is_load2 = 0;
  2686 +
2655 2687 // 请求成功
2656   - if (res.data.code == 0) {
  2688 + if (res.data.code == 0 && res.data.data && res.data.data.pageData) {
  2689 +
2657 2690 if (res.data.data.pageData.length > 0) {
2658 2691 th.data.currentPage2++;
2659 2692 var data = res.data.data.pageData;
2660 2693 // 判断有无更多数据可以加载,如果大于则没有更多数据,反之则有
2661   - if (res.data.data.page * res.data.data.pageSize > res.data.data.total) { th.setData({ is_no_more2: 1 }); }
2662   - let list = [];
  2694 + if (res.data.data.page * res.data.data.pageSize >= res.data.data.total) { th.setData({ is_no_more2: 1 }); }
  2695 +
  2696 +
  2697 + let list = th.data.list2;
  2698 + if(!list) list=[];
2663 2699  
2664 2700 if (currentIndex == 1) {
2665 2701 //list = th.data.list2;
2666   - list = list.concat(data);
  2702 + var new_data= data.map((item,index)=>{
  2703 + var all_qty=0; //总数量
  2704 + var all_yh=0; //总是优惠金额
  2705 + if(item.list && item.list.length){
  2706 + for (let iv = 0; iv < item.list.length; iv++) {
  2707 + var tt_ite=item.list[iv];
  2708 + all_qty+=tt_ite.Qty;
  2709 + all_yh+=tt_ite.LetSum;
  2710 + }
  2711 + item.all_qty=all_qty;
  2712 + item.all_yh=all_yh;
  2713 + }
  2714 + if(item.CashRepNo){
  2715 + var q_arr=item.CashRepNo.split(',');
  2716 + var n_arr=[];
  2717 + for (let ix = 0; ix <q_arr.length; ix++) {
  2718 + if(!q_arr[ix]) continue;
  2719 + n_arr.push(q_arr[ix]);
  2720 + }
  2721 + item.quan_arr=n_arr;
  2722 + }
  2723 + return item;
  2724 + })
  2725 +
  2726 + list = list.concat(new_data);
2667 2727 th.setData({ list2: list });
2668 2728 };
  2729 +
2669 2730 if (currentIndex == 2) { // 卡项订单
2670 2731 list = th.data.cardList;
2671 2732 // var new_data= data.map((item,index)=>{
... ... @@ -2713,6 +2774,7 @@ Page({
2713 2774 th.setData({ is_no_more2: 1 });
2714 2775 }
2715 2776 }
  2777 +
2716 2778 if (callback) callback(res);
2717 2779 } else {
2718 2780 // wx.showToast({
... ... @@ -2721,14 +2783,18 @@ Page({
2721 2783 // duration: 2000
2722 2784 // })
2723 2785 }
  2786 +
  2787 + th.setData({is_get:1})
  2788 +
2724 2789 })
2725 2790 },
2726 2791  
2727 2792  
2728 2793 onClickTab(e) {
2729   - let currentIndex = e.target.dataset.index;
  2794 + let currentIndex = parseInt(e.target.dataset.index || 0);
2730 2795 this.setData({
2731   - currentIndex: currentIndex
  2796 + currentIndex: currentIndex,
  2797 + is_get:0
2732 2798 });
2733 2799  
2734 2800 this.setData({
... ... @@ -2736,14 +2802,21 @@ Page({
2736 2802 is_no_more2: 0,
2737 2803 currentPage2: 1,
2738 2804 });
2739   - if (currentIndex == 0) {
  2805 + if (currentIndex == 0 && !this.data.have_get_nor) {
2740 2806 console.log('线上订单');
2741 2807 /*---
2742 2808 this.setData({
2743 2809 startDate: '选择开始时间',
2744 2810 endDate: '选择结束时间',
2745 2811 });--*/
  2812 + wx.showLoading({
  2813 + title: '',
  2814 + })
  2815 + this.requestOrderList(this.data.activeCategoryId);
  2816 +
2746 2817 };
  2818 +
  2819 +
2747 2820 if (currentIndex == 1) {
2748 2821 console.log('线下订单');
2749 2822 this.request_list({
... ... @@ -2869,14 +2942,6 @@ Page({
2869 2942 let endDate = this.data.endDate;
2870 2943  
2871 2944 // this.data.is_no_data2 = 0;
2872   - this.setData({
2873   - currentPage2: 1,
2874   - list2: [],
2875   - is_no_data2: 0,
2876   - is_no_more2:0
2877   - });
2878   -
2879   -
2880 2945 if (startDate == '选择开始时间' || endDate == '选择结束时间') {
2881 2946 wx.showToast({
2882 2947 title: '请选择完整的查询时间~',
... ... @@ -2892,6 +2957,19 @@ Page({
2892 2957 return;
2893 2958 };
2894 2959  
  2960 + this.setData({
  2961 + currentPage2: 1,
  2962 + list2: [],
  2963 + is_no_data2: 0,
  2964 + is_no_more2:0,
  2965 + is_get:0
  2966 + });
  2967 +
  2968 +
  2969 + wx.showLoading({
  2970 + title: '',
  2971 + })
  2972 +
2895 2973  
2896 2974 this.request_list({
2897 2975 store_id: os.stoid,
... ... @@ -2960,7 +3038,7 @@ Page({
2960 3038 if (e) {
2961 3039 currentIndex = e.target.dataset.index;
2962 3040 } else {
2963   - currentIndex = this.data.tabIndex
  3041 + currentIndex = this.data.currentIndex
2964 3042 };
2965 3043  
2966 3044 // let || this.data.tabIndex;
... ... @@ -2971,14 +3049,14 @@ Page({
2971 3049 user_id: oo.user_id,
2972 3050 };
2973 3051 this.setData({
2974   - tabIndex: currentIndex,
  3052 + tabIndex: this.data.tabIndex || 0,
2975 3053 is_no_data2: 0,
2976 3054 is_no_more2: 0,
2977 3055 cardList: [],
2978 3056 });
2979 3057  
2980 3058  
2981   - switch (currentIndex) {
  3059 + switch (parseInt(currentIndex+'')) {
2982 3060 case 0: { // 全部
2983 3061 delete data.order_status;
2984 3062 delete data.pay_status;
... ... @@ -2987,6 +3065,11 @@ Page({
2987 3065 case 1: { // 待支付
2988 3066 data.order_status = 0;
2989 3067 delete data.pay_status;
  3068 +
  3069 + data.page=1;
  3070 + data.BeginDate=this.data.startDate,
  3071 + data.EndDate=this.data.endDate
  3072 +
2990 3073 break;
2991 3074 };
2992 3075 case 2: { // 待评价
... ...
pages/user/order_list/order_list.wxml
... ... @@ -38,7 +38,7 @@
38 38 </view>
39 39 <view class="search-btn search-btn2" bindtap="searchOffline">查询</view>
40 40 </view>
41   - <view class="fs24 c-9 pdt20">注:读取时段内近10笔记录</view>
  41 +
42 42 </view>
43 43  
44 44 <!-- 二级tabbar - 卡项订单 -->
... ... @@ -499,29 +499,73 @@
499 499 <!-- 线下订单 -->
500 500 <view class="offline-container" wx:elif="{{currentIndex == 1}}">
501 501 <view class="offline-list">
502   - <view class="item" wx:for="{{list2}}">
503   - <view class="title">
504   - <view><text class="iconfont icon-order"></text>单号:{{item.No}}</view>
505   - <view>{{item.states}}</view>
  502 + <view class="item new_d" wx:for="{{list2}}">
  503 + <!-- 顶部 -->
  504 + <view class="fs32 sto_title">{{item.StorageName}}</view>
  505 + <view class="fs24 order_info_new flex jc_sb">
  506 + <view>营业员:{{item.StaffName}}</view>
  507 + <view>单号:{{item.No}}</view>
506 508 </view>
507   - <view class="subtitle">
508   - <text>{{item.BillDate}}</text>
509   - <view>消费总额:<text class="co-red fs28">¥{{item.Sum}}</text></view>
  509 + <view class="fs24 order_info_new flex jc_sb" style="margin-top: 26rpx;">
  510 + <view>收银员:{{ofil.for_mat_val(item.Operator)}}</view>
  511 + <view>{{item.BillDate}}</view>
510 512 </view>
511   - <view wx:for="{{item.list}}" wx:for-item="i">
512   - <view class="ellipsis-2 name">{{i.BarCode}} - {{i.WareName}}</view>
513   - <view class="flex">
514   - <view class="subitem">
515   - <view class="key">数量</view>
516   - <view class="val">{{i.Qty}}</view>
517   - </view>
518   - <view class="subitem">
519   - <view class="key">单价</view>
520   - <view class="val">¥{{i.Price}}(<text style="text-decoration: line-through;">{{i.PosPrice}}</text>)</view>
  513 + <view class="line_new" style="margin-top: 34rpx;"></view>
  514 + <!-- 中间商品 -->
  515 + <view class="flex fs24 tab_title">
  516 + <view class="subitem_n1">
  517 + 名称/条码
  518 + </view>
  519 + <view class="flex subitem_n2">
  520 + <view class="subitem_nn">数量</view>
  521 + <view class="subitem_nn">单价</view>
  522 + <view class="subitem_nn">金额</view>
  523 + </view>
  524 + </view>
  525 + <view class="val_item flex ai_c" wx:for="{{item.list}}" wx:for-item="i">
  526 + <view class="subitem_n1">
  527 + <view class="ellipsis-2">{{i.WareName}}</view>
  528 + <view>
  529 + {{i.BarCode}}
  530 + <block wx:if="{{i.SpecName || i.UnitName}}">
  531 + ({{i.SpecName}}<text wx:if="{{i.SpecName && i.UnitName}}">/</text>{{i.UnitName}})
  532 + </block>
521 533 </view>
522   - <view class="subitem">
523   - <view class="key">金额</view>
524   - <view class="val">¥{{i.Sum}}</view>
  534 + </view>
  535 + <view class="flex subitem_n2">
  536 + <view class="subitem_nn">{{i.Qty}}</view>
  537 + <view class="subitem_nn">{{i.Price}}</view>
  538 + <view class="subitem_nn je_color">{{ofil.toFix(i.Sum,2)}}</view>
  539 + </view>
  540 + </view>
  541 + <view class="line_new" style="margin-top: 34rpx;"></view>
  542 + <!-- 底部金额 -->
  543 + <view style="margin-top: 16rpx;padding-bottom: 26rpx;">
  544 + <view class="more_info flex jc_sb ai_c fs24">
  545 + <text>商品总数</text>
  546 + <text>{{item.all_qty}}</text>
  547 + </view>
  548 + <view class="more_info flex jc_sb ai_c fs24">
  549 + <text>优惠金额</text>
  550 + <text class="je_color">{{ofil.toFix(item.all_yh,2)}}</text>
  551 + </view>
  552 + <view class="more_info flex jc_sb ai_c fs24">
  553 + <text>实付金额</text>
  554 + <text class="je_color">{{ofil.toFix(item.FactAndBank,2)}}</text>
  555 + </view>
  556 + <view class="more_info flex jc_sb ai_c fs24">
  557 + <text>本次积分</text>
  558 + <text>{{ofil.for_mat_val(item.PIntegral)}}</text>
  559 + </view>
  560 + <view class="more_info flex jc_sb ai_c fs24">
  561 + <text>会员卡号</text>
  562 + <text>{{item.VIPNo}}</text>
  563 + </view>
  564 + <view class="more_info flex jc_sb fs24">
  565 + <view>本次使用优惠券号</view>
  566 + <view wx:if="{{!item.quan_arr}}">-</view>
  567 + <view wx:else>
  568 + <view wx:for="{{item.quan_arr}}" wx:for-item="quan">{{quan}}</view>
525 569 </view>
526 570 </view>
527 571 </view>
... ... @@ -538,7 +582,7 @@
538 582 </view>
539 583  
540 584 <!-- 无订单 -->
541   -<view class="empty_order" wx:if="{{((!orderList||orderList.length==0) && is_get && currentIndex == 0) || (list2.length==0 && currentIndex == 1) || (cardList.length == 0 && currentIndex == 2 && is_get)}}">
  585 +<view class="empty_order" wx:if="{{((!orderList||orderList.length==0) && is_get && currentIndex == 0) || (list2.length==0 && currentIndex == 1 && is_get) || (cardList.length == 0 && currentIndex == 2 && is_get)}}">
542 586 <view class="flex-level">
543 587 <image src="{{iurl}}miniapp/images/order/empty_order.png"></image>
544 588 </view>
... ...
pages/user/order_list/order_list.wxss
... ... @@ -587,11 +587,19 @@ page {
587 587 border-radius: 16rpx;
588 588 margin-top: 20rpx;
589 589 }
  590 +.item.new_d {
  591 + background-color: white;
  592 + border-radius: 12rpx;
  593 + margin-top: 20rpx;
  594 +}
  595 +
590 596 .subitem {
591 597 width: calc(100% / 3);
592 598 text-align: center;
593 599 font-size: 26rpx;
594 600 }
  601 +
  602 +
595 603 .name {
596 604 padding: 0 20rpx;
597 605 margin: 20rpx 0;
... ... @@ -609,7 +617,7 @@ page {
609 617 }
610 618  
611 619 .offline-container {
612   - padding: 244rpx 20rpx 20rpx;
  620 + padding: 194rpx 18rpx 20rpx;
613 621 }
614 622  
615 623 .search-btn2 {
... ... @@ -622,3 +630,51 @@ page {
622 630 }
623 631  
624 632  
  633 +
  634 +.sto_title{
  635 + line-height: 32rpx;font-weight: bolder;color: #000; text-align: center;padding-top: 38rpx;
  636 +}
  637 +
  638 +.order_info_new{
  639 + line-height: 24rpx; color:#898585; padding: 0 30rpx; margin-top: 41rpx;
  640 +}
  641 +
  642 +.line_new{
  643 + border-bottom:1rpx #a9a9a9 dashed;
  644 + border-top:1rpx #a9a9a9 dashed;
  645 + margin: 0rpx 30rpx;
  646 + height: 6rpx;
  647 +}
  648 +
  649 +.subitem_n1 {
  650 + width:314rpx;
  651 + font-size: 24rpx;
  652 +}
  653 +
  654 +
  655 +.subitem_n2 {
  656 + width:358rpx;
  657 + font-size: 24rpx;
  658 +}
  659 +
  660 +.tab_title{
  661 + padding: 0 30rpx;color: #000; line-height: 24rpx;margin-top: 31rpx; margin-bottom: 34rpx;
  662 +}
  663 +.val_item{
  664 + padding: 0 30rpx; line-height: 33rpx;
  665 +}
  666 +.val_item~.val_item{
  667 + margin-top: 38rpx;
  668 +}
  669 +.more_info{
  670 + min-height: 52rpx;padding: 0 30rpx;color: #898585;
  671 +}
  672 +
  673 +.je_color{
  674 + color: #f87d27;
  675 +}
  676 +
  677 +.subitem_nn {
  678 + width: calc(100% / 3);
  679 + text-align: center;
  680 +}
... ...