New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | 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.TCancelOrder; |
| | | import com.stylefeng.guns.modular.system.service.ITCancelOrderService; |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-27 15:52:01 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCancelOrder") |
| | | public class TCancelOrderController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCancelOrder/"; |
| | | |
| | | @Autowired |
| | | private ITCancelOrderService tCancelOrderService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCancelOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tCancelOrder_add") |
| | | public String tCancelOrderAdd() { |
| | | return PREFIX + "tCancelOrder_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tCancelOrder_update/{tCancelOrderId}") |
| | | public String tCancelOrderUpdate(@PathVariable Integer tCancelOrderId, Model model) { |
| | | TCancelOrder tCancelOrder = tCancelOrderService.selectById(tCancelOrderId); |
| | | model.addAttribute("item",tCancelOrder); |
| | | LogObjectHolder.me().set(tCancelOrder); |
| | | return PREFIX + "tCancelOrder_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tCancelOrderService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "获取取消订单列表") |
| | | @RequestMapping(value = "/cancelOrderList") |
| | | @ResponseBody |
| | | public Object cancelOrderList(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName) { |
| | | return tCancelOrderService.getCancelOrderList(createTime, code, source, userName, userPhone, state, driverName); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCancelOrder tCancelOrder) { |
| | | tCancelOrderService.insert(tCancelOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCancelOrderId) { |
| | | tCancelOrderService.deleteById(tCancelOrderId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCancelOrder tCancelOrder) { |
| | | tCancelOrderService.updateById(tCancelOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tCancelOrderId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tCancelOrderId") Integer tCancelOrderId) { |
| | | return tCancelOrderService.selectById(tCancelOrderId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出取消订单列表",notes="导出取消订单列表") |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "CancelOrderInfo"+time1+".xls"; |
| | | String[] title = new String[] {"下单时间","订单编号","订单来源","下单用户昵称", |
| | | "下单用户手机","起点地址","终点地址","接单司机","司机电话","转单原因","取消时间"}; |
| | | List<TOrderResp> orderList = tCancelOrderService.getCancelOrderList(createTime, code, source, userName, userPhone, state, driverName); |
| | | String[][] values = new String[orderList.size()][]; |
| | | for (int i = 0; i < orderList.size(); i++) { |
| | | TOrderResp d = orderList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getPlaceTime()); |
| | | values[i][1] = d.getCode(); |
| | | Integer source1 = d.getSource(); |
| | | if(1 == source1){ |
| | | values[i][2] = "小程序"; |
| | | }else if(2 == source1){ |
| | | values[i][2] = "司机创建"; |
| | | } |
| | | values[i][3] = d.getUserName(); |
| | | values[i][4] = d.getUserPhone(); |
| | | values[i][5] = d.getStartAddress(); |
| | | values[i][6] = d.getEndAddress(); |
| | | values[i][7] = d.getDriverName(); |
| | | values[i][8] = d.getDriverPhone(); |
| | | values[i][9] = d.getCause(); |
| | | values[i][10] = 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.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.TEvaluate; |
| | | import com.stylefeng.guns.modular.system.service.ITEvaluateService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-27 14:03:41 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tEvaluate") |
| | | public class TEvaluateController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tEvaluate/"; |
| | | |
| | | @Autowired |
| | | private ITEvaluateService tEvaluateService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tEvaluate.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tEvaluate_add") |
| | | public String tEvaluateAdd() { |
| | | return PREFIX + "tEvaluate_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tEvaluate_update/{tEvaluateId}") |
| | | public String tEvaluateUpdate(@PathVariable Integer tEvaluateId, Model model) { |
| | | TEvaluate tEvaluate = tEvaluateService.selectById(tEvaluateId); |
| | | model.addAttribute("item",tEvaluate); |
| | | LogObjectHolder.me().set(tEvaluate); |
| | | return PREFIX + "tEvaluate_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tEvaluateService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TEvaluate tEvaluate) { |
| | | tEvaluateService.insert(tEvaluate); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tEvaluateId) { |
| | | tEvaluateService.deleteById(tEvaluateId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TEvaluate tEvaluate) { |
| | | tEvaluateService.updateById(tEvaluate); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tEvaluateId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tEvaluateId") Integer tEvaluateId) { |
| | | return tEvaluateService.selectById(tEvaluateId); |
| | | } |
| | | } |
| | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TAppUserDetailOrderResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverCommissionResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.model.TAppUser; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.stylefeng.guns.modular.system.service.ITAppUserService; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private ITOrderService tOrderService; |
| | | @Autowired |
| | | private ITAppUserService tAppUserService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 跳转异常页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tOrder-exception") |
| | | public String tOrderException(Model model) { |
| | | return PREFIX + "tOrderException.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("/cancelOrder") |
| | | public String cancelOrder() { |
| | | return PREFIX + "tCancelOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转冻结页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tOrderException_start_and_stop") |
| | | public String tAppUserStartAndStop( Integer id, |
| | | Model model) { |
| | | |
| | | // 查询订单 |
| | | TOrder tOrder = tOrderService.selectById(id); |
| | | TAppUser tAppUser = new TAppUser(); |
| | | if(Objects.nonNull(tOrder)){ |
| | | tAppUser = tAppUserService.selectById(tOrder.getUserId()); |
| | | } |
| | | |
| | | model.addAttribute("id",id); |
| | | if(Objects.nonNull(tAppUser)){ |
| | | model.addAttribute("status",tAppUser.getStatus()); |
| | | } |
| | | return PREFIX + "tOrderStartAndStopException.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "获取订单列表") |
| | | @ApiOperation(value = "用户获取订单列表") |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition,Integer userId) { |
| | | public Object list(Integer userId) { |
| | | EntityWrapper<TOrder> wrapper = new EntityWrapper<>(); |
| | | if(Objects.nonNull(userId)){ |
| | | wrapper.eq("user_id",userId); |
| | | } |
| | | return tOrderService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "获取订单列表") |
| | | @RequestMapping(value = "/orderList") |
| | | @ResponseBody |
| | | public Object orderList(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName) { |
| | | return tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,1); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "获取订单异常列表") |
| | | @RequestMapping(value = "/orderExceptionList") |
| | | @ResponseBody |
| | | public Object orderExceptionList(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName) { |
| | | return tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,2); |
| | | } |
| | | |
| | | /** |
| | |
| | | TAppUserDetailOrderResp tAppUserDetailOrderResp = new TAppUserDetailOrderResp(); |
| | | BeanUtils.copyProperties(tOrder,tAppUserDetailOrderResp); |
| | | |
| | | // 计算总里程 |
| | | // TODO 计算总里程 |
| | | |
| | | |
| | | // 计算总时长 |
| | |
| | | public Object detail(@PathVariable("tOrderId") Integer tOrderId) { |
| | | return tOrderService.selectById(tOrderId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出订单列表",notes="导出订单列表") |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName,HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "OrderInfo"+time1+".xls"; |
| | | String[] title = new String[] {"下单时间","订单编号","订单来源","开始服务时间","下单用户昵称", |
| | | "下单用户手机","起点地址","终点地址","接单司机","司机电话","预估价","取消次数","订单状态"}; |
| | | List<TOrderResp> orderList = tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,1); |
| | | String[][] values = new String[orderList.size()][]; |
| | | for (int i = 0; i < orderList.size(); i++) { |
| | | TOrderResp d = orderList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getCode(); |
| | | Integer source1 = d.getSource(); |
| | | if(1 == source1){ |
| | | values[i][2] = "小程序"; |
| | | }else if(2 == source1){ |
| | | values[i][2] = "司机创建"; |
| | | } |
| | | values[i][3] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getStartTime()); |
| | | values[i][4] = d.getUserName(); |
| | | values[i][5] = d.getUserPhone(); |
| | | values[i][6] = d.getStartAddress(); |
| | | values[i][7] = d.getEndAddress(); |
| | | values[i][8] = d.getDriverName(); |
| | | values[i][9] = d.getDriverPhone(); |
| | | values[i][10] = String.valueOf(Objects.nonNull(d.getEstimatedPrice())?d.getEstimatedPrice(): BigDecimal.ZERO); |
| | | values[i][11] = String.valueOf(d.getCancelCount()); |
| | | Integer status1 = d.getState(); |
| | | if(101 == status1){ |
| | | values[i][12] = "待接单"; |
| | | }else if(102 == status1){ |
| | | values[i][12] = "已接单"; |
| | | }else if(103 == status1){ |
| | | values[i][12] = "前往预约点"; |
| | | }else if(104 == status1){ |
| | | values[i][12] = "到达预约点"; |
| | | }else if(105 == status1){ |
| | | values[i][12] = "开始服务"; |
| | | }else if(106 == status1){ |
| | | values[i][12] = "到达目的地"; |
| | | }else if(107 == status1){ |
| | | values[i][12] = "待支付"; |
| | | }else if(108 == status1){ |
| | | values[i][12] = "待评价"; |
| | | }else if(109 == status1){ |
| | | values[i][12] = "已完成"; |
| | | }else if(201 == status1){ |
| | | values[i][12] = "转单中"; |
| | | }else if(301 == status1){ |
| | | values[i][12] = "已取消"; |
| | | }else if(401 == status1){ |
| | | values[i][12] = "等待中"; |
| | | } |
| | | } |
| | | 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="导出订单列表") |
| | | @RequestMapping(value = "/export-exception") |
| | | @ResponseBody |
| | | public void exportException(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName,HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "OrderExceptionInfo"+time1+".xls"; |
| | | String[] title = new String[] {"下单时间","订单编号","订单来源","乘车时间","下单用户昵称", |
| | | "下单用户手机","起点","终点","接单司机","司机电话","预估价格","取消次数","订单状态"}; |
| | | List<TOrderResp> orderList = tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,1); |
| | | String[][] values = new String[orderList.size()][]; |
| | | for (int i = 0; i < orderList.size(); i++) { |
| | | TOrderResp d = orderList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getCode(); |
| | | Integer source1 = d.getSource(); |
| | | if(1 == source1){ |
| | | values[i][2] = "小程序"; |
| | | }else if(2 == source1){ |
| | | values[i][2] = "司机创建"; |
| | | } |
| | | values[i][3] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getStartTime()); |
| | | values[i][4] = d.getUserName(); |
| | | values[i][5] = d.getUserPhone(); |
| | | values[i][6] = d.getStartAddress(); |
| | | values[i][7] = d.getEndAddress(); |
| | | values[i][8] = d.getDriverName(); |
| | | values[i][9] = d.getDriverPhone(); |
| | | values[i][10] = String.valueOf(Objects.nonNull(d.getEstimatedPrice())?d.getEstimatedPrice(): BigDecimal.ZERO); |
| | | values[i][11] = String.valueOf(d.getCancelCount()); |
| | | Integer status1 = d.getState(); |
| | | if(101 == status1){ |
| | | values[i][12] = "待接单"; |
| | | }else if(102 == status1){ |
| | | values[i][12] = "已接单"; |
| | | }else if(103 == status1){ |
| | | values[i][12] = "前往预约点"; |
| | | }else if(104 == status1){ |
| | | values[i][12] = "到达预约点"; |
| | | }else if(105 == status1){ |
| | | values[i][12] = "开始服务"; |
| | | }else if(106 == status1){ |
| | | values[i][12] = "到达目的地"; |
| | | }else if(107 == status1){ |
| | | values[i][12] = "待支付"; |
| | | }else if(108 == status1){ |
| | | values[i][12] = "待评价"; |
| | | }else if(109 == status1){ |
| | | values[i][12] = "已完成"; |
| | | }else if(201 == status1){ |
| | | values[i][12] = "转单中"; |
| | | }else if(301 == status1){ |
| | | values[i][12] = "已取消"; |
| | | }else if(401 == status1){ |
| | | values[i][12] = "等待中"; |
| | | } |
| | | } |
| | | 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.resp; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.util.Date; |
| | | |
| | | public class TOrderResp extends TOrder { |
| | | |
| | | @ApiModelProperty(value = "下单用户昵称") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "下单用户电话") |
| | | private String userPhone; |
| | | |
| | | @ApiModelProperty(value = "司机昵称") |
| | | private String driverName; |
| | | |
| | | @ApiModelProperty(value = "司机电话") |
| | | private String driverPhone; |
| | | |
| | | @ApiModelProperty(value = "取消次数") |
| | | private Integer cancelCount; |
| | | |
| | | @ApiModelProperty(value = "用户状态") |
| | | private Integer userStatus; |
| | | |
| | | @ApiModelProperty(value = "取消订单页面使用:下单时间") |
| | | private Date placeTime; |
| | | |
| | | @ApiModelProperty(value = "取消原因") |
| | | private String cause; |
| | | |
| | | |
| | | public Date getPlaceTime() { |
| | | return placeTime; |
| | | } |
| | | |
| | | public void setPlaceTime(Date placeTime) { |
| | | this.placeTime = placeTime; |
| | | } |
| | | |
| | | public String getCause() { |
| | | return cause; |
| | | } |
| | | |
| | | public void setCause(String cause) { |
| | | this.cause = cause; |
| | | } |
| | | |
| | | public Integer getUserStatus() { |
| | | return userStatus; |
| | | } |
| | | |
| | | public void setUserStatus(Integer userStatus) { |
| | | this.userStatus = userStatus; |
| | | } |
| | | |
| | | public Integer getCancelCount() { |
| | | return cancelCount; |
| | | } |
| | | |
| | | public void setCancelCount(Integer cancelCount) { |
| | | this.cancelCount = cancelCount; |
| | | } |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | public String getUserPhone() { |
| | | return userPhone; |
| | | } |
| | | |
| | | public void setUserPhone(String userPhone) { |
| | | this.userPhone = userPhone; |
| | | } |
| | | |
| | | public String getDriverName() { |
| | | return driverName; |
| | | } |
| | | |
| | | public void setDriverName(String driverName) { |
| | | this.driverName = driverName; |
| | | } |
| | | |
| | | public String getDriverPhone() { |
| | | return driverPhone; |
| | | } |
| | | |
| | | public void setDriverPhone(String driverPhone) { |
| | | this.driverPhone = driverPhone; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.model.TCancelOrder; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单取消记录 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-27 |
| | | */ |
| | | @Mapper |
| | | public interface TCancelOrderMapper extends BaseMapper<TCancelOrder> { |
| | | |
| | | /** |
| | | * 查询取消订单列表 |
| | | * @param startTime |
| | | * @param endTime |
| | | * @param code |
| | | * @param source |
| | | * @param userName |
| | | * @param userPhone |
| | | * @param state |
| | | * @param driverName |
| | | * @return |
| | | */ |
| | | List<TOrderResp> getCancelOrderList(@Param("startTime") String startTime, @Param("endTime")String endTime, @Param("code") String code, |
| | | @Param("source") Integer source, @Param("userName")String userName, @Param("userPhone")String userPhone, |
| | | @Param("state")Integer state, @Param("driverName")String driverName); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TEvaluate; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单评价 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-27 |
| | | */ |
| | | public interface TEvaluateMapper extends BaseMapper<TEvaluate> { |
| | | |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Mapper |
| | | public interface TOrderMapper extends BaseMapper<TOrder> { |
| | | |
| | | /** |
| | | * 查询订单列表 |
| | | * @param startTime |
| | | * @param endTime |
| | | * @param code |
| | | * @param source |
| | | * @param userName |
| | | * @param userPhone |
| | | * @param state |
| | | * @param driverName |
| | | * @return |
| | | */ |
| | | List<TOrderResp> getOrderList(@Param("startTime") String startTime,@Param("endTime")String endTime, @Param("code") String code, |
| | | @Param("source") Integer source,@Param("userName")String userName, @Param("userPhone")String userPhone, |
| | | @Param("state")Integer state,@Param("driverName")String driverName,@Param("isException") Integer isException); |
| | | } |
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.TCancelOrderMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TCancelOrder"> |
| | | <id column="id" property="id" /> |
| | | <result column="orderId" property="orderId" /> |
| | | <result column="userType" property="userType" /> |
| | | <result column="userId" property="userId" /> |
| | | <result column="cause" property="cause" /> |
| | | <result column="status" property="status" /> |
| | | <result column="createTime" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, orderId, userType, userId, cause, status, createTime |
| | | </sql> |
| | | |
| | | <sql id="Base_Column_Order"> |
| | | co.id, co.orderId, co.userType, co.userId, co.cause, co.status, co.createTime,o.code, o.`source`, o.startAddress, o.endAddress,o.createTime AS placeTime, |
| | | a.nickname AS userName,a.phone AS userPhone,a.cancelCount,a.status AS userStatus,d.name AS driverName,d.phone AS driverPhone |
| | | </sql> |
| | | |
| | | <select id="getCancelOrderList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp"> |
| | | select <include refid="Base_Column_Order"></include> |
| | | from t_cancel_order co |
| | | left join t_order o on co.orderId = o.id |
| | | left join t_app_user a on o.userId = a.id |
| | | left join t_driver d on o.driverId = d.id |
| | | <where> |
| | | <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
| | | AND co.createTime between #{startTime} and #{endTime} |
| | | </if> |
| | | <if test="code != null and code != ''"> |
| | | AND o.code LIKE concat('%',#{code},'%') |
| | | </if> |
| | | <if test="source != null"> |
| | | AND o.source = #{source} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | AND a.nickname LIKE concat('%',#{userName},'%') |
| | | </if> |
| | | <if test="userPhone != null and userPhone != ''"> |
| | | AND a.phone LIKE concat('%',#{userPhone},'%') |
| | | </if> |
| | | <if test="state != null"> |
| | | AND o.state = #{state} |
| | | </if> |
| | | <if test="driverName != null and driverName != ''"> |
| | | AND d.name LIKE concat('%',#{driverName},'%') |
| | | </if> |
| | | AND co.userType = 1 |
| | | </where> |
| | | ORDER BY co.createTime |
| | | </select> |
| | | |
| | | </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.TEvaluateMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TEvaluate"> |
| | | <id column="id" property="id" /> |
| | | <result column="orderId" property="orderId" /> |
| | | <result column="userId" property="userId" /> |
| | | <result column="score" property="score" /> |
| | | <result column="evaluate" property="evaluate" /> |
| | | <result column="status" property="status" /> |
| | | <result column="createTime" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, orderId, userId, score, evaluate, status, createTime |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | <result column="code" property="code" /> |
| | | <result column="userId" property="userId" /> |
| | | <result column="driverId" property="driverId" /> |
| | | <result column="source" property="source" /> |
| | | <result column="`source`" property="source" /> |
| | | <result column="agentId" property="agentId" /> |
| | | <result column="branchOfficeId" property="branchOfficeId" /> |
| | | <result column="startTime" property="startTime" /> |
| | |
| | | <result column="couponId" property="couponId" /> |
| | | <result column="payType" property="payType" /> |
| | | <result column="payTime" property="payTime" /> |
| | | <result column="state" property="state" /> |
| | | <result column="`state`" property="state" /> |
| | | <result column="status" property="status" /> |
| | | <result column="createTime" property="createTime" /> |
| | | <result column="startDistance" property="startLng" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, code, userId, driverId, source, agentId, branchOfficeId, startTime, startAddress, startLat, startLng, endAddress, endLat, endLng, |
| | | boardingTime, getoffTime, estimatedPrice, orderMoney, payMoney, discountedPrice, couponId, payType, payTime, state, status, createTime, |
| | | id, code, userId, driverId, `source`, agentId, branchOfficeId, startTime, startAddress, startLat, startLng, endAddress, endLat, endLng, |
| | | boardingTime, getoffTime, estimatedPrice, orderMoney, payMoney, discountedPrice, couponId, payType, payTime, `state`, status, createTime, |
| | | startDistance,startPrice,overDriveDistance,overDrivePrice,longDistance,longDistancePrice,overLongDistance,overLongDistancePrice, |
| | | waitTime,waitTimePrice,outWaitTime,outWaitTimePrice,badWeatherDistance,badWeatherPrice,overBadWeatherDistance,overBadWeatherPrice |
| | | </sql> |
| | | |
| | | <sql id="Base_Column_Order"> |
| | | o.id, o.code, o.userId, o.driverId, o.`source`, o.agentId, o.branchOfficeId, o.startTime, o.startAddress, o.startLat, o.startLng, o.endAddress, o.endLat, o.endLng, |
| | | o.boardingTime, o.getoffTime, o.estimatedPrice, o.orderMoney, o.payMoney, o.discountedPrice, o.couponId, o.payType, o.payTime, o.`state`, o.status, o.createTime, |
| | | o.startDistance,o.startPrice,o.overDriveDistance,o.overDrivePrice,o.longDistance,o.longDistancePrice,o.overLongDistance,o.overLongDistancePrice, |
| | | o.waitTime,o.waitTimePrice,o.outWaitTime,o.outWaitTimePrice,o.badWeatherDistance,o.badWeatherPrice,o.overBadWeatherDistance,o.overBadWeatherPrice,a.nickname AS userName, |
| | | a.phone AS userPhone,a.cancelCount,a.status AS userStatus,d.name AS driverName,d.phone AS driverPhone |
| | | </sql> |
| | | |
| | | <select id="getOrderList" resultType="com.stylefeng.guns.modular.system.controller.resp.TOrderResp"> |
| | | select <include refid="Base_Column_Order"></include> |
| | | from t_order o |
| | | left join t_app_user a on o.userId = a.id |
| | | left join t_driver d on o.driverId = d.id |
| | | <where> |
| | | <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
| | | AND o.createTime between #{startTime} and #{endTime} |
| | | </if> |
| | | <if test="code != null and code != ''"> |
| | | AND o.code LIKE concat('%',#{code},'%') |
| | | </if> |
| | | <if test="source != null"> |
| | | AND o.source = #{source} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | AND a.nickname LIKE concat('%',#{userName},'%') |
| | | </if> |
| | | <if test="userPhone != null and userPhone != ''"> |
| | | AND a.phone LIKE concat('%',#{userPhone},'%') |
| | | </if> |
| | | <if test="state != null"> |
| | | AND o.state = #{state} |
| | | </if> |
| | | <if test="driverName != null and driverName != ''"> |
| | | AND d.name LIKE concat('%',#{driverName},'%') |
| | | </if> |
| | | <if test="isException != null"> |
| | | AND a.is_exception = #{isException} |
| | | </if> |
| | | </where> |
| | | ORDER BY o.createTime |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | WAIT_EVALUATED(107, "待评价"), |
| | | FINISH(108, "已完成"), |
| | | TRANSFERRING(201, "转单中"), |
| | | CANCELED(301,"已取消"); |
| | | CANCELED(301,"已取消"), |
| | | WAITING(401,"等待中"); |
| | | |
| | | private String desc; |
| | | |
| | |
| | | @TableField(value = "remark") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 取消订单次数,取消一次添加一次,若成功接单清零 |
| | | */ |
| | | @TableField(value = "cancelCount") |
| | | private Integer cancelCount; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "注册开始时间") |
| | |
| | | @ApiModelProperty(value = "注册结束时间") |
| | | private Date endTime; |
| | | |
| | | public Integer getCancelCount() { |
| | | return cancelCount; |
| | | } |
| | | |
| | | public void setCancelCount(Integer cancelCount) { |
| | | this.cancelCount = cancelCount; |
| | | } |
| | | |
| | | public Integer getIsException() { |
| | | return 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-27 |
| | | */ |
| | | @TableName("t_cancel_order") |
| | | public class TCancelOrder extends Model<TCancelOrder> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 订单id |
| | | */ |
| | | private Integer orderId; |
| | | /** |
| | | * 用户类型(1=用户,2=司机) |
| | | */ |
| | | private Integer userType; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer userId; |
| | | /** |
| | | * 转单原因 |
| | | */ |
| | | private String cause; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | 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 getUserType() { |
| | | return userType; |
| | | } |
| | | |
| | | public void setUserType(Integer userType) { |
| | | this.userType = userType; |
| | | } |
| | | |
| | | public Integer getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(Integer userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public String getCause() { |
| | | return cause; |
| | | } |
| | | |
| | | public void setCause(String cause) { |
| | | this.cause = cause; |
| | | } |
| | | |
| | | 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 "TCancelOrder{" + |
| | | "id=" + id + |
| | | ", orderId=" + orderId + |
| | | ", userType=" + userType + |
| | | ", userId=" + userId + |
| | | ", cause=" + cause + |
| | | ", status=" + status + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
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-27 |
| | | */ |
| | | @TableName("t_evaluate") |
| | | public class TEvaluate extends Model<TEvaluate> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 订单id |
| | | */ |
| | | private Integer orderId; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer userId; |
| | | /** |
| | | * 评分 |
| | | */ |
| | | private Integer score; |
| | | /** |
| | | * 评价内容 |
| | | */ |
| | | private String evaluate; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | 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 getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(Integer userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public Integer getScore() { |
| | | return score; |
| | | } |
| | | |
| | | public void setScore(Integer score) { |
| | | this.score = score; |
| | | } |
| | | |
| | | public String getEvaluate() { |
| | | return evaluate; |
| | | } |
| | | |
| | | public void setEvaluate(String evaluate) { |
| | | this.evaluate = evaluate; |
| | | } |
| | | |
| | | 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 "TEvaluate{" + |
| | | "id=" + id + |
| | | ", orderId=" + orderId + |
| | | ", userId=" + userId + |
| | | ", score=" + score + |
| | | ", evaluate=" + evaluate + |
| | | ", status=" + status + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.model.TCancelOrder; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单取消记录 服务类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-27 |
| | | */ |
| | | public interface ITCancelOrderService extends IService<TCancelOrder> { |
| | | |
| | | |
| | | /** |
| | | * 查询取消订单列表 |
| | | * @param createTime |
| | | * @param code |
| | | * @param source |
| | | * @param userName |
| | | * @param userPhone |
| | | * @param state |
| | | * @param driverName |
| | | * @return |
| | | */ |
| | | List<TOrderResp> getCancelOrderList(String createTime, String code, Integer source, String userName, String userPhone, Integer state, String driverName); |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TEvaluate; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单评价 服务类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-27 |
| | | */ |
| | | public interface ITEvaluateService extends IService<TEvaluate> { |
| | | |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface ITOrderService extends IService<TOrder> { |
| | | |
| | | /** |
| | | * 获取订单列表 |
| | | * @param createTime |
| | | * @param code |
| | | * @param source |
| | | * @param userName |
| | | * @param userPhone |
| | | * @param state |
| | | * @param driverName |
| | | * @return |
| | | */ |
| | | List<TOrderResp> getOrderList(String createTime, String code, Integer source, String userName, String userPhone, Integer state, String driverName,Integer isException); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.model.TCancelOrder; |
| | | import com.stylefeng.guns.modular.system.dao.TCancelOrderMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITCancelOrderService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单取消记录 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-27 |
| | | */ |
| | | @Service |
| | | public class TCancelOrderServiceImpl extends ServiceImpl<TCancelOrderMapper, TCancelOrder> implements ITCancelOrderService { |
| | | |
| | | @Autowired |
| | | private TCancelOrderMapper tCancelOrderMapper; |
| | | |
| | | @Override |
| | | public List<TOrderResp> getCancelOrderList(String createTime, String code, Integer source, String userName, String userPhone, Integer state, String driverName) { |
| | | String startTime = null; |
| | | String endTime = null; |
| | | // 开始,结束时间 |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | return tCancelOrderMapper.getCancelOrderList(startTime,endTime,code,source,userName,userPhone,state,driverName); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TEvaluate; |
| | | import com.stylefeng.guns.modular.system.dao.TEvaluateMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITEvaluateService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单评价 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-27 |
| | | */ |
| | | @Service |
| | | public class TEvaluateServiceImpl extends ServiceImpl<TEvaluateMapper, TEvaluate> implements ITEvaluateService { |
| | | |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.stylefeng.guns.modular.system.dao.TOrderMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> implements ITOrderService { |
| | | |
| | | @Autowired |
| | | private TOrderMapper tOrderMapper; |
| | | |
| | | @Override |
| | | public List<TOrderResp> getOrderList(String createTime, String code, Integer source, String userName, String userPhone, Integer state, String driverName,Integer isException) { |
| | | String startTime = null; |
| | | String endTime = null; |
| | | // 开始,结束时间 |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | startTime = split[0]; |
| | | endTime = split[1]; |
| | | } |
| | | return tOrderMapper.getOrderList(startTime,endTime,code,source,userName,userPhone,state,driverName,isException); |
| | | } |
| | | } |
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="TCancelOrder.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCancelOrderTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tCancelOrder/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TCancelOrder.openAddTCancelOrder()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tCancelOrder/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TCancelOrder.openTCancelOrderDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tCancelOrder/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TCancelOrder.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TCancelOrderTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tCancelOrder/tCancelOrder.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="userType" name="用户类型(1=用户,2=司机)" underline="true"/> |
| | | <#input id="userId" name="用户id"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="cause" 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="TCancelOrderInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCancelOrderInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tCancelOrder/tCancelOrder_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="userType" name="用户类型(1=用户,2=司机)" value="${item.userType}" underline="true"/> |
| | | <#input id="userId" name="用户id" value="${item.userId}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="cause" name="转单原因" value="${item.cause}" 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="TCancelOrderInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCancelOrderInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tCancelOrder/tCancelOrder_info.js"></script> |
| | | @} |
| | |
| | | <#button name="搜索" icon="fa-search" clickFun="TDriver.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TDriver.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <div class="col-sm-12"> |
| | | <button type="button" class="btn btn-primary " onclick="TDriver.auditPage()" id="audit"> |
| | | <i class="fa "></i> 立即审核 |
| | | </button> |
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="TEvaluate.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TEvaluateTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tEvaluate/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TEvaluate.openAddTEvaluate()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tEvaluate/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TEvaluate.openTEvaluateDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tEvaluate/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TEvaluate.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TEvaluateTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tEvaluate/tEvaluate.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="userId" name="用户id" underline="true"/> |
| | | <#input id="score" name="评分"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="evaluate" 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="TEvaluateInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TEvaluateInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tEvaluate/tEvaluate_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="userId" name="用户id" value="${item.userId}" underline="true"/> |
| | | <#input id="score" name="评分" value="${item.score}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="evaluate" name="评价内容" value="${item.evaluate}" 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="TEvaluateInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TEvaluateInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tEvaluate/tEvaluate_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-2"> |
| | | <#TimeCon id="createTime" name="取消订单时间" /> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="code" name="订单编号" /> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <select class="input-group" id="source" style="width: 120px;height: 33px" name="source"> |
| | | <option value="">请选择订单来源</option> |
| | | <option value="1">小程序</option> |
| | | <option value="2">司机创建</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="userName" name="下单用户昵称" /> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="userPhone" name="下单用户手机" /> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <select class="input-group" id="state" style="width: 120px;height: 33px" name="state"> |
| | | <option value="">请选择订单状态</option> |
| | | <option value="101">待接单</option> |
| | | <option value="102">已接单</option> |
| | | <option value="103">前往预约点</option> |
| | | <option value="104">到达预约点</option> |
| | | <option value="105">开始服务</option> |
| | | <option value="106">到达目的地</option> |
| | | <option value="107">待支付</option> |
| | | <option value="108">待评价</option> |
| | | <option value="109">已完成</option> |
| | | <option value="201">转单中</option> |
| | | <option value="301">已取消</option> |
| | | <option value="401">等待中</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="driverName" name="司机姓名" /> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCancelOrder.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCancelOrder.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | <button type="button" class="btn btn-primary " onclick="TCancelOrder.export()" id="export"> |
| | | <i class="fa "></i> 导出 |
| | | </button> |
| | | </div> |
| | | <div class="hidden-xs" id="TCancelOrderTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tCancelOrder/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TCancelOrder.openAddTCancelOrder()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tCancelOrder/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TCancelOrder.openTCancelOrderDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tCancelOrder/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TCancelOrder.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TCancelOrderTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrder/tCancelOrder.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | <div class="col-sm-2"> |
| | | <#TimeCon id="createTime" name="订单时间" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TOrder.search()"/> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="code" name="订单编号" /> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <select class="input-group" id="source" style="width: 120px;height: 33px" name="source"> |
| | | <option value="">请选择订单来源</option> |
| | | <option value="1">小程序</option> |
| | | <option value="2">司机创建</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="userName" name="下单用户昵称" /> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="userPhone" name="下单用户手机" /> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <select class="input-group" id="state" style="width: 120px;height: 33px" name="state"> |
| | | <option value="">请选择订单状态</option> |
| | | <option value="101">待接单</option> |
| | | <option value="102">已接单</option> |
| | | <option value="103">前往预约点</option> |
| | | <option value="104">到达预约点</option> |
| | | <option value="105">开始服务</option> |
| | | <option value="106">到达目的地</option> |
| | | <option value="107">待支付</option> |
| | | <option value="108">待评价</option> |
| | | <option value="109">已完成</option> |
| | | <option value="201">转单中</option> |
| | | <option value="301">已取消</option> |
| | | <option value="401">等待中</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="driverName" name="司机姓名" /> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TOrder.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TOrder.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | <button type="button" class="btn btn-primary " onclick="TOrder.cancelOrder()" id="cancelOrder"> |
| | | <i class="fa "></i> 取消订单 |
| | | </button> |
| | | <button type="button" class="btn btn-primary " onclick="TOrder.tOrderException()" id="orderException"> |
| | | <i class="fa "></i> 异常 |
| | | </button> |
| | | <button type="button" class="btn btn-primary " onclick="TOrder.export()" id="export"> |
| | | <i class="fa "></i> 导出 |
| | | </button> |
| | | </div> |
| | | <div class="hidden-xs" id="TOrderTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tOrder/add")){ |
| | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrder/tOrder.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tOrder/tOrderException.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"> |
| | | <div class="row"> |
| | | <div class="col-sm-2"> |
| | | <#TimeCon id="createTime" name="订单时间" /> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="code" name="订单编号" /> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <select class="input-group" id="source" style="width: 120px;height: 33px" name="source"> |
| | | <option value="">请选择订单来源</option> |
| | | <option value="1">小程序</option> |
| | | <option value="2">司机创建</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="userName" name="下单用户昵称" /> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="userPhone" name="下单用户手机" /> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <select class="input-group" id="state" style="width: 120px;height: 33px" name="state"> |
| | | <option value="">请选择订单状态</option> |
| | | <option value="101">待接单</option> |
| | | <option value="102">已接单</option> |
| | | <option value="103">前往预约点</option> |
| | | <option value="104">到达预约点</option> |
| | | <option value="105">开始服务</option> |
| | | <option value="106">到达目的地</option> |
| | | <option value="107">待支付</option> |
| | | <option value="108">待评价</option> |
| | | <option value="109">已完成</option> |
| | | <option value="201">转单中</option> |
| | | <option value="301">已取消</option> |
| | | <option value="401">等待中</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="driverName" name="司机姓名" /> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TOrderException.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TOrderException.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-12"> |
| | | <button type="button" class="btn btn-primary " onclick="TOrderException.cancelOrder()" id="cancelOrder"> |
| | | <i class="fa "></i> 取消订单 |
| | | </button> |
| | | <button type="button" class="btn btn-primary " onclick="TOrderException.export()" id="export"> |
| | | <i class="fa "></i> 导出 |
| | | </button> |
| | | </div> |
| | | <#table id="TOrderExceptionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrder/tOrderException.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tOrder/tOrder.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="TAppUserTableToolbar" role="group" style="margin-left:300px"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TOrderInfoDlg.closeException()" /> |
| | | <#button name="确定" icon="fa-plus" clickFun="TOrderException.updateStatus()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrder/tOrderException.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tOrder/tOrder_info.js"></script> |
| | | @} |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TCancelOrder = { |
| | | id: "TCancelOrderTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCancelOrder.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单id', field: 'orderId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户类型(1=用户,2=司机)', field: 'userType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户id', field: 'userId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '转单原因', field: 'cause', 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'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCancelOrder.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCancelOrder.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TCancelOrder.openAddTCancelOrder = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCancelOrder/tCancelOrder_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TCancelOrder.openTCancelOrderDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCancelOrder/tCancelOrder_update/' + TCancelOrder.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TCancelOrder.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tCancelOrder/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TCancelOrder.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tCancelOrderId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TCancelOrder.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TCancelOrder.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCancelOrder.initColumn(); |
| | | var table = new BSTable(TCancelOrder.id, "/tCancelOrder/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TCancelOrder.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TCancelOrderInfoDlg = { |
| | | tCancelOrderInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TCancelOrderInfoDlg.clearData = function() { |
| | | this.tCancelOrderInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCancelOrderInfoDlg.set = function(key, val) { |
| | | this.tCancelOrderInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCancelOrderInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TCancelOrderInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TCancelOrder.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TCancelOrderInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('orderId') |
| | | .set('userType') |
| | | .set('userId') |
| | | .set('cause') |
| | | .set('status') |
| | | .set('createTime'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TCancelOrderInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCancelOrder/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TCancelOrder.table.refresh(); |
| | | TCancelOrderInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tCancelOrderInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TCancelOrderInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCancelOrder/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TCancelOrder.table.refresh(); |
| | | TCancelOrderInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tCancelOrderInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TEvaluate = { |
| | | id: "TEvaluateTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TEvaluate.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单id', field: 'orderId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户id', field: 'userId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '评分', field: 'score', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '评价内容', field: 'evaluate', 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'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TEvaluate.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TEvaluate.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TEvaluate.openAddTEvaluate = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tEvaluate/tEvaluate_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TEvaluate.openTEvaluateDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tEvaluate/tEvaluate_update/' + TEvaluate.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TEvaluate.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tEvaluate/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TEvaluate.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tEvaluateId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TEvaluate.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TEvaluate.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TEvaluate.initColumn(); |
| | | var table = new BSTable(TEvaluate.id, "/tEvaluate/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TEvaluate.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TEvaluateInfoDlg = { |
| | | tEvaluateInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TEvaluateInfoDlg.clearData = function() { |
| | | this.tEvaluateInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TEvaluateInfoDlg.set = function(key, val) { |
| | | this.tEvaluateInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TEvaluateInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TEvaluateInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TEvaluate.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TEvaluateInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('orderId') |
| | | .set('userId') |
| | | .set('score') |
| | | .set('evaluate') |
| | | .set('status') |
| | | .set('createTime'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TEvaluateInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tEvaluate/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TEvaluate.table.refresh(); |
| | | TEvaluateInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tEvaluateInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TEvaluateInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tEvaluate/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TEvaluate.table.refresh(); |
| | | TEvaluateInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tEvaluateInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TAppUser = { |
| | | id: "TAppUserTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TAppUser.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: false}, |
| | | {title: '用户ID', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户昵称', field: 'nickname', 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: 'avatar', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | return '<img src="'+row.avatar+'" style="height: 60px;width: 60px"/>' |
| | | } |
| | | }, |
| | | {title: '微信openid', field: 'openid', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '微信unionid', field: 'unionid', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '紧急联系人', field: 'emergencyContact', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '紧急联系电话', field: 'emergencyPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '账户余额', field: 'accountBalance', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户标签id', field: 'userTagId', 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: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | // {title: '是否异常', field: 'isException', hidden:true, visible: true, align: 'center', valign: 'middle'}, |
| | | // {title: '启用冻结理由', field: 'remark', hidden:true,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="TAppUser.stop('+row.id+','+row.status+')" style="color:red">停用</a>' +' ' + |
| | | '<a href="#" onclick="TAppUser.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | }else if (row.status === 2){ |
| | | return '<a href="#" onclick="TAppUser.start('+row.id+','+row.status+')" style="color:green">启用</a>' +' ' + |
| | | '<a href="#" onclick="TAppUser.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TAppUser.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TAppUser.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 用户信息导出 |
| | | */ |
| | | TAppUser.export=function(){ |
| | | var nickName=$("#nickName").val() |
| | | var status=$("#status").val() |
| | | var id=$("#id").val() |
| | | var createTime=$("#createTime").val() |
| | | var phone=$("#phone").val() |
| | | window.location.href=Feng.ctxPath + "/tAppUser/export-userInfo?nickname="+nickName |
| | | +"&status="+status |
| | | +"&id="+id |
| | | +"&createTime="+createTime |
| | | +"&phone="+phone |
| | | ; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TAppUser.openAddTAppUser = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 停用 |
| | | */ |
| | | TAppUser.stop = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '停用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 启动 |
| | | */ |
| | | TAppUser.start = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '启用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 提交启用冻结 |
| | | */ |
| | | TAppUser.updateStatus = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAppUser/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TAppUserInfoDlg.close(); |
| | | parent.TAppUser.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(); |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TAppUser.openTAppUserDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_update/' + TAppUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情(使用中) |
| | | */ |
| | | TAppUser.searchTAppUserDetail = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/userDetail?tAppUserId=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TAppUser.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAppUser/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TAppUser.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tAppUserId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询异常列表 |
| | | */ |
| | | TAppUser.searchExceptionList = function () { |
| | | var queryData = {}; |
| | | queryData.status = 2; |
| | | TAppUser.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TAppUser.search = function () { |
| | | var queryData = {}; |
| | | queryData.nickname = $("#nickName").val(); |
| | | queryData.phone = $("#phone").val(); |
| | | queryData.createTime = $("#createTime").val(); |
| | | queryData.id = $("#id").val(); |
| | | queryData.status = $("#status").val(); |
| | | TAppUser.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 跳转优惠卷页面 |
| | | */ |
| | | TAppUser.searchCoupon = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | var data = []; |
| | | for (let i = 0; i < selected.length; i++) { |
| | | data[i] = selected[i].id; |
| | | } |
| | | if(this.check()){ |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '赠送优惠券', |
| | | area: ['80%', '80%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/sendCoupon?userIds=' + data |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | TAppUser.resetSearch = function (){ |
| | | $("#nickName").val(''); |
| | | $("#phone").val(''); |
| | | $("#createTime").val(''); |
| | | $("#id").val(''); |
| | | $("#status").val(''); |
| | | TAppUser.search(); |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = TAppUser.initColumn(); |
| | | var table = new BSTable(TAppUser.id, "/tAppUser/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TAppUser.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TCancelOrder = { |
| | | id: "TCancelOrderTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCancelOrder.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | |
| | | {title: '下单时间', field: 'placeTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单来源', field: 'source', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.source === 1){ |
| | | return '<span>小程序</span>' |
| | | }else if (row.source === 2){ |
| | | return '<span>司机创建</span>' |
| | | } |
| | | }}, |
| | | {title: '下单用户昵称', field: 'userName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '下单用户手机', field: 'userPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '接单司机', field: 'driverName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '司机电话', field: 'driverPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | |
| | | {title: '订单id', field: 'orderId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '用户类型(1=用户,2=司机)', field: 'userType', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '转单原因', field: 'cause', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '取消时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | return '<a href="#" onclick="TCancelOrder.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCancelOrder.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCancelOrder.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TCancelOrder.openAddTCancelOrder = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCancelOrder/tCancelOrder_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TCancelOrder.openTCancelOrderDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCancelOrder/tCancelOrder_update/' + TCancelOrder.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TCancelOrder.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tCancelOrder/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TCancelOrder.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tCancelOrderId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 取消订单信息导出 |
| | | */ |
| | | TCancelOrder.export=function(){ |
| | | var createTime=$("#createTime").val() |
| | | var code=$("#code").val() |
| | | var source=$("#source").val() |
| | | var userName=$("#userName").val() |
| | | var userPhone=$("#userPhone").val() |
| | | var state=$("#state").val() |
| | | var driverName=$("#driverName").val() |
| | | window.location.href=Feng.ctxPath + "/tCancelOrder/export?createTime="+createTime |
| | | +"&code="+code |
| | | +"&source="+source |
| | | +"&userName="+userName |
| | | +"&userPhone="+userPhone |
| | | +"&state="+state |
| | | +"&driverName="+driverName |
| | | ; |
| | | } |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TCancelOrder.search = function () { |
| | | var queryData = {}; |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | queryData['code'] = $("#code").val(); |
| | | queryData['source'] = $("#source").val(); |
| | | queryData['userName'] = $("#userName").val(); |
| | | queryData['userPhone'] = $("#userPhone").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | queryData['driverName'] = $("#driverName").val(); |
| | | TCancelOrder.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | TCancelOrder.resetSearch = function (){ |
| | | $("#createTime").val(''); |
| | | $("#code").val(''); |
| | | $("#source").val(''); |
| | | $("#userName").val(''); |
| | | $("#userPhone").val(''); |
| | | $("#state").val(''); |
| | | $("#driverName").val(''); |
| | | TCancelOrder.search(); |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCancelOrder.initColumn(); |
| | | var table = new BSTable(TCancelOrder.id, "/tCancelOrder/cancelOrderList", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TCancelOrder.table = table.init(); |
| | | }); |
| | |
| | | TOrder.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: '用户id', field: 'userId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '司机id', field: 'driverId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单来源(1=小程序)', field: 'source', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理商id', field: 'agentId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '分公司id', field: 'branchOfficeId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '开始服务时间', field: 'startTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点纬度', field: 'startLat', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点经度', field: 'startLng', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点纬度', field: 'endLat', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点经度', field: 'endLng', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '上车时间', field: 'boardingTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '下车时间', field: 'getoffTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '预估价', field: 'estimatedPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单金额', field: 'orderMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付金额', field: 'payMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'discountedPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券id', field: 'couponId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付类型(1=线上)', field: 'payType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付时间', field: 'payTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单状态(1=待接单,2=已接单,3=)', field: 'state', 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'} |
| | | {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '下单时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单来源', field: 'source', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.source === 1){ |
| | | return '<span>小程序</span>' |
| | | }else if (row.source === 2){ |
| | | return '<span>司机创建</span>' |
| | | } |
| | | }}, |
| | | {title: '开始服务时间', field: 'startTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '下单用户昵称', field: 'userName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '下单用户手机', field: 'userPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点纬度', field: 'startLat', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '起点经度', field: 'startLng', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点纬度', field: 'endLat', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '终点经度', field: 'endLng', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '司机id', field: 'driverId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '接单司机', field: 'driverName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '司机电话', field: 'driverPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '预估价', field: 'estimatedPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理商id', field: 'agentId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '分公司id', field: 'branchOfficeId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '上车时间', field: 'boardingTime', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '下车时间', field: 'getoffTime', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '订单金额', field: 'orderMoney', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '支付金额', field: 'payMoney', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'discountedPrice', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券id', field: 'couponId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '支付类型', field: 'payType', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '支付时间', field: 'payTime', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '取消次数', field: 'cancelCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.state === 101){ |
| | | return '<span>待接单</span>' |
| | | }else if (row.state === 102){ |
| | | return '<span>已接单</span>' |
| | | }else if (row.state === 103){ |
| | | return '<span>前往预约点</span>' |
| | | }else if (row.state === 104){ |
| | | return '<span>到达预约点</span>' |
| | | }else if (row.state === 105){ |
| | | return '<span>开始服务</span>' |
| | | }else if (row.state === 106){ |
| | | return '<span>到达目的地</span>' |
| | | }else if (row.state === 107){ |
| | | return '<span>待支付</span>' |
| | | }else if (row.state === 108){ |
| | | return '<span>待评价</span>' |
| | | }else if (row.state === 109){ |
| | | return '<span>已完成</span>' |
| | | }else if (row.state === 201){ |
| | | return '<span>转单中</span>' |
| | | }else if (row.state === 301){ |
| | | return '<span>已取消</span>' |
| | | }else if (row.state === 401){ |
| | | return '<span>等待中</span>' |
| | | } |
| | | }}, |
| | | {title: '状态', field: 'status', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | return '<a href="#" onclick="TOrder.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | |
| | | }; |
| | | |
| | | /** |
| | | * 订单信息导出 |
| | | */ |
| | | TOrder.export=function(){ |
| | | var createTime=$("#createTime").val() |
| | | var code=$("#code").val() |
| | | var source=$("#source").val() |
| | | var userName=$("#userName").val() |
| | | var userPhone=$("#userPhone").val() |
| | | var state=$("#state").val() |
| | | var driverName=$("#driverName").val() |
| | | window.location.href=Feng.ctxPath + "/tOrder/export?createTime="+createTime |
| | | +"&code="+code |
| | | +"&source="+source |
| | | +"&userName="+userName |
| | | +"&userPhone="+userPhone |
| | | +"&state="+state |
| | | +"&driverName="+driverName |
| | | ; |
| | | } |
| | | |
| | | /** |
| | | * 订单异常页面 |
| | | */ |
| | | TOrder.tOrderException = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '异常', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrder-exception' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 取消订单页面 |
| | | */ |
| | | TOrder.cancelOrder = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '取消订单', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/cancelOrder' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TOrder.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | queryData['code'] = $("#code").val(); |
| | | queryData['source'] = $("#source").val(); |
| | | queryData['userName'] = $("#userName").val(); |
| | | queryData['userPhone'] = $("#userPhone").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | queryData['driverName'] = $("#driverName").val(); |
| | | TOrder.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | TOrder.resetSearch = function (){ |
| | | $("#createTime").val(''); |
| | | $("#code").val(''); |
| | | $("#source").val(''); |
| | | $("#userName").val(''); |
| | | $("#userPhone").val(''); |
| | | $("#state").val(''); |
| | | $("#driverName").val(''); |
| | | TOrder.search(); |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = TOrder.initColumn(); |
| | | var table = new BSTable(TOrder.id, "/tOrder/list", defaultColunms); |
| | | var table = new BSTable(TOrder.id, "/tOrder/orderList", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TOrder.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TOrderException = { |
| | | id: "TOrderExceptionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TOrderException.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '下单时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单来源', field: 'source', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.source === 1){ |
| | | return '<span>小程序</span>' |
| | | }else if (row.source === 2){ |
| | | return '<span>司机创建</span>' |
| | | } |
| | | }}, |
| | | {title: '开始服务时间', field: 'startTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '下单用户昵称', field: 'userName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '下单用户手机', field: 'userPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点纬度', field: 'startLat', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '起点经度', field: 'startLng', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点纬度', field: 'endLat', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '终点经度', field: 'endLng', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '司机id', field: 'driverId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '接单司机', field: 'driverName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '司机电话', field: 'driverPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '预估价', field: 'estimatedPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理商id', field: 'agentId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '分公司id', field: 'branchOfficeId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '上车时间', field: 'boardingTime', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '下车时间', field: 'getoffTime', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '订单金额', field: 'orderMoney', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '支付金额', field: 'payMoney', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'discountedPrice', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券id', field: 'couponId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '支付类型', field: 'payType', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '支付时间', field: 'payTime', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '取消次数', field: 'cancelCount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if (row.state === 101){ |
| | | return '<span>待接单</span>' |
| | | }else if (row.state === 102){ |
| | | return '<span>已接单</span>' |
| | | }else if (row.state === 103){ |
| | | return '<span>前往预约点</span>' |
| | | }else if (row.state === 104){ |
| | | return '<span>到达预约点</span>' |
| | | }else if (row.state === 105){ |
| | | return '<span>开始服务</span>' |
| | | }else if (row.state === 106){ |
| | | return '<span>到达目的地</span>' |
| | | }else if (row.state === 107){ |
| | | return '<span>待支付</span>' |
| | | }else if (row.state === 108){ |
| | | return '<span>待评价</span>' |
| | | }else if (row.state === 109){ |
| | | return '<span>已完成</span>' |
| | | }else if (row.state === 201){ |
| | | return '<span>转单中</span>' |
| | | }else if (row.state === 301){ |
| | | return '<span>已取消</span>' |
| | | }else if (row.state === 401){ |
| | | return '<span>等待中</span>' |
| | | } |
| | | }}, |
| | | {title: '状态', field: 'status', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | if (row.userStatus === 1){ |
| | | return '<a href="#" onclick="TOrderException.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' +' ' + |
| | | '<a href="#" onclick="TOrderException.stop('+row.id+','+row.status+')" style="color:red">冻结</a>' |
| | | }else if (row.userStatus === 2){ |
| | | return '<a href="#" onclick="TOrderException.searchTDriverDetail('+row.id+')" style="color:green">详情</a>' +' ' + |
| | | '<a href="#" onclick="TOrderException.start('+row.id+','+row.status+')" style="color:green">启用</a>' |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TOrderException.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TOrderException.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TOrderException.openAddTOrder = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrder_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TOrderException.openTOrderDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrder_update/' + TOrderException.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TOrderException.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrder/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TOrderException.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tOrderId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 司机信息导出 |
| | | */ |
| | | TOrderException.export=function(){ |
| | | var createTime=$("#createTime").val() |
| | | var code=$("#code").val() |
| | | var source=$("#source").val() |
| | | var userName=$("#userName").val() |
| | | var userPhone=$("#userPhone").val() |
| | | var state=$("#state").val() |
| | | var driverName=$("#driverName").val() |
| | | window.location.href=Feng.ctxPath + "/tOrder/export-exception?createTime="+createTime |
| | | +"&code="+code |
| | | +"&source="+source |
| | | +"&userName="+userName |
| | | +"&userPhone="+userPhone |
| | | +"&state="+state |
| | | +"&driverName="+driverName |
| | | ; |
| | | } |
| | | |
| | | /** |
| | | * 停用 |
| | | */ |
| | | TOrderException.stop = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '停用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrderException_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 启动 |
| | | */ |
| | | TOrderException.start = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '启用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrderException_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 提交启用冻结 |
| | | */ |
| | | TOrderException.updateStatus = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAppUser/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TOrderInfoDlg.closeException(); |
| | | parent.TOrderException.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(); |
| | | }; |
| | | |
| | | /** |
| | | * 取消订单页面 |
| | | */ |
| | | TOrderException.cancelOrder = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '取消订单', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/cancelOrder' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TOrderException.search = function () { |
| | | var queryData = {}; |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | queryData['code'] = $("#code").val(); |
| | | queryData['source'] = $("#source").val(); |
| | | queryData['userName'] = $("#userName").val(); |
| | | queryData['userPhone'] = $("#userPhone").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | queryData['driverName'] = $("#driverName").val(); |
| | | TOrderException.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | TOrderException.resetSearch = function (){ |
| | | $("#createTime").val(''); |
| | | $("#code").val(''); |
| | | $("#source").val(''); |
| | | $("#userName").val(''); |
| | | $("#userPhone").val(''); |
| | | $("#state").val(''); |
| | | $("#driverName").val(''); |
| | | TOrderException.search(); |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = TOrderException.initColumn(); |
| | | var table = new BSTable(TOrderException.id, "/tOrder/orderExceptionList", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TOrderException.table = table.init(); |
| | | }); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TOrderInfoDlg.closeException = function() { |
| | | parent.layer.close(window.parent.TOrderException.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TOrderInfoDlg.collectData = function() { |