New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.ExcelExportUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.service.IIncomeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2021-04-22 10:53:34 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/platform/commission") |
| | | public class PlatformController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/platform/"; |
| | | |
| | | @Autowired |
| | | private IIncomeService tIncomeService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index( Model model) { |
| | | return PREFIX + "commission.html"; |
| | | } |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(Integer time,String insertTime,Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | // 如果筛选了时间 将time设置为null |
| | | time = null; |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | return null; |
| | | // Page<Map<String,Object>> page = new PageFactory<Map<String,Object>>().defaultPage(); |
| | | // page.setRecords(tIncomeService.getList(page,id)); |
| | | // return super.packForBT(page); |
| | | } |
| | | |
| | | } |
| | |
| | | , Integer num8 |
| | | , Double num9 |
| | | , Integer num10 |
| | | , Double num11) { |
| | | , Double num11 |
| | | , String num12 |
| | | |
| | | ) { |
| | | |
| | | driverActivityService.insertOrUpdate(null,staTime,startTime, num1, num2 |
| | | , num3 |
| | |
| | | , num8 |
| | | , num9 |
| | | , num10 |
| | | , num11); |
| | | , num11 |
| | | , num12); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | , Integer num8 |
| | | , Double num9 |
| | | , Integer num10 |
| | | , Double num11) { |
| | | , Double num11 |
| | | , String num12 |
| | | ) { |
| | | driverActivityService.insertOrUpdate(id,staTime,startTime, num1, num2 |
| | | , num3 |
| | | , num4 |
| | |
| | | , num8 |
| | | , num9 |
| | | , num10 |
| | | , num11); |
| | | , num11 |
| | | ,num12); |
| | | return SUCCESS_TIP; |
| | | } |
| | | @RequestMapping(value = "/updateStatus") |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.google.gson.Gson; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TServerCarmodel tServerCarmodel) { |
| | | public Object add(TServerCarmodel tServerCarmodel,@RequestParam Integer isPrivateCar,@RequestParam Integer isPackage ) { |
| | | int count = tServerCarmodelService.selectCount(new EntityWrapper<TServerCarmodel>().eq("type", 1) |
| | | .eq("name", tServerCarmodel.getName()).last(" and not FIND_IN_SET(state,'3')")); |
| | | if (count > 0){ |
| | |
| | | tServerCarmodel.setInsertTime(new Date()); |
| | | tServerCarmodel.setState(1); |
| | | tServerCarmodel.setType(1); |
| | | tServerCarmodel.setIsPackage(isPackage); |
| | | tServerCarmodel.setIsPrivateCar(isPrivateCar); |
| | | tServerCarmodelService.insert(tServerCarmodel); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TServerCarmodel tServerCarmodel) { |
| | | public Object update(TServerCarmodel tServerCarmodel,@RequestParam Integer isPrivateCar,@RequestParam Integer isPackage) { |
| | | tServerCarmodel.setInsertTime(new Date()); |
| | | tServerCarmodel.setState(1); |
| | | tServerCarmodel.setType(1); |
| | | tServerCarmodel.setIsPackage(isPackage); |
| | | tServerCarmodel.setIsPrivateCar(isPrivateCar); |
| | | tServerCarmodelService.updateById(tServerCarmodel); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | * @author stylefeng |
| | | * @since 2020-06-17 |
| | | */ |
| | | @Data |
| | | @TableName("t_driver_activity") |
| | | public class DriverActivity extends Model<DriverActivity> { |
| | | |
| | |
| | | private Date endTime; |
| | | |
| | | private Integer companyType; |
| | | private String offline; |
| | | |
| | | public Integer getCompanyType() { |
| | | return companyType; |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | * @author 吕雪 |
| | | * @since 2020-08-29 |
| | | */ |
| | | @Data |
| | | @TableName("t_server_carmodel") |
| | | public class TServerCarmodel extends Model<TServerCarmodel> { |
| | | |
| | |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 是否勾选了专车 0否1是 |
| | | */ |
| | | private Integer isPrivateCar; |
| | | /** |
| | | * 是否勾选了包裹 0否1是 |
| | | */ |
| | | private Integer isPackage; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date insertTime; |
| | |
| | | , Integer num8 |
| | | , Double num9 |
| | | , Integer num10 |
| | | , Double num11); |
| | | , Double num11 |
| | | , String num12 |
| | | ); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void insertOrUpdate(Integer id, String staTime, String startTime, String num1, Double num2, Double num3, Integer num4, Double num5, Integer num6, Double num7, Integer num8, Double num9, Integer num10, Double num11) { |
| | | public void insertOrUpdate(Integer id, String staTime, String startTime, String num1, Double num2, Double num3, Integer num4, Double num5, Integer num6, Double num7, Integer num8, Double num9, Integer num10, Double num11,String num12) { |
| | | //判断id是否为空,为空执行添加,或者执行修改 |
| | | if(id==null){ |
| | | String[] timeArray = startTime.split(" - "); |
| | |
| | | driverActivity.setName(num1); |
| | | driverActivity.setStartTime(startTimes); |
| | | driverActivity.setEndTime(endTimes); |
| | | driverActivity.setOffline(num12); |
| | | driverActivity.insertOrUpdate(); |
| | | //添加在线活动-专车 |
| | | DriverActivityOnline driverActivityOnline = new DriverActivityOnline(); |
| | |
| | | driverActivity.setName(num1); |
| | | driverActivity.setStartTime(startTimes); |
| | | driverActivity.setEndTime(endTimes); |
| | | driverActivity.setOffline(num12); |
| | | driverActivity.insertOrUpdate(); |
| | | |
| | | //添加在线活动-专车 |
| | | DriverActivityOnline driverActivityOnline = driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",id).eq("type",1)); |
| | | if(driverActivityOnline==null){ |
| | |
| | | <br/> |
| | | <br/> |
| | | |
| | | 司机注册既赠送 <input type="text" id="num2" class="form-control newWidth" /> 元 |
| | | 司机注册既赠送 <input type="text" id="num2" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机邀请用户注册 |
| | | <br/> |
| | | <br/> |
| | | 用户注册既赠送 <input type="text" id="num3" class="form-control newWidth" /> 元 |
| | | 用户注册既赠送 <input type="text" id="num3" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机APP每天累计在线奖励 |
| | | <br/> |
| | | <br/> |
| | | 专车累计在线 <input type="text" id="num4" class="form-control newWidth" /> 小时奖励 |
| | | <input type="text" id="num5" class="form-control newWidth" /> 元 |
| | | 专车/包裹累计在线 <input type="text" id="num4" class="form-control newWidth" /> 小时奖励 |
| | | <input type="text" id="num5" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | 连续在线 <input type="text" id="num12" class="form-control newWidth" /> 小时不接单 则强制更改司机账号状态为:下班,并且累计的在线时长清零; |
| | | <br/> |
| | | <br/> |
| | | <!-- |
| | | <br/> |
| | | 出租车累计在线 <input type="text" id="num6" class="form-control newWidth" /> 小时奖励 |
| | | <input type="text" id="num7" class="form-control newWidth" /> 元 |
| | | <input type="text" id="num7" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | 跨城出行累计在线 <input type="text" id="num8" class="form-control newWidth" /> 小时奖励 |
| | | <input type="text" id="num9" class="form-control newWidth" /> 元 |
| | | <input type="text" id="num9" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | --> |
| | | <br/> |
| | | 司机累计达到规定订单数奖励 |
| | | <br/> |
| | | <br/> |
| | | 每天 <input type="text" id="staTime" class="form-control newWidth" /> 司机接单达到 |
| | | <input type="text" id="num10" class="form-control newWidth" /> 单既奖励 |
| | | <input type="text" id="num11" class="form-control newWidth" /> 元 |
| | | <input type="text" id="num11" class="form-control newWidth" /> GHS |
| | | <br/> |
| | | <br/> |
| | | 有效期为 <input type="text" id="startTime" name="zc7" class="form-control" style="max-width:300px !important;display: initial !important;" /> |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机邀请用户注册 |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机APP每天累计在线奖励 |
| | | <br/> |
| | | <br/> |
| | | 专车累计在线 <input type="text" @if(isNotEmpty(online1)){ |
| | | 专车/包裹累计在线 <input type="text" @if(isNotEmpty(online1)){ |
| | | value="${online1.online}" |
| | | @}else{ |
| | | value="" |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | <br/> |
| | | 连续在线 <input type="text" @if(isNotEmpty(item.offline)){ |
| | | value="${item.offline}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="num12" class="form-control newWidth" readonly/> 小时奖励 |
| | | <br/> |
| | | |
| | | <!-- |
| | | <br/> |
| | | 出租车累计在线 <input type="text" @if(isNotEmpty(online2)){ |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | <br/> |
| | | 跨城出行累计在线 <input type="text" @if(isNotEmpty(online3)){ |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | --> |
| | | <br/> |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" class="form-control newWidth" readonly/> 元 |
| | | name="zc7" class="form-control newWidth" readonly/> GHS |
| | | <br/> |
| | | <br/> |
| | | 有效期为 <input type="text" value="${startTime}" name="zc7" class="form-control newWidth" readonly/>- |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num2" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num2" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机邀请用户注册 |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num3" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num3" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | <br/> |
| | | 司机APP每天累计在线奖励 |
| | | <br/> |
| | | <br/> |
| | | 专车累计在线 <input type="text" @if(isNotEmpty(online1)){ |
| | | 专车/包裹累计在线 <input type="text" @if(isNotEmpty(online1)){ |
| | | value="${online1.online}" |
| | | @}else{ |
| | | value="" |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num5" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num5" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | <br/> |
| | | 连续在线 <input type="text" @if(isNotEmpty(item.offline)){ |
| | | value="${item.offline}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="num12" class="form-control newWidth"/> 小时奖励 |
| | | <br/> |
| | | <!-- |
| | | <br/> |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num7" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num7" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | <br/> |
| | | 跨城出行累计在线 <input type="text" @if(isNotEmpty(online3)){ |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num9" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num9" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | --> |
| | | <br/> |
| | |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="num11" class="form-control newWidth"/> 元 |
| | | name="zc7" id="num11" class="form-control newWidth"/> GHS |
| | | <br/> |
| | | <br/> |
| | | 有效期为 <input type="text" id="startTime" name="zc7" class="form-control" style="max-width:300px !important;display: initial !important;" /> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .container { |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | margin-left: 50px; |
| | | margin-top: 30px; |
| | | } |
| | | .rectangle1 { |
| | | width: 550px; /* 设置框的宽度 */ |
| | | height: 160px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 50px; /* 设置矩形框之间的间距 */ |
| | | } |
| | | .rectangle2 { |
| | | width: 300px; /* 设置框的宽度 */ |
| | | height: 130px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 50px; /* 设置矩形框之间的间距 */ |
| | | margin-left: 50px; /* 设置矩形框之间的间距 */ |
| | | margin-top: 15px; |
| | | } |
| | | .rectangle3 { |
| | | width: 300px; /* 设置框的宽度 */ |
| | | height: 130px; /* 自适应高度 */ |
| | | background-color: #cecece; /* 设置底色为灰色 */ |
| | | border-radius: 30px; /* 设置圆角半径为10px */ |
| | | display: flex; /* 使用 Flex 布局 */ |
| | | flex-direction: column; /* 设置主轴方向为垂直 */ |
| | | justify-content: center; /* 垂直居中 */ |
| | | align-items: center; /* 水平居中 */ |
| | | margin-right: 50px; /* 设置矩形框之间的间距 */ |
| | | margin-left: 50px; /* 设置矩形框之间的间距 */ |
| | | margin-top: 15px; |
| | | } |
| | | h1, h2 { |
| | | margin: 0; /* 去除默认的外边距 */ |
| | | } |
| | | |
| | | </style> |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>平台佣金统计</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="time" name="时间" > |
| | | <option value="1">今日</option> |
| | | <option value="2">本周</option> |
| | | <option value="3">本月</option> |
| | | <option value="4">全年</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="insertTime" name="时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">已结算</option> |
| | | <option value="2">未结算</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="查询" icon="fa-search" clickFun="TUser.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TUser.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="container"> |
| | | <div class="rectangle1"> |
| | | <h1 id="num1">0</h1> |
| | | <br> |
| | | <h2 id="text1">佣金总额</h2> |
| | | |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/=.png."> |
| | | <div class="rectangle2"> |
| | | <h1 id="num2">1</h1> |
| | | <br> |
| | | <h2 id="text2">司机已结算</h2> |
| | | </div> |
| | | <img style="margin-top: 70px" width="25px" height="25px" src="${ctxPath}/static/img/+.png."> |
| | | |
| | | <div class="rectangle3"> |
| | | <h1 id="num3">2</h1> |
| | | <br> |
| | | <h2 id="text3">司机未结算</h2> |
| | | </div> |
| | | </div> |
| | | |
| | | <#table id="TUserTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/platform/platform.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | <#avatar id="img" name="车型图片:" /> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">经营业务:</label> |
| | | <div class="col-sm-9"> |
| | | <fieldset> |
| | | <div class="checkbox checkbox-success"> |
| | | <input name="checkbox" id="checkbox1" type="checkbox" value="1" > |
| | | <label for="checkbox1"> |
| | | 包裹 |
| | | </label> |
| | | </div> |
| | | |
| | | <div class="checkbox checkbox-info"> |
| | | <input name="checkbox" id="checkbox4" type="checkbox" value="4" > |
| | | <label for="checkbox4"> |
| | | 专车 |
| | | </label> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | |
| | | <#avatar id="img" name="车型图片:" avatarImg="${data.img}"/> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">经营业务:</label> |
| | | <div class="col-sm-9"> |
| | | <fieldset> |
| | | <div class="checkbox checkbox-success"> |
| | | <input name="checkbox" id="checkbox1" type="checkbox" value="1" ${1 == data.isPackage ? 'checked=checked' : ''} > |
| | | <label for="checkbox1"> |
| | | 包裹 |
| | | </label> |
| | | </div> |
| | | |
| | | <div class="checkbox checkbox-info"> |
| | | <input name="checkbox" id="checkbox4" type="checkbox" value="4" ${1 == data.isPrivateCar ? 'checked=checked' : ''} > |
| | | <label for="checkbox4"> |
| | | 专车 |
| | | </label> |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TServerCarmodelInfoDlg.editSubmit()"/> |
| | |
| | | Feng.error("请输入正确金额数!"); |
| | | return; |
| | | } |
| | | if (!re.test($("#num12").val())) { |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | | } |
| | | // if (!re.test($("#num7").val())) { |
| | | // Feng.error("请输入正确金额数!"); |
| | | // return; |
| | |
| | | ajax.set("num9",0); |
| | | ajax.set("num10",$("#num10").val()); |
| | | ajax.set("num11",$("#num11").val()); |
| | | ajax.set("num12",$("#num12").val()); |
| | | ajax.start(); |
| | | } |
| | | /** |
| | |
| | | Feng.error("请输入正确金额数!"); |
| | | return; |
| | | } |
| | | if (!re.test($("#num12").val())) { |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | | } |
| | | // if (!re.test($("#num7").val())) { |
| | | // Feng.error("请输入正确金额数!"); |
| | | // return; |
| | |
| | | Feng.error("请输入正确小时数!"); |
| | | return; |
| | | } |
| | | |
| | | // if (!/^[1-9]\d*$/.test($("#num6").val())) { |
| | | // Feng.error("请输入正确小时数!"); |
| | | // return; |
| | |
| | | ajax.set("num9",0); |
| | | ajax.set("num10",$("#num10").val()); |
| | | ajax.set("num11",$("#num11").val()); |
| | | ajax.set("num12",$("#num12").val()); |
| | | ajax.start(); |
| | | } |
| | | |
New file |
| | |
| | | /** |
| | | * 用户管理管理初始化 |
| | | */ |
| | | var TUser = { |
| | | id: "TUserTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 鼠标悬停提示框 class .toolTip 为无效样式,作用于个别选择器使用 |
| | | */ |
| | | TUser.tooltip = function(){ |
| | | $(".toolTip").tooltip(); |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TUser.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '下单时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单号', field: 'orderNumber', visible: true, align: 'center', valign: 'middle'}, |
| | | |
| | | {title: '司机姓名', field: 'driverName', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '司机手机号', field: 'driverPhone', visible: true, align: 'center', valign: 'middle', |
| | | }, |
| | | {title: '佣金金额', field: 'commission', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var commission = row.commission; |
| | | var btn = ""; |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: orange;" title="待审核" onfocus="TUser.tooltip()">'+commission+'</p>'] |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '支付方式', field: 'payType', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.payType != '' && row.payType != null) { |
| | | if (row.payType == 1) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="手机支付" >手机支付</p>'] |
| | | } |
| | | else if (row.payType == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="银行卡支付">银行卡支付</p>'] |
| | | } |
| | | else if (row.payType == 3){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="余额支付">余额支付</p>'] |
| | | } |
| | | |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle',}, |
| | | {title: '状态', field: 'paymentStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.payType != '' && row.payType != null) { |
| | | if (row.payType == 1) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="未结算" >未结算</p>'] |
| | | } |
| | | else if (row.payType == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已结算">已结算</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '结算时间', field: 'payTime', visible: true, align: 'center', valign: 'middle',}, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TUser.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TUser.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 修改余额 |
| | | */ |
| | | TUser.updateBalance = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改余额', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updateBalance/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 修改密码 |
| | | */ |
| | | TUser.updatePassword = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改密码', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_updatePassword/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | /** |
| | | * 查看分享信息 |
| | | */ |
| | | TUser.inviteInfo=function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '邀请信息', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/inviteInfo/'+ TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看用户管理详情 |
| | | */ |
| | | TUser.userDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '用户详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_userDetail/' + TUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 冻结用户 |
| | | */ |
| | | TUser.freezeUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 1) { |
| | | swal("冻结失败", "【正常】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '冻结用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+1 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | /** |
| | | * 解冻用户 |
| | | */ |
| | | TUser.trawUser = function () { |
| | | if (this.check()) { |
| | | var nickname = TUser.seItem.nickName; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该用户"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TUser.seItem.state != 2) { |
| | | swal("启用失败", "【冻结】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '解冻用户', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tUser/tUser_optUser/' + TUser.seItem.id +"/"+2 |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询用户管理列表 |
| | | */ |
| | | TUser.search = function () { |
| | | var queryData = {}; |
| | | queryData['time'] = $("#time").val(); |
| | | queryData['insertTime'] = $("#id").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | TUser.table.refresh({query: queryData}); |
| | | }; |
| | | TUser.resetSearch = function () { |
| | | $("#time").val("今日"); |
| | | $("#insertTime").val(""); |
| | | $("#state").val(""); |
| | | TUser.search(); |
| | | }; |
| | | $(function () { |
| | | var defaultColunms = TUser.initColumn(); |
| | | var table = new BSTable(TUser.id, "/tUser/list", defaultColunms); |
| | | // 设置物理分页server(逻辑分页client) |
| | | table.setPaginationType("server"); |
| | | TUser.table = table.init(); |
| | | }); |
| | | |
| | | |
| | | TUser.sendAjaxRequest = function(url,type,data){ |
| | | $.ajax({ |
| | | url : url, |
| | | type : type, |
| | | data : data, |
| | | success : function(result) { |
| | | if(result.code==500) { |
| | | Feng.info(result.message); |
| | | }else { |
| | | Feng.success("导入成功!"); |
| | | } |
| | | TUser.table.refresh(); |
| | | }, |
| | | error : function() { |
| | | Feng.error("excel上传失败!"); |
| | | }, |
| | | cache : false, |
| | | contentType : false, |
| | | processData : false |
| | | }); |
| | | }; |
| | | |
| | | var agreement; |
| | | $(function(){ |
| | | agreement = new agreement(); |
| | | agreement.init(); |
| | | }); |
| | | |
| | |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '活动标题', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券类型', field: 'couponUseType', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if(value==0){ |
| | |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var checkbox1 = $('#checkbox1').prop('checked'); |
| | | var checkbox4 = $('#checkbox4').prop('checked'); |
| | | var temp = 0; |
| | | var temp1 = 0; |
| | | if (checkbox1){ |
| | | temp = 1; |
| | | } |
| | | if (checkbox4){ |
| | | temp1 = 1; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tServerCarmodel/add", function(data){ |
| | | if (500 == data.code){ |
| | |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tServerCarmodelInfoData); |
| | | ajax.set("isPrivateCar",temp1); |
| | | ajax.set("isPackage",temp); |
| | | ajax.start(); |
| | | } |
| | | |
| | |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | var checkbox1 = $('#checkbox1').prop('checked'); |
| | | var checkbox4 = $('#checkbox4').prop('checked'); |
| | | var temp = 0; |
| | | var temp1 = 0; |
| | | if (checkbox1){ |
| | | temp = 1; |
| | | } |
| | | if (checkbox4){ |
| | | temp1 = 1; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tServerCarmodel/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tServerCarmodelInfoData); |
| | | ajax.set("isPrivateCar",temp1); |
| | | ajax.set("isPackage",temp); |
| | | ajax.start(); |
| | | } |
| | | |