| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.controller.req.CouponSendReq; |
| | | import com.stylefeng.guns.modular.system.enums.CouponStatusEnum; |
| | |
| | | tUserToCoupon.setCouponTotal(1); |
| | | tUserToCoupon.setValidCount(1); |
| | | Date expireTime = Date.from(LocalDate.now().plusDays(tCoupon.getCouponValidity()).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); |
| | | System.err.println(expireTime); |
| | | tUserToCoupon.setExpireTime(expireTime); |
| | | |
| | | // 添加发放人id和类型 |
| | | tUserToCoupon.setObjectId(ShiroKit.getUser().getObjectId()); |
| | | tUserToCoupon.setRoleType(ShiroKit.getUser().getRoleType()); |
| | | |
| | | tUserToCoupons.add(tUserToCoupon); |
| | | } |
| | | tUserToCouponService.insertBatch(tUserToCoupons); |
| | |
| | | */ |
| | | private Integer expireCount; |
| | | |
| | | /** |
| | | * 角色类型 1=平台 2=分公司 3=加盟商 |
| | | */ |
| | | private Integer roleType; |
| | | |
| | | /** |
| | | * 公司id |
| | | */ |
| | | private Integer objectId; |
| | | |
| | | public Integer getRoleType() { |
| | | return roleType; |
| | | } |
| | | |
| | | public void setRoleType(Integer roleType) { |
| | | this.roleType = roleType; |
| | | } |
| | | |
| | | public Integer getObjectId() { |
| | | return objectId; |
| | | } |
| | | |
| | | public void setObjectId(Integer objectId) { |
| | | this.objectId = objectId; |
| | | } |
| | | |
| | | public Integer getExpireCount() { |
| | | return expireCount; |
| | | } |
| | |
| | | |
| | | @Autowired |
| | | private TRechargeRecordMapper tRechargeRecordMapper; |
| | | @Autowired |
| | | private TUserToCouponMapper tUserToCouponMapper; |
| | | |
| | | @Override |
| | | public EntityWrapper<TAgent> getAgentWrapper(String principal, String principalPhone, String createTime) { |
| | |
| | | model.addAttribute("usedCoupon",usedCoupon.size()); |
| | | // 已使用优惠券金额求和,已使用优惠券id |
| | | List<Integer> usedCouponId = usedCoupon.stream().map(TOrder::getCouponId).collect(Collectors.toList()); |
| | | // 查询已使用优惠券金额求和 |
| | | List<TCoupon> tCoupons1 = tCouponMapper.selectList(new EntityWrapper<TCoupon>().in("id", usedCouponId)); |
| | | if(CollectionUtils.isEmpty(tCoupons1)){ |
| | | model.addAttribute("couponPriceSum", BigDecimal.ZERO); |
| | | }else { |
| | | tCoupons1.stream().map(TCoupon::getCouponPreferentialAmount).reduce(BigDecimal::add).ifPresent(bigDecimal -> model.addAttribute("couponPriceSum", bigDecimal)); |
| | | } |
| | | // if(CollectionUtils.isEmpty(usedCouponId)){ |
| | | // // 如果优惠券为空 |
| | | // model.addAttribute("couponPriceSum", BigDecimal.ZERO); |
| | | // }else { |
| | | // // 查询已使用优惠券金额求和 |
| | | // List<TCoupon> tCoupons1 = tCouponMapper.selectList(new EntityWrapper<TCoupon>().in("id", usedCouponId)); |
| | | // if(CollectionUtils.isEmpty(tCoupons1)){ |
| | | // model.addAttribute("couponPriceSum", BigDecimal.ZERO); |
| | | // }else { |
| | | // tCoupons1.stream().map(TCoupon::getCouponPreferentialAmount).reduce(BigDecimal::add).ifPresent(bigDecimal -> model.addAttribute("couponPriceSum", bigDecimal)); |
| | | // } |
| | | // } |
| | | // 优惠券信息 |
| | | // 过滤代理商发放的优惠券 |
| | | List<TCoupon> tCoupons = tCouponMapper.selectList(new EntityWrapper<TCoupon>()); |
| | | model.addAttribute("issuedCoupon",tCoupons.size()); |
| | | List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().eq("objectId",tAgent.getId()) |
| | | .eq("roleType",3)); |
| | | BigDecimal couponPriceSum = BigDecimal.ZERO; |
| | | for (TUserToCoupon userToCoupon : tUserToCoupons) { |
| | | TCoupon tCoupons1 = tCouponMapper.selectById(userToCoupon.getCouponId()); |
| | | couponPriceSum = couponPriceSum.add(tCoupons1.getCouponPreferentialAmount().multiply(new BigDecimal(userToCoupon.getCouponTotal()))); |
| | | } |
| | | model.addAttribute("couponPriceSum", couponPriceSum); |
| | | // 过滤代理商发放的优惠券 |
| | | int sum = tUserToCoupons.stream().mapToInt(TUserToCoupon::getCouponTotal).sum(); |
| | | model.addAttribute("issuedCoupon",sum); |
| | | // 司机信息 |
| | | // 司机数 |
| | | List<TDriver> drivers = tDriverMapper.selectList(new EntityWrapper<TDriver>().eq("agentId", tAgent.getId())); |
| | |
| | | List<TOrder> tOrders = tOrderMapper.selectList(new EntityWrapper<TOrder>()); |
| | | // 查询优惠券 |
| | | List<TCoupon> tCoupons = tCouponMapper.selectList(new EntityWrapper<TCoupon>()); |
| | | // 用户 |
| | | List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>()); |
| | | // 查询司机信息 |
| | | List<TDriver> tDrivers = tDriverMapper.selectList(new EntityWrapper<TDriver>()); |
| | | |
| | |
| | | && Objects.nonNull(order.getCouponId()) && tAgent.getId().equals(order.getAgentId())).collect(Collectors.toList()); |
| | | tAgentResp.setUsedCoupon(usedCoupon.size()); |
| | | // 已使用优惠券金额求和,已使用优惠券id |
| | | List<Integer> usedCouponId = usedCoupon.stream().map(TOrder::getCouponId).collect(Collectors.toList()); |
| | | // 查询已使用优惠券金额求和 |
| | | List<TCoupon> tCoupons1 = tCouponMapper.selectList(new EntityWrapper<TCoupon>().in("id", usedCouponId)); |
| | | tCoupons1.stream().map(TCoupon::getCouponPreferentialAmount).reduce(BigDecimal::add).ifPresent(tAgentResp::setCouponPriceSum); |
| | | // List<Integer> usedCouponId = usedCoupon.stream().map(TOrder::getCouponId).collect(Collectors.toList()); |
| | | // if(CollectionUtils.isEmpty(usedCouponId)){ |
| | | // tAgentResp.setCouponPriceSum(BigDecimal.ZERO); |
| | | // }else { |
| | | // // 查询已使用优惠券金额求和 |
| | | // BigDecimal couponPriceSum = BigDecimal.ZERO; |
| | | // for (Integer id : usedCouponId) { |
| | | // TCoupon tCoupons1 = tCouponMapper.selectById(id); |
| | | // couponPriceSum = couponPriceSum.add(tCoupons1.getCouponPreferentialAmount()); |
| | | // } |
| | | // tAgentResp.setCouponPriceSum(couponPriceSum); |
| | | // } |
| | | } |
| | | |
| | | if(!CollectionUtils.isEmpty(tCoupons)){ |
| | | if(!CollectionUtils.isEmpty(tUserToCoupons)){ |
| | | // 过滤代理商发放的优惠券 |
| | | List<TCoupon> coupons = tCoupons.stream().filter(coupon -> tAgent.getId().equals(coupon.getAgentId())).collect(Collectors.toList()); |
| | | tAgentResp.setIssuedCoupon(coupons.size()); |
| | | List<TUserToCoupon> userToCoupons = tUserToCoupons.stream().filter(coupon -> tAgent.getId().equals(coupon.getObjectId()) && coupon.getRoleType() == 3).collect(Collectors.toList()); |
| | | int sum = userToCoupons.stream().mapToInt(TUserToCoupon::getCouponTotal).sum(); |
| | | tAgentResp.setIssuedCoupon(sum); |
| | | BigDecimal couponPriceSum = BigDecimal.ZERO; |
| | | for (TUserToCoupon userToCoupon : userToCoupons) { |
| | | TCoupon tCoupons1 = tCouponMapper.selectById(userToCoupon.getCouponId()); |
| | | couponPriceSum = couponPriceSum.add(tCoupons1.getCouponPreferentialAmount().multiply(new BigDecimal(userToCoupon.getCouponTotal()))); |
| | | } |
| | | tAgentResp.setCouponPriceSum(couponPriceSum); |
| | | } |
| | | |
| | | if(!CollectionUtils.isEmpty(tDrivers)){ |
| | |
| | | |
| | | // 优惠券数据,,,通过订单找到该区域的下单人,找出优惠券信息 |
| | | List<Integer> userIds = orders.stream().map(TOrder::getUserId).collect(Collectors.toList()); |
| | | List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().in("userId", userIds)); |
| | | List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().eq("objectId", tBranchOfficeId) |
| | | .eq("roleType",2)); |
| | | // 优惠券有效数量 |
| | | int validCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getValidCount).sum(); |
| | | // 过期数量 |
| | |
| | | |
| | | // 优惠券数据,,,通过订单找到该区域的下单人,找出优惠券信息 |
| | | List<Integer> userIds = orderList.stream().map(TOrder::getUserId).collect(Collectors.toList()); |
| | | List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().in("userId", userIds)); |
| | | List<TUserToCoupon> tUserToCoupons = tUserToCouponMapper.selectList(new EntityWrapper<TUserToCoupon>().eq("objectId", tBranchOfficeResp.getId()) |
| | | .eq("roleType",2)); |
| | | // 优惠券有效数量 |
| | | int validCount = tUserToCoupons.stream().mapToInt(TUserToCoupon::getValidCount).sum(); |
| | | // 过期数量 |
| | |
| | | <div class="col-sm-12"> |
| | | <input hidden id="id" value="${id}"> |
| | | <div class="col-sm-12" style="text-align: center;height: 60px"> |
| | | 充值余额:<input id="backgroundBalance" placeholder="请输入充值金额" maxlength="4" style="width: 300px; height: 30px;" required/> |
| | | 充值余额:<input id="backgroundBalance" placeholder="请输入充值金额" type="number" maxlength="4" min="0" style="width: 300px; height: 30px;" required/> |
| | | </div> |
| | | <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="text-align: center"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TDriverInfoDlg.close()" /> |
| | |
| | | <button id="btn3" onclick="queryCommission()">佣金</button> |
| | | </div> |
| | | <div> |
| | | <select class="col-lg-8" style="height: 25px"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | <input type="text" class="form-control layer-date" placeholder="请选择" id="insertTimeMonth"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="col-sm-3"></div> |
| | | <div class="initialLevel col-sm-4 control-label form-group" style="text-align: right"> |
| | | <select class="col-lg-12" id="year" style="height: 25px;border-radius: 5px"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | <input type="text" class="form-control layer-date" placeholder="请选择" id="insertTime"> |
| | | </div> |
| | | </div><br/> |
| | | <div id="chart1" style="height: 90%;width: 100%"></div> |
| | |
| | | |
| | | $(function (){ |
| | | loading() |
| | | orderByMonth() |
| | | orderByYear() |
| | | orderByMonth(new Date().getMonth() + 1) |
| | | orderByYear(new Date().getFullYear()) |
| | | queryOrderCount() |
| | | |
| | | }) |
| | | |
| | | function selectYear(e){ |
| | | orderByYear(e) |
| | | } |
| | | function selectMonth(e){ |
| | | // 查询排行榜 |
| | | if($('#btn1').val() != null && $('#btn1').val() != ''){ |
| | | console.log(11111) |
| | | getOrder($('#btn1').val(),e) |
| | | } |
| | | if($('#btn2').val() != null && $('#btn2').val() != ''){ |
| | | console.log(22222) |
| | | getOrder($('#btn2').val(),e) |
| | | } |
| | | if($('#btn3').val() != null && $('#btn3').val() != ''){ |
| | | console.log(33333) |
| | | getOrder($('#btn3').val(),e) |
| | | } |
| | | } |
| | | laydate.render({ |
| | | elem: '#insertTime', |
| | | range: false, |
| | | type: "year", |
| | | change:function(value,date) { |
| | | selectYear(value)// change 每点一次都会监听一遍 |
| | | } |
| | | }); |
| | | laydate.render({ |
| | | elem: '#insertTimeMonth', |
| | | range: false, |
| | | type: "month", |
| | | change:function(value,date) { |
| | | selectMonth(value)// change 每点一次都会监听一遍 |
| | | } |
| | | }); |
| | | |
| | | // 进度条加载 |
| | | function loading(){ |
| | |
| | | $('#btn1').val(1) |
| | | $('#btn2').val('') |
| | | $('#btn3').val('') |
| | | getOrder($('#btn1').val()) |
| | | getOrder($('#btn1').val(),$('#insertTimeMonth').val()) |
| | | } |
| | | // 收入 |
| | | function queryIncome(){ |
| | |
| | | $('#btn1').val('') |
| | | $('#btn2').val(2) |
| | | $('#btn3').val('') |
| | | getOrder($('#btn2').val()) |
| | | getOrder($('#btn2').val(),$('#insertTimeMonth').val()) |
| | | } |
| | | // 佣金 |
| | | function queryCommission(){ |
| | |
| | | $('#btn1').val('') |
| | | $('#btn2').val('') |
| | | $('#btn3').val(3) |
| | | getOrder($('#btn3').val()) |
| | | getOrder($('#btn3').val(),$('#insertTimeMonth').val()) |
| | | } |
| | | |
| | | // 通过年查询订单数量(查询每月) |
| | | function orderByYear(){ |
| | | function orderByYear(e){ |
| | | var dom = document.getElementById('chart1'); |
| | | var ajax = new $ax(Feng.ctxPath+"/tHomePage/statisticsYearByAgentId",function(data){ |
| | | data = data.yearResp |
| | | var myChart = echarts.init(dom, null, { |
| | | renderer: 'canvas', |
| | | useDirtyRect: false |
| | | }); |
| | | var option; |
| | | option = { |
| | | tooltip: { |
| | | trigger: 'axis', //坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用 |
| | | axisPointer: {// 坐标轴指示器,坐标轴触发有效 |
| | | type: 'line' // 默认为直线,可选为:'line' | 'shadow' |
| | | }, |
| | | formatter: '日期: {b} <br/>订单数量 : {c}' |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: [data[0].month+'月',data[1].month+'月', data[2].month+'月', data[3].month+'月',data[4].month+'月',data[5].month+'月',data[6].month+'月',data[7].month+'月',data[8].month+'月',data[9].month+'月',data[10].month+'月',data[11].month+'月'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [data[0].orderCount,data[1].orderCount, data[2].orderCount, data[3].orderCount,data[4].orderCount,data[5].orderCount,data[6].orderCount,data[7].orderCount,data[8].orderCount,data[9].orderCount,data[10].orderCount,data[11].orderCount], |
| | | type: 'line', |
| | | color: '#00b7ee' |
| | | } |
| | | ] |
| | | }; |
| | | option && myChart.setOption(option); |
| | | }, function (data) { |
| | | data = data.yearResp |
| | | var myChart = echarts.init(dom, null, { |
| | | renderer: 'canvas', |
| | | useDirtyRect: false |
| | | }); |
| | | var option; |
| | | option = { |
| | | tooltip: { |
| | | trigger: 'axis', //坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用 |
| | | axisPointer: {// 坐标轴指示器,坐标轴触发有效 |
| | | type: 'line' // 默认为直线,可选为:'line' | 'shadow' |
| | | }, |
| | | formatter: '日期: {b} <br/>订单数量 : {c}' |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: [data[0].month+'月',data[1].month+'月', data[2].month+'月', data[3].month+'月',data[4].month+'月',data[5].month+'月',data[6].month+'月',data[7].month+'月',data[8].month+'月',data[9].month+'月',data[10].month+'月',data[11].month+'月'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [data[0].orderCount,data[1].orderCount, data[2].orderCount, data[3].orderCount,data[4].orderCount,data[5].orderCount,data[6].orderCount,data[7].orderCount,data[8].orderCount,data[9].orderCount,data[10].orderCount,data[11].orderCount], |
| | | type: 'line', |
| | | color: '#00b7ee' |
| | | } |
| | | ] |
| | | }; |
| | | option && myChart.setOption(option); |
| | | }, function (data) { |
| | | }); |
| | | ajax.set("agentId",$("#agentName").val()); |
| | | ajax.set("yearDate",$("#year").val()); |
| | | if(e==''){ |
| | | ajax.set("yearDate",$("#year").val()); |
| | | }else{ |
| | | ajax.set("yearDate",e); |
| | | } |
| | | |
| | | ajax.start(); |
| | | } |
| | | |
| | |
| | | ajax.start(); |
| | | } |
| | | |
| | | function getOrder(type){ |
| | | function getOrder(type,e){ |
| | | $.ajax({ |
| | | url: Feng.ctxPath + '/tHomePage/statisticsOrderByAgentId', |
| | | type: 'POST', |
| | | data: { |
| | | agentId: $("#agentName").val(), |
| | | monthDate: $("#monthDate").val(), |
| | | monthDate: e, |
| | | type: type |
| | | }, |
| | | success: function (res) { |
| | |
| | | // 查询月度报表 |
| | | orderByMonth() |
| | | // 通过年查询订单报表 |
| | | orderByYear() |
| | | orderByYear($('#insertTime').val()) |
| | | // 查询排行榜 |
| | | if($('#btn1').val() != null && $('#btn1').val() != ''){ |
| | | console.log(111) |
| | | getOrder($('#btn1').val()) |
| | | getOrder($('#btn1').val(),$('#insertTimeMonth').val()) |
| | | } |
| | | if($('#btn2').val() != null && $('#btn2').val() != ''){ |
| | | console.log(222) |
| | | getOrder($('#btn2').val()) |
| | | getOrder($('#btn2').val(),$('#insertTimeMonth').val()) |
| | | } |
| | | if($('#btn3').val() != null && $('#btn3').val() != ''){ |
| | | console.log(333) |
| | | getOrder($('#btn3').val()) |
| | | getOrder($('#btn3').val(),$('#insertTimeMonth').val()) |
| | | } |
| | | }) |
| | | |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <span class="control-label" >余额低于</span> |
| | | <input class="control-label" id="num1" name="num1" value="${num1}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num1" name="num1" value="${num1}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,停止接单</span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span class="control-label" >余额充值满</span> |
| | | <input class="control-label" id="num2" name="num2" value="${num2}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num2" name="num2" value="${num2}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,获得9折优惠权限</span> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> |
| | | <script> |
| | | $("input[name=num1]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num2]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | function regexp(value){ |
| | | var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(value)){ |
| | | if(parseInt(value) <= 0){ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >司机邀请1名用户,下单后完成订单后获得</span> |
| | | <input class="control-label" id="num1" name="num1" value="${num1}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num1" name="num1" value="${num1}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/单</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >司机A邀请1名司机B,完成有效单后获得</span> |
| | | <input class="control-label" id="num2" name="num2" value="${num2}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num2" name="num2" value="${num2}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/单</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >司机B邀请1名司机C,完成有效单后B获得</span> |
| | | <input class="control-label" id="num3" name="num3" value="${num3}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num3" name="num3" value="${num3}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/单 司机A获得</span> |
| | | <input class="control-label" id="num4" name="num4" value="${num4}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num4" name="num4" value="${num4}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/单</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >司机C邀请1名司机D,完成有效单后C获得</span> |
| | | <input class="control-label" id="num5" name="num5" value="${num5}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num5" name="num5" value="${num5}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/单 司机B获得</span> |
| | | <input class="control-label" id="num6" name="num6" value="${num6}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num6" name="num6" value="${num6}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/单 司机A获得</span> |
| | | <input class="control-label" id="num7" name="num7" value="${num7}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num7" name="num7" value="${num7}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/单</span> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> |
| | | <script> |
| | | $("input[name=num1]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num2]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num3]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num4]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num5]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num6]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num7]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | function regexp(value){ |
| | | var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(value)){ |
| | | if(parseInt(value) <= 0){ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <span class="control-label" >派单距离第一轮</span> |
| | | <input class="control-label" id="num1" name="num1" value="${num1}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num1" name="num1" value="${num1}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >米</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <span class="control-label" >派单距离第二轮</span> |
| | | <input class="control-label" id="num2" name="num2" value="${num2}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num2" name="num2" value="${num2}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >米</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <span class="control-label" >派单距离第三轮</span> |
| | | <input class="control-label" id="num3" name="num3" value="${num3}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num3" name="num3" value="${num3}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >米</span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <span class="control-label" >接单时间</span> |
| | | <input class="control-label" id="num4" name="num4" value="${num4}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num4" name="num4" value="${num4}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >秒</span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <span class="control-label" >改派后暂停接单</span> |
| | | <input class="control-label" id="num5" name="num5" value="${num5}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num5" name="num5" value="${num5}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >分钟</span> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> |
| | | <script> |
| | | $("input[name=num1]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num2]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num3]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num4]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num5]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | function regexp(value){ |
| | | var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(value)){ |
| | | if(parseInt(value) <= 0){ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span class="control-label" >司机订单保险费,每天固定抽取</span> |
| | | <input class="control-label" id="num1" name="num1" value="${num1}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num1" name="num1" value="${num1}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/天</span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span class="control-label" >抽成,每笔订单满</span> |
| | | <input class="control-label" id="num2" name="num2" value="${num2}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num2" name="num2" value="${num2}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/单,抽取</span> |
| | | <input class="control-label" id="num3" name="num3" value="${num3}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num3" name="num3" value="${num3}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> |
| | | <script> |
| | | $("input[name=num1]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num2]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num3]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | function regexp(value){ |
| | | var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(value)){ |
| | | if(parseInt(value) <= 0){ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <span class="control-label" >——</span> |
| | | <input class="control-label" id="num2" name="num2" value="${num2}" type="text" style="height: 30px;width: 80px" placeholder="23:00"> |
| | | <span class="control-label" >每小时增加</span> |
| | | <input class="control-label" id="num3" name="num3" value="${num3}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num3" name="num3" value="${num3}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >积分</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span class="control-label" >推荐用户首次下单,完成订单后</span> |
| | | <input class="control-label" id="num4" name="num4" value="${num4}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num4" name="num4" value="${num4}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >积分</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span class="control-label" >司机完成订单,获得</span> |
| | | <input class="control-label" id="num5" name="num5" value="${num5}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num5" name="num5" value="${num5}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >积分</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span class="control-label" >获得5星好评,获得</span> |
| | | <input class="control-label" id="num6" name="num6" value="${num6}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num6" name="num6" value="${num6}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >积分</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span class="control-label" >邀请司机注册成功获得</span> |
| | | <input class="control-label" id="num7" name="num7" value="${num7}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num7" name="num7" value="${num7}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >积分</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span class="control-label" >恶劣天气完成订单获得</span> |
| | | <input class="control-label" id="num8" name="num8" value="${num8}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num8" name="num8" value="${num8}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >积分</span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <span class="control-label" >差评扣除</span> |
| | | <input class="control-label" id="num9" name="num9" value="${num9}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num9" name="num9" value="${num9}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >积分</span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <span class="control-label" >拒绝订单扣除</span> |
| | | <input class="control-label" id="num10" name="num10" value="${num10}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num10" name="num10" value="${num10}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >积分</span> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tSystemConfig/tSystemConfig_info.js"></script> |
| | | <script> |
| | | $("input[name=num3]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num4]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num5]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num6]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num7]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num8]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num9]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num10]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | function regexp(value){ |
| | | var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(value)){ |
| | | if(parseInt(value) <= 0){ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <span class="control-label" >——</span> |
| | | <input class="control-label" id="num2" name="num2" value="${ChargeStandard.num2}" type="text" placeholder="00:00" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >代驾里程</span> |
| | | <input class="control-label" id="num3" name="num3" value="${ChargeStandard.num3}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num3" name="num3" value="${ChargeStandard.num3}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >——</span> |
| | | <input class="control-label" id="num4" name="num4" value="${ChargeStandard.num4}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num4" name="num4" value="${ChargeStandard.num4}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,起步价</span> |
| | | <input class="control-label" id="num5" name="num5" value="${ChargeStandard.num5}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num5" name="num5" value="${ChargeStandard.num5}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出里程每</span> |
| | | <input class="control-label" id="num6" name="num6" value="${ChargeStandard.num6}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num6" name="num6" value="${ChargeStandard.num6}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num7" name="num7" value="${ChargeStandard.num7}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num7" name="num7" value="${ChargeStandard.num7}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | |
| | | @if(ChargeStandard.key == 0){ |
| | |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >代驾里程</span> |
| | | <input class="control-label" id="num8" name="num8" value="${ChargeStandard.num8}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num8" name="num8" value="${ChargeStandard.num8}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >——</span> |
| | | <input class="control-label" id="num9" name="num9" value="${ChargeStandard.num9}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num9" name="num9" value="${ChargeStandard.num9}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,起步价</span> |
| | | <input class="control-label" id="num10" name="num10" value="${ChargeStandard.num10}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num10" name="num10" value="${ChargeStandard.num10}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出里程每</span> |
| | | <input class="control-label" id="num11" name="num11" value="${ChargeStandard.num11}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num11" name="num11" value="${ChargeStandard.num11}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num12" name="num12" value="${ChargeStandard.num12}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num12" name="num12" value="${ChargeStandard.num12}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >等待</span> |
| | | <input class="control-label" id="num13" name="num13" value="${ExtraCost.num1}" type="text" placeholder="00:00" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num13" name="num13" value="${ExtraCost.num1}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >分钟,收取</span> |
| | | <input class="control-label" id="num14" name="num14" value="${ExtraCost.num2}" type="text" placeholder="00:00" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num14" name="num14" value="${ExtraCost.num2}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出</span> |
| | | <input class="control-label" id="num15" name="num15" value="${ExtraCost.num3}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num15" name="num15" value="${ExtraCost.num3}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >分钟,收取</span> |
| | | <input class="control-label" id="num16" name="num16" value="${ExtraCost.num4}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num16" name="num16" value="${ExtraCost.num4}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/分钟</span> |
| | | </div> |
| | | <input hidden id="zcOne" value="${zcOne}"> |
| | |
| | | @if(1 == zcOne){ |
| | | <div class="initialLevel col-sm-10 control-label form-group" > |
| | | <span class="control-label" >恶劣天气</span> |
| | | <input class="control-label" id="num17" name="num17" value="${ExtraCost.num5}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num17" name="num17" value="${ExtraCost.num5}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里以内,加收</span> |
| | | <input class="control-label" id="num18" name="num18" value="${ExtraCost.num6}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num18" name="num18" value="${ExtraCost.num6}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出</span> |
| | | <input class="control-label" id="num19" name="num19" value="${ExtraCost.num7}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num19" name="num19" value="${ExtraCost.num7}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收取订单的</span> |
| | | <input class="control-label" id="num20" name="num20" value="${ExtraCost.num8}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num20" name="num20" value="${ExtraCost.num8}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >倍计费,最高收取</span> |
| | | <input class="control-label" id="num21" name="num21" value="${ExtraCost.num9}" type="number" style="height: 30px;width: 80px"> |
| | | <input class="control-label" id="num21" name="num21" value="${ExtraCost.num9}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | @} |
| | |
| | | } |
| | | ajax.start(); |
| | | }) |
| | | |
| | | $("input[name=num1]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num2]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num3]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num4]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num5]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num6]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num7]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num8]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num9]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num10]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num11]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num12]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | |
| | | |
| | | $("input[name=num13]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num14]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num15]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num16]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num17]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num18]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num19]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num20]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num21]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | |
| | | |
| | | function regexp(value){ |
| | | var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(value)){ |
| | | if(parseInt(value) <= 0){ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '联系电话不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^1[3-9]\d{9}$/, |
| | | message: '请输入合法手机号' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '联系电话不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^1[3-9]\d{9}$/, |
| | | message: '请输入合法手机号' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '优惠券数量不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[1-9]\d*$/, |
| | | message: '请输入大于0的正整数' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '条件金额不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[1-9]\d*$/, |
| | | message: '请输入大于0的正整数' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '优惠金额不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[1-9]\d*$/, |
| | | message: '请输入大于0的正整数' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '有效期不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[1-9]\d*$/, |
| | | message: '请输入大于0的正整数' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '优惠券总量不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[1-9]\d*$/, |
| | | message: '请输入大于0的正整数' |
| | | } |
| | | } |
| | | }, |
| | |
| | | * 提交充值 |
| | | */ |
| | | TDriver.rechargeBalance = function () { |
| | | var balance = $('#backgroundBalance').val().trim(); |
| | | var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(balance)){ |
| | | if(parseInt(balance) <= 0){ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/recharge-balance", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.close(); |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '手机号不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^1[3-9]\d{9}$/, |
| | | message: '请输入合法手机号' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '紧急联系人电话不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^1[3-9]\d{9}$/, |
| | | message: '请输入合法手机号' |
| | | } |
| | | } |
| | | }, |
| | |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TSystemConfigInfoDlg = { |
| | | tSystemConfigInfoData : {} |
| | | tSystemConfigInfoData : {}, |
| | | validateFields: { |
| | | phone: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '联系电话不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^1[3-9]\d{9}$/, |
| | | message: '请输入合法手机号' |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | |
| | | /** |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '兑换条件不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[1-9]\d*$/, |
| | | message: '请输入大于0的正整数' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '优推距离不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[1-9]\d*$/, |
| | | message: '请输入大于0的正整数' |
| | | } |
| | | } |
| | | }, |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '有效期不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[1-9]\d*$/, |
| | | message: '请输入大于0的正整数' |
| | | } |
| | | } |
| | | }, |