diff --git a/packageA/pages/quan_list/quan_list.js b/packageA/pages/quan_list/quan_list.js index 66bcb83..44058ac 100644 --- a/packageA/pages/quan_list/quan_list.js +++ b/packageA/pages/quan_list/quan_list.js @@ -19,6 +19,7 @@ Page({ loading:0, get_item:null, show_success:0, + getcurday:null, }, //------初始化加载---------- onLoad: function(t) { @@ -36,6 +37,8 @@ Page({ //券的模拟数据 //var data = [{ is_get:0,money:50,condition:500,id:1,name: "券名字", endtype: 0, use_start_time: 1579596090, use_end_time: 1611218490, everyone_num: 2,interval_time:1,color:"red"}]; //th.setData({dataList: data}); + + this.setData({getcurday:ut.gettimestamp()}); }, onHide: function() { diff --git a/packageA/pages/quan_list/quan_list.wxml b/packageA/pages/quan_list/quan_list.wxml index b2fe076..0840d24 100644 --- a/packageA/pages/quan_list/quan_list.wxml +++ b/packageA/pages/quan_list/quan_list.wxml @@ -18,11 +18,12 @@ {{item.name}} 所有门店通用 - 有效期 - {{filters.format_time(item.use_start_time)}}至 + 有效期 + {{filters.format_time(getcurday+3600*24*item.startdays)}} + {{filters.format_time(item.use_start_time)}} {{filters.format_time(item.use_end_time)}}不限 - 有效期{{item.days}}天不限 + 有效期 {{filters.format_time(getcurday+3600*24*item.startdays)}}至 {{filters.format_time(getcurday+3600*24*item.days)}}不限 每人限领:{{item.everyone_num}}不限 diff --git a/packageA/pages/quan_pro/quan_pro.js b/packageA/pages/quan_pro/quan_pro.js index a3e9906..6484b13 100644 --- a/packageA/pages/quan_pro/quan_pro.js +++ b/packageA/pages/quan_pro/quan_pro.js @@ -14,6 +14,7 @@ Page({ q_data: null, id:null, config2:null, + getcurday:null }, //------初始化加载---------- @@ -38,6 +39,8 @@ Page({ th.setData({q_data:res.data.data.pageData[0]}); } }); + + th.setData({getcurday:ut.gettimestamp()}); }, onHide: function() { diff --git a/packageA/pages/quan_pro/quan_pro.wxml b/packageA/pages/quan_pro/quan_pro.wxml index 3ff4c39..e2c79f5 100644 --- a/packageA/pages/quan_pro/quan_pro.wxml +++ b/packageA/pages/quan_pro/quan_pro.wxml @@ -23,11 +23,15 @@ 满{{filters.toFix(q_data.condition,2)}}可用 - 有效期 - {{filters.format_time(q_data.use_start_time)}}至 - {{filters.format_time(q_data.use_end_time)}}不限 + 有效期 + {{filters.format_time(getcurday+3600*24*q_data.startdays)}} + {{filters.format_time(q_data.use_start_time)}}至 + {{filters.format_time(q_data.use_end_time)}}不限 - 有效期{{q_data.days}}天不限 + 有效期 + + {{filters.format_time(getcurday+3600*24*q_data.startdays)}}至 + {{filters.format_time(getcurday+3600*24*q_data.days)}}不限 diff --git a/pages/cart/cart2/c_filter.wxs b/pages/cart/cart2/c_filter.wxs index 6a74c7e..7216131 100644 --- a/pages/cart/cart2/c_filter.wxs +++ b/pages/cart/cart2/c_filter.wxs @@ -15,6 +15,7 @@ var filters = { if(ind==2) return "blue"; if(ind==11) return "green"; if(ind==12) return "blue"; + if(ind==20) return "green"; return ""; }, setbgcolor: function (ind) { @@ -23,6 +24,7 @@ var filters = { if (ind == 2) return "#a3bcff"; if (ind == 11) return "#59e1d2"; if (ind == 12) return "#a3bcff"; + if (ind == 20) return "#6d87cd"; return ""; }, @@ -32,6 +34,7 @@ var filters = { if (ind == 2) return "品类"; if (ind == 11) return "用途"; if (ind == 12) return "分类1"; + if (ind == 20) return "指定单品"; return ""; }, get_type_card:function(ind){ @@ -40,6 +43,7 @@ var filters = { if (ind == 2) return "指定品类"; if (ind == 11) return "指定用途"; if (ind == 12) return "指定分类1"; + if (ind == 20) return "指定单品"; return ""; }, format_huiche:function (text) { diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js index 7b58bd5..376b3f8 100644 --- a/pages/cart/cart2/cart2.js +++ b/pages/cart/cart2/cart2.js @@ -707,8 +707,7 @@ Page({ } //-- 如果系统要平摊到单品 -- - if(!th.data.ispt_goods){ - + //if(!th.data.ispt_goods){ var pt_data={ 'prom_id':item_map.prom_id, 'dis': parseFloat((item_map.price-item_map.prom_price).toFixed(2)), @@ -722,11 +721,15 @@ Page({ if(pt_res){ for (var io in item_map.goods){ //平摊赋值 - item_map.goods[io].account=th.arr_get_goods(item_map.goods[io].goods_id,pt_res).fisrt_account; - item_map.goods[io].account_yu=th.arr_get_goods(item_map.goods[io].goods_id,pt_res).fisrt_account_yu; + item_map.goods[io].account_fir=th.arr_get_goods(item_map.goods[io].goods_id,pt_res).fisrt_account; + item_map.goods[io].account_yu_fir=th.arr_get_goods(item_map.goods[io].goods_id,pt_res).fisrt_account_yu; + if(!th.data.ispt_goods){ + item_map.goods[io].account=item_map.goods[io].account_fir; + item_map.goods[io].account_yu=item_map.goods[io].account_yu_fir; + } } } - } + // } o_price-=(item_map.price-item_map.prom_price); //如果有限制使用优惠券,就要减掉参与的活动商品的钱 @@ -738,6 +741,8 @@ Page({ if(item[j].prom_type==3 && item[j].prom_id==item_map.prom_id){ item[j].is_xz_yh= item_map.is_xz_yh; item[j].is_past= item_map.is_past; + item[j].account_fir= th.item_map_get_goods(item[j].goods_id,item_map).account_fir; + item[j].account_yu_fir= th.item_map_get_goods(item[j].goods_id,item_map).account_yu_fir; item[j].account= th.item_map_get_goods(item[j].goods_id,item_map).account; item[j].account_yu= th.item_map_get_goods(item[j].goods_id,item_map).account_yu; } @@ -2134,17 +2139,60 @@ Page({ /*--点击选择券--*/ sele_quan_item:function(e) { + + var ind = e.currentTarget.dataset.ind; + var quan_item=this.data.selected_quan_list[ind]; + var pickid=this.data.selected_quan_pick; //现在选择的是哪一个门店 + //--如果券是单品使用的时候-- + if(quan_item.UseObjectType=="20"){ + //---只有多件购买的时候才要计算,//购物车购买和搭配勾的时候--- + var gg=getApp().get_b_now(); + if(this.data.is_b_now==0 || this.data.gg.prom_type==5){ + var arr=this.data.order_prom_list_cart; + var t_pk_item=null; + for(var ii in arr){ + var ep=arr[ii]; + if(pickid==ep.pickup_id){ + t_pk_item=ep; break; + } + } + //--寻找券指定的商品-- + var gd=null; + if(t_pk_item){ + var goods=t_pk_item.goods; + for(var gid in goods){ + if(quan_item.UseObjectID==goods[gid].erpwareid){ gd=goods[gid]; } + } + } + if(!gd){ + getApp().my_warnning("未找到指定商品使用",0,this,600); + return false; + } + //计算价格,如果有平摊的实收要计算实收的金额 + var item_price=gd.goods_price*gd.goods_num; + //-- 如果有平摊下去,有实收价格的时候,就要用account_fir来计算价格 -- + if(gd.account_fir!=null && gd.account_fir!=undefined){ + item_price=gd.account_fir*gd.goods_num; + } + + if(item_price< parseFloat(quan_item.BuySum)){ + getApp().my_warnning("该单品金额没有大于等于"+quan_item.BuySum+"元时不能使用优惠券",0,this,600); + return false; + } + } + } + var no_use=e.currentTarget.dataset.no, quanlist=this.data.selected_quan_list; //---所有的券的显示红色选择都清理一遍--- - for(var ind in quanlist){ - quanlist[ind].show_red=0; + for(var i in quanlist){ + quanlist[i].show_red=0; } this.setData({selected_quan_list:quanlist}); var by_quanlist=this.data.get_by_quan_list; if(by_quanlist){ //---所有的券的显示红色选择都清理一遍--- - for(var ind in by_quanlist){ - by_quanlist[ind].show_red=0; + for(var inb in by_quanlist){ + by_quanlist[inb].show_red=0; } this.setData({get_by_quan_list:by_quanlist}); } @@ -2173,11 +2221,9 @@ Page({ return; } - var ind = e.currentTarget.dataset.ind; - - var quan_item = this.data.selected_quan_list[ind]; + + var txt = "selected_quan_list[" + ind + "].show_red"; - var obj = {}; obj[txt] = 1; if (quan_item.show_red) { @@ -2527,8 +2573,8 @@ Page({ is_xz_yh=0; var item_price=gd.goods_price*gd.goods_num; //-- 如果有平摊下去,有实收价格的时候,就要用account来计算价格 -- - if(gd.account!=null && gd.account!=undefined){ - item_price=gd.account*gd.goods_num; + if(gd.account_fir!=null && gd.account_fir!=undefined){ + item_price=gd.account_fir*gd.goods_num; } ckeck_quan_price+=item_price; diff --git a/pages/user/Detailed/Detailed.js b/pages/user/Detailed/Detailed.js index 83a71af..1e4274a 100644 --- a/pages/user/Detailed/Detailed.js +++ b/pages/user/Detailed/Detailed.js @@ -33,6 +33,10 @@ Page({ imagePath:"", //分享的生成图片 canvasHidden:true, + isBind:true, + isBinds:true, + + input_val:null, }, /** @@ -108,20 +112,36 @@ Page({ selectDetailed: function() { var th = this, e = th; + var r_data={ + storeId: o.stoid, + userId: r.user_id, + page: th.data.page, + pageSize: th.data.pageSize + }; + + if(th.data.datet!="" && th.data.datet){ + r_data.Sdate=th.data.datet; + } + if(th.data.dates!="" && th.data.dates){ + r_data.Edate=th.data.dates; + } + if(th.data.input_val!="" && th.data.input_val){ + r_data.MobileTel=th.data.input_val; + } + getApp().request.promiseGet("/api/weshop/plus/vip/mem/referee/page", { - data: { - storeId: o.stoid, - userId: r.user_id, - page: th.data.page, - pageSize: th.data.pageSize - } + data:r_data }).then(res => { - - th.setData({isDetailed:1}) + + setTimeout(function () { + th.setData({isDetailed: 1 }); + },300) if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { th.data.page++;//当前页数+1 var arr1 = th.data.arrayDetailed;//获取明细数组 var arr2 = res.data.data.pageData;//获取当前查询数据 + if(!arr1) arr1=[]; + var arr3 = [...arr1, ...arr2];//把当前查询数组拼接到原本数组后面 var ismore = 0; if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断 @@ -129,8 +149,9 @@ Page({ arrayDetailed: arr3, total: res.data.data.total, ismore: ismore, - isDetailed: 1 }) + + } }) @@ -152,7 +173,6 @@ Page({ * 页面上拉触底事件的处理函数 */ onReachBottom: function() { - if (this.data.total <= this.data.pageSize) return; if (this.data.ismore) { t.my_warnning("加载完啦!", 0, this); @@ -183,7 +203,7 @@ Page({ var privilege_o = th.data.privilege_o;//勋章图片 var img_square=th.data.img_square; var app = getApp(); - var user=app.globalData.userInfo; + var user=app.globalData.userInfo; var unit = th.data.screenWidth / 750 * 1.35; var scene = getApp().globalData.user_id; var nickname = user.nickname; @@ -368,10 +388,7 @@ Page({ },300) }) }) - - - - + } }) @@ -435,9 +452,66 @@ Page({ }) }, - - - - - + + + //起始时间 + bindDateChenge: function(e) { + var isBind = false; + this.setData({ + datet: e.detail.value, + isBind: isBind + }); + }, + // 结束时间 + bindDateChenges: function(e) { + var isBinds = false; + this.setData({ + dates: e.detail.value, + isBinds: isBinds + }); + }, + //catchtap阻止冒泡,点击清除开始时间的按钮 + eliminate: function() { + var isBind = true; + var data = ""; + this.setData({ + datet: data, + isBind: isBind + }) + }, + //catchtap阻止冒泡,点击清除结束时间的按钮 + eliminates: function() { + var isBinds = true; + var dates = ""; + this.setData({ + dates: dates, + isBinds: isBinds + }) + }, + + get_input:function (e) { + this.data.input_val=e.detail.value; + }, + + //点击的搜索事件 + get_search:function () { + var th=this; + + if(th.data.datet && th.data.dates){ + var oDate1 = new Date(th.data.datet); + var oDate2 = new Date(th.data.dates); + if(oDate2 +
+ + 日期: + + + + {{datet}} + + + + + + + + + {{dates}} + + + + + + + + 查询内容 + + + + + +
+ + diff --git a/pages/user/Detailed/Detailed.wxss b/pages/user/Detailed/Detailed.wxss index fec8d60..97a6d96 100644 --- a/pages/user/Detailed/Detailed.wxss +++ b/pages/user/Detailed/Detailed.wxss @@ -14,7 +14,6 @@ } - .phone { width: 250rpx; } @@ -59,4 +58,247 @@ height: 56rpx; background-color: rgb(255, 72, 72); border-radius: 40rpx; +} + + +.big-rim{ + margin-top: 15rpx; + width: 100%; + height: 305rpx; + border-bottom: 8px solid #EEEEEE; +} +/* 单据时间 */ +.time{ + + font-size: 25rpx; + color: #999999; + width: 100%; +} +.min-rim{ + display: flex; + width: 100%; + height: auto; + margin-left: 30rpx; +} +/* 日期 */ +.rq{ + height: 25rpx; + font-size: 28rpx; + margin-top:12rpx; + font-family:'SimHei',Arial; +} +/* 日期控件 */ +.pi{ + width:200rpx; + height:auto; + margin-left:10rpx; + +} +.pis{ + width:200rpx; + height:auto; + margin-left:30rpx; +} +/* 日期边框 */ +.rq-rim{ + position:relative; + left:0; + top:0 +} +/* 开始时间边框*/ +.kssj{ + display: inline-block; + height: 50rpx; + background-color: #EEEEEE; + border: 1px solid #DADADA; + width:200rpx; + border-radius: 3px; + line-height:40rpx; + position:relative; + top:0rpx; + left:0rpx; + +} +/* 开始时间的文字 */ +.wz{ + display: inline-block; + font-size: 25rpx; + color: #333; +} + +/* 开始清空按钮的 边框*/ +.qc-rim{ + position:absolute; + top:10rpx; + left:173rpx; + +} +/* 结束时间清空输入框的按钮的边框 */ +.end-rim{ + position: absolute; + top: 23rpx; + left:547rpx; + width: 25rpx; + height: 25rpx; +} +/* 查询内容 */ +.cxnr{ + margin-left:30rpx; + font-size:28rpx; + font-family: 'SimHei',Arial; +} +/* 至 */ +.zi{ + margin-top:14rpx; + font-weight:600; + font-size:28rpx; + font-family: 'SimHei',Arial; + margin-left:30rpx; +} +/* 结束时间 */ + +.jssj{ + padding-left: 10rpx; + margin-left: 30rpx; + padding-bottom: 10rpx; + height: 35rpx; + font-size: 25rpx; + color: #333; + background-color: #EEEEEE; + border: 1px solid #DADADA; + width:85%; + border-radius: 5px; + +} +/* 查询内容的备考的边框 */ +.xknr-rim{ + display: flex; + width: 100%; + height: 55rpx; + line-height:105rpx; + margin-top:20rpx; +} +/* 明细查询 */ +.botton{ + margin-left: 30rpx; + margin-top: 50rpx; + background-color: #C4182E; + width: 95%; + border-radius:10rpx; + text-align: center; + height: 70rpx; + line-height: 70rpx; + color: #FFF; + font-size: 29rpx; + border: none; + font-family: 'SimHei',Arial; +} + +/*开始时间清空输入框的按钮*/ +.empty{ + width: 25rpx; + height: 25rpx; + border-radius:50%; + background: #767676; + color: #fff; + font-size: 25rpx; + text-align: center; + line-height:19rpx; +} +/*结束时间清空输入框的按钮*/ +.end{ + width: 25rpx; + height: 25rpx; + border-radius:50%; + background: #767676; + color: #fff; + font-size: 25rpx; + text-align: center; + line-height:19rpx; +} + +/* 顶部 */ +.top{ + width: 170rpx; + height: 50rpx; + padding: 0 10rpx; + line-height: 50rpx; + font-size: 34rpx; + margin-top: 25rpx; + border-radius:3rpx; +} +.images{ + width:35rpx; + height:35rpx; + margin-left:-9rpx; + margin-top:6rpx; +} +.rim-images{ + width: 62rpx; + height: 46rpx; + line-height: 37rpx; + /* border-style: inset;padding:4rpx;text-align: center; */ + background: #f1f1f1; + border-color:#000000; + border-width: 1rpx; + transform:translateX(28%); + margin-top:-3rpx; + border-radius:5rpx; +} +/* 下拉框 */ +.top-selected{ + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + border: 1px solid #ccc; + padding: 0 10rpx; + font-size: 30rpx; + background:#eeeeee; + height:50rpx; + border-radius:6rpx; + +} +.texts{ + margin:0 auto; + font-size: 25rpx; +} + +/* 下拉内容 */ +.select-box { + background-color: #eeeeee; + width:190rpx; + position: relative; + z-index:1; + overflow: hidden; + text-align: left; + animation: myfirst 0.5s; + font-size: 25rpx; + border: 1px solid #DADADA; +} +.select_one { + padding-left: 20rpx; + width: 100%; + height: 60rpx; + line-height: 60rpx; +} +/* 注释 */ +.zs{ + margin-left: 30rpx; + font-size: 25rpx; + color: #999999; + font-family: 'SimHei',Arial; + margin-top: 42rpx; + margin-bottom: 30rpx; +} + +.input{ + width: 300rpx; + background-color: #EEEEEE; + border-radius: 10rpx; + font-size: 24rpx; + text-indent: 5rpx; + height: 56rpx; + border: 1rpx solid #ccc; + } \ No newline at end of file diff --git a/pages/user/userinfo/userinfo.js b/pages/user/userinfo/userinfo.js index f6b0e5a..47ea48c 100644 --- a/pages/user/userinfo/userinfo.js +++ b/pages/user/userinfo/userinfo.js @@ -812,7 +812,7 @@ Page({ } var identity_card = th.data.identity_card; //身份证 - if (identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))) { + if (identity_card!=null && identity_card!=undefined && identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))) { getApp().my_warnning("身份证号码错误", 0, th); return false; } diff --git a/pages/user/userqy/userqy.js b/pages/user/userqy/userqy.js index f44aee0..9927f1d 100644 --- a/pages/user/userqy/userqy.js +++ b/pages/user/userqy/userqy.js @@ -27,6 +27,7 @@ Page({ is_full:0, //是否满级 cur_g_num:0,//当前级需要多少钱 + userqy_color:null,//颜色值 }, swiperChange: function (e) { @@ -57,6 +58,14 @@ Page({ var gl_data=getApp().globalData; var sw_cur_id=0; var th=this; + //颜色值 + getApp().getConfig2(function(e) { + var getuserqy_color=e.userqy_color; + if (getuserqy_color) getuserqy_color = JSON.parse(getuserqy_color) + if(getuserqy_color){ + th.setData({userqy_color:getuserqy_color}) + } + }) //获取成长值 await getApp().request.promiseGet("/api/weshop/users/grade/aftervipinfo/get",{ data:{ storeId:os.stoid,userId:gl_data.user_id } diff --git a/pages/user/userqy/userqy.wxml b/pages/user/userqy/userqy.wxml index 78ca589..28f1f24 100644 --- a/pages/user/userqy/userqy.wxml +++ b/pages/user/userqy/userqy.wxml @@ -2,22 +2,22 @@ - + - + {{userinfo.nickname}} {{GradeName}} - 成长值 - - - + 成长值 + + + - {{filter.pInt(cz_val)}} / {{need_money}} - {{filter.pInt(cz_val)}} + {{filter.pInt(cz_val)}} / {{need_money}} + {{filter.pInt(cz_val)}} diff --git a/pages/user/userqy/userqy.wxss b/pages/user/userqy/userqy.wxss index ac250b8..9e039aa 100644 --- a/pages/user/userqy/userqy.wxss +++ b/pages/user/userqy/userqy.wxss @@ -9,7 +9,13 @@ } .xc-userqy-frame .user-frame .arc{ width: 750rpx; - height: 444rpx; + height: 444rpx; + left: -20%; + top: 0; + z-index: -1; + content: ''; + border-radius: 0 0 20% 20%; + background: #ff7295; } .xc-userqy-frame .user-frame .user-img{