| | |
| | | @Autowired |
| | | private ITSystemConfigService systemConfigService; |
| | | |
| | | @Autowired |
| | | private ICompanyFundFlowService companyFundFlowService; |
| | | |
| | | @Value("${callbackPath}") |
| | | private String callbackPath; |
| | | |
| | |
| | | TAgent tAgent = tAgentService.selectById(tAgentId); |
| | | model.addAttribute("item",tAgent); |
| | | LogObjectHolder.me().set(tAgent); |
| | | User user = userService.selectOne(new EntityWrapper<User>().eq("role_type", 3).eq("object_id", tAgentId)); |
| | | model.addAttribute("user", user); |
| | | return PREFIX + "tAgent_edit.html"; |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/tAgent/update") |
| | | @ResponseBody |
| | | public Object update(TAgent tAgent) { |
| | | TAgent tAgent1 = tAgentService.selectOne(new EntityWrapper<TAgent>() |
| | | .eq("merchantName", tAgent.getMerchantName())); |
| | | if(null != tAgent1 && tAgent1.getId().compareTo(tAgent.getId()) != 0){ |
| | | return new SuccessTip(500,"该代理商已存在!"); |
| | | } |
| | | |
| | | User user = userService.selectOne(new EntityWrapper<User>().eq("account", tAgent.getAccount())); |
| | | User user1 = userService.selectOne(new EntityWrapper<User>().eq("role_type", 3).eq("object_id", tAgent.getId())); |
| | | if (null != user && user.getId().compareTo(user1.getId()) != 0){ |
| | | return new SuccessTip(500,"该账号已存在!"); |
| | | } |
| | | |
| | | tAgent.setPrincipal(tAgent.getPrincipal().replace(" ","")); |
| | | |
| | | |
| | | String[] split = tAgent.getAreaId().split("/"); |
| | | // 查询省市 |
| | | // 黑龙江省/大兴安岭地区 |
| | | // 702/852 |
| | | TRegion province = tRegionService.selectById(split[0]); |
| | | tAgent.setProvinceName(province.getName()); |
| | | tAgent.setProvinceCode(province.getCode()); |
| | | TRegion city = tRegionService.selectById(split[1]); |
| | | if(Objects.isNull(city)){ |
| | | city = tRegionService.selectOne(new EntityWrapper<TRegion>() |
| | | .eq("name",split[1]) |
| | | .last("LIMIT 1")); |
| | | } |
| | | tAgent.setCityName(city.getName()); |
| | | tAgent.setCityCode(city.getCode()); |
| | | tAgentService.updateById(tAgent); |
| | | |
| | | user1.setAccount(tAgent.getAccount()); |
| | | if(ToolUtil.isNotEmpty(tAgent.getPassword())){ |
| | | user1.setPassword(ShiroKit.md5(tAgent.getPassword(), user.getSalt())); |
| | | } |
| | | userService.updateById(user1); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | if(0 == settledAmount){ |
| | | return ResultUtil.error("余额不足"); |
| | | } |
| | | |
| | | Double balance = 0D; |
| | | if(roleType == 1){ |
| | | balance = rechargeRecordService.queryCompanyBalance(); |
| | | }else{ |
| | | balance = rechargeRecordService.queryAgentBalance(tAgent.getId()); |
| | | } |
| | | |
| | | SettlementRecord settlementRecord = new SettlementRecord(); |
| | | settlementRecord.setType(roleType == 1 ? 1 : 2); |
| | | if(roleType == 3){ |
| | |
| | | settlementRecord.setOrderNumber(merOrderId1); |
| | | settlementRecord.setArrivalTime(new Date()); |
| | | settlementRecordService.updateById(settlementRecord); |
| | | |
| | | CompanyFundFlow companyFundFlow = new CompanyFundFlow(); |
| | | companyFundFlow.setType(2); |
| | | companyFundFlow.setObjectType(roleType == 1 ? 1 : 2); |
| | | if(roleType == 3){ |
| | | companyFundFlow.setObjectId(tAgent.getId()); |
| | | } |
| | | companyFundFlow.setBalance(new BigDecimal(balance)); |
| | | companyFundFlow.setMoney(new BigDecimal(settlementRecord.getAmount())); |
| | | companyFundFlow.setCreateTime(new Date()); |
| | | companyFundFlowService.insert(companyFundFlow); |
| | | return ResultUtil.success(); |
| | | } |
| | | if(2 == status){ |
| | |
| | | settlementRecord.setOrderNumber(merOrderId1); |
| | | settlementRecord.setArrivalTime(new Date()); |
| | | settlementRecordService.updateById(settlementRecord); |
| | | Integer type = settlementRecord.getType(); |
| | | Double balance = 0D; |
| | | if(type == 1){ |
| | | balance = rechargeRecordService.queryCompanyBalance(); |
| | | }else{ |
| | | balance = rechargeRecordService.queryAgentBalance(settlementRecord.getObjectId()); |
| | | } |
| | | BigDecimal bigDecimal = new BigDecimal(balance).add(new BigDecimal(settlementRecord.getAmount())); |
| | | CompanyFundFlow companyFundFlow = new CompanyFundFlow(); |
| | | companyFundFlow.setType(2); |
| | | companyFundFlow.setObjectType(type); |
| | | if(type == 2){ |
| | | companyFundFlow.setObjectId(settlementRecord.getObjectId()); |
| | | } |
| | | companyFundFlow.setBalance(bigDecimal); |
| | | companyFundFlow.setMoney(new BigDecimal(settlementRecord.getAmount())); |
| | | companyFundFlow.setCreateTime(new Date()); |
| | | companyFundFlowService.insert(companyFundFlow); |
| | | |
| | | |
| | | response.setStatus(200); |
| | | PrintWriter out = response.getWriter(); |
| | | out.print("OK"); |
| | |
| | | try { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | String out_trade_no = sdf.format(new Date()) + UUIDUtil.getNumberRandom(3); |
| | | |
| | | RechargeRecord rechargeRecord = new RechargeRecord(); |
| | | rechargeRecord.setCode(out_trade_no); |
| | | rechargeRecord.setType(4); |
| | |
| | | num++; |
| | | } |
| | | if("1".equals(status1)){//成功 |
| | | Double balance = rechargeRecordService.queryCompanyBalance();//平台余额 |
| | | |
| | | String merOrderId = jsonObject1.getString("merOrderId"); |
| | | rechargeRecord1.setPayTime(new Date()); |
| | | rechargeRecord1.setPayStatus(2); |
| | | rechargeRecord1.setOrderNumber(merOrderId); |
| | | rechargeRecord1.setSurplusDividedAmount(rechargeRecord1.getAmount()); |
| | | rechargeRecordService.updateById(rechargeRecord1); |
| | | |
| | | CompanyFundFlow companyFundFlow = new CompanyFundFlow(); |
| | | companyFundFlow.setType(1); |
| | | companyFundFlow.setObjectType(1); |
| | | companyFundFlow.setBalance(new BigDecimal(balance)); |
| | | companyFundFlow.setMoney(new BigDecimal(rechargeRecord1.getAmount())); |
| | | companyFundFlow.setCreateTime(new Date()); |
| | | companyFundFlowService.insert(companyFundFlow); |
| | | break; |
| | | } |
| | | if("2".equals(status1) || 10 == num){//失败 |
| | |
| | | return; |
| | | } |
| | | if(1 == status){ |
| | | Double balance = rechargeRecordService.queryCompanyBalance();//平台余额 |
| | | String parameter1 = jsonObject.getString("parameter1"); |
| | | RechargeRecord rechargeRecord = rechargeRecordService.selectById(parameter1); |
| | | rechargeRecord.setPayStatus(2); |
| | |
| | | rechargeRecord.setOrderNumber(jsonObject.getString("merOrderId")); |
| | | rechargeRecord.setSurplusDividedAmount(rechargeRecord.getAmount()); |
| | | rechargeRecordService.updateById(rechargeRecord); |
| | | |
| | | CompanyFundFlow companyFundFlow = new CompanyFundFlow(); |
| | | companyFundFlow.setType(1); |
| | | companyFundFlow.setObjectType(1); |
| | | companyFundFlow.setBalance(new BigDecimal(balance)); |
| | | companyFundFlow.setMoney(new BigDecimal(rechargeRecord.getAmount())); |
| | | companyFundFlow.setCreateTime(new Date()); |
| | | companyFundFlowService.insert(companyFundFlow); |
| | | |
| | | response.setStatus(200); |
| | | PrintWriter out = response.getWriter(); |
| | | out.print("OK"); |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | } |
| | | |
| | | model.addAttribute("item",tDriverResp); |
| | | model.addAttribute("driver",tDriver); |
| | | LogObjectHolder.me().set(tDriver); |
| | | return PREFIX + "tDriver_edit.html"; |
| | | } |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取详情中的汇总数据查询 |
| | | * @param id |
| | | * @param time |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/querySummaryData") |
| | | public Object querySummaryData(Integer id, String time){ |
| | | return tDriverService.querySummaryData(id, time); |
| | | } |
| | | } |
| | |
| | | model.addAttribute("num1",jsonObject.getInteger("num1")); |
| | | model.addAttribute("num2",jsonObject.getInteger("num2")); |
| | | model.addAttribute("num3",jsonObject.getString("num3")); |
| | | model.addAttribute("num4",jsonObject.getString("num4")); |
| | | return PREFIX + "tSystemConfigExtractionRules.html"; |
| | | } |
| | | /** |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.CompanyFundFlow; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/7/30 4:32 |
| | | */ |
| | | public interface CompanyFundFlowMapper extends BaseMapper<CompanyFundFlow> { |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.DriverOnlineTime; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/7/30 1:33 |
| | | */ |
| | | public interface DriverOnlineTimeMapper extends BaseMapper<DriverOnlineTime> { |
| | | } |
| | |
| | | |
| | | |
| | | Double querSumSurplusDividedAmount(@Param("type") Integer type); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取代理商账户余额 |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | Double queryAgentBalance(@Param("companyId") Integer companyId); |
| | | |
| | | |
| | | /** |
| | | * 获取平台账户余额 |
| | | * @return |
| | | */ |
| | | Double queryCompanyBalance(); |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.CompanyFundFlowMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.CompanyFundFlow"> |
| | | <id column="id" property="id"/> |
| | | <result column="type" property="type"/> |
| | | <result column="objectType" property="objectType"/> |
| | | <result column="objectId" property="objectId"/> |
| | | <result column="balance" property="balance"/> |
| | | <result column="money" property="money"/> |
| | | <result column="createTime" property="createTime"/> |
| | | </resultMap> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.DriverOnlineTimeMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.DriverOnlineTime"> |
| | | <id column="id" property="id" /> |
| | | <result column="driverId" property="driverId" /> |
| | | <result column="day" property="day" /> |
| | | <result column="onlineTime" property="onlineTime"/> |
| | | </resultMap> |
| | | </mapper> |
| | |
| | | and `type` = #{type} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="queryAgentBalance" resultType="double"> |
| | | select |
| | | sum(aa.income) - sum(aa.disburse) as balance |
| | | from ( |
| | | select sum(amount) as income, 0 as disburse from t_revenue where userType = 3 and userId = #{companyId} |
| | | union all |
| | | select 0 as ncome, sum(amount) as disburse from t_settlement_record where type = 2 and objectId = #{companyId} |
| | | ) as aa |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="queryCompanyBalance" resultType="double"> |
| | | select |
| | | sum(aa.income) - sum(aa.disburse) + sum(aa.recharge) as balance |
| | | from ( |
| | | select sum(amount) as income, 0 as disburse, 0 as recharge from t_revenue where userType = 4 |
| | | union all |
| | | select 0 as ncome, sum(amount) as disburse, 0 as recharge from t_settlement_record where type = 1 |
| | | union all |
| | | select 0 as ncome, 0 as disburse, sum(surplusDividedAmount) as recharge from t_recharge_record where type = 4 and payStatus = 2 |
| | | ) as aa |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/7/30 3:02 |
| | | */ |
| | | @Data |
| | | @TableName("t_company_fund_flow") |
| | | public class CompanyFundFlow { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 变动类型(1=充值,2=提现,3=佣金收入,4=保险收入) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 对象类型(1=平台,2=代理商) |
| | | */ |
| | | @TableField("objectType") |
| | | private Integer objectType; |
| | | /** |
| | | * 代理商id |
| | | */ |
| | | @TableField("objectId") |
| | | private Integer objectId; |
| | | /** |
| | | * 历史账户余额 |
| | | */ |
| | | @TableField("balance") |
| | | private BigDecimal balance; |
| | | /** |
| | | * 变动金额 |
| | | */ |
| | | @TableField("money") |
| | | private BigDecimal money; |
| | | /** |
| | | * 变动时间 |
| | | */ |
| | | @TableField("createTime") |
| | | private Date createTime; |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigInteger; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/7/30 1:31 |
| | | */ |
| | | @Data |
| | | @TableName("t_driver_online_time") |
| | | public class DriverOnlineTime { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 司机id |
| | | */ |
| | | @TableField("driverId") |
| | | private Integer driverId; |
| | | /** |
| | | * 统计日期 |
| | | */ |
| | | @TableField("day") |
| | | private Date day; |
| | | /** |
| | | * 在线时长(秒) |
| | | */ |
| | | @TableField("onlineTime") |
| | | private BigInteger onlineTime; |
| | | } |
| | |
| | | private Date firstCertificateTime; |
| | | @ApiModelProperty(value = "佣金") |
| | | private BigDecimal commission; |
| | | /** |
| | | * 在线时长 |
| | | */ |
| | | @TableField("onlineTime") |
| | | private Long onlineTime; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "区域") |
| | |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Long getOnlineTime() { |
| | | return onlineTime; |
| | | } |
| | | |
| | | public void setOnlineTime(Long onlineTime) { |
| | | this.onlineTime = onlineTime; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.CompanyFundFlow; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/7/30 4:34 |
| | | */ |
| | | public interface ICompanyFundFlowService extends IService<CompanyFundFlow> { |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.DriverOnlineTime; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/7/30 1:35 |
| | | */ |
| | | public interface IDriverOnlineTimeService extends IService<DriverOnlineTime> { |
| | | } |
| | |
| | | * @throws Exception |
| | | */ |
| | | Double querSumSurplusDividedAmount(Integer type); |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取代理商账户余额 |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | Double queryAgentBalance(Integer companyId); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取平台账户余额 |
| | | * @return |
| | | */ |
| | | Double queryCompanyBalance(); |
| | | } |
| | |
| | | * @param map |
| | | */ |
| | | void getDataStatisticsByIds(List<Integer> ids, Model model, Map<String, Object> map); |
| | | |
| | | |
| | | /** |
| | | * 获取司机详情汇总数据 |
| | | * @param driverId |
| | | * @param time |
| | | * @return |
| | | */ |
| | | Map<String, Object> querySummaryData(Integer driverId, String time); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.CompanyFundFlowMapper; |
| | | import com.stylefeng.guns.modular.system.model.CompanyFundFlow; |
| | | import com.stylefeng.guns.modular.system.service.ICompanyFundFlowService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/7/30 4:34 |
| | | */ |
| | | @Service |
| | | public class CompanyFundFlowServiceImpl extends ServiceImpl<CompanyFundFlowMapper, CompanyFundFlow> implements ICompanyFundFlowService { |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.DriverOnlineTimeMapper; |
| | | import com.stylefeng.guns.modular.system.model.DriverOnlineTime; |
| | | import com.stylefeng.guns.modular.system.service.IDriverOnlineTimeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/7/30 1:35 |
| | | */ |
| | | @Service |
| | | public class DriverOnlineTimeServiceImpl extends ServiceImpl<DriverOnlineTimeMapper, DriverOnlineTime> implements IDriverOnlineTimeService { |
| | | } |
| | |
| | | public Double querSumSurplusDividedAmount(Integer type) { |
| | | return this.baseMapper.querSumSurplusDividedAmount(type); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取代理商账户余额 |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Double queryAgentBalance(Integer companyId) { |
| | | return this.baseMapper.queryAgentBalance(companyId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取平台账户余额 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Double queryCompanyBalance() { |
| | | return this.baseMapper.queryCompanyBalance(); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | 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.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverCommissionResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.HttpUtils; |
| | |
| | | import com.stylefeng.guns.modular.system.enums.StatusEnum; |
| | | import com.stylefeng.guns.modular.system.enums.UserTypeEnum; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.IDriverOnlineTimeService; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | |
| | | private TRechargeRecordMapper tRechargeRecordMapper; |
| | | @Autowired |
| | | private TCashWithdrawalMapper tCashWithdrawalMapper; |
| | | |
| | | @Autowired |
| | | private IDriverOnlineTimeService driverOnlineTimeService; |
| | | |
| | | |
| | | private Logger log = LoggerFactory.getLogger(this.getClass()); |
| | | @Override |
| | |
| | | model.addAttribute("score",tDriver.getScore()); |
| | | model.addAttribute("source",tDriver.getSource()); |
| | | model.addAttribute("createTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tDriver.getCreateTime())); |
| | | |
| | | model.addAttribute("balance", tDriver.getBalance().add(tDriver.getCouponBalance()).add(tDriver.getBackgroundBalance()).add(tDriver.getCommission()).doubleValue()); |
| | | // 计算驾龄 |
| | | if(Objects.nonNull(tDriver.getFirstCertificateTime())){ |
| | | Period period = Period.between(LocalDate.now(), com.stylefeng.guns.modular.system.util.DateUtil.dateToLocalDate(tDriver.getFirstCertificateTime())); |
| | |
| | | }else { |
| | | model.addAttribute("drivingExperience",0); |
| | | } |
| | | |
| | | List<TOrder> tOrders = tOrderMapper.selectList(new EntityWrapper<TOrder>()); |
| | | |
| | | String monthDate = new SimpleDateFormat("yyyyMM").format(new Date()); |
| | | |
| | | if(Objects.nonNull(tDriver.getBackgroundBalance()) && Objects.nonNull(tDriver.getBalance()) && Objects.nonNull(tDriver.getCouponBalance())){ |
| | | // 设置余额 |
| | | tDriver.setBalance(tDriver.getBackgroundBalance().add(tDriver.getBalance()).add(tDriver.getCouponBalance())); |
| | | model.addAttribute("balance",tDriver.getBalance()); |
| | | }else { |
| | | model.addAttribute("balance",BigDecimal.ZERO); |
| | | } |
| | | |
| | | // 所属代理商 |
| | | TAgent tAgent = tAgentMapper.selectById(tDriver.getAgentId()); |
| | | if(Objects.nonNull(tAgent)){ |
| | |
| | | |
| | | // 查询当前用户邀请了哪些人 |
| | | List<TDriver> list = tDriverMapper.selectList(new EntityWrapper<TDriver>().eq("inviterId", tDriver.getId())); |
| | | if(!CollectionUtils.isEmpty(list)){ |
| | | List<TCashWithdrawal> tCashWithdrawals = tCashWithdrawalMapper.selectList(new EntityWrapper<TCashWithdrawal>() |
| | | .eq("type", UserTypeEnum.DRIVER.getCode()) |
| | | .eq("userDriverId", tDriver.getId()) |
| | | .eq("businessType", 11) |
| | | .eq("state", 2)); |
| | | Optional<BigDecimal> reduce = tCashWithdrawals.stream().map(TCashWithdrawal::getAmount).reduce(BigDecimal::add); |
| | | BigDecimal bigDecimal = BigDecimal.ZERO; |
| | | reduce.ifPresent(bigDecimal::add); |
| | | model.addAttribute("inviterCommission",bigDecimal.add(tDriver.getCommission())); |
| | | model.addAttribute("inviterCount",list.size()); |
| | | }else { |
| | | model.addAttribute("inviterCommission",0); |
| | | model.addAttribute("inviterCount",0); |
| | | } |
| | | List<TAppUser> tAppUsers = tAppUserMapper.selectList(new EntityWrapper<TAppUser>().eq("inviterType", 2).eq("inviterId", tDriver.getId())); |
| | | model.addAttribute("inviterDriverCount",list.size()); |
| | | model.addAttribute("inviterUserCount",tAppUsers.size()); |
| | | List<TCashWithdrawal> tCashWithdrawals = tCashWithdrawalMapper.selectList(new EntityWrapper<TCashWithdrawal>() |
| | | .eq("type", UserTypeEnum.DRIVER.getCode()) |
| | | .eq("userDriverId", tDriver.getId()) |
| | | .eq("businessType", 11) |
| | | .eq("state", 2)); |
| | | Optional<BigDecimal> reduce = tCashWithdrawals.stream().map(TCashWithdrawal::getAmount).reduce(BigDecimal::add); |
| | | BigDecimal bigDecimal = BigDecimal.ZERO; |
| | | reduce.ifPresent(bigDecimal::add); |
| | | model.addAttribute("inviterCommission",bigDecimal.add(tDriver.getCommission())); |
| | | |
| | | if(!CollectionUtils.isEmpty(tOrders)){ |
| | | //累计订单量 |
| | | List<TOrder> cumulativeOrderCount = tOrders.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) |
| | | && (order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) || order.getState().equals(OrderStateEnum.FINISH.getCode()))).collect(Collectors.toList()); |
| | | model.addAttribute("cumulativeOrderCount",cumulativeOrderCount.size()); |
| | | //当月订单量 |
| | | List<TOrder> monthOrderCount = tOrders.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) |
| | | && (order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) || order.getState().equals(OrderStateEnum.FINISH.getCode())) |
| | | && new SimpleDateFormat("yyyyMM").format(order.getCreateTime()).equals(monthDate)).collect(Collectors.toList()); |
| | | model.addAttribute("monthOrderCount",monthOrderCount.size()); |
| | | // 拒单次数 |
| | | List<TOrderRefusal> driverRefusalList = tOrderRefusalMapper.selectList(new EntityWrapper<TOrderRefusal>().eq("driver_id", tDriver.getId())); |
| | | model.addAttribute("refusalCount",driverRefusalList.size()); |
| | | // 累计收入 司机提现记录加上余额减去充值金额,为累计收入 |
| | | List<TCashWithdrawal> tCashWithdrawals = tCashWithdrawalMapper.selectList(new EntityWrapper<TCashWithdrawal>() |
| | | .eq("type", UserTypeEnum.DRIVER.getCode()) |
| | | .eq("userDriverId", tDriver.getId()) |
| | | .eq("state", 2)); |
| | | BigDecimal balance = tDriver.getBalance(); |
| | | // if(!CollectionUtils.isEmpty(tCashWithdrawals)){ |
| | | // Optional<BigDecimal> reduce = tCashWithdrawals.stream().map(TCashWithdrawal::getAmount).reduce(BigDecimal::add); |
| | | // if(reduce.isPresent()){ |
| | | // balance = balance.add(reduce.get()); |
| | | // } |
| | | // } |
| | | // List<TRechargeRecord> tRechargeRecords = tRechargeRecordMapper.selectList(new EntityWrapper<TRechargeRecord>() |
| | | // .eq("type", UserTypeEnum.DRIVER.getCode()) |
| | | // .eq("userId", tDriver.getId()) |
| | | // .eq("payType", 1) |
| | | // .eq("payStatus", PayStatusEnum.FINISH.getCode())); |
| | | // if(!CollectionUtils.isEmpty(tRechargeRecords)){ |
| | | // Optional<BigDecimal> reduce = tRechargeRecords.stream().map(TRechargeRecord::getAmount).reduce(BigDecimal::add); |
| | | // if(reduce.isPresent()){ |
| | | // balance = balance.subtract(reduce.get()); |
| | | // } |
| | | // } |
| | | List<TRevenue> tRevenues = tRevenueMapper.selectList(new EntityWrapper<TRevenue>() |
| | | .eq("userType", 2) |
| | | .eq("userId", tDriver.getId())); |
| | | Optional<BigDecimal> reduce = tRevenues.stream().map(TRevenue::getAmount).reduce(BigDecimal::add); |
| | | // 减去充值金额 |
| | | if(reduce.isPresent()){ |
| | | model.addAttribute("cumulativeIncome", reduce.get()); |
| | | }else { |
| | | model.addAttribute("cumulativeIncome",0); |
| | | } |
| | | //累计订单量 |
| | | Integer cumulativeOrderCount = tOrderMapper.selectCount(new EntityWrapper<TOrder>().eq("driverId", tDriver.getId()).eq("status", 1)); |
| | | model.addAttribute("cumulativeOrderCount", cumulativeOrderCount); |
| | | //有效订单数 |
| | | Integer effectiveOrderCount = tOrderMapper.selectCount(new EntityWrapper<TOrder>().eq("driverId", tDriver.getId()).eq("status", 1).in("state", Arrays.asList(106, 107, 108))); |
| | | model.addAttribute("effectiveOrderCount", effectiveOrderCount); |
| | | model.addAttribute("commission", tDriver.getCommission().doubleValue()); |
| | | // 拒单次数 |
| | | List<TOrderRefusal> driverRefusalList = tOrderRefusalMapper.selectList(new EntityWrapper<TOrderRefusal>().eq("driver_id", tDriver.getId())); |
| | | model.addAttribute("refusalCount",driverRefusalList.size()); |
| | | List<TRevenue> tRevenues = tRevenueMapper.selectList(new EntityWrapper<TRevenue>() |
| | | .eq("userType", 2) |
| | | .eq("userId", tDriver.getId())); |
| | | Optional<BigDecimal> reduce1 = tRevenues.stream().map(TRevenue::getAmount).reduce(BigDecimal::add); |
| | | // 减去充值金额 |
| | | if(reduce1.isPresent()){ |
| | | model.addAttribute("cumulativeIncome", reduce1.get()); |
| | | }else { |
| | | model.addAttribute("cumulativeOrderCount",0); |
| | | model.addAttribute("monthOrderCount",0); |
| | | model.addAttribute("refusalCount",0); |
| | | // 累计收入 |
| | | model.addAttribute("cumulativeIncome",0); |
| | | } |
| | | //消单次数 |
| | | Integer cancelOrderCount = tOrderMapper.selectCount(new EntityWrapper<TOrder>().eq("driverId", tDriver.getId()).eq("status", 1).in("state", Arrays.asList(301))); |
| | | model.addAttribute("cancelOrderCount",cancelOrderCount); |
| | | //有效在线时长 |
| | | Long onlineTime = tDriver.getOnlineTime(); |
| | | Long s = onlineTime % 60; |
| | | Long m = onlineTime / 60; |
| | | model.addAttribute("onlineTime", (m < 10 ? ("0" + m) : m) + ":" + (s < 10 ? ("0" + s) : s)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put("driverTotal",driverTotal); |
| | | map.put("driverMonthTotal",driverMonthTotal); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取司机详情汇总数据 |
| | | * @param driverId |
| | | * @param time |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> querySummaryData(Integer driverId, String time) { |
| | | String startTime = ""; |
| | | String endTime = ""; |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | String[] split = time.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | TDriver tDriver = this.selectById(driverId); |
| | | //累计订单量 |
| | | Wrapper<TOrder> cumulativeOrderCountWrapper = new EntityWrapper<TOrder>().eq("driverId", tDriver.getId()).eq("status", 1); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | cumulativeOrderCountWrapper.last(" and DATE_FORMAT(createTime, '$Y-$m-$d') between '" + startTime + "' and '" + endTime + "'"); |
| | | } |
| | | Integer cumulativeOrderCount = tOrderMapper.selectCount(cumulativeOrderCountWrapper); |
| | | map.put("cumulativeOrderCount", cumulativeOrderCount); |
| | | //有效订单数 |
| | | Wrapper<TOrder> effectiveOrderCountWrapper = new EntityWrapper<TOrder>().eq("driverId", tDriver.getId()).eq("status", 1).in("state", Arrays.asList(106, 107, 108)); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | effectiveOrderCountWrapper.last(" and DATE_FORMAT(createTime, '$Y-$m-$d') between '" + startTime + "' and '" + endTime + "'"); |
| | | } |
| | | Integer effectiveOrderCount = tOrderMapper.selectCount(effectiveOrderCountWrapper); |
| | | map.put("effectiveOrderCount", effectiveOrderCount); |
| | | map.put("commission", tDriver.getCommission().doubleValue()); |
| | | map.put("balance", tDriver.getBalance().add(tDriver.getCouponBalance()).add(tDriver.getBackgroundBalance()).add(tDriver.getCommission()).doubleValue()); |
| | | |
| | | |
| | | // 查询当前用户邀请了哪些人 |
| | | Wrapper<TDriver> inviterDriverCountWrapper = new EntityWrapper<TDriver>().eq("inviterId", tDriver.getId()); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | inviterDriverCountWrapper.last(" and DATE_FORMAT(createTime, '$Y-$m-$d') between '" + startTime + "' and '" + endTime + "'"); |
| | | } |
| | | List<TDriver> list = tDriverMapper.selectList(inviterDriverCountWrapper); |
| | | map.put("inviterDriverCount",list.size()); |
| | | |
| | | Wrapper<TAppUser> inviterUserCountWrapper = new EntityWrapper<TAppUser>().eq("inviterType", 2).eq("inviterId", tDriver.getId()); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | inviterUserCountWrapper.last(" and DATE_FORMAT(createTime, '$Y-$m-$d') between '" + startTime + "' and '" + endTime + "'"); |
| | | } |
| | | List<TAppUser> tAppUsers = tAppUserMapper.selectList(inviterUserCountWrapper); |
| | | map.put("inviterUserCount",tAppUsers.size()); |
| | | |
| | | Wrapper<TRevenue> cumulativeIncomeWrapper = new EntityWrapper<TRevenue>().eq("userType", 2).eq("userId", tDriver.getId()); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | cumulativeIncomeWrapper.last(" and DATE_FORMAT(createTime, '$Y-$m-$d') between '" + startTime + "' and '" + endTime + "'"); |
| | | } |
| | | List<TRevenue> tRevenues = tRevenueMapper.selectList(cumulativeIncomeWrapper); |
| | | Optional<BigDecimal> reduce1 = tRevenues.stream().map(TRevenue::getAmount).reduce(BigDecimal::add); |
| | | // 减去充值金额 |
| | | if(reduce1.isPresent()){ |
| | | map.put("cumulativeIncome", reduce1.get()); |
| | | }else { |
| | | map.put("cumulativeIncome",0); |
| | | } |
| | | |
| | | Wrapper<TCashWithdrawal> inviterCommissionWrapper = new EntityWrapper<TCashWithdrawal>().eq("type", UserTypeEnum.DRIVER.getCode()).eq("userDriverId", tDriver.getId()) |
| | | .eq("businessType", 11).eq("state", 2); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | inviterCommissionWrapper.last(" and DATE_FORMAT(createTime, '$Y-$m-$d') between '" + startTime + "' and '" + endTime + "'"); |
| | | } |
| | | List<TCashWithdrawal> tCashWithdrawals = tCashWithdrawalMapper.selectList(inviterCommissionWrapper); |
| | | Optional<BigDecimal> reduce = tCashWithdrawals.stream().map(TCashWithdrawal::getAmount).reduce(BigDecimal::add); |
| | | BigDecimal bigDecimal = BigDecimal.ZERO; |
| | | reduce.ifPresent(bigDecimal::add); |
| | | map.put("inviterCommission",bigDecimal.add(tDriver.getCommission())); |
| | | |
| | | //消单次数 |
| | | Wrapper<TOrder> cancelOrderCountWrapper = new EntityWrapper<TOrder>().eq("driverId", tDriver.getId()).eq("status", 1).in("state", Arrays.asList(301)); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | cancelOrderCountWrapper.last(" and DATE_FORMAT(createTime, '$Y-$m-$d') between '" + startTime + "' and '" + endTime + "'"); |
| | | } |
| | | Integer cancelOrderCount = tOrderMapper.selectCount(cancelOrderCountWrapper); |
| | | map.put("cancelOrderCount",cancelOrderCount); |
| | | |
| | | Wrapper<DriverOnlineTime> driverOnlineTimeWrapper = new EntityWrapper<DriverOnlineTime>().eq("driverId", driverId); |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | driverOnlineTimeWrapper.last(" and DATE_FORMAT(`day`, '$Y-$m-$d') between '" + startTime + "' and '" + endTime + "'"); |
| | | } |
| | | Long onlineTime = 0L; |
| | | List<DriverOnlineTime> driverOnlineTimes = driverOnlineTimeService.selectList(driverOnlineTimeWrapper); |
| | | for (DriverOnlineTime driverOnlineTime : driverOnlineTimes) { |
| | | onlineTime += driverOnlineTime.getOnlineTime().longValue(); |
| | | } |
| | | Long s = onlineTime % 60; |
| | | Long m = onlineTime / 60; |
| | | map.put("onlineTime", (m < 10 ? ("0" + m) : m) + ":" + (s < 10 ? ("0" + s) : s)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | |
| | | spring: |
| | | datasource: |
| | | url: jdbc:mysql://192.168.110.80:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://127.0.0.1:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: root |
| | | # password: f4OfRjqoN3jSiNGiUoiNsQdOBtCOKYRj |
| | | password: 123456 |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script> |
| | | <script src="${ctxPath}/static/modular/system/tCoupon/tAgent_info.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tCoupon/tAgent.js"></script> |
| | | |
| | | <link rel="stylesheet" href="${ctxPath}/static/css/plugins/lineProgressbar/jquery.lineProgressbar.css"> |
| | | <script src="${ctxPath}/static/js/plugins/lineProgressbar/jquery.lineProgressbar.js"></script> |
| | | |
| | |
| | | <#button name="导出" icon="" clickFun="TAgent.export()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tAgent/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TAgent.openAddTAgent()"/> |
| | | <#button name="添加" icon="fa-plus" clickFun="TAgent.openAddTAgent()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tAgent/update")){ |
| | | <#button name="编辑" icon="fa-edit" clickFun="TAgent.openUpdateTAgent()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tAgent/stop")){ |
| | | <#button name="冻结" icon="fa-edit" clickFun="TAgent.stop()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tAgent/start")){ |
| | | <#button name="启动" icon="fa-edit" clickFun="TAgent.start()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TAgentTable"/> |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="form-horizontal" id="tAgentInfoForm"> |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" value="${item.id}" underline="true"/> |
| | | <#input id="principal" name="负责人姓名" value="${item.principal}" underline="true"/> |
| | | <#input id="principalPhone" name="负责人电话" value="${item.principalPhone}" underline="true"/> |
| | | <#input id="email" name="邮箱" value="${item.email}" underline="true"/> |
| | | <#input id="provinceCode" name="代理区域省编号" value="${item.provinceCode}" /> |
| | | </div> |
| | | |
| | | <input type="hidden" id="id" value="${item.id}"> |
| | | <div class="col-sm-6"> |
| | | <#input id="provinceName" name="代理区域省名称" value="${item.provinceName}" underline="true"/> |
| | | <#input id="cityCode" name="代理区域市编号" value="${item.cityCode}" underline="true"/> |
| | | <#input id="cityName" name="代理区域市名称" value="${item.cityName}" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> |
| | | <#input id="createTime" name="添加时间" value="${item.createTime}" /> |
| | | <div class="form-group"> |
| | | 代理商信息 |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*负责人姓名:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="principal" name="principal" value="${item.principal}" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*联系电话:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="principalPhone" name="principalPhone" value="${item.principalPhone}" maxlength="11" type="number" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <input id="areaId" type="hidden"> |
| | | <label class="col-sm-3 control-label">*代理区域:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="area" onclick="TAgent.area()" name="area" placeholder="请选择" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*邮箱:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="email" name="email" type="email" value="${item.email}" maxlength="40" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*登录账号:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="account" name="account" type="text" value="${user.account}" maxlength="20" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*登录密码:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="password" name="password" type="password" maxlength="20" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">*确认密码:</label> |
| | | <div class="col-sm-9"> |
| | | <input class="form-control" id="rePassword" name="rePassword" type="password" maxlength="20" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TAgentInfoDlg.editSubmit()"/> |
| | | <div class="col-sm-10" style="text-align: center"> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TAgentInfoDlg.close()"/> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TAgentInfoDlg.editSubmit()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAgent/tAgent_info.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAgent/tAgentInfo.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAgent/tAgent.js"></script> |
| | | <script type="text/javascript"> |
| | | var citys = [{"value":"0011","title":"北京市","cities":[{"value":"1100","title":"北京市"}]},{"value":"0012","title":"天津市","cities":[{"value":"1200","title":"天津市"}]},{"value":"0013","title":"河北省","cities":[{"value":"1301","title":"石家庄"},{"value":"1302","title":"保定"},{"value":"1303","title":"沧州"},{"value":"1304","title":"承德"},{"value":"1305","title":"邯郸"},{"value":"1306","title":"衡水"},{"value":"1307","title":"廊坊"},{"value":"1308","title":"秦皇岛"},{"value":"1309","title":"唐山"},{"value":"1310","title":"邢台"},{"value":"1311","title":"张家口"}]},{"value":"0014","title":"山西省","cities":[{"value":"1401","title":"太原"},{"value":"1402","title":"长治"},{"value":"1403","title":"大同"},{"value":"1404","title":"晋城"},{"value":"1405","title":"离石"},{"value":"1406","title":"临汾"},{"value":"1407","title":"朔州"},{"value":"1408","title":"忻州"},{"value":"1409","title":"阳泉"},{"value":"1410","title":"榆次"},{"value":"1411","title":"运城"},{"value":"1412","title":"晋中"},{"value":"1413","title":"吕梁"}]},{"value":"0015","title":"内蒙古自治区","cities":[{"value":"1501","title":"呼和浩特"},{"value":"1502","title":"包头"},{"value":"1503","title":"阿拉善"},{"value":"1504","title":"巴彦淖尔"},{"value":"1505","title":"赤峰"},{"value":"1506","title":"呼伦贝尔"},{"value":"1507","title":"乌海"},{"value":"1508","title":"乌兰察布"},{"value":"1509","title":"锡林郭勒"},{"value":"1510","title":"兴安"},{"value":"1511","title":"鄂尔多斯"},{"value":"1512","title":"通辽"},{"value":"1513","title":"满洲里"}]},{"value":"0021","title":"辽宁省","cities":[{"value":"2101","title":"沈阳"},{"value":"2102","title":"大连"},{"value":"2103","title":"鞍山"},{"value":"2104","title":"本溪"},{"value":"2105","title":"朝阳"},{"value":"2106","title":"丹东"},{"value":"2107","title":"抚顺"},{"value":"2108","title":"阜新"},{"value":"2109","title":"葫芦岛"},{"value":"2110","title":"锦州"},{"value":"2111","title":"辽阳"},{"value":"2112","title":"盘锦"},{"value":"2113","title":"铁岭"},{"value":"2114","title":"营口"}]},{"value":"0022","title":"吉林省","cities":[{"value":"2201","title":"长春"},{"value":"2202","title":"白城"},{"value":"2203","title":"白山"},{"value":"2204","title":"吉林"},{"value":"2205","title":"辽源"},{"value":"2206","title":"四平"},{"value":"2207","title":"松原"},{"value":"2208","title":"通化"},{"value":"2209","title":"延边"}]},{"value":"0023","title":"黑龙江省","cities":[{"value":"2301","title":"哈尔滨"},{"value":"2302","title":"大庆"},{"value":"2303","title":"大兴安岭"},{"value":"2304","title":"鹤岗"},{"value":"2305","title":"黑河"},{"value":"2306","title":"鸡西"},{"value":"2307","title":"佳木斯"},{"value":"2308","title":"牡丹江"},{"value":"2309","title":"七台河"},{"value":"2310","title":"齐齐哈尔"},{"value":"2311","title":"双鸭山"},{"value":"2312","title":"绥化"},{"value":"2313","title":"伊春"}]},{"value":"0031","title":"上海市","cities":[{"value":"3100","title":"上海市"}]},{"value":"0032","title":"江苏省","cities":[{"value":"3201","title":"南京"},{"value":"3202","title":"常州"},{"value":"3203","title":"淮安"},{"value":"3204","title":"连云港"},{"value":"3205","title":"南通"},{"value":"3206","title":"苏州"},{"value":"3207","title":"宿迁"},{"value":"3208","title":"泰州"},{"value":"3209","title":"无锡"},{"value":"3210","title":"徐州"},{"value":"3211","title":"盐城"},{"value":"3212","title":"扬州"},{"value":"3213","title":"镇江"},{"value":"3214","title":"胥浦"},{"value":"3215","title":"昆山"}]},{"value":"0033","title":"浙江省","cities":[{"value":"3301","title":"杭州"},{"value":"3302","title":"宁波"},{"value":"3303","title":"湖州"},{"value":"3304","title":"嘉兴"},{"value":"3305","title":"金华"},{"value":"3306","title":"绍兴"},{"value":"3307","title":"台州"},{"value":"3308","title":"温州"},{"value":"3309","title":"舟山"},{"value":"3310","title":"衢州"},{"value":"3311","title":"丽水"}]},{"value":"0034","title":"安徽省","cities":[{"value":"3401","title":"合肥"},{"value":"3402","title":"安庆"},{"value":"3403","title":"蚌埠"},{"value":"3404","title":"巢湖"},{"value":"3405","title":"池州"},{"value":"3406","title":"滁州"},{"value":"3407","title":"阜阳"},{"value":"3408","title":"淮北"},{"value":"3409","title":"淮南"},{"value":"3410","title":"黄山"},{"value":"3411","title":"六安"},{"value":"3412","title":"马鞍山"},{"value":"3414","title":"铜陵"},{"value":"3415","title":"芜湖"},{"value":"3416","title":"宣城"},{"value":"3417","title":"亳州"},{"value":"3418","title":"宿州"}]},{"value":"0035","title":"福建省","cities":[{"value":"3501","title":"福州"},{"value":"3502","title":"厦门"},{"value":"3503","title":"龙岩"},{"value":"3504","title":"南平"},{"value":"3505","title":"宁德"},{"value":"3506","title":"莆田"},{"value":"3507","title":"泉州"},{"value":"3508","title":"三明"},{"value":"3509","title":"漳州"}]},{"value":"0036","title":"江西省","cities":[{"value":"3601","title":"南昌"},{"value":"3602","title":"抚州"},{"value":"3603","title":"赣州"},{"value":"3604","title":"吉安"},{"value":"3605","title":"景德镇"},{"value":"3606","title":"九江"},{"value":"3607","title":"萍乡"},{"value":"3608","title":"上饶"},{"value":"3609","title":"新余"},{"value":"3610","title":"宜春"},{"value":"3611","title":"鹰潭"}]},{"value":"0037","title":"山东省","cities":[{"value":"3701","title":"济南"},{"value":"3702","title":"青岛"},{"value":"3703","title":"滨州"},{"value":"3704","title":"德州"},{"value":"3705","title":"东营"},{"value":"3706","title":"菏泽"},{"value":"3707","title":"济宁"},{"value":"3708","title":"莱芜"},{"value":"3709","title":"聊城"},{"value":"3710","title":"临沂"},{"value":"3711","title":"日照"},{"value":"3712","title":"泰安"},{"value":"3713","title":"威海"},{"value":"3714","title":"潍坊"},{"value":"3715","title":"烟台"},{"value":"3716","title":"枣庄"},{"value":"3717","title":"淄博"}]},{"value":"0041","title":"河南省","cities":[{"value":"4101","title":"郑州"},{"value":"4102","title":"安阳"},{"value":"4103","title":"焦作"},{"value":"4104","title":"鹤壁"},{"value":"4105","title":"开封"},{"value":"4106","title":"洛阳"},{"value":"4107","title":"南阳"},{"value":"4108","title":"平顶山"},{"value":"4109","title":"三门峡"},{"value":"4110","title":"商丘"},{"value":"4111","title":"新乡"},{"value":"4112","title":"信阳"},{"value":"4113","title":"许昌"},{"value":"4114","title":"周口"},{"value":"4115","title":"驻马店"},{"value":"4116","title":"漯河"},{"value":"4117","title":"濮阳"},{"value":"4118","title":"济源"}]},{"value":"0042","title":"湖北省","cities":[{"value":"4201","title":"武汉"},{"value":"4202","title":"鄂州"},{"value":"4203","title":"恩施"},{"value":"4204","title":"黄冈"},{"value":"4205","title":"黄石"},{"value":"4206","title":"荆门"},{"value":"4207","title":"荆州"},{"value":"4208","title":"十堰"},{"value":"4209","title":"随州"},{"value":"4210","title":"咸宁"},{"value":"4211","title":"襄樊"},{"value":"4212","title":"孝感"},{"value":"4213","title":"神农架"},{"value":"4214","title":"天门"},{"value":"4215","title":"宜昌"},{"value":"4216","title":"三峡"},{"value":"4217","title":"潜江"},{"value":"4218","title":"仙桃"}]},{"value":"0043","title":"湖南省","cities":[{"value":"4301","title":"长沙"},{"value":"4302","title":"常德"},{"value":"4303","title":"郴州"},{"value":"4304","title":"衡阳"},{"value":"4305","title":"怀化"},{"value":"4306","title":"娄底"},{"value":"4307","title":"邵阳"},{"value":"4308","title":"湘潭"},{"value":"4309","title":"湘西"},{"value":"4310","title":"益阳"},{"value":"4311","title":"永州"},{"value":"4312","title":"岳阳"},{"value":"4313","title":"张家界"},{"value":"4314","title":"株洲"},{"value":"4331","title":"吉首"}]},{"value":"0044","title":"广东省","cities":[{"value":"4401","title":"广州"},{"value":"4402","title":"深圳"},{"value":"4403","title":"潮州"},{"value":"4404","title":"东莞"},{"value":"4405","title":"佛山"},{"value":"4406","title":"惠州"},{"value":"4407","title":"江门"},{"value":"4408","title":"揭阳"},{"value":"4409","title":"茂名"},{"value":"4410","title":"梅州"},{"value":"4411","title":"清远"},{"value":"4412","title":"汕头"},{"value":"4413","title":"汕尾"},{"value":"4414","title":"韶关"},{"value":"4415","title":"阳江"},{"value":"4416","title":"云浮"},{"value":"4417","title":"湛江"},{"value":"4418","title":"肇庆"},{"value":"4419","title":"中山"},{"value":"4420","title":"河源"},{"value":"4421","title":"珠海"}]},{"value":"0045","title":"广西壮族自治区","cities":[{"value":"4501","title":"南宁"},{"value":"4502","title":"百色"},{"value":"4503","title":"北海"},{"value":"4504","title":"桂林"},{"value":"4505","title":"河池"},{"value":"4506","title":"柳州"},{"value":"4507","title":"梧州"},{"value":"4508","title":"玉林"},{"value":"4509","title":"崇左"},{"value":"4510","title":"防城港"},{"value":"4511","title":"贵港"},{"value":"4512","title":"贺州"},{"value":"4513","title":"来宾"},{"value":"4514","title":"钦州"}]},{"value":"0046","title":"海南省","cities":[{"value":"4601","title":"海口"},{"value":"4602","title":"三亚"},{"value":"4603","title":"白沙"},{"value":"4604","title":"保亭"},{"value":"4605","title":"昌江"},{"value":"4606","title":"澄迈"},{"value":"4607","title":"儋州"},{"value":"4608","title":"定安"},{"value":"4609","title":"东方"},{"value":"4610","title":"乐东"},{"value":"4611","title":"临高"},{"value":"4612","title":"陵水"},{"value":"4613","title":"琼海"},{"value":"4614","title":"琼中"},{"value":"4615","title":"屯昌"},{"value":"4616","title":"万宁"},{"value":"4617","title":"文昌"},{"value":"4618","title":"五指山"},{"value":"4619","title":"洋浦"}]},{"value":"0050","title":"重庆市","cities":[{"value":"5000","title":"重庆市"}]},{"value":"0051","title":"四川省","cities":[{"value":"5101","title":"成都"},{"value":"5102","title":"巴中"},{"value":"5103","title":"达州"},{"value":"5104","title":"德阳"},{"value":"5105","title":"广安"},{"value":"5106","title":"广元"},{"value":"5107","title":"乐山"},{"value":"5108","title":"凉山"},{"value":"5109","title":"眉山"},{"value":"5110","title":"绵阳"},{"value":"5111","title":"南充"},{"value":"5112","title":"内江"},{"value":"5113","title":"攀枝花"},{"value":"5114","title":"遂宁"},{"value":"5115","title":"雅安"},{"value":"5116","title":"宜宾"},{"value":"5117","title":"自贡"},{"value":"5118","title":"泸州"},{"value":"5119","title":"阿坝"},{"value":"5120","title":"甘孜"},{"value":"5121","title":"资阳"}]},{"value":"0052","title":"贵州省","cities":[{"value":"5201","title":"贵阳"},{"value":"5202","title":"安顺"},{"value":"5203","title":"毕节"},{"value":"5204","title":"六盘水"},{"value":"5205","title":"铜仁"},{"value":"5206","title":"遵义"},{"value":"5207","title":"黔东南"},{"value":"5208","title":"黔南"},{"value":"5209","title":"黔西南"}]},{"value":"0053","title":"云南省","cities":[{"value":"5301","title":"昆明"},{"value":"5302","title":"西双版纳"},{"value":"5303","title":"保山"},{"value":"5304","title":"楚雄"},{"value":"5305","title":"大理"},{"value":"5306","title":"德宏"},{"value":"5307","title":"红河"},{"value":"5308","title":"丽江"},{"value":"5309","title":"临沧"},{"value":"5310","title":"怒江"},{"value":"5311","title":"曲靖"},{"value":"5312","title":"思茅"},{"value":"5313","title":"文山"},{"value":"5314","title":"玉溪"},{"value":"5315","title":"昭通"},{"value":"5316","title":"中甸"},{"value":"5317","title":"迪庆州"}]},{"value":"0054","title":"西藏自治区","cities":[{"value":"5401","title":"拉萨"},{"value":"5402","title":"阿里"},{"value":"5403","title":"昌都"},{"value":"5404","title":"林芝"},{"value":"5405","title":"那曲"},{"value":"5406","title":"日喀则"},{"value":"5407","title":"山南"},{"value":"5424","title":"樟木口岸"}]},{"value":"0061","title":"陕西省","cities":[{"value":"6101","title":"西安"},{"value":"6102","title":"安康"},{"value":"6103","title":"宝鸡"},{"value":"6104","title":"汉中"},{"value":"6105","title":"商洛"},{"value":"6106","title":"铜川"},{"value":"6107","title":"渭南"},{"value":"6108","title":"咸阳"},{"value":"6109","title":"延安"},{"value":"6110","title":"榆林"}]},{"value":"0062","title":"甘肃省","cities":[{"value":"6201","title":"兰州"},{"value":"6202","title":"白银"},{"value":"6203","title":"定西"},{"value":"6204","title":"东风"},{"value":"6205","title":"合作"},{"value":"6206","title":"嘉峪关"},{"value":"6207","title":"金昌"},{"value":"6208","title":"酒泉"},{"value":"6209","title":"矿区"},{"value":"6210","title":"临夏"},{"value":"6211","title":"陇南"},{"value":"6212","title":"平凉"},{"value":"6213","title":"庆阳"},{"value":"6214","title":"天水"},{"value":"6215","title":"武威"},{"value":"6216","title":"张掖"},{"value":"6217","title":"甘南州"}]},{"value":"0063","title":"青海省","cities":[{"value":"6301","title":"西宁"},{"value":"6302","title":"海东"},{"value":"6322","title":"海北"},{"value":"6323","title":"黄南"},{"value":"6325","title":"海南"},{"value":"6326","title":"果洛"},{"value":"6327","title":"玉树"},{"value":"6328","title":"海西"}]},{"value":"0064","title":"宁夏回族自治区","cities":[{"value":"6401","title":"银川"},{"value":"6402","title":"中卫"},{"value":"6403","title":"固原"},{"value":"6404","title":"石嘴山"},{"value":"6405","title":"吴忠"}]},{"value":"0065","title":"新疆维吾尔自治区","cities":[{"value":"6501","title":"乌鲁木齐"},{"value":"6502","title":"阿克苏"},{"value":"6503","title":"阿勒泰"},{"value":"6504","title":"巴州"},{"value":"6505","title":"博州"},{"value":"6506","title":"昌吉"},{"value":"6507","title":"哈密"},{"value":"6508","title":"和田"},{"value":"6509","title":"喀什"},{"value":"6510","title":"克拉玛依"},{"value":"6511","title":"马兰"},{"value":"6512","title":"石河子"},{"value":"6513","title":"塔城"},{"value":"6514","title":"吐鲁番"},{"value":"6515","title":"伊犁"},{"value":"6516","title":"克州"},{"value":"6517","title":"阿拉尔"},{"value":"6518","title":"五家渠"}]},{"value":"2003","title":"台湾省","cities":[{"value":"9903","title":"台湾省"}]},{"value":"2001","title":"香港特别行政区","cities":[{"value":"9901","title":"香港特别行政区"}]},{"value":"2002","title":"澳门特别行政区","cities":[{"value":"9902","title":"澳门特别行政区"}]}]; |
| | | laydate.render({ |
| | | elem: '#socialCreditCodeExpires', |
| | | type: "date" |
| | | }); |
| | | laydate.render({ |
| | | elem: '#certIdExpires', |
| | | type: "date" |
| | | }); |
| | | $('.qy').hide(); |
| | | $('#userType').change(function () { |
| | | let userType = $(this).val(); |
| | | if(userType == 0){ |
| | | $('.qy').hide(); |
| | | $('#bankAcctType').html('<option value="2">对私</option>') |
| | | $('#merchantIDCode').parent('div').siblings('label').text('*身份证号') |
| | | $('#merchantName').parent('div').siblings('label').text('*姓名') |
| | | }else{ |
| | | $('.qy').show(); |
| | | $('#bankAcctType').html('<option value="1">对公</option>') |
| | | $('#merchantIDCode').parent('div').siblings('label').text('*法人身份证号') |
| | | $('#merchantName').parent('div').siblings('label').text('*公司名称') |
| | | } |
| | | }) |
| | | |
| | | function initCity(id) { |
| | | let city = ""; |
| | | for(let i in citys){ |
| | | let p = citys[i]; |
| | | city += '<option value="' + p.value + '">' + p.title+ '</option>' |
| | | } |
| | | $('#' + id).html(city); |
| | | } |
| | | |
| | | function initArea(e, id) { |
| | | let city = ""; |
| | | let cityCode = $(e).val(); |
| | | for(let i in citys){ |
| | | let p = citys[i]; |
| | | if(p.value == cityCode){ |
| | | let a = p.cities; |
| | | for(let j in a){ |
| | | city += '<option value="' + a[j].value + '">' + a[j].title+ '</option>' |
| | | } |
| | | break; |
| | | } |
| | | |
| | | } |
| | | $('#' + id).html(city); |
| | | } |
| | | |
| | | |
| | | $('#fileNoBtnId').click(function () { |
| | | $('#file').click(); |
| | | }) |
| | | |
| | | $('#file').change(function () { |
| | | var formData = new FormData(); |
| | | formData.append('file', $('#file')[0].files[0]) |
| | | $.ajax({ |
| | | url : Feng.ctxPath + "/tAgent/uploadFile", |
| | | type : "POST", |
| | | data : formData, |
| | | contentType : false, |
| | | processData : false, |
| | | success : function(data) { |
| | | if("" == data){ |
| | | Feng.error("上传失败"); |
| | | }else{ |
| | | $('#fileNo').val(data); |
| | | $('#file').val(''); |
| | | Feng.success("上传成功!"); |
| | | } |
| | | }, |
| | | error : function() { |
| | | Feng.error("上传失败"); |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | |
| | | $(function () { |
| | | initCity('provCodeBank'); |
| | | initCity('provCodeEnterprise'); |
| | | }) |
| | | </script> |
| | | @} |
| | |
| | | <#button name="查询" icon="fa-search" clickFun="TDriver.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TDriver.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | @if(shiro.hasPermission("/tDriver/auditPage")){ |
| | | <#button name="立即审核" icon="fa-edit" clickFun="TDriver.auditPage()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/export")){ |
| | | <#button name="导出" icon="" clickFun="TDriver.export()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/tDriver_exception")){ |
| | | <#button name="异常" icon="" clickFun="TDriverException.tDriverException()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/rechargeBalancePage")){ |
| | | <#button name="充值" icon="fa-edit" clickFun="TDriver.rechargeBalancePage()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TDriver.openAddTDriver()"/> |
| | | @} |
| | | </div> |
| | | </div> |
| | | <!--<div class="hidden-xs" id="TDriverTableToolbar" role="group"> |
| | | <div class="hidden-xs" id="TDriverTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tDriver/auditPage")){ |
| | | <#button name="立即审核" icon="fa-edit" clickFun="TDriver.auditPage()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/export")){ |
| | | <#button name="导出" icon="" clickFun="TDriver.export()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/tDriver_exception")){ |
| | | <#button name="异常" icon="" clickFun="TDriverException.tDriverException()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/rechargeBalancePage")){ |
| | | <#button name="充值" icon="fa-edit" clickFun="TDriver.rechargeBalancePage()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TDriver.openAddTDriver()"/> |
| | | <#button name="添加" icon="fa-plus" clickFun="TDriver.openAddTDriver()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TDriver.openTDriverDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tDriver/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TDriver.delete()" space="true"/> |
| | | @} |
| | | </div>--> |
| | | </div> |
| | | <#table id="TDriverTable"/> |
| | | </div> |
| | | </div> |
| | |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label" >累计订单:</label> |
| | | <label>${cumulativeOrderCount}</label> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <label class="control-label" >时间筛选:</label> |
| | | <input id="time" placeholder="请选择时间" style="height: 30px"> |
| | | <#button name="查询" icon="fa-search" clickFun="search()"/> |
| | | <label id="balance">钱包余额:¥${balance}</label> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >总共订单数:</label> |
| | | <label id="cumulativeOrderCount">${cumulativeOrderCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >邀约用户人数:</label> |
| | | <label>${inviterCount}</label> |
| | | <label class="control-label" >邀约司机数:</label> |
| | | <label id="inviterDriverCount">${inviterDriverCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >累计获得佣金:</label> |
| | | <label>${inviterCommission}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label" >当前积分:</label> |
| | | <label>${integral}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label" >代驾次数:</label> |
| | | <label>${cumulativeOrderCount}</label> |
| | | <label id="inviterCommission">${inviterCommission}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label" >累计获得收入:</label> |
| | | <label>${cumulativeIncome}</label> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >有效订单数:</label> |
| | | <label id="effectiveOrderCount">${effectiveOrderCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >钱包余额:</label> |
| | | <label>${balance}</label> |
| | | <label class="control-label" >邀约用户数:</label> |
| | | <label id="inviterUserCount">${inviterUserCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >评论分数:</label> |
| | | <label>${score}</label> |
| | | <label class="control-label" >佣金余额:</label> |
| | | <label id="commission">${commission}</label> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >累计获得订单收入:</label> |
| | | <label id="cumulativeIncome">${cumulativeIncome}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >消单次数:</label> |
| | | <label id="cancelOrderCount">${cancelOrderCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >有效在线时长:</label> |
| | | <label id="onlineTime">${onlineTime}</label> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | laydate.render({ |
| | | elem: '#time', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | |
| | | </script> |
| | | @} |
| | |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>添加</h5> |
| | | <h5>编辑</h5> |
| | | </div> |
| | | <div class="ibox-content" id="driverInfoForm"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input hidden id="id" value="${item.id}"/> |
| | | <input hidden id="areaId" value="${item.areaId}"> |
| | | <input hidden id="id" value="${item.id}"> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label" >姓名:</label> |
| | | <input id="name" name="name" value="${item.name}" type="text" maxlength="20" style="height: 30px" required> |
| | | <input id="name" name="name" type="text" value="${driver.name}" style="height: 30px" maxlength="20" placeholder="请输入" required="required"> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label" >手机号:</label> |
| | | <input id="phone" name="phone" value="${item.phone}" type="number" maxlength="11" style="height: 30px" required> |
| | | <input id="phone" name="phone" type="number" value="${driver.phone}" style="height: 30px" maxlength="11" placeholder="请输入" required="required"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label" >紧急联系人姓名:</label> |
| | | <input id="emergencyContact" name="emergencyContact" value="${item.emergencyContact}" type="text" maxlength="20" style="height: 30px" required disabled> |
| | | <input id="emergencyContact" name="emergencyContact" value="${driver.emergencyContact}" type="text" maxlength="20" placeholder="请输入" style="height: 30px" required> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label" >紧急联系人电话:</label> |
| | | <input id="emergencyPhone" name="emergencyPhone" value="${item.emergencyPhone}" type="number" maxlength="11" style="height: 30px" required disabled> |
| | | <input id="emergencyPhone" name="emergencyPhone" value="${driver.emergencyPhone}" type="number" maxlength="11" placeholder="请输入" style="height: 30px" required> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >邀约人姓名:</label> |
| | | <input id="inviterName" value="${item.inviterName}" type="text" maxlength="20" style="height: 30px" disabled> |
| | | <input id="inviterName" type="text" value="${driver.inviterName}" maxlength="20" placeholder="请输入" style="height: 30px"> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >邀约人电话:</label> |
| | | <input id="inviterPhone" value="${item.inviterPhone}" type="number" maxlength="11" style="height: 30px" disabled> |
| | | <input id="inviterPhone" type="number" value="${driver.inviterPhone}" maxlength="11" placeholder="请输入" style="height: 30px"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label" >服务区域:</label> |
| | | <input id="area" value="${item.area}" onclick="TDriver.areaUpdate()" name="area" placeholder="请选择" style="height: 30px" readonly required> |
| | | <input id="area" onclick="TDriver.areaAdd()" name="area" value="${item.area}" placeholder="请选择" style="height: 30px" readonly required> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label" >身份证号码:</label> |
| | | <input id="idcard" name="idcard" value="${item.idcard}" type="text" maxlength="20" style="height: 30px" required disabled> |
| | | <input id="idcard" name="idcard" type="text" value="${driver.idcard}" maxlength="20" placeholder="请输入" style="height: 30px" required> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <!-- <div class="initialLevel col-sm-3 control-label form-group" >--> |
| | | <!-- <span style="color:red">*</span>--> |
| | | <!-- <label class="control-label" >身份证正面照:</label>--> |
| | | <!-- <#uploadImg id="idcardFront" fileImg="${item.idcardFront}"/>--> |
| | | <!-- </div>--> |
| | | <div class="initialLevel col-sm-3 control-label form-group"> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label">身份证正面照:</label> |
| | | <div class="form-group"> |
| | | <div class="col-sm-4"> |
| | | <div id="idcardFrontPreId"> |
| | | <div><img width="100px" height="100px" src="${item.idcardFront}"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <label class="control-label" >身份证正面照:</label> |
| | | <#uploadImg id="idcardFront" fileImg="${driver.idcardFront}"/> |
| | | </div> |
| | | <!-- <div class="initialLevel col-sm-3 control-label form-group" >--> |
| | | <!-- <span style="color:red">*</span>--> |
| | | <!-- <label class="control-label" >身份证背面照:</label>--> |
| | | <!-- <#uploadImg id="idcardBack" fileImg="${item.idcardBack}"/>--> |
| | | <!-- </div>--> |
| | | <div class="initialLevel col-sm-3 control-label form-group"> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label">身份证背面照:</label> |
| | | <div class="form-group"> |
| | | <div class="col-sm-4"> |
| | | <div id="idcardBackPreId"> |
| | | <div><img width="100px" height="100px" src="${item.idcardBack}"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <label class="control-label" >身份证背面照:</label> |
| | | <#uploadImg id="idcardBack" fileImg="${driver.idcardBack}"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >驾驶证初次领证时间:</label> |
| | | <input id="firstCertificateTime" name="firstCertificateTime" value="${item.firstCertificateTimeStr}" type="text" style="height: 30px" disabled> |
| | | <input id="firstCertificateTime" name="firstCertificateTime" value="${item.firstCertificateTimeStr}" type="text" placeholder="请选择时间" style="height: 30px"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <!-- <div class="initialLevel col-sm-3 control-label form-group" >--> |
| | | <!-- <span style="color:red">*</span>--> |
| | | <!-- <label class="control-label" >驾驶证:</label>--> |
| | | <!-- <#uploadImg id="driverLicense" fileImg="${item.driverLicense}"/>--> |
| | | <!-- </div>--> |
| | | <div class="initialLevel col-sm-3 control-label form-group"> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label">驾驶证:</label> |
| | | <div class="form-group"> |
| | | <div class="col-sm-4"> |
| | | <div id="driverLicensePreId"> |
| | | <div><img width="100px" height="100px" src="${item.driverLicense}"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <label class="control-label" >驾驶证:</label> |
| | | <#uploadImg id="driverLicense" fileImg="${driver.driverLicense}"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--<div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" value="${item.id}" underline="true"/> |
| | | <#input id="code" name="编号" value="${item.code}" underline="true"/> |
| | | <#input id="name" name="姓名" value="${item.name}" underline="true"/> |
| | | <#input id="avatar" name="头像" value="${item.avatar}" underline="true"/> |
| | | <#input id="phone" name="手机号" value="${item.phone}" underline="true"/> |
| | | <#input id="password" name="密码" value="${item.password}" underline="true"/> |
| | | <#input id="sex" name="性别(1=男,2=女)" value="${item.sex}" underline="true"/> |
| | | <#input id="source" name="来源(1=)" value="${item.source}" underline="true"/> |
| | | <#input id="emergencyContact" name="紧急联系人" value="${item.emergencyContact}" underline="true"/> |
| | | <#input id="emergencyPhone" name="紧急联系电话" value="${item.emergencyPhone}" underline="true"/> |
| | | <#input id="driverLicenseNumber" name="驾驶证号码" value="${item.driverLicenseNumber}" underline="true"/> |
| | | <#input id="driverLicense" name="驾驶证照片" value="${item.driverLicense}" underline="true"/> |
| | | <#input id="idcard" name="身份证号码" value="${item.idcard}" underline="true"/> |
| | | <#input id="idcardFront" name="身份证正面照" value="${item.idcardFront}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="idcardBack" name="身份证背面照" value="${item.idcardBack}" underline="true"/> |
| | | <#input id="inviterType" name="邀约人类型(1=用户,2=司机)" value="${item.inviterType}" underline="true"/> |
| | | <#input id="inviterId" name="邀约人id" value="${item.inviterId}" underline="true"/> |
| | | <#input id="agentId" name="代理商id" value="${item.agentId}" underline="true"/> |
| | | <#input id="branchOfficeId" name="分公司id" value="${item.branchOfficeId}" underline="true"/> |
| | | <#input id="balance" name="账户余额" value="${item.balance}" underline="true"/> |
| | | <#input id="approvalStatus" name="审核状态(1=待审核,2=已同意,3=已拒绝)" value="${item.approvalStatus}" underline="true"/> |
| | | <#input id="approvalNotes" name="审核注释" value="${item.approvalNotes}" underline="true"/> |
| | | <#input id="approvalUserId" name="审核用户id" value="${item.approvalUserId}" underline="true"/> |
| | | <#input id="approvalTime" name="审核时间" value="${item.approvalTime}" underline="true"/> |
| | | <#input id="serverStatus" name="服务状态(1=空闲,2=服务中)" value="${item.serverStatus}" underline="true"/> |
| | | <#input id="integral" name="剩余积分" value="${item.integral}" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> |
| | | <#input id="createTime" name="添加时间" value="${item.createTime}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TDriverInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TDriverInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div>--> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver_info.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver.js"></script> |
| | | <script type="text/javascript"> |
| | |
| | | }); |
| | | |
| | | $(function () { |
| | | if('' == $("#inviterName").val()){ |
| | | $("#inviterName").val('') |
| | | } |
| | | if('' == $("#inviterPhone").val()){ |
| | | $("#inviterPhone").val('') |
| | | } |
| | | |
| | | var idCardPositive = new $WebUpload("idcardFront"); |
| | | idCardPositive.setUploadBarId("progressBar"); |
| | | idCardPositive.init(); |
| | |
| | | <#button name="查询" icon="fa-search" clickFun="TOrder.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TOrder.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | <div class="hidden-xs" id="TOrderTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tOrder/cancelOrder")){ |
| | | <#button name="取消订单" icon="" clickFun="TOrder.cancelOrder()"/> |
| | | @} |
| | |
| | | @} |
| | | @if(shiro.hasPermission("/tOrder/cancelOrderUpdate")){ |
| | | <#button name="关闭订单" icon="" clickFun="TOrder.cancelOrderUpdate()"/> |
| | | @} |
| | | </div> |
| | | <div class="hidden-xs" id="TOrderTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tOrder/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TOrder.openAddTOrder()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrder/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TOrder.openTOrderDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrder/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TOrder.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TOrderTable"/> |
| | |
| | | </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" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >抽成,每笔订单满</span> |
| | | <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" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,平台收取</span> |
| | | <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> |
| | |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num4]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | // function regexp(value){ |
| | | // var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | // //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | |
| | | }}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<a href="#" onclick="TAgent.updateStatus('+row.id+','+row.status+')" style="color:red">停用</a>' +' ' + |
| | | '<a href="#" onclick="TAgent.searchTAgentDetail('+row.id+')" style="color:green">详情</a>' |
| | | }else if (row.status === 2){ |
| | | return '<a href="#" onclick="TAgent.updateStatus('+row.id+','+row.status+')" style="color:green">解冻</a>' +' ' + |
| | | '<a href="#" onclick="TAgent.searchTAgentDetail('+row.id+')" style="color:green">详情</a>' |
| | | } |
| | | return '<a href="#" onclick="TAgent.searchTAgentDetail('+row.id+')" style="color:green">详情</a>' |
| | | } |
| | | } |
| | | ]; |
| | |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | TAgent.openUpdateTAgent = function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '编辑', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAgent/tAgent_update/' + TAgent.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | TAgent.stop = function(){ |
| | | if(this.check()){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgent/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TAgent.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", TAgent.seItem.id); |
| | | ajax.set("status", 1); |
| | | ajax.start(); |
| | | } |
| | | } |
| | | |
| | | |
| | | TAgent.start = function(){ |
| | | if(this.check()){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgent/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TAgent.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id", TAgent.seItem.id); |
| | | ajax.set("status", 2); |
| | | ajax.start(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 提交启用冻结 |
| | | */ |
| | |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TAgent.openTAgentDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAgent/tAgent_update/' + TAgent.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开区域选择页面 |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TAgentInfoDlg = { |
| | | tAgentInfoData : {}, |
| | | validateFields: { |
| | | principal: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '负责人姓名不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[\u4E00-\u9FA5A-Za-z\s]+$/, |
| | | message: '不能输入特殊字符和数字' |
| | | } |
| | | } |
| | | }, |
| | | principalPhone: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '联系电话不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^1[3-9]\d{9}$/, |
| | | message: '请输入合法手机号' |
| | | } |
| | | } |
| | | }, |
| | | area: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请选择代理区域' |
| | | } |
| | | } |
| | | }, |
| | | account: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '登录账号不能为空' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TAgentInfoDlg.validate = function () { |
| | | $('#tAgentInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#tAgentInfoForm').bootstrapValidator('validate'); |
| | | return $("#tAgentInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TAgentInfoDlg.clearData = function() { |
| | | this.tAgentInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TAgentInfoDlg.set = function(key, val) { |
| | | this.tAgentInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TAgentInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TAgentInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TAgent.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TAgentInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('principal') |
| | | .set('principalPhone') |
| | | .set('email') |
| | | .set('provinceCode') |
| | | .set('provinceName') |
| | | .set('cityCode') |
| | | .set('cityName') |
| | | .set('status') |
| | | .set('area') |
| | | .set('areaId') |
| | | .set('account') |
| | | .set('password'); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TAgentInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | let password = $('#password').val(); |
| | | let rePassword = $('#rePassword').val(); |
| | | if(null != password && '' != password && password != rePassword){ |
| | | Feng.error("两个密码不一致"); |
| | | return |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tAgent/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TAgent.table.refresh(); |
| | | TAgentInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tAgentInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("tAgentInfoForm", TAgentInfoDlg.validateFields); |
| | | }); |
| | |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:'160px',fixed:'true', |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<a href="#" onclick="TDriver.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.stop('+row.id+','+row.status+')" style="color:red">冻结</a>' +' ' + |
| | | return '<a href="#" onclick="TDriver.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.stop('+row.id+','+row.status+')" style="color:red">冻结</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.updateInfo('+row.id+')" style="color:green">编辑</a>' |
| | | }else if (row.status === 2 || row.approvalStatus === 2){ |
| | | return '<a href="#" onclick="TDriver.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' +' ' + |
| | | return '<a href="#" onclick="TDriver.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.start('+row.id+','+row.status+')" style="color:green">解冻</a>' |
| | | } |
| | | } |
| | |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | function search() { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/querySummaryData", function(data){ |
| | | $('#balance').text('钱包余额:¥' + data.balance); |
| | | $('#cumulativeOrderCount').text(data.cumulativeOrderCount); |
| | | $('#inviterDriverCount').text(data.inviterDriverCount); |
| | | $('#inviterCommission').text(data.inviterCommission); |
| | | $('#effectiveOrderCount').text(data.effectiveOrderCount); |
| | | $('#inviterUserCount').text(data.inviterUserCount); |
| | | $('#commission').text(data.commission); |
| | | $('#cumulativeIncome').text(data.cumulativeIncome); |
| | | $('#cancelOrderCount').text(data.cancelOrderCount); |
| | | $('#onlineTime').text(data.onlineTime); |
| | | },function(data){ |
| | | Feng.error("查询失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set('id', $('#driverId').val()); |
| | | ajax.set('time', $('#time').val()) |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | $(function() { |
| | | Feng.initValidator("driverInfoForm", TDriverInfoDlg.validateFields); |
| | | }); |
| | |
| | | reqData['num1'] = Number($("#num1").val()); |
| | | reqData['num2'] = Number($("#num2").val()); |
| | | reqData['num3'] = $("#num3").val(); |
| | | reqData['num4'] = $("#num4").val(); |
| | | if(reqData.num4 > reqData.num3){ |
| | | Feng.error("平台抽成金额不能大于总抽成金额"); |
| | | return |
| | | } |
| | | ajax.set("content",JSON.stringify(reqData)); |
| | | ajax.set("type",3); |
| | | ajax.start(); |