| | |
| | | Integer id, |
| | | Integer status) { |
| | | EntityWrapper<TAppUser> wrapper = tAppUserService.getUserListWrapper(createTime,nickname,phone,id,status); |
| | | wrapper.ne("is_exception",2); |
| | | return tAppUserService.selectList(wrapper); |
| | | } |
| | | |
| | |
| | | String[] title = new String[] {"用户ID","用户昵称","手机号","性别","头像","微信openid", |
| | | "微信unionid","紧急联系人","紧急联系电话","账户余额","用户标签id","状态","添加时间"}; |
| | | EntityWrapper<TAppUser> wrapper = tAppUserService.getUserListWrapper(createTime,nickname,phone,id,status); |
| | | wrapper.ne("is_exception",2); |
| | | // 是否异常 |
| | | List<TAppUser> list = tAppUserService.selectList(wrapper); |
| | | |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TBranchOffice; |
| | | import com.stylefeng.guns.modular.system.service.ITBranchOfficeService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-21 11:17:18 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tBranchOffice") |
| | | public class TBranchOfficeController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tBranchOffice/"; |
| | | |
| | | @Autowired |
| | | private ITBranchOfficeService tBranchOfficeService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tBranchOffice.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tBranchOffice_add") |
| | | public String tBranchOfficeAdd() { |
| | | return PREFIX + "tBranchOffice_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tBranchOffice_update/{tBranchOfficeId}") |
| | | public String tBranchOfficeUpdate(@PathVariable Integer tBranchOfficeId, Model model) { |
| | | TBranchOffice tBranchOffice = tBranchOfficeService.selectById(tBranchOfficeId); |
| | | model.addAttribute("item",tBranchOffice); |
| | | LogObjectHolder.me().set(tBranchOffice); |
| | | return PREFIX + "tBranchOffice_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tBranchOfficeService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TBranchOffice tBranchOffice) { |
| | | tBranchOfficeService.insert(tBranchOffice); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tBranchOfficeId) { |
| | | tBranchOfficeService.deleteById(tBranchOfficeId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TBranchOffice tBranchOffice) { |
| | | tBranchOfficeService.updateById(tBranchOffice); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tBranchOfficeId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tBranchOfficeId") Integer tBranchOfficeId) { |
| | | return tBranchOfficeService.selectById(tBranchOfficeId); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.model.TAgent; |
| | | import com.stylefeng.guns.modular.system.model.TAppUser; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 跳转冻结页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tDriver_start_and_stop") |
| | | public String tAppUserStartAndStop( Integer id, |
| | | Model model) { |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("status",tDriver.getStatus()); |
| | | return PREFIX + "tDriverStartAndStop.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转充值页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/rechargeBalancePage") |
| | | public String rechargeBalancePage( Integer id, |
| | | Model model) { |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tDriverRechargeBalancePage.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转异常页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tDriver_exception") |
| | | public String tDriverException(Model model) { |
| | | model.addAttribute("isException",2); |
| | | return PREFIX + "tDriverException.html"; |
| | | } |
| | | /** |
| | | * 跳转异常启用冻结页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tDriverException_start_and_stop") |
| | | public String tDriverExceptionStartAndStop(Integer id,Model model) { |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("status",tDriver.getStatus()); |
| | | return PREFIX + "tDriverExceptionStartAndStop.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转审核页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/auditPage") |
| | | public String auditPage( Integer id, |
| | | Model model) { |
| | | tDriverService.auditPage(id,model); |
| | | return PREFIX + "tDriverAudit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转详情页面 |
| | | */ |
| | | @RequestMapping("/driverDetail") |
| | | public String driverDetail(Integer tDriverId, Model model) { |
| | | tDriverService.detail(tDriverId,model); |
| | | |
| | | return PREFIX + "tDriverDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String phone,Integer status) { |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); |
| | | return tDriverService.selectList(wrapper); |
| | | wrapper.ne("isException",2); |
| | | List<TDriver> tDrivers = tDriverService.selectList(wrapper); |
| | | return tDriverService.getTDriverResp(tDrivers); |
| | | } |
| | | /** |
| | | * 获取异常列表 |
| | | */ |
| | | @RequestMapping(value = "/exceptionList") |
| | | @ResponseBody |
| | | public Object exceptionList(String createTime,String phone,Integer status) { |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); |
| | | wrapper.eq("isException",2); |
| | | List<TDriver> tDrivers = tDriverService.selectList(wrapper); |
| | | return tDriverService.getTDriverResp(tDrivers); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tDriverService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | */ |
| | | @RequestMapping(value = "/auditSubmit") |
| | | @ResponseBody |
| | | public Object auditSubmit(Integer id,Integer approvalStatus,String approvalNotes) { |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | tDriver.setApprovalStatus(approvalStatus); |
| | | tDriver.setApprovalNotes(approvalNotes); |
| | | // 审核用户id |
| | | Subject subject = ShiroKit.getSubject(); |
| | | ShiroUser shiroUser = (ShiroUser)subject.getPrincipal(); |
| | | tDriver.setApprovalUserId(shiroUser.getId()); |
| | | tDriver.setApprovalTime(new Date()); |
| | | tDriverService.updateById(tDriver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 修改司机状态 |
| | | */ |
| | | @RequestMapping(value = "/update-status") |
| | | @ResponseBody |
| | | public Object updateStatus(Integer id,Integer status, |
| | | String remark) { |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | if(1 == status){ |
| | | tDriver.setStatus(2); |
| | | } |
| | | if(2 == status){ |
| | | tDriver.setStatus(1); |
| | | } |
| | | tDriver.setRemark(remark); |
| | | tDriverService.updateById(tDriver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 充值余额 |
| | | */ |
| | | @ApiOperation(value = "充值余额") |
| | | @RequestMapping(value = "/recharge-balance") |
| | | @ResponseBody |
| | | public Object rechargeBalance(Integer id, String money) { |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | tDriver.setBackgroundBalance(new BigDecimal(money).add(tDriver.getBackgroundBalance())); |
| | | tDriverService.updateById(tDriver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | |
| | | public Object detail(@PathVariable("tDriverId") Integer tDriverId) { |
| | | return tDriverService.selectById(tDriverId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出司机列表",notes="导出司机列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String createTime,String phone,Integer status,HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "DriverInfo"+time1+".xls"; |
| | | String[] title = new String[] {"编号","姓名","手机号","性别","驾驶证号码","身份证号码", |
| | | "身份证","所属代理商","所属分公司","钱包余额","累计订单量","当月订单量","积分","拒单次数","状态","添加时间"}; |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); |
| | | // 是否异常 |
| | | List<TDriver> list = tDriverService.selectList(wrapper); |
| | | |
| | | List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(list); |
| | | |
| | | String[][] values = new String[tDriverResp.size()][]; |
| | | for (int i = 0; i < tDriverResp.size(); i++) { |
| | | TDriverResp d = tDriverResp.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = d.getCode(); |
| | | values[i][1] = d.getName(); |
| | | values[i][2] = d.getPhone(); |
| | | Integer sex = d.getSex(); |
| | | if(Objects.isNull(sex)){ |
| | | values[i][3] = "未知"; |
| | | }else if(1 == sex){ |
| | | values[i][3] = "男"; |
| | | }else if(2 == sex){ |
| | | values[i][3] = "女"; |
| | | } |
| | | values[i][4] = d.getDriverLicenseNumber(); |
| | | values[i][5] = d.getIdcard(); |
| | | if(StringUtils.hasLength(d.getIdcardFront())){ |
| | | values[i][6] = "已上传"; |
| | | }else { |
| | | values[i][6] = "未上传"; |
| | | } |
| | | values[i][7] = d.getAgentName(); |
| | | values[i][8] = d.getBranchName(); |
| | | values[i][9] = String.valueOf(d.getBalance()); |
| | | values[i][10] = String.valueOf(d.getCumulativeOrderCount()); |
| | | values[i][11] = String.valueOf(d.getMonthOrderCount()); |
| | | values[i][12] = String.valueOf(d.getIntegral()); |
| | | values[i][13] = String.valueOf(d.getRefusalCount()); |
| | | Integer status1 = d.getStatus(); |
| | | if(1 == status1){ |
| | | values[i][14] = "正常"; |
| | | }else if(2 == status1){ |
| | | values[i][14] = "冻结"; |
| | | }else { |
| | | values[i][14] = "删除"; |
| | | } |
| | | values[i][15] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "导出司机异常列表",notes="导出司机异常列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | @RequestMapping(value = "/export-exception") |
| | | @ResponseBody |
| | | public void exportException(String createTime,String phone,Integer status,HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "DriverExceptionInfo"+time1+".xls"; |
| | | String[] title = new String[] {"编号","姓名","手机号","性别","驾驶证号码","身份证号码", |
| | | "身份证","累计订单量","当月订单量","积分","连续未上线(天)","状态","添加时间"}; |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); |
| | | wrapper.eq("isException",2); |
| | | // 是否异常 |
| | | List<TDriver> list = tDriverService.selectList(wrapper); |
| | | |
| | | List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(list); |
| | | |
| | | String[][] values = new String[tDriverResp.size()][]; |
| | | for (int i = 0; i < tDriverResp.size(); i++) { |
| | | TDriverResp d = tDriverResp.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = d.getCode(); |
| | | values[i][1] = d.getName(); |
| | | values[i][2] = d.getPhone(); |
| | | Integer sex = d.getSex(); |
| | | if(Objects.isNull(sex)){ |
| | | values[i][3] = "未知"; |
| | | }else if(1 == sex){ |
| | | values[i][3] = "男"; |
| | | }else if(2 == sex){ |
| | | values[i][3] = "女"; |
| | | } |
| | | values[i][4] = d.getDriverLicenseNumber(); |
| | | values[i][5] = d.getIdcard(); |
| | | if(StringUtils.hasLength(d.getIdcardFront())){ |
| | | values[i][6] = "已上传"; |
| | | }else { |
| | | values[i][6] = "未上传"; |
| | | } |
| | | values[i][7] = String.valueOf(d.getCumulativeOrderCount()); |
| | | values[i][8] = String.valueOf(d.getMonthOrderCount()); |
| | | values[i][9] = String.valueOf(d.getIntegral()); |
| | | values[i][10] = String.valueOf(Objects.isNull(d.getNotOnlineCount())?0:d.getNotOnlineCount()); |
| | | values[i][11] = "异常"; |
| | | values[i][12] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TOrderRefusal; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderRefusalService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-21 17:54:07 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tOrderRefusal") |
| | | public class TOrderRefusalController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tOrderRefusal/"; |
| | | |
| | | @Autowired |
| | | private ITOrderRefusalService tOrderRefusalService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tOrderRefusal.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tOrderRefusal_add") |
| | | public String tOrderRefusalAdd() { |
| | | return PREFIX + "tOrderRefusal_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tOrderRefusal_update/{tOrderRefusalId}") |
| | | public String tOrderRefusalUpdate(@PathVariable Integer tOrderRefusalId, Model model) { |
| | | TOrderRefusal tOrderRefusal = tOrderRefusalService.selectById(tOrderRefusalId); |
| | | model.addAttribute("item",tOrderRefusal); |
| | | LogObjectHolder.me().set(tOrderRefusal); |
| | | return PREFIX + "tOrderRefusal_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | EntityWrapper<TOrderRefusal> wrapper = new EntityWrapper<>(); |
| | | if(StringUtils.hasLength(condition)){ |
| | | wrapper.eq("order_id",condition); |
| | | } |
| | | return tOrderRefusalService.selectList(wrapper); |
| | | } |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tOrderRefusalService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TOrderRefusal tOrderRefusal) { |
| | | tOrderRefusalService.insert(tOrderRefusal); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tOrderRefusalId) { |
| | | tOrderRefusalService.deleteById(tOrderRefusalId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TOrderRefusal tOrderRefusal) { |
| | | tOrderRefusalService.updateById(tOrderRefusal); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tOrderRefusalId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tOrderRefusalId") Integer tOrderRefusalId) { |
| | | return tOrderRefusalService.selectById(tOrderRefusalId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.resp; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | public class TDriverResp extends TDriver { |
| | | |
| | | //所属代理商 |
| | | @ApiModelProperty(value = "所属代理商") |
| | | private String agentName; |
| | | //所属分公司 |
| | | @ApiModelProperty(value = "所属分公司") |
| | | private String branchName; |
| | | //累计订单量 |
| | | @ApiModelProperty(value = "累计订单量") |
| | | private Integer cumulativeOrderCount; |
| | | //当月订单量 |
| | | @ApiModelProperty(value = "当月订单量") |
| | | private Integer monthOrderCount; |
| | | //拒单次数 |
| | | @ApiModelProperty(value = "拒单次数") |
| | | private Integer refusalCount; |
| | | |
| | | @ApiModelProperty(value = "连续未上线天数") |
| | | private Integer notOnlineCount; |
| | | |
| | | public Integer getNotOnlineCount() { |
| | | return notOnlineCount; |
| | | } |
| | | |
| | | public void setNotOnlineCount(Integer notOnlineCount) { |
| | | this.notOnlineCount = notOnlineCount; |
| | | } |
| | | |
| | | public String getAgentName() { |
| | | return agentName; |
| | | } |
| | | |
| | | public void setAgentName(String agentName) { |
| | | this.agentName = agentName; |
| | | } |
| | | |
| | | public String getBranchName() { |
| | | return branchName; |
| | | } |
| | | |
| | | public void setBranchName(String branchName) { |
| | | this.branchName = branchName; |
| | | } |
| | | |
| | | public Integer getCumulativeOrderCount() { |
| | | return cumulativeOrderCount; |
| | | } |
| | | |
| | | public void setCumulativeOrderCount(Integer cumulativeOrderCount) { |
| | | this.cumulativeOrderCount = cumulativeOrderCount; |
| | | } |
| | | |
| | | public Integer getMonthOrderCount() { |
| | | return monthOrderCount; |
| | | } |
| | | |
| | | public void setMonthOrderCount(Integer monthOrderCount) { |
| | | this.monthOrderCount = monthOrderCount; |
| | | } |
| | | |
| | | public Integer getRefusalCount() { |
| | | return refusalCount; |
| | | } |
| | | |
| | | public void setRefusalCount(Integer refusalCount) { |
| | | this.refusalCount = refusalCount; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TBranchOffice; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 分公司 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-21 |
| | | */ |
| | | @Mapper |
| | | public interface TBranchOfficeMapper extends BaseMapper<TBranchOffice> { |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TOrderRefusal; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 拒单记录 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-21 |
| | | */ |
| | | public interface TOrderRefusalMapper extends BaseMapper<TOrderRefusal> { |
| | | |
| | | } |
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.TBranchOfficeMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TBranchOffice"> |
| | | <id column="id" property="id" /> |
| | | <result column="agentId" property="agentId" /> |
| | | <result column="principal" property="principal" /> |
| | | <result column="principalPhone" property="principalPhone" /> |
| | | <result column="email" property="email" /> |
| | | <result column="provinceCode" property="provinceCode" /> |
| | | <result column="provinceName" property="provinceName" /> |
| | | <result column="cityCode" property="cityCode" /> |
| | | <result column="cityName" property="cityName" /> |
| | | <result column="districtCode" property="districtCode" /> |
| | | <result column="districtName" property="districtName" /> |
| | | <result column="status" property="status" /> |
| | | <result column="createTime" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, agentId, principal, principalPhone, email, provinceCode, provinceName, cityCode, cityName, districtCode, districtName, status, createTime |
| | | </sql> |
| | | |
| | | </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.TOrderRefusalMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TOrderRefusal"> |
| | | <id column="id" property="id" /> |
| | | <result column="order_id" property="orderId" /> |
| | | <result column="driver_id" property="driverId" /> |
| | | <result column="startAddress" property="startAddress" /> |
| | | <result column="endAddress" property="endAddress" /> |
| | | <result column="code" property="code" /> |
| | | <result column="createTime" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, order_id, driver_id, startAddress, endAddress, code, createTime |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 是否异常 1正常 0异常 |
| | | * 是否异常 1正常 2异常 |
| | | */ |
| | | @TableField(value = "is_exception") |
| | | private Integer isException; |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 分公司 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-21 |
| | | */ |
| | | @TableName("t_branch_office") |
| | | public class TBranchOffice extends Model<TBranchOffice> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 代理商id |
| | | */ |
| | | private Integer agentId; |
| | | /** |
| | | * 负责人姓名 |
| | | */ |
| | | private String principal; |
| | | /** |
| | | * 负责人电话 |
| | | */ |
| | | private String principalPhone; |
| | | /** |
| | | * 邮箱 |
| | | */ |
| | | private String email; |
| | | /** |
| | | * 代理区域省编号 |
| | | */ |
| | | private String provinceCode; |
| | | /** |
| | | * 代理区域省名称 |
| | | */ |
| | | private String provinceName; |
| | | /** |
| | | * 代理区域市编号 |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 代理区域市名称 |
| | | */ |
| | | private String cityName; |
| | | /** |
| | | * 代理区域区编号 |
| | | */ |
| | | private String districtCode; |
| | | /** |
| | | * 代理区域区名称 |
| | | */ |
| | | private String districtName; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getAgentId() { |
| | | return agentId; |
| | | } |
| | | |
| | | public void setAgentId(Integer agentId) { |
| | | this.agentId = agentId; |
| | | } |
| | | |
| | | public String getPrincipal() { |
| | | return principal; |
| | | } |
| | | |
| | | public void setPrincipal(String principal) { |
| | | this.principal = principal; |
| | | } |
| | | |
| | | public String getPrincipalPhone() { |
| | | return principalPhone; |
| | | } |
| | | |
| | | public void setPrincipalPhone(String principalPhone) { |
| | | this.principalPhone = principalPhone; |
| | | } |
| | | |
| | | public String getEmail() { |
| | | return email; |
| | | } |
| | | |
| | | public void setEmail(String email) { |
| | | this.email = email; |
| | | } |
| | | |
| | | public String getProvinceCode() { |
| | | return provinceCode; |
| | | } |
| | | |
| | | public void setProvinceCode(String provinceCode) { |
| | | this.provinceCode = provinceCode; |
| | | } |
| | | |
| | | public String getProvinceName() { |
| | | return provinceName; |
| | | } |
| | | |
| | | public void setProvinceName(String provinceName) { |
| | | this.provinceName = provinceName; |
| | | } |
| | | |
| | | public String getCityCode() { |
| | | return cityCode; |
| | | } |
| | | |
| | | public void setCityCode(String cityCode) { |
| | | this.cityCode = cityCode; |
| | | } |
| | | |
| | | public String getCityName() { |
| | | return cityName; |
| | | } |
| | | |
| | | public void setCityName(String cityName) { |
| | | this.cityName = cityName; |
| | | } |
| | | |
| | | public String getDistrictCode() { |
| | | return districtCode; |
| | | } |
| | | |
| | | public void setDistrictCode(String districtCode) { |
| | | this.districtCode = districtCode; |
| | | } |
| | | |
| | | public String getDistrictName() { |
| | | return districtName; |
| | | } |
| | | |
| | | public void setDistrictName(String districtName) { |
| | | this.districtName = districtName; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TBranchOffice{" + |
| | | "id=" + id + |
| | | ", agentId=" + agentId + |
| | | ", principal=" + principal + |
| | | ", principalPhone=" + principalPhone + |
| | | ", email=" + email + |
| | | ", provinceCode=" + provinceCode + |
| | | ", provinceName=" + provinceName + |
| | | ", cityCode=" + cityCode + |
| | | ", cityName=" + cityName + |
| | | ", districtCode=" + districtCode + |
| | | ", districtName=" + districtName + |
| | | ", status=" + status + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | */ |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "后台充值余额") |
| | | private BigDecimal backgroundBalance; |
| | | @ApiModelProperty(value = "启用冻结理由") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 是否异常 1正常 2异常 |
| | | */ |
| | | @TableField(value = "isException") |
| | | private Integer isException; |
| | | |
| | | @ApiModelProperty(value = "加盟区域省编号") |
| | | private String provinceCode; |
| | | @ApiModelProperty(value = "加盟区域省名称") |
| | | private String provinceName; |
| | | @ApiModelProperty(value = "加盟区域市编号") |
| | | private String cityCode; |
| | | @ApiModelProperty(value = "加盟区域市名称") |
| | | private String cityName; |
| | | @ApiModelProperty(value = "加盟区域区编号") |
| | | private String areaCode; |
| | | @ApiModelProperty(value = "加盟区域区名称") |
| | | private String areaName; |
| | | |
| | | @ApiModelProperty(value = "驾驶证初次领证时间") |
| | | private Date firstCertificateTime; |
| | | |
| | | public Date getFirstCertificateTime() { |
| | | return firstCertificateTime; |
| | | } |
| | | |
| | | public void setFirstCertificateTime(Date firstCertificateTime) { |
| | | this.firstCertificateTime = firstCertificateTime; |
| | | } |
| | | |
| | | public String getProvinceCode() { |
| | | return provinceCode; |
| | | } |
| | | |
| | | public void setProvinceCode(String provinceCode) { |
| | | this.provinceCode = provinceCode; |
| | | } |
| | | |
| | | public String getProvinceName() { |
| | | return provinceName; |
| | | } |
| | | |
| | | public void setProvinceName(String provinceName) { |
| | | this.provinceName = provinceName; |
| | | } |
| | | |
| | | public String getCityCode() { |
| | | return cityCode; |
| | | } |
| | | |
| | | public void setCityCode(String cityCode) { |
| | | this.cityCode = cityCode; |
| | | } |
| | | |
| | | public String getCityName() { |
| | | return cityName; |
| | | } |
| | | |
| | | public void setCityName(String cityName) { |
| | | this.cityName = cityName; |
| | | } |
| | | |
| | | public String getAreaCode() { |
| | | return areaCode; |
| | | } |
| | | |
| | | public void setAreaCode(String areaCode) { |
| | | this.areaCode = areaCode; |
| | | } |
| | | |
| | | public String getAreaName() { |
| | | return areaName; |
| | | } |
| | | |
| | | public void setAreaName(String areaName) { |
| | | this.areaName = areaName; |
| | | } |
| | | |
| | | public Integer getIsException() { |
| | | return isException; |
| | | } |
| | | |
| | | public void setIsException(Integer isException) { |
| | | this.isException = isException; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public BigDecimal getBackgroundBalance() { |
| | | return backgroundBalance; |
| | | } |
| | | |
| | | public void setBackgroundBalance(BigDecimal backgroundBalance) { |
| | | this.backgroundBalance = backgroundBalance; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 拒单记录 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-21 |
| | | */ |
| | | @TableName("t_order_refusal") |
| | | public class TOrderRefusal extends Model<TOrderRefusal> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 订单id |
| | | */ |
| | | @TableField("order_id") |
| | | private Integer orderId; |
| | | /** |
| | | * 司机id |
| | | */ |
| | | @TableField("driver_id") |
| | | private Integer driverId; |
| | | /** |
| | | * 起点地址 |
| | | */ |
| | | private String startAddress; |
| | | /** |
| | | * 终点地址 |
| | | */ |
| | | private String endAddress; |
| | | /** |
| | | * 编号 |
| | | */ |
| | | private String code; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(Integer orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public Integer getDriverId() { |
| | | return driverId; |
| | | } |
| | | |
| | | public void setDriverId(Integer driverId) { |
| | | this.driverId = driverId; |
| | | } |
| | | |
| | | public String getStartAddress() { |
| | | return startAddress; |
| | | } |
| | | |
| | | public void setStartAddress(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | |
| | | public String getEndAddress() { |
| | | return endAddress; |
| | | } |
| | | |
| | | public void setEndAddress(String endAddress) { |
| | | this.endAddress = endAddress; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TOrderRefusal{" + |
| | | "id=" + id + |
| | | ", orderId=" + orderId + |
| | | ", driverId=" + driverId + |
| | | ", startAddress=" + startAddress + |
| | | ", endAddress=" + endAddress + |
| | | ", code=" + code + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TBranchOffice; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 分公司 服务类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-21 |
| | | */ |
| | | public interface ITBranchOfficeService extends IService<TBranchOffice> { |
| | | |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import org.springframework.ui.Model; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @return |
| | | */ |
| | | EntityWrapper<TDriver> getPageList(String createTime, String phone, Integer status); |
| | | |
| | | /** |
| | | * 封装司机放回resp |
| | | * @param tDrivers |
| | | * @return |
| | | */ |
| | | List<TDriverResp> getTDriverResp(List<TDriver> tDrivers); |
| | | |
| | | /** |
| | | * 跳转审核页面 |
| | | * @param id |
| | | * @param model |
| | | */ |
| | | void auditPage(Integer id, Model model); |
| | | |
| | | /** |
| | | * 跳转详情页面 |
| | | * @param tDriverId |
| | | * @param model |
| | | */ |
| | | void detail(Integer tDriverId, Model model); |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TOrderRefusal; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 拒单记录 服务类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-21 |
| | | */ |
| | | public interface ITOrderRefusalService extends IService<TOrderRefusal> { |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TBranchOffice; |
| | | import com.stylefeng.guns.modular.system.dao.TBranchOfficeMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITBranchOfficeService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 分公司 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-21 |
| | | */ |
| | | @Service |
| | | public class TBranchOfficeServiceImpl extends ServiceImpl<TBranchOfficeMapper, TBranchOffice> implements ITBranchOfficeService { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.dao.TDriverMapper; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; |
| | | import com.stylefeng.guns.modular.system.dao.*; |
| | | import com.stylefeng.guns.modular.system.enums.OrderStateEnum; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.Period; |
| | | import java.time.ZoneId; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class TDriverServiceImpl extends ServiceImpl<TDriverMapper, TDriver> implements ITDriverService { |
| | | |
| | | |
| | | @Autowired |
| | | private TAgentMapper tAgentMapper; |
| | | @Autowired |
| | | private TBranchOfficeMapper tBranchOfficeMapper; |
| | | @Autowired |
| | | private TOrderMapper tOrderMapper; |
| | | @Autowired |
| | | private TDriverMapper tDriverMapper; |
| | | @Autowired |
| | | private TAppUserMapper tAppUserMapper; |
| | | |
| | | @Override |
| | | public EntityWrapper<TDriver> getPageList(String createTime, String phone, Integer status) { |
| | |
| | | Date endTime = DateUtil.getDate_str4(split[1]); |
| | | wrapper.between("createTime",startTime,endTime); |
| | | } |
| | | wrapper.orderBy(true,"approvalStatus"); |
| | | return wrapper; |
| | | } |
| | | |
| | | @Override |
| | | public List<TDriverResp> getTDriverResp(List<TDriver> tDrivers) { |
| | | List<TDriverResp> tDriverRespList = new ArrayList<>(tDrivers.size()); |
| | | |
| | | List<TOrder> tOrders = tOrderMapper.selectList(new EntityWrapper<TOrder>()); |
| | | |
| | | String monthDate = new SimpleDateFormat("yyyyMM").format(new Date()); |
| | | |
| | | for (TDriver tDriver : tDrivers) { |
| | | TDriverResp tDriverResp = new TDriverResp(); |
| | | BeanUtils.copyProperties(tDriver,tDriverResp); |
| | | |
| | | // 设置余额 |
| | | tDriverResp.setBalance(tDriver.getBackgroundBalance().add(tDriver.getBalance())); |
| | | |
| | | // 所属代理商 |
| | | TAgent tAgent = tAgentMapper.selectById(tDriver.getAgentId()); |
| | | if(Objects.nonNull(tAgent)){ |
| | | tDriverResp.setAgentName(tAgent.getPrincipal()); |
| | | } |
| | | //所属分公司 |
| | | TBranchOffice tBranchOffice = tBranchOfficeMapper.selectById(tDriver.getBranchOfficeId()); |
| | | if(Objects.nonNull(tBranchOffice)){ |
| | | tDriverResp.setBranchName(tBranchOffice.getPrincipal()); |
| | | } |
| | | //累计订单量 |
| | | List<TOrder> cumulativeOrderCount = tOrders.stream().filter(order -> order.getDriverId().equals(tDriver.getId()) |
| | | && order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) && order.getState().equals(OrderStateEnum.FINISH.getCode())).collect(Collectors.toList()); |
| | | tDriverResp.setCumulativeOrderCount(cumulativeOrderCount.size()); |
| | | //当月订单量 |
| | | List<TOrder> monthOrderCount = tOrders.stream().filter(order -> order.getDriverId().equals(tDriver.getId()) |
| | | && order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) && order.getState().equals(OrderStateEnum.FINISH.getCode()) |
| | | && new SimpleDateFormat("yyyyMM").format(order.getCreateTime()).equals(monthDate)).collect(Collectors.toList()); |
| | | tDriverResp.setMonthOrderCount(monthOrderCount.size()); |
| | | // TODO 拒单次数 |
| | | List<TOrder> refusalCount = tOrders.stream().filter(order -> order.getDriverId().equals(tDriver.getId()) |
| | | && order.getState().equals(OrderStateEnum.CANCELED.getCode())).collect(Collectors.toList()); |
| | | tDriverResp.setRefusalCount(refusalCount.size()); |
| | | |
| | | tDriverRespList.add(tDriverResp); |
| | | } |
| | | return tDriverRespList; |
| | | } |
| | | |
| | | @Override |
| | | public void auditPage(Integer id, Model model) { |
| | | |
| | | TDriver tDriver = tDriverMapper.selectById(id); |
| | | |
| | | model.addAttribute("id",tDriver.getId()); |
| | | model.addAttribute("code",tDriver.getCode()); |
| | | model.addAttribute("name",tDriver.getName()); |
| | | model.addAttribute("phone",tDriver.getPhone()); |
| | | model.addAttribute("sex",tDriver.getSex()); |
| | | model.addAttribute("driverLicenseNumber",tDriver.getDriverLicenseNumber()); |
| | | model.addAttribute("driverLicense",tDriver.getDriverLicense()); |
| | | model.addAttribute("idcard",tDriver.getIdcard()); |
| | | model.addAttribute("idcardFront",tDriver.getIdcardFront()); |
| | | model.addAttribute("idcardBack",tDriver.getIdcardBack()); |
| | | model.addAttribute("emergencyContact",tDriver.getEmergencyContact()); |
| | | model.addAttribute("emergencyPhone",tDriver.getEmergencyPhone()); |
| | | model.addAttribute("provinceName",tDriver.getProvinceName()); |
| | | model.addAttribute("cityName",tDriver.getCityName()); |
| | | model.addAttribute("areaName",tDriver.getAreaName()); |
| | | model.addAttribute("createTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tDriver.getCreateTime())); |
| | | |
| | | // 计算驾龄 |
| | | ZoneId zoneId = ZoneId.systemDefault(); |
| | | LocalDate firstTime = tDriver.getFirstCertificateTime().toInstant().atZone(zoneId).toLocalDate(); |
| | | LocalDate now = tDriver.getFirstCertificateTime().toInstant().atZone(zoneId).toLocalDate(); |
| | | Period period = Period.between(firstTime, now); |
| | | model.addAttribute("drivingExperience",period.getYears()); |
| | | |
| | | List<TOrder> tOrders = tOrderMapper.selectList(new EntityWrapper<TOrder>()); |
| | | |
| | | String monthDate = new SimpleDateFormat("yyyyMM").format(new Date()); |
| | | |
| | | // 设置余额 |
| | | tDriver.setBalance(tDriver.getBackgroundBalance().add(tDriver.getBalance())); |
| | | |
| | | // 所属代理商 |
| | | TAgent tAgent = tAgentMapper.selectById(tDriver.getAgentId()); |
| | | if(Objects.nonNull(tAgent)){ |
| | | model.addAttribute("agentName",tAgent.getPrincipal()); |
| | | }else { |
| | | model.addAttribute("agentName",""); |
| | | } |
| | | //所属分公司 |
| | | TBranchOffice tBranchOffice = tBranchOfficeMapper.selectById(tDriver.getBranchOfficeId()); |
| | | if(Objects.nonNull(tBranchOffice)){ |
| | | model.addAttribute("principal",tBranchOffice.getPrincipal()); |
| | | }else { |
| | | model.addAttribute("principal",""); |
| | | } |
| | | |
| | | // 查询邀请人 |
| | | if(1 == tDriver.getInviterType()){ |
| | | TAppUser tAppUser = tAppUserMapper.selectById(tDriver.getInviterId()); |
| | | model.addAttribute("inviterName",tAppUser.getNickname()); |
| | | model.addAttribute("inviterPhone",tAppUser.getPhone()); |
| | | }else if(2 == tDriver.getInviterType()){ |
| | | TDriver tDriver1 = tDriverMapper.selectById(tDriver.getInviterId()); |
| | | model.addAttribute("inviterName",tDriver1.getName()); |
| | | model.addAttribute("inviterPhone",tDriver1.getPhone()); |
| | | }else { |
| | | model.addAttribute("inviterName",""); |
| | | model.addAttribute("inviterPhone",""); |
| | | } |
| | | |
| | | if(!CollectionUtils.isEmpty(tOrders)){ |
| | | //累计订单量 |
| | | List<TOrder> cumulativeOrderCount = tOrders.stream().filter(order -> order.getDriverId().equals(tDriver.getId()) |
| | | && 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 -> order.getDriverId().equals(tDriver.getId()) |
| | | && 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()); |
| | | // TODO 拒单次数 |
| | | List<TOrder> refusalCount = tOrders.stream().filter(order -> order.getDriverId().equals(tDriver.getId()) |
| | | && order.getState().equals(OrderStateEnum.CANCELED.getCode())).collect(Collectors.toList()); |
| | | model.addAttribute("refusalCount",refusalCount.size()); |
| | | }else { |
| | | model.addAttribute("cumulativeOrderCount",""); |
| | | model.addAttribute("monthOrderCount",""); |
| | | model.addAttribute("refusalCount",""); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void detail(Integer tDriverId, Model model) { |
| | | auditPage(tDriverId,model); |
| | | // TODO 查询司机 |
| | | TDriver tDriver = tDriverMapper.selectById(tDriverId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TOrderRefusal; |
| | | import com.stylefeng.guns.modular.system.dao.TOrderRefusalMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderRefusalService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 拒单记录 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-21 |
| | | */ |
| | | @Service |
| | | public class TOrderRefusalServiceImpl extends ServiceImpl<TOrderRefusalMapper, TOrderRefusal> implements ITOrderRefusalService { |
| | | |
| | | } |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TBranchOffice.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TBranchOfficeTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tBranchOffice/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TBranchOffice.openAddTBranchOffice()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tBranchOffice/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TBranchOffice.openTBranchOfficeDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tBranchOffice/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TBranchOffice.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TBranchOfficeTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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="主键" underline="true"/> |
| | | <#input id="agentId" name="代理商id" underline="true"/> |
| | | <#input id="principal" name="负责人姓名" underline="true"/> |
| | | <#input id="principalPhone" name="负责人电话" underline="true"/> |
| | | <#input id="email" name="邮箱" underline="true"/> |
| | | <#input id="provinceCode" name="代理区域省编号" underline="true"/> |
| | | <#input id="provinceName" name="代理区域省名称"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="cityCode" name="代理区域市编号" underline="true"/> |
| | | <#input id="cityName" name="代理区域市名称" underline="true"/> |
| | | <#input id="districtCode" name="代理区域区编号" underline="true"/> |
| | | <#input id="districtName" name="代理区域区名称" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" underline="true"/> |
| | | <#input id="createTime" name="添加时间" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TBranchOfficeInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TBranchOfficeInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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="agentId" name="代理商id" value="${item.agentId}" 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}" underline="true"/> |
| | | <#input id="provinceName" name="代理区域省名称" value="${item.provinceName}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="cityCode" name="代理区域市编号" value="${item.cityCode}" underline="true"/> |
| | | <#input id="cityName" name="代理区域市名称" value="${item.cityName}" underline="true"/> |
| | | <#input id="districtCode" name="代理区域区编号" value="${item.districtCode}" underline="true"/> |
| | | <#input id="districtName" name="代理区域区名称" value="${item.districtName}" 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="TBranchOfficeInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TBranchOfficeInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice_info.js"></script> |
| | | @} |
| | |
| | | <#button name="重置" icon="fa-trash" clickFun="TDriver.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <button type="button" class="btn btn-primary " onclick="TAgent.export()" id="audit"> |
| | | <button type="button" class="btn btn-primary " onclick="TDriver.auditPage()" id="audit"> |
| | | <i class="fa "></i> 立即审核 |
| | | </button> |
| | | <button type="button" class="btn btn-primary " onclick="TAgent.export()" id="export"> |
| | | <button type="button" class="btn btn-primary " onclick="TDriver.export()" id="export"> |
| | | <i class="fa "></i> 导出 |
| | | </button> |
| | | <button type="button" class="btn btn-primary " onclick="TAgent.export()" id="driverException"> |
| | | <button type="button" class="btn btn-primary " onclick="TDriverException.tDriverException()" id="driverException"> |
| | | <i class="fa "></i> 异常 |
| | | </button> |
| | | <button type="button" class="btn btn-primary " onclick="TAgent.export()" id="recharge"> |
| | | <button type="button" class="btn btn-primary " onclick="TDriver.rechargeBalancePage()" id="recharge"> |
| | | <i class="fa "></i> 充值 |
| | | </button> |
| | | @if(shiro.hasPermission("/tAgent/add")){ |
| | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriverException.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#createTime', |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | <input hidden id="id" value="${id}"> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">司机资料</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <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>${name}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">头像:</label> |
| | | <img src="https://lmg.jj20.com/up/allimg/1114/040221103339/210402103339-7-1200.jpg" /> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label">紧急联系人:</label> |
| | | <label>${emergencyContact}</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>${phone}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">紧急联系人电话:</label> |
| | | <label>${emergencyPhone}</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> |
| | | @if(sex==1){ |
| | | <label>男</label> |
| | | @} |
| | | @if(sex==2){ |
| | | <label>女</label> |
| | | @} |
| | | @if(sex==3){ |
| | | <label>未知</label> |
| | | @} |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">邀请人:</label> |
| | | <label>${phone}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label">电话:</label> |
| | | <label>${phone}</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>${driverLicenseNumber}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">驾龄:</label> |
| | | <label>${driverLicenseNumber}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">认证资料</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <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> |
| | | <img src="https://lmg.jj20.com/up/allimg/1114/040221103339/210402103339-7-1200.jpg" /> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">身份证照片:</label> |
| | | <img src="https://lmg.jj20.com/up/allimg/1114/040221103339/210402103339-7-1200.jpg" /> |
| | | </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>${idcard}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">加盟城市:</label> |
| | | <label>${cityName}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">服务区域:</label> |
| | | <label>${areaName}</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> |
| | | <select class="input-group col-sm-6" id="approvalStatus" style="width: 180px;height: 30px" name="approvalStatus"> |
| | | <option value="">请选择审核结果</option> |
| | | <option value="2">审核通过</option> |
| | | <option value="3">审核不通过</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <textarea id="approvalNotes" placeholder="请输入原因" class="control-label" style="width: 280px;height: 100px"></textarea> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="hidden-xs" id="TDriverTableToolbar" role="group" style="text-align: center"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TDriverInfoDlg.close()" /> |
| | | <#button name="确定" icon="fa-plus" clickFun="TDriver.auditSubmit()"/> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver_info.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | <input hidden id="driverId" value="${id}"> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">司机详情</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <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>${createTime}</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>${name}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >手机号:</label> |
| | | <label>${phone}</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>${emergencyContact}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">紧急联系人电话:</label> |
| | | <label>${emergencyPhone}</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>${cityName}</label> |
| | | <label>${areaName}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">认证资料</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <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> |
| | | <img src="https://lmg.jj20.com/up/allimg/1114/040221103339/210402103339-7-1200.jpg" /> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">身份证背面照:</label> |
| | | <img src="https://lmg.jj20.com/up/allimg/1114/040221103339/210402103339-7-1200.jpg" /> |
| | | </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>${name}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >身份证号码:</label> |
| | | <label>${idcard}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">历史记录</label> |
| | | </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>${name}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >邀约用户人数:</label> |
| | | <label>${idcard}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >累计获得佣金:</label> |
| | | <label>${idcard}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label" >当前积分:</label> |
| | | <label>${idcard}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label" >代驾次数:</label> |
| | | <label>${idcard}</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>${name}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >钱包余额:</label> |
| | | <label>${idcard}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >评论分数:</label> |
| | | <label>${idcard}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">拒单记录</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <!--拒单记录表--> |
| | | <#table id="TOrderRefusalTable"/> |
| | | <div class="hidden-xs" id="TDriverTableToolbar" role="group" style="text-align: center"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TDriverInfoDlg.close()" /> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver_info.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tOrderRefusal/tOrderRefusal.js"></script> |
| | | <script type="text/javascript"> |
| | | /*$(function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#driverId").val();; |
| | | TOrderRefusal.table.refresh({query: queryData}); |
| | | });*/ |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | <#TimeCon id="createTime" name="时间" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="手机号" /> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <select class="input-group" id="status" style="width: 80px;height: 33px" name="status"> |
| | | <option value="">状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="2">冻结</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TDriverException.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TDriverException.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <button type="button" class="btn btn-primary " onclick="TDriverException.export()" id="export"> |
| | | <i class="fa "></i> 导出 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <!--<div class="hidden-xs" id="TDriverTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tDriver/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TDriver.openAddTDriver()"/> |
| | | @} |
| | | @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>--> |
| | | <#table id="TDriverExceptionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriverException.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input hidden id="id" value="${id}"> |
| | | <input hidden id="status" value="${status}"> |
| | | <div class="col-lg-3"> |
| | | @if(status==1){ |
| | | 冻结理由:<textarea id="stopRemark" placeholder="请输入冻结理由" style="width: 681px; height: 249px;"></textarea> |
| | | @} |
| | | @if(status==2){ |
| | | 解冻理由:<textarea id="startRemark" placeholder="请输入解冻理由" style="width: 681px; height: 249px;"></textarea> |
| | | @} |
| | | </div> |
| | | <div class="hidden-xs" id="TDriverTableToolbar" role="group" style="margin-left:300px"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TDriverInfoDlg.closeException()" /> |
| | | <#button name="确定" icon="fa-plus" clickFun="TDriverException.updateStatus()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriverException.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input hidden id="id" value="${id}"> |
| | | <div class="col-sm-12" style="text-align: center;height: 60px"> |
| | | 充值余额:<input id="backgroundBalance" placeholder="请输入充值金额" style="width: 300px; height: 30px;" required/> |
| | | </div> |
| | | <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="text-align: center"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TDriverInfoDlg.close()" /> |
| | | <#button name="确定" icon="fa-plus" clickFun="TDriver.rechargeBalance()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input hidden id="id" value="${id}"> |
| | | <input hidden id="status" value="${status}"> |
| | | <div class="col-lg-3"> |
| | | @if(status==1){ |
| | | 冻结理由:<textarea id="stopRemark" placeholder="请输入冻结理由" style="width: 681px; height: 249px;"></textarea> |
| | | @} |
| | | @if(status==2){ |
| | | 解冻理由:<textarea id="startRemark" placeholder="请输入解冻理由" style="width: 681px; height: 249px;"></textarea> |
| | | @} |
| | | </div> |
| | | <div class="hidden-xs" id="TDriverTableToolbar" role="group" style="margin-left:300px"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TDriverInfoDlg.close()" /> |
| | | <#button name="确定" icon="fa-plus" clickFun="TDriver.updateStatus()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tDriver/tDriver_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TOrderRefusal.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TOrderRefusalTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tOrderRefusal/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TOrderRefusal.openAddTOrderRefusal()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrderRefusal/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TOrderRefusal.openTOrderRefusalDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrderRefusal/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TOrderRefusal.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TOrderRefusalTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrderRefusal/tOrderRefusal.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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="" underline="true"/> |
| | | <#input id="orderId" name="订单id" underline="true"/> |
| | | <#input id="driverId" name="司机id" underline="true"/> |
| | | <#input id="startAddress" name="起点地址"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="endAddress" name="终点地址" underline="true"/> |
| | | <#input id="code" name="编号" underline="true"/> |
| | | <#input id="createTime" name="添加时间" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TOrderRefusalInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TOrderRefusalInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrderRefusal/tOrderRefusal_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <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="orderId" name="订单id" value="${item.orderId}" underline="true"/> |
| | | <#input id="driverId" name="司机id" value="${item.driverId}" underline="true"/> |
| | | <#input id="startAddress" name="起点地址" value="${item.startAddress}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="endAddress" name="终点地址" value="${item.endAddress}" underline="true"/> |
| | | <#input id="code" name="编号" value="${item.code}" 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="TOrderRefusalInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TOrderRefusalInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrderRefusal/tOrderRefusal_info.js"></script> |
| | | @} |
| | |
| | | opts.length=0;// 这一句是清空原有列表项 |
| | | for(var i=0,n=data.length;i<n;i++){ |
| | | var data1=data[i]; |
| | | console.log(data1.name) |
| | | console.log(data1.id) |
| | | var opt=new Option(data1.name,data1.id,true,true); |
| | | opts.add(opt); |
| | | } |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TBranchOffice = { |
| | | id: "TBranchOfficeTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TBranchOffice.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理商id', field: 'agentId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '负责人姓名', field: 'principal', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '负责人电话', field: 'principalPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '邮箱', field: 'email', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理区域省编号', field: 'provinceCode', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理区域省名称', field: 'provinceName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理区域市编号', field: 'cityCode', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理区域市名称', field: 'cityName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理区域区编号', field: 'districtCode', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理区域区名称', field: 'districtName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TBranchOffice.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TBranchOffice.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TBranchOffice.openAddTBranchOffice = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tBranchOffice/tBranchOffice_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TBranchOffice.openTBranchOfficeDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tBranchOffice/tBranchOffice_update/' + TBranchOffice.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TBranchOffice.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TBranchOffice.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tBranchOfficeId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TBranchOffice.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TBranchOffice.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TBranchOffice.initColumn(); |
| | | var table = new BSTable(TBranchOffice.id, "/tBranchOffice/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TBranchOffice.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TBranchOfficeInfoDlg = { |
| | | tBranchOfficeInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TBranchOfficeInfoDlg.clearData = function() { |
| | | this.tBranchOfficeInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TBranchOfficeInfoDlg.set = function(key, val) { |
| | | this.tBranchOfficeInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TBranchOfficeInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TBranchOfficeInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TBranchOffice.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TBranchOfficeInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('agentId') |
| | | .set('principal') |
| | | .set('principalPhone') |
| | | .set('email') |
| | | .set('provinceCode') |
| | | .set('provinceName') |
| | | .set('cityCode') |
| | | .set('cityName') |
| | | .set('districtCode') |
| | | .set('districtName') |
| | | .set('status') |
| | | .set('createTime'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TBranchOfficeInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TBranchOffice.table.refresh(); |
| | | TBranchOfficeInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tBranchOfficeInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TBranchOfficeInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TBranchOffice.table.refresh(); |
| | | TBranchOfficeInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tBranchOfficeInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |
| | |
| | | }}, |
| | | {title: '驾驶证号码', field: 'driverLicenseNumber', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证号码', field: 'idcard', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证', field: 'source', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属代理商', field: 'agentId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属分公司', field: 'branchOfficeId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证', field: 'source', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (null != row.idcardFront){ |
| | | return '<span>已上传</span>' |
| | | }else{ |
| | | return '<span>未上传</span>' |
| | | } |
| | | }}, |
| | | {title: '所属代理商', field: 'agentName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '所属分公司', field: 'branchName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '钱包余额', field: 'balance', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '累计订单量', field: 'approvalStatus', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '当月订单量', field: 'approvalNotes', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '累计订单量', field: 'cumulativeOrderCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '当月订单量', field: 'monthOrderCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '积分', field: 'integral', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '拒单次数', field: 'approvalUserId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '拒单次数', field: 'refusalCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<span>正常</span>' |
| | | }else if (row.status === 2){ |
| | | return '<span>冻结</span>' |
| | | }else if (row.status === 3){ |
| | | return '<span>已删除</span>' |
| | | } |
| | | }}, |
| | | {title: '审核状态', field: 'approvalStatus', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.approvalStatus === 1){ |
| | | return '<span>待审核</span>' |
| | | }else if (row.approvalStatus === 2){ |
| | | return '<span>审核通过</span>' |
| | | }else if (row.approvalStatus === 3){ |
| | | return '<span>审核不通过</span>' |
| | | } |
| | | }}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | /*if(row.approvalStatus === 1){ |
| | | return '<a href="#" onclick="TDriver.stop('+row.id+','+row.status+')" style="color:red">驳回</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | }else */if (row.status === 1){ |
| | | return '<a href="#" onclick="TDriver.stop('+row.id+','+row.status+')" style="color:red">停用</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | 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>' +' ' + |
| | | '<a href="#" onclick="TDriver.updateInfo('+row.id+')" style="color:green">编辑</a>' |
| | | }else if (row.status === 2){ |
| | | return '<a href="#" onclick="TDriver.start('+row.id+','+row.status+')" style="color:green">启用</a>' +' ' + |
| | | '<a href="#" onclick="TDriver.searchTAppUserDetail('+row.id+','+row.status+')" 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>' |
| | | } |
| | | } |
| | | } |
| | |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情(使用中) |
| | | */ |
| | | TDriver.searchTDriverDetail = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/driverDetail?tDriverId=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TDriver.delete = function () { |
| | |
| | | }; |
| | | |
| | | /** |
| | | * 停用页面 |
| | | */ |
| | | TDriver.stop = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '停用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 启动页面 |
| | | */ |
| | | TDriver.start = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '启用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 提交启用冻结 |
| | | */ |
| | | TDriver.updateStatus = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.close(); |
| | | parent.TDriver.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("status",$("#status").val()); |
| | | if($("#status").val() == 1){ |
| | | ajax.set("remark",$("#stopRemark").val()); |
| | | } |
| | | if($("#status").val() == 2){ |
| | | ajax.set("remark",$("#startRemark").val()); |
| | | } |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 跳转充值余额页面 |
| | | * @param id |
| | | */ |
| | | TDriver.rechargeBalancePage = function () { |
| | | if (this.check()) { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | var id = selected[0].id; |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '充值余额', |
| | | area: ['45%', '20%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/rechargeBalancePage?id=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 提交充值 |
| | | */ |
| | | TDriver.rechargeBalance = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/recharge-balance", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.close(); |
| | | parent.TDriver.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("money",$("#backgroundBalance").val()); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 司机信息导出 |
| | | */ |
| | | TDriver.export=function(){ |
| | | var createTime=$("#createTime").val() |
| | | var phone=$("#phone").val() |
| | | var status=$("#status").val() |
| | | window.location.href=Feng.ctxPath + "/tDriver/export?createTime="+createTime |
| | | +"&status="+status |
| | | +"&phone="+phone |
| | | ; |
| | | } |
| | | |
| | | /** |
| | | * 跳转审核页面 |
| | | * @param id |
| | | */ |
| | | TDriver.auditPage = function () { |
| | | if (this.check()) { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | var id = selected[0].id; |
| | | var approvalStatus = selected[0].approvalStatus; |
| | | if(approvalStatus != 1){ |
| | | Feng.info("该条数据已审核!"); |
| | | return false; |
| | | } |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '审核详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/auditPage?id=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 提交审核 |
| | | */ |
| | | TDriver.auditSubmit = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/auditSubmit", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.close(); |
| | | parent.TDriver.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("approvalStatus",$("#approvalStatus").val()); |
| | | ajax.set("approvalNotes",$("#approvalNotes").val()); |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TDriver.search = function () { |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TDriverException = { |
| | | id: "TDriverExceptionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TDriverException.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '手机号', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '性别', field: 'sex', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.sex === 1){ |
| | | return '<span>男</span>' |
| | | }else if (row.sex === 2){ |
| | | return '<span>女</span>' |
| | | }else { |
| | | return '<span>未知</span>' |
| | | } |
| | | }}, |
| | | {title: '驾驶证号码', field: 'driverLicenseNumber', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证号码', field: 'idcard', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '身份证', field: 'source', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (null != row.idcardFront){ |
| | | return '<span>已上传</span>' |
| | | }else{ |
| | | return '<span>未上传</span>' |
| | | } |
| | | }}, |
| | | {title: '累计订单量', field: 'cumulativeOrderCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '当月订单量', field: 'monthOrderCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '积分', field: 'integral', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '连续未上线(天)', field: 'refusalCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | return '<span>异常</span>' |
| | | }}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<a href="#" onclick="TDriverException.stop('+row.id+','+row.status+')" style="color:red">冻结</a>' |
| | | }else if (row.status === 2){ |
| | | return '<a href="#" onclick="TDriverException.start('+row.id+','+row.status+')" style="color:green">解冻</a>' |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TDriverException.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TDriverException.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TDriverException.openAddTDriver = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TDriverException.openTDriverDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_update/' + TDriver.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TDriverException.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TDriver.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tDriverId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 停用页面 |
| | | */ |
| | | TDriverException.stop = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '停用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriverException_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 启动页面 |
| | | */ |
| | | TDriverException.start = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '启用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriverException_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 提交启用冻结 |
| | | */ |
| | | TDriverException.updateStatus = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriver/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TDriverInfoDlg.closeException(); |
| | | parent.TDriverException.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("status",$("#status").val()); |
| | | if($("#status").val() == 1){ |
| | | ajax.set("remark",$("#stopRemark").val()); |
| | | } |
| | | if($("#status").val() == 2){ |
| | | ajax.set("remark",$("#startRemark").val()); |
| | | } |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 司机异常信息导出 |
| | | */ |
| | | TDriverException.export=function(){ |
| | | var createTime=$("#createTime").val() |
| | | var phone=$("#phone").val() |
| | | var status=$("#status").val() |
| | | window.location.href=Feng.ctxPath + "/tDriver/export-exception?createTime="+createTime |
| | | +"&status="+status |
| | | +"&phone="+phone |
| | | ; |
| | | } |
| | | |
| | | /** |
| | | * 司机异常列表 |
| | | */ |
| | | TDriverException.tDriverException = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '司机异常列表', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriver/tDriver_exception' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TDriverException.search = function () { |
| | | var queryData = {}; |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | queryData['status'] = $("#status").val(); |
| | | TDriverException.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | TDriverException.resetSearch = function (){ |
| | | $("#createTime").val(''); |
| | | $("#phone").val(''); |
| | | $("#status").val(''); |
| | | TDriverException.search(); |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = TDriverException.initColumn(); |
| | | var table = new BSTable(TDriverException.id, "/tDriver/exceptionList", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TDriverException.table = table.init(); |
| | | }); |
| | |
| | | parent.layer.close(window.parent.TDriver.layerIndex); |
| | | } |
| | | |
| | | TDriverInfoDlg.closeException = function() { |
| | | parent.layer.close(window.parent.TDriverException.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TOrderRefusal = { |
| | | id: "TOrderRefusalTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TOrderRefusal.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '拒单时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TOrderRefusal.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TOrderRefusal.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TOrderRefusal.openAddTOrderRefusal = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderRefusal/tOrderRefusal_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TOrderRefusal.openTOrderRefusalDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderRefusal/tOrderRefusal_update/' + TOrderRefusal.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TOrderRefusal.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderRefusal/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TOrderRefusal.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tOrderRefusalId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TOrderRefusal.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TOrderRefusal.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TOrderRefusal.initColumn(); |
| | | var table = new BSTable(TOrderRefusal.id, "/tOrderRefusal/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TOrderRefusal.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TOrderRefusalInfoDlg = { |
| | | tOrderRefusalInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TOrderRefusalInfoDlg.clearData = function() { |
| | | this.tOrderRefusalInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TOrderRefusalInfoDlg.set = function(key, val) { |
| | | this.tOrderRefusalInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TOrderRefusalInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TOrderRefusalInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TOrderRefusal.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TOrderRefusalInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('orderId') |
| | | .set('driverId') |
| | | .set('startAddress') |
| | | .set('endAddress') |
| | | .set('code') |
| | | .set('createTime'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TOrderRefusalInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderRefusal/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TOrderRefusal.table.refresh(); |
| | | TOrderRefusalInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tOrderRefusalInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TOrderRefusalInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderRefusal/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TOrderRefusal.table.refresh(); |
| | | TOrderRefusalInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tOrderRefusalInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |