diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 49fa4f2..21319ca 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -2929,14 +2929,16 @@ Page({ cart_item.g_monthlb_num = [{ 'month_id': item_map.monthlibao, "monthnum": item_map.monthlb_num, - 'monthlbtitle': item_map.monthlbtitle + 'monthlbtitle': item_map.monthlbtitle, + 'prom_id':item_map.prom_id }]; } else { cart_item.monthlibao += "," + item_map.monthlibao; cart_item.g_monthlb_num.push({ 'month_id': item_map.monthlibao, "monthnum": item_map.monthlb_num, - 'monthlbtitle': item_map.monthlbtitle + 'monthlbtitle': item_map.monthlbtitle, + 'prom_id':item_map.prom_id }) } } @@ -5431,7 +5433,8 @@ Page({ let obj = { num: ite.monthnum, l_id: ite.month_id, - monthlbtitle: ite.monthlbtitle + monthlbtitle: ite.monthlbtitle, + prom_id: ite.prom_id, } marr.push(obj) }) @@ -5886,8 +5889,12 @@ Page({ } var str = JSON.stringify(pdata); + console.log("--str--"); + console.log(str); + return false; + wx.showLoading({ title: "加载中" }); th.setData({ submit: 1, }) wx.request({ diff --git a/pages/user/order_list/ofilter.wxs b/pages/user/order_list/ofilter.wxs index 8968b99..6492774 100644 --- a/pages/user/order_list/ofilter.wxs +++ b/pages/user/order_list/ofilter.wxs @@ -4,5 +4,24 @@ module.exports = { if(item.presell && item.presell.presell_type==0 && item.order_status<3 && item.presell.deposit_pay_time>0 && item.presell.tail_pay_state==0) url='/packageC/pages/presell/cart/cart?is_fwk=1&order_id='+item.order_id return url; - } + }, + for_mat_val:function (e){ + if(e==undefined) return '-'; + if(e==null) return '-'; + if(e=="null") return '-'; + if(e=="") return '-'; + return e; + }, + toFix: function (val, count) { + + if(val==undefined) return '-'; + if(val==null) return '-'; + if(val=="null") return '-'; + if(val=="") return '-'; + if (!val) { + return parseFloat(0).toFixed(count); + } + val = parseFloat(val); + return val.toFixed(count) + }, } \ No newline at end of file diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js index ff01b1d..af343d6 100644 --- a/pages/user/order_list/order_list.js +++ b/pages/user/order_list/order_list.js @@ -252,7 +252,11 @@ Page({ r = r + "&page=" + e.data.currentPage; s.request(r, function (t) { - th.setData({ is_get: 1 }); + + if(t.data.data.page*t.data.data.pageSize>=t.data.data.total){ + th.setData({ iscodeall: 1 }); + } + var data = e.data.orderList; //-- 如果有值的时候 -- @@ -437,6 +441,8 @@ Page({ wx.hideLoading(); } + th.setData({ is_get: 1 }); + @@ -445,19 +451,30 @@ Page({ //滑倒底部 onReachBottom: function () { + + + if (this.data.currentIndex == 0) { if (s.data.goodsLoadFinishFlag) { this.setData({ iscodeall: 1 }) } - s.canloadMore() && this.requestOrderList(this.data.activeCategoryId); + + if(!this.data.iscodeall){ + wx.showLoading(); + s.canloadMore() && this.requestOrderList(this.data.activeCategoryId); + } + + } else { if (this.data.currentIndex == 1) { this.request_list({ store_id: os.stoid, user_id: oo.user_id, page: this.data.currentPage2, + BeginDate: this.data.startDate, + EndDate: this.data.endDate }); } else { // 卡项订单 this.request_list({ @@ -2646,26 +2663,57 @@ Page({ url = '/api/weshop/recharge/user/page'; }; + wx.showLoading({ + title: '', + }) + app.request.promiseGet(url, { data: data }).then(async res => { wx.hideLoading(); // 关闭加载状态 th.data.is_load2 = 0; + // 请求成功 if (res.data.code == 0) { + if (res.data.data.pageData.length > 0) { th.data.currentPage2++; var data = res.data.data.pageData; // 判断有无更多数据可以加载,如果大于则没有更多数据,反之则有 - if (res.data.data.page * res.data.data.pageSize > res.data.data.total) { th.setData({ is_no_more2: 1 }); } + if (res.data.data.page * res.data.data.pageSize >= res.data.data.total) { th.setData({ is_no_more2: 1 }); } let list = []; if (currentIndex == 1) { //list = th.data.list2; - list = list.concat(data); + var new_data= data.map((item,index)=>{ + var all_qty=0; //总数量 + var all_yh=0; //总是优惠金额 + if(item.list && item.list.length){ + for (let iv = 0; iv < item.list.length; iv++) { + var tt_ite=item.list[iv]; + all_qty+=tt_ite.Qty; + all_yh+=tt_ite.LetSum; + } + item.all_qty=all_qty; + item.all_yh=all_yh; + } + if(item.CashRepNo){ + var q_arr=item.CashRepNo.split(','); + var n_arr=[]; + for (let ix = 0; ix { @@ -2713,6 +2761,7 @@ Page({ th.setData({ is_no_more2: 1 }); } } + if (callback) callback(res); } else { // wx.showToast({ @@ -2721,6 +2770,9 @@ Page({ // duration: 2000 // }) } + + th.setData({is_get:1}) + }) }, @@ -2728,7 +2780,8 @@ Page({ onClickTab(e) { let currentIndex = e.target.dataset.index; this.setData({ - currentIndex: currentIndex + currentIndex: currentIndex, + is_get:0 }); this.setData({ @@ -2744,6 +2797,9 @@ Page({ endDate: '选择结束时间', });--*/ }; + + + if (currentIndex == 1) { console.log('线下订单'); this.request_list({ @@ -2869,14 +2925,6 @@ Page({ let endDate = this.data.endDate; // this.data.is_no_data2 = 0; - this.setData({ - currentPage2: 1, - list2: [], - is_no_data2: 0, - is_no_more2:0 - }); - - if (startDate == '选择开始时间' || endDate == '选择结束时间') { wx.showToast({ title: '请选择完整的查询时间~', @@ -2892,6 +2940,19 @@ Page({ return; }; + this.setData({ + currentPage2: 1, + list2: [], + is_no_data2: 0, + is_no_more2:0, + is_get:0 + }); + + + wx.showLoading({ + title: '', + }) + this.request_list({ store_id: os.stoid, diff --git a/pages/user/order_list/order_list.wxml b/pages/user/order_list/order_list.wxml index 7aff9c6..70438d6 100644 --- a/pages/user/order_list/order_list.wxml +++ b/pages/user/order_list/order_list.wxml @@ -499,29 +499,73 @@ - - - 单号:{{item.No}} - {{item.states}} + + + {{item.StorageName}} + + 营业员:{{item.StaffName}} + 单号:{{item.No}} - - {{item.BillDate}} - 消费总额:¥{{item.Sum}} + + 收银员:{{ofil.for_mat_val(item.Operator)}} + {{item.BillDate}} - - {{i.BarCode}} - {{i.WareName}} - - - 数量 - {{i.Qty}} - - - 单价 - ¥{{i.Price}}({{i.PosPrice}}) + + + + + 名称/条码 + + + 数量 + 单价 + 金额 + + + + + {{i.WareName}} + + {{i.BarCode}} + + ({{i.SpecName}}/{{i.UnitName}}) + - - 金额 - ¥{{i.Sum}} + + + {{i.Qty}} + {{i.Price}} + {{i.Sum}} + + + + + + + 商品总数 + {{item.all_qty}} + + + 优惠金额 + {{ofil.toFix(item.all_yh,2)}} + + + 实付金额 + {{item.FactSum}} + + + 本次积分 + {{ofil.for_mat_val(item.FactIntRepSum)}} + + + 会员卡号 + {{item.VIPNo}} + + + 本次使用优惠券号 + - + + {{quan}} @@ -538,7 +582,7 @@ - + diff --git a/pages/user/order_list/order_list.wxss b/pages/user/order_list/order_list.wxss index 8ba96b0..71e1651 100644 --- a/pages/user/order_list/order_list.wxss +++ b/pages/user/order_list/order_list.wxss @@ -587,11 +587,19 @@ page { border-radius: 16rpx; margin-top: 20rpx; } +.item.new_d { + background-color: white; + border-radius: 12rpx; + margin-top: 20rpx; +} + .subitem { width: calc(100% / 3); text-align: center; font-size: 26rpx; } + + .name { padding: 0 20rpx; margin: 20rpx 0; @@ -609,7 +617,7 @@ page { } .offline-container { - padding: 244rpx 20rpx 20rpx; + padding: 256rpx 18rpx 20rpx; } .search-btn2 { @@ -622,3 +630,51 @@ page { } + +.sto_title{ + line-height: 32rpx;font-weight: bolder;color: #000; text-align: center;padding-top: 38rpx; +} + +.order_info_new{ + line-height: 24rpx; color:#898585; padding: 0 30rpx; margin-top: 41rpx; +} + +.line_new{ + border-bottom:1rpx #a9a9a9 dashed; + border-top:1rpx #a9a9a9 dashed; + margin: 0rpx 30rpx; + height: 6rpx; +} + +.subitem_n1 { + width:314rpx; + font-size: 24rpx; +} + + +.subitem_n2 { + width:358rpx; + font-size: 24rpx; +} + +.tab_title{ + padding: 0 30rpx;color: #000; line-height: 24rpx;margin-top: 31rpx; margin-bottom: 34rpx; +} +.val_item{ + padding: 0 30rpx; line-height: 33rpx; +} +.val_item~.val_item{ + margin-top: 38rpx; +} +.more_info{ + min-height: 52rpx;padding: 0 30rpx;color: #898585; +} + +.je_color{ + color: #f87d27; +} + +.subitem_nn { + width: calc(100% / 3); + text-align: center; +}