Merge remote-tracking branch 'origin/master'
| | |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCharteredService.html"; |
| | | return PREFIX + "tCarModel.html"; |
| | | } |
| | | |
| | | /** |
| | |
| | | public String tCarModelAdd(Model model) { |
| | | List<TCarBrand> brandList = tCarBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1).orderBy("insertTime", false)); |
| | | model.addAttribute("brandList",brandList); |
| | | return PREFIX + "tCharteredService_add.html"; |
| | | return PREFIX + "tCarModel_add.html"; |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | List<TCarBrand> brandList = tCarBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1).orderBy("insertTime", false)); |
| | | model.addAttribute("brandList",brandList); |
| | | return PREFIX + "tCharteredService_edit.html"; |
| | | return PREFIX + "tCarModel_edit.html"; |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TCarBrand; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.model.TDriverFacialFail; |
| | | import com.stylefeng.guns.modular.system.service.ITCarBrandService; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverFacialFailService; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 司机人脸识别异常记录管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 14:31:28 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tDriverFacialFail") |
| | | public class TDriverFacialFailController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tDriverFacialFail/"; |
| | | |
| | | @Autowired |
| | | private ITDriverFacialFailService tDriverFacialFailService; |
| | | @Autowired |
| | | private ITDriverService driverService; |
| | | |
| | | /** |
| | | * 跳转到司机人脸识别异常记录管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tDriverFacialFail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加司机人脸识别异常记录管理 |
| | | */ |
| | | @RequestMapping("/tDriverFacialFail_add") |
| | | public String tDriverFacialFailAdd(Model model) { |
| | | return PREFIX + "tDriverFacialFail_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改司机人脸识别异常记录管理 |
| | | */ |
| | | @RequestMapping("/tDriverFacialFail_update/{tDriverFacialFailId}") |
| | | public String tDriverFacialFailUpdate(@PathVariable Integer tDriverFacialFailId, Model model) { |
| | | TDriverFacialFail tDriverFacialFail = tDriverFacialFailService.selectById(tDriverFacialFailId); |
| | | TDriver driver = driverService.selectById(tDriverFacialFail.getDriverId()); |
| | | model.addAttribute("item",tDriverFacialFail); |
| | | model.addAttribute("driverName",driver.getName()); |
| | | model.addAttribute("driverPhone",driver.getPhone()); |
| | | LogObjectHolder.me().set(tDriverFacialFail); |
| | | return PREFIX + "tDriverFacialFail_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取司机人脸识别异常记录管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime, |
| | | String name, |
| | | String phone) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tDriverFacialFailService.getDriverFacialFailList(page,beginTime,endTime,name,phone)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 删除司机人脸识别异常记录管理 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tDriverFacialFailId) { |
| | | TDriverFacialFail tDriverFacialFail = tDriverFacialFailService.selectById(tDriverFacialFailId); |
| | | tDriverFacialFail.setIsDelete(2); |
| | | tDriverFacialFailService.updateById(tDriverFacialFail); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除司机人脸识别异常记录管理 |
| | | */ |
| | | @RequestMapping(value = "/deleteBatch") |
| | | @ResponseBody |
| | | public Object deleteBatch(@RequestParam String tDriverFacialFailIds) { |
| | | |
| | | if(!StringUtils.hasLength(tDriverFacialFailIds)){ |
| | | return ResultUtil.error("请选择要删除的数据"); |
| | | } |
| | | |
| | | String[] split = tDriverFacialFailIds.split(","); |
| | | List<Integer> driverFacialFailIds = new ArrayList<>(); |
| | | for (String s : split) { |
| | | driverFacialFailIds.add(Integer.valueOf(s)); |
| | | } |
| | | |
| | | List<TDriverFacialFail> driverFacialFails = tDriverFacialFailService.selectList(new EntityWrapper<TDriverFacialFail>() |
| | | .in("id", driverFacialFailIds)); |
| | | driverFacialFails.forEach(tDriverFacialFail -> { |
| | | tDriverFacialFail.setIsDelete(2); |
| | | }); |
| | | tDriverFacialFailService.updateBatchById(driverFacialFails); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 解封司机人脸识别 |
| | | */ |
| | | @RequestMapping(value = "/unsealing") |
| | | @ResponseBody |
| | | public Object unsealing(@RequestParam Integer tDriverFacialFailId) { |
| | | TDriverFacialFail tDriverFacialFail = tDriverFacialFailService.selectById(tDriverFacialFailId); |
| | | // 重置司机失败次数,并且更新是否需要进行人脸识别和识别时间 |
| | | TDriver driver = driverService.selectById(tDriverFacialFail.getDriverId()); |
| | | driver.setFailCount(0); |
| | | driver.setIsNeedFacial(0); |
| | | driver.setLastFacialTime(new Date()); |
| | | driverService.updateById(driver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.specialTrain; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.OrderCancelMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderPositionService; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderTransferService; |
| | | import com.stylefeng.guns.modular.system.service.ITServerCarmodelService; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 接送机订单控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-09-02 17:28:59 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tOrderTransfer") |
| | | public class TOrderTransferController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tOrderTransfer/"; |
| | | |
| | | @Autowired |
| | | private ITOrderTransferService tOrderTransferService; |
| | | |
| | | @Autowired |
| | | private ITServerCarmodelService tServerCarmodelService; |
| | | |
| | | @Autowired |
| | | private ITOrderPositionService tOrderPositionService; |
| | | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | |
| | | @Autowired |
| | | private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; |
| | | |
| | | @Resource |
| | | private OrderCancelMapper orderCancelMapper; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | @Value("${filePath}") |
| | | private String filePath; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到接送机订单首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | //服务接送机车型 |
| | | List<TServerCarmodel> carmodelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 1).eq("state", 1)); |
| | | model.addAttribute("carmodelList",carmodelList); |
| | | return PREFIX + "tOrderTransfer.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改接送机订单 |
| | | */ |
| | | @RequestMapping("/tOrderTransfer_orderDetail/{tOrderTransferId}") |
| | | public String tOrderTransferUpdate(@PathVariable Integer tOrderTransferId, Model model) { |
| | | Map<String, Object> item = tOrderTransferService.getTransferOrderDetailById(tOrderTransferId); |
| | | model.addAttribute("item",item); |
| | | return PREFIX + "tOrderTransfer_orderDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到出租车订单轨迹页面 |
| | | */ |
| | | @RequestMapping("/tOrderTransfer_trajectory/{tOrderTransferId}") |
| | | public String tOrderTaxi_trajectory(@PathVariable Integer tOrderTransferId, Model model) { |
| | | model.addAttribute("tOrderTransferId",tOrderTransferId); |
| | | return PREFIX + "tOrderTransfer_trajectory.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取接送机订单列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String orderNum, |
| | | Integer orderSource, |
| | | String userName, |
| | | String userPhone, |
| | | String passengers, |
| | | String passengersPhone, |
| | | Integer serverCarModelId, |
| | | String driver, |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tOrderTransferService.getTransferOrderList(page,beginTime,endTime,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),orderNum,orderSource,userName,userPhone,passengers,passengersPhone,serverCarModelId,driver,state)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | private ResultUtil resultUtil; |
| | | |
| | | /** |
| | | * 获取订单轨迹 |
| | | * @param orderDetailId |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/getOrderTrack", method = RequestMethod.POST) |
| | | public ResultUtil getOrderTrack(String orderDetailId){ |
| | | if(ToolUtil.isNotEmpty(orderDetailId)){ |
| | | try { |
| | | // List<TOrderPosition> list = tOrderPositionService.selectList(new EntityWrapper<TOrderPosition>().eq("orderType", 1).eq("orderId", orderDetailId).orderBy("insertTime")); |
| | | /*if(list.size() == 0){ |
| | | return ResultUtil.error("该订单没有运行轨迹"); |
| | | }*/ |
| | | //将数据存储到文件中 |
| | | File file = new File(filePath + orderDetailId + "_1.txt"); |
| | | if(!file.exists()){ |
| | | return ResultUtil.success(new ArrayList<>()); |
| | | } |
| | | //读取文件(字符流) |
| | | BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8")); |
| | | //循环取出数据 |
| | | String str = null; |
| | | StringBuffer sb = new StringBuffer(); |
| | | while ((str = in.readLine()) != null) { |
| | | sb.append(str); |
| | | } |
| | | List<TOrderPosition> list = JSONArray.parseArray(sb.toString(), TOrderPosition.class); |
| | | resultUtil = ResultUtil.success(list); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | resultUtil = ResultUtil.runErr(); |
| | | } |
| | | }else { |
| | | resultUtil = ResultUtil.paranErr(); |
| | | } |
| | | return resultUtil; |
| | | } |
| | | |
| | | /** |
| | | * 取消接送机订单 |
| | | */ |
| | | @RequestMapping(value = "/cancel") |
| | | @ResponseBody |
| | | public Object cancel(@RequestParam Integer tOrderTransferId) { |
| | | TOrderTransfer tOrderTransfer = tOrderTransferService.selectById(tOrderTransferId); |
| | | |
| | | //修改之前司机状态 -- 空闲 |
| | | if(null != tOrderTransfer.getDriverId()){ |
| | | TDriver driver = tDriverService.selectById(tOrderTransfer.getDriverId()); |
| | | driver.setState(2); |
| | | tDriverService.updateById(driver); |
| | | } |
| | | |
| | | tOrderTransfer.setState(10); |
| | | tOrderTransferService.updateById(tOrderTransfer); |
| | | |
| | | OrderCancel orderCancel = new OrderCancel(); |
| | | orderCancel.setOrderId(tOrderTransferId); |
| | | orderCancel.setOrderType(1); |
| | | orderCancel.setReason("平台取消订单"); |
| | | orderCancel.setRemark("平台取消订单"); |
| | | orderCancel.setUserType(2); |
| | | orderCancel.setState(2); |
| | | orderCancel.setInsertTime(new Date()); |
| | | orderCancelMapper.insert(orderCancel); |
| | | |
| | | //增加推送 |
| | | Map<String,String> map = new HashMap<>(); |
| | | map.put("id", tOrderTransfer.getId().toString()); |
| | | map.put("orderType", "1"); |
| | | String result = HttpRequestUtil.postRequest(PushURL.cancel_order_url, map); |
| | | System.out.println("接送机取消:【orderId="+tOrderTransfer.getId().toString()+"】,调用接口:"+result); |
| | | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.orderCancel(tOrderTransferId); |
| | | } |
| | | } |
| | | }).start(); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除接送机订单 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tOrderTransferId) { |
| | | TOrderTransfer tOrderTransfer = tOrderTransferService.selectById(tOrderTransferId); |
| | | tOrderTransfer.setIsDelete(2); |
| | | tOrderTransferService.updateById(tOrderTransfer); |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 跳转到接送机车型设置首页 |
| | | */ |
| | | @RequestMapping("/transfer") |
| | | public String transfer() { |
| | | return PREFIX + "transfer.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加专车车型设置 |
| | | */ |
| | | @RequestMapping("/tServerCarmodel_add") |
| | |
| | | return PREFIX + "charter_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加接送机车型设置 |
| | | */ |
| | | @RequestMapping("/tServerCarmodel_addTransfer") |
| | | public String tServerCarmodel_addTransfer() { |
| | | return PREFIX + "transfer_add.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加接送机车型设置 |
| | | */ |
| | | @RequestMapping("/tServerCarmodel_editTransfer") |
| | | public String tServerCarmodel_editTransfer(Integer id, Model model) { |
| | | TServerCarmodel tServerCarmodel = tServerCarmodelService.selectById(id); |
| | | model.addAttribute("data", tServerCarmodel); |
| | | return PREFIX + "transfer_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取专车车型设置列表 |
| | |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tServerCarmodelService.getServerCarModelList(page,3,name,state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 获取接送机车型设置列表 |
| | | */ |
| | | @RequestMapping(value = "/listTransfer") |
| | | @ResponseBody |
| | | public Object listTransfer(String name,Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tServerCarmodelService.getServerCarModelList(page,7,name,state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 新增接送机车型设置 |
| | | */ |
| | | @RequestMapping(value = "/addTransfer") |
| | | @ResponseBody |
| | | public Object addTransfer(TServerCarmodel tServerCarmodel) { |
| | | int count = tServerCarmodelService.selectCount(new EntityWrapper<TServerCarmodel>().eq("type", 7) |
| | | .eq("name", tServerCarmodel.getName()).last(" and not FIND_IN_SET(state,'3')")); |
| | | if (count > 0){ |
| | | return new ErrorTip(500, "【"+tServerCarmodel.getName()+"】已存在,请重新输入"); |
| | | } |
| | | tServerCarmodel.setInsertTime(new Date()); |
| | | tServerCarmodel.setState(1); |
| | | tServerCarmodel.setType(7); |
| | | tServerCarmodelService.insert(tServerCarmodel); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改接送机车型设置 |
| | | */ |
| | | @RequestMapping(value = "/updateTransfer") |
| | | @ResponseBody |
| | | public Object updateTransfer(TServerCarmodel tServerCarmodel) { |
| | | tServerCarmodel.setInsertTime(new Date()); |
| | | tServerCarmodel.setState(1); |
| | | tServerCarmodel.setType(7); |
| | | tServerCarmodelService.updateById(tServerCarmodel); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 禁用/启用 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 跳转到接送机价格设置首页 |
| | | */ |
| | | @RequestMapping("/transfer") |
| | | public String transfer() { |
| | | return PREFIX + "transfer.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加专车价格设置 |
| | | */ |
| | | @RequestMapping("/tSystemPrice_add") |
| | |
| | | } |
| | | model.addAttribute("modelList",serverCarmodels); |
| | | return PREFIX + "tSystemPrice_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加专车价格设置 |
| | | */ |
| | | @RequestMapping("/tSystemPrice_addTransfer") |
| | | public String tSystemPrice_addTransfer(Model model) { |
| | | //查询所有专车车型 |
| | | List<TSystemPrice> tSystemPrices = tSystemPriceService.selectList(new EntityWrapper<TSystemPrice>().eq("type", 7).eq("companyId", ShiroKit.getUser().getObjectId()).ne("state", 3)); |
| | | List<TServerCarmodel> modelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 7).eq("state", 1)); |
| | | List<TServerCarmodel> serverCarmodels = new ArrayList<>(); |
| | | for(TServerCarmodel tsc : modelList){ |
| | | boolean b = true; |
| | | for(TSystemPrice tsp : tSystemPrices){ |
| | | if(tsc.getId().compareTo(tsp.getServerCarModelId()) == 0){ |
| | | b = false; |
| | | break; |
| | | } |
| | | } |
| | | if(b){ |
| | | serverCarmodels.add(tsc); |
| | | } |
| | | } |
| | | model.addAttribute("modelList",serverCarmodels); |
| | | return PREFIX + "tSystemPrice_addTransfer.html"; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改接送机价格设置 |
| | | */ |
| | | @RequestMapping("/tSystemPrice_updateTransfer/{tSystemPriceId}") |
| | | public String tSystemPrice_updateTransfer(@PathVariable Integer tSystemPriceId, Model model) { |
| | | TSystemPrice tSystemPrice = tSystemPriceService.selectById(tSystemPriceId); |
| | | model.addAttribute("item",tSystemPrice); |
| | | LogObjectHolder.me().set(tSystemPrice); |
| | | |
| | | JSONObject json = JSONObject.fromObject(tSystemPrice.getContent()); |
| | | model.addAttribute("json",json); |
| | | |
| | | //查询所有专车车型 |
| | | List<TSystemPrice> tSystemPrices = tSystemPriceService.selectList(new EntityWrapper<TSystemPrice>().eq("type", 7).eq("companyId", ShiroKit.getUser().getObjectId()).ne("state", 3)); |
| | | List<TServerCarmodel> modelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 7).eq("state", 1)); |
| | | List<TServerCarmodel> serverCarmodels = new ArrayList<>(); |
| | | for(TServerCarmodel tsc : modelList){ |
| | | boolean b = true; |
| | | for(TSystemPrice tsp : tSystemPrices){ |
| | | if(tsc.getId().compareTo(tsp.getServerCarModelId()) == 0){ |
| | | b = false; |
| | | break; |
| | | } |
| | | } |
| | | if(b){ |
| | | serverCarmodels.add(tsc); |
| | | } |
| | | } |
| | | serverCarmodels.add(tServerCarmodelService.selectById(tSystemPrice.getServerCarModelId())); |
| | | model.addAttribute("modelList",serverCarmodels); |
| | | |
| | | return PREFIX + "tSystemPrice_editTransfer.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取专车价格设置列表 |
| | | */ |
| | | @RequestMapping(value = "/listSpecial") |
| | |
| | | public Object list(String name,Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tSystemPriceService.getSpecialPriceList(page,ShiroKit.getUser().getObjectId(),name,state)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 获取接送机价格设置列表 |
| | | */ |
| | | @RequestMapping(value = "/listTransfer") |
| | | @ResponseBody |
| | | public Object listTransfer(String name,Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tSystemPriceService.getTransferPriceList(page,ShiroKit.getUser().getObjectId(),name,state)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增接送机价格设置 |
| | | */ |
| | | @RequestMapping(value = "/addTransfer") |
| | | @ResponseBody |
| | | public Object addTransfer(TSystemPrice tSystemPrice) { |
| | | //判断当前公司是否添加过该专车车型价格配置 |
| | | int count = tSystemPriceService.selectCount(new EntityWrapper<TSystemPrice>() |
| | | .eq("type", 7) |
| | | .eq("serverCarModelId", tSystemPrice.getServerCarModelId()) |
| | | .eq("companyId",ShiroKit.getUser().getObjectId()) |
| | | .last(" and not FIND_IN_SET(state,'3')")); |
| | | if (count > 0){ |
| | | TServerCarmodel one = tServerCarmodelService.selectById(tSystemPrice.getServerCarModelId()); |
| | | return new ErrorTip(500, "【"+one.getName()+"】已存在,请重新选择"); |
| | | } |
| | | tSystemPrice.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | tSystemPrice.setType(7); |
| | | tSystemPrice.setState(1); |
| | | tSystemPriceService.insert(tSystemPrice); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoCompanyFare(tSystemPrice.getId()); |
| | | } |
| | | } |
| | | }).start(); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改专车价格设置 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 修改专车价格设置 |
| | | */ |
| | | @RequestMapping(value = "/updateTransfer") |
| | | @ResponseBody |
| | | public Object updateTransfer(TSystemPrice tSystemPrice) { |
| | | TSystemPrice obj = tSystemPriceService.selectById(tSystemPrice.getId()); |
| | | if (obj.getServerCarModelId() != tSystemPrice.getServerCarModelId()){ |
| | | //判断当前公司是否添加过该专车车型价格配置 |
| | | int count = tSystemPriceService.selectCount(new EntityWrapper<TSystemPrice>() |
| | | .eq("type", 7) |
| | | .eq("serverCarModelId", tSystemPrice.getServerCarModelId()) |
| | | .eq("companyId",ShiroKit.getUser().getObjectId()) |
| | | .last(" and not FIND_IN_SET(state,'3')")); |
| | | if (count > 0){ |
| | | TServerCarmodel one = tServerCarmodelService.selectById(tSystemPrice.getServerCarModelId()); |
| | | return new ErrorTip(500, "【"+one.getName()+"】已存在,请重新选择"); |
| | | } |
| | | } |
| | | tSystemPriceService.updateById(tSystemPrice); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport) {//上传数据 |
| | | pushMinistryOfTransportUtil.baseInfoCompanyFare(tSystemPrice.getId()); |
| | | } |
| | | } |
| | | }).start(); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改状态 |
| | | */ |
| | | @RequestMapping(value = "/opt") |
| | |
| | | loginFailures.put(username, f); |
| | | } |
| | | |
| | | if(f > 5 && (System.currentTimeMillis() - t) <= (30 * 60 * 1000)){ |
| | | model.addAttribute("tips", "登录次数过多,请等30分钟再试!"); |
| | | return "/login.html"; |
| | | } |
| | | // if(f > 5 && (System.currentTimeMillis() - t) <= (30 * 60 * 1000)){ |
| | | // model.addAttribute("tips", "登录次数过多,请等30分钟再试!"); |
| | | // return "/login.html"; |
| | | // } |
| | | //验证验证码是否正确 |
| | | if (KaptchaUtil.getKaptchaOnOff()) { |
| | | String kaptcha = super.getPara("kaptcha").trim(); |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.TCarModel; |
| | | import com.stylefeng.guns.modular.system.model.TDriverFacialFail; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 人脸识别失败记录表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-05 |
| | | */ |
| | | public interface TDriverFacialFailMapper extends BaseMapper<TDriverFacialFail> { |
| | | |
| | | /** |
| | | * 查询人脸识别异常记录列表 |
| | | * @param page |
| | | * @param beginTime |
| | | * @param endTime |
| | | * @param name |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getDriverFacialFailList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("name") String name, |
| | | @Param("phone") String phone); |
| | | } |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单-专车 Mapper 接口 |
| | | * 订单-接送机 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-09-02 |
| | | */ |
| | | public interface TOrderTransferMapper extends BaseMapper<TOrderTransfer> { |
| | | /** |
| | | * 根据条件查询专车订单列表 |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getTransferOrderList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("roleType") Integer roleType, |
| | | @Param("nowUserId") Integer nowUserId, |
| | | @Param("orderNum") String orderNum, |
| | | @Param("orderSource") Integer orderSource, |
| | | @Param("userName") String userName, |
| | | @Param("userPhone") String userPhone, |
| | | @Param("passengers") String passengers, |
| | | @Param("passengersPhone") String passengersPhone, |
| | | @Param("serverCarModelId") Integer serverCarModelId, |
| | | @Param("driver") String driver, |
| | | @Param("state") Integer state); |
| | | |
| | | /** |
| | | * 根据专车订单ID获取专车订单详情 |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | Map<String,Object> getTransferOrderDetailById(@Param("orderId") Integer orderId); |
| | | } |
| | |
| | | @Param("companyId") Integer companyId, |
| | | @Param("name") String name, |
| | | @Param("state") Integer state); |
| | | |
| | | /** |
| | | * 获取接送机价格设置列表 |
| | | * @param page |
| | | * @param companyId |
| | | * @param name |
| | | * @param state |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getTransferPriceList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("companyId") Integer companyId, |
| | | @Param("name") String name, |
| | | @Param("state") Integer state); |
| | | } |
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.TDriverFacialFailMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TDriverFacialFail"> |
| | | <id column="id" property="id" /> |
| | | <result column="driverId" property="driverId" /> |
| | | <result column="city" property="city" /> |
| | | <result column="cityCode" property="cityCode" /> |
| | | <result column="facialPicture" property="facialPicture" /> |
| | | <result column="createTime" property="createTime" /> |
| | | <result column="isDelete" property="isDelete" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, driverId, city, cityCode, facialPicture, createTime, isDelete |
| | | </sql> |
| | | <select id="getDriverFacialFailList" resultType="java.util.Map"> |
| | | SELECT tdff.id, tdff.driverId, tdff.city, tdff.cityCode, tdff.facialPicture, tdff.createTime, tdff.isDelete ,td.`name` AS driverName,td.phone AS driverPhone |
| | | FROM t_driver_facial_fail tdff |
| | | left join t_driver td on td.id = tdff.driverId |
| | | <where> |
| | | <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> |
| | | AND (tdff.createTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | AND td.name LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="phone != null and phone != ''"> |
| | | AND td.phone LIKE CONCAT('%',#{phone},'%') |
| | | </if> |
| | | AND tdff.isDelete = 1 |
| | | </where> |
| | | order by tdff.createTime desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, type, userId, driverId, carId, orderNum, placementLon, placementLat, placementAddress, startLon, startLat, endLon, startAddress, endLat, endAddress, boardingLon, boardingLat, boardingAddress, boardingTime, getoffLon, getoffLat, getoffAddress, getoffTime, mileage, payManner, payType, orderMoney, startMoney, mileageMoney, durationMoney, longDistanceMoney, parkMoney, roadTollMoney, redPacketMoney, couponMoney, redPacketId, couponId, discount, discountMoney, activityId, companyId, payMoney, substitute, passengers, passengersPhone, state, insertTime, travelTime, snatchOrderTime, setOutTime, arriveTime, startServiceTime, endServiceTime, orderType, orderSource, invoiceId, isReassign, reassignNotice, trackId, isDelete, oldState, telX, bindId, serverCarModelId |
| | | </sql> |
| | | <!--根据条件查询专车订单列表--> |
| | | <select id="getTransferOrderList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT ui.nickName as userName,ui.phone as userPhone,CONCAT(di.`name`,'-',di.phone) as driver,CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, |
| | | sc.`name` as serverCarModel,ot.* FROM t_order_transfer as ot |
| | | LEFT JOIN t_user as ui on ui.id = ot.userId |
| | | LEFT JOIN t_driver as di on di.id = ot.driverId |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | | LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = ot.serverCarModelId |
| | | ) as o |
| | | <where> |
| | | o.isDelete = 1 and o.type = 7 |
| | | <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> |
| | | AND (o.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="orderNum != null and orderNum != ''"> |
| | | and o.orderNum LIKE CONCAT('%',#{orderNum},'%') |
| | | </if> |
| | | <if test="orderSource != null and orderSource != ''"> |
| | | and o.orderSource = #{orderSource} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and o.userName LIKE CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="userPhone != null and userPhone != ''"> |
| | | and o.userPhone LIKE CONCAT('%',#{userPhone},'%') |
| | | </if> |
| | | <if test="passengers != null and passengers != ''"> |
| | | and o.passengers LIKE CONCAT('%',#{passengers},'%') |
| | | </if> |
| | | <if test="passengersPhone != null and passengersPhone != ''"> |
| | | and o.passengersPhone LIKE CONCAT('%',#{passengersPhone},'%') |
| | | </if> |
| | | <if test="serverCarModelId != null and serverCarModelId != ''"> |
| | | and o.serverCarModelId = #{serverCarModelId} |
| | | </if> |
| | | <if test="driver != null and driver != ''"> |
| | | and o.driver LIKE CONCAT('%',#{driver},'%') |
| | | </if> |
| | | <if test="state != null and state != ''"> |
| | | and o.state = #{state} |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType == 2"> |
| | | and (o.companyId = #{nowUserId} or FIND_IN_SET(o.companyId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId))) |
| | | </if> |
| | | <if test="roleType != null and roleType != '' and roleType == 3"> |
| | | and o.companyId = #{nowUserId} |
| | | </if> |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | | |
| | | <!--根据专车订单ID获取专车订单详情--> |
| | | <select id="getTransferOrderDetailById" resultType="map"> |
| | | SELECT |
| | | DATE_FORMAT(ot.insertTime,'%Y-%m-%d %H:%i') as insertTimeStr, |
| | | DATE_FORMAT(ot.travelTime,'%Y-%m-%d %H:%i') as travelTimeStr, |
| | | DATE_FORMAT(ot.boardingTime,'%Y-%m-%d %H:%i') as boardingTimeStr, |
| | | DATE_FORMAT(ot.getoffTime,'%Y-%m-%d %H:%i') as getoffTimeStr, |
| | | case when ot.orderSource = 1 then 'APP下单' |
| | | when ot.orderSource = 2 then '扫码下单' |
| | | when ot.orderSource = 3 then '小程序下单' |
| | | when ot.orderSource = 4 then '司机下单' |
| | | when ot.orderSource = 5 then '调度下单' else '' end orderSourceStr, |
| | | ui.nickName as userName,ui.phone as userPhone, |
| | | case when ot.payType = 1 then '微信' |
| | | when ot.payType = 2 then '支付宝' |
| | | when ot.payType = 3 then '余额' else '' end as payTypeStr, |
| | | sc.`name` as serverCarModel, |
| | | case when income1.type = 1 then income1.money else 0 end as platIncome, |
| | | case when income1.type = 2 then income1.money else 0 end as companyIncome, |
| | | case when income1.type = 3 then income1.money else 0 end as franchiseeIncome, |
| | | IFNULL(income2.money,0) as driverIncome, |
| | | CONCAT(di.`name`,'-',di.phone) as driver, |
| | | CONCAT(cb.`name`,'-',ci.carLicensePlate) as car, |
| | | cc.`name` as companyName,ot.* |
| | | FROM t_order_transfer as ot |
| | | LEFT JOIN t_user as ui on ui.id = ot.userId |
| | | LEFT JOIN t_driver as di on di.id = ot.driverId |
| | | LEFT JOIN t_car as ci on ci.id= ot.carId |
| | | LEFT JOIN t_car_brand as cb on cb.id = ci.carBrandId |
| | | LEFT JOIN t_company as cc on cc.id = ot.companyId |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = ot.serverCarModelId |
| | | LEFT JOIN (SELECT ii.money,ii.incomeId,cc.type FROM t_income as ii |
| | | LEFT JOIN t_company as cc on ii.objectId = cc.id |
| | | where ii.userType = 1 and ii.type = 2 and ii.orderType = 7 GROUP BY ii.incomeId) as income1 on income1.incomeId = ot.id |
| | | LEFT JOIN (SELECT * FROM t_income where userType = 2 and type = 2 and orderType = 7 GROUP BY incomeId) as income2 on income2.incomeId = ot.id |
| | | where ot.id = #{orderId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | | <select id="getTransferPriceList" resultType="java.util.Map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT * FROM (SELECT sp.id,sp.type,sp.companyId,sc.`name`,sc.img,sp.state from t_system_price as sp |
| | | LEFT JOIN t_server_carmodel as sc on sc.id = sp.serverCarModelId) as o |
| | | <where> |
| | | o.type = 7 and o.state != 3 and o.companyId = #{companyId} |
| | | <if test="name != null and name != ''"> |
| | | and o.name LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test="state != null and state != ''"> |
| | | and o.state = #{state} |
| | | </if> |
| | | </where> |
| | | order by o.id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | */ |
| | | private Integer addObjectId; |
| | | |
| | | /** |
| | | * 人脸识别失败次数 5次进行下线 |
| | | */ |
| | | private Integer failCount; |
| | | |
| | | /** |
| | | * 是否需要进行人脸识别 1=是 0=否 |
| | | */ |
| | | private Integer isNeedFacial; |
| | | |
| | | /** |
| | | * 上次人脸识别时间 |
| | | */ |
| | | private Date lastFacialTime; |
| | | |
| | | public Integer getFailCount() { |
| | | return failCount; |
| | | } |
| | | |
| | | public void setFailCount(Integer failCount) { |
| | | this.failCount = failCount; |
| | | } |
| | | |
| | | public Integer getIsNeedFacial() { |
| | | return isNeedFacial; |
| | | } |
| | | |
| | | public void setIsNeedFacial(Integer isNeedFacial) { |
| | | this.isNeedFacial = isNeedFacial; |
| | | } |
| | | |
| | | public Date getLastFacialTime() { |
| | | return lastFacialTime; |
| | | } |
| | | |
| | | public void setLastFacialTime(Date lastFacialTime) { |
| | | this.lastFacialTime = lastFacialTime; |
| | | } |
| | | |
| | | public BigDecimal getBalance() { |
| | | return balance; |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 司机人脸识别失败记录 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-05 |
| | | */ |
| | | @TableName("t_driver_facial_fail") |
| | | public class TDriverFacialFail extends Model<TDriverFacialFail> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 司机id |
| | | */ |
| | | private Integer driverId; |
| | | |
| | | /** |
| | | * 所属城市 |
| | | */ |
| | | private String city; |
| | | /** |
| | | * 城市code |
| | | */ |
| | | private String cityCode; |
| | | /** |
| | | * 识别失败图片 |
| | | */ |
| | | private String facialPicture; |
| | | /** |
| | | * 识别时间 |
| | | */ |
| | | private Date createTime; |
| | | /** |
| | | * 是否删除 1=否 2=是 |
| | | */ |
| | | private Integer isDelete; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getDriverId() { |
| | | return driverId; |
| | | } |
| | | |
| | | public void setDriverId(Integer driverId) { |
| | | this.driverId = driverId; |
| | | } |
| | | |
| | | public String getCity() { |
| | | return city; |
| | | } |
| | | |
| | | public void setCity(String city) { |
| | | this.city = city; |
| | | } |
| | | |
| | | public String getCityCode() { |
| | | return cityCode; |
| | | } |
| | | |
| | | public void setCityCode(String cityCode) { |
| | | this.cityCode = cityCode; |
| | | } |
| | | |
| | | public String getFacialPicture() { |
| | | return facialPicture; |
| | | } |
| | | |
| | | public void setFacialPicture(String facialPicture) { |
| | | this.facialPicture = facialPicture; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Integer getIsDelete() { |
| | | return isDelete; |
| | | } |
| | | |
| | | public void setIsDelete(Integer isDelete) { |
| | | this.isDelete = isDelete; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TDriverFacialFail{" + |
| | | "id=" + id + |
| | | ", driverId=" + driverId + |
| | | ", city='" + city + '\'' + |
| | | ", cityCode='" + cityCode + '\'' + |
| | | ", facialPicture='" + facialPicture + '\'' + |
| | | ", createTime='" + createTime + '\'' + |
| | | ", isDelete='" + isDelete + '\'' + |
| | | '}'; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | |
| | | /** |
| | | * 用车时长(天) |
| | | */ |
| | | private Integer carTime; |
| | | private BigDecimal carTime; |
| | | /** |
| | | * 服务车型id |
| | | */ |
| | |
| | | this.traveltime = traveltime; |
| | | } |
| | | |
| | | public Integer getCarTime() { |
| | | public BigDecimal getCarTime() { |
| | | return carTime; |
| | | } |
| | | |
| | | public void setCarTime(Integer carTime) { |
| | | public void setCarTime(BigDecimal carTime) { |
| | | this.carTime = carTime; |
| | | } |
| | | |
| | |
| | | * 移动小号绑定关系id |
| | | */ |
| | | private String bindId; |
| | | /** |
| | | * 行程录音 |
| | | */ |
| | | private String routeRecord; |
| | | /** |
| | | * 录音时间 |
| | | */ |
| | | private Date recordTime; |
| | | |
| | | public Date getRecordTime() { |
| | | return recordTime; |
| | | } |
| | | |
| | | public void setRecordTime(Date recordTime) { |
| | | this.recordTime = recordTime; |
| | | } |
| | | public String getRouteRecord() { |
| | | return routeRecord; |
| | | } |
| | | |
| | | public void setRouteRecord(String routeRecord) { |
| | | this.routeRecord = routeRecord; |
| | | } |
| | | public Integer getOldState() { |
| | | return oldState; |
| | | } |
| | |
| | | */ |
| | | private Integer serverCarModelId; |
| | | |
| | | /** |
| | | * 行程录音 |
| | | */ |
| | | private String routeRecord; |
| | | /** |
| | | * 录音时间 |
| | | */ |
| | | private Date recordTime; |
| | | |
| | | public Date getRecordTime() { |
| | | return recordTime; |
| | | } |
| | | |
| | | public void setRecordTime(Date recordTime) { |
| | | this.recordTime = recordTime; |
| | | } |
| | | public String getRouteRecord() { |
| | | return routeRecord; |
| | | } |
| | | |
| | | public void setRouteRecord(String routeRecord) { |
| | | this.routeRecord = routeRecord; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TOrderPrivateCar{" + |
| | | return "TOrderTransfer{" + |
| | | "id=" + id + |
| | | ", type=" + type + |
| | | ", userId=" + userId + |
| | |
| | | * 专车车型ID 关联t_server_carmodel表 |
| | | */ |
| | | private Integer serverCarModelId; |
| | | /** |
| | | * 行程录音 |
| | | */ |
| | | private String routeRecord; |
| | | |
| | | /** |
| | | * 录音时间 |
| | | */ |
| | | private Date recordTime; |
| | | |
| | | public Date getRecordTime() { |
| | | return recordTime; |
| | | } |
| | | |
| | | public void setRecordTime(Date recordTime) { |
| | | this.recordTime = recordTime; |
| | | } |
| | | |
| | | public String getRouteRecord() { |
| | | return routeRecord; |
| | | } |
| | | |
| | | public void setRouteRecord(String routeRecord) { |
| | | this.routeRecord = routeRecord; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TOrderPrivateCar{" + |
| | | return "TOrderTransfer{" + |
| | | "id=" + id + |
| | | ", type=" + type + |
| | | ", userId=" + userId + |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.TDriverFacialFail; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 人脸识别失败记录表 服务类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-05 |
| | | */ |
| | | public interface ITDriverFacialFailService extends IService<TDriverFacialFail> { |
| | | |
| | | /** |
| | | * 查询人脸识别失败记录列表 |
| | | * @param page |
| | | * @param beginTime |
| | | * @param endTime |
| | | * @param name |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getDriverFacialFailList(Page<Map<String, Object>> page, String beginTime, String endTime, String name, String phone); |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.TOrderPrivateCar; |
| | | import com.stylefeng.guns.modular.system.model.TOrderTransfer; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface ITOrderTransferService extends IService<TOrderTransfer> { |
| | | |
| | | /** |
| | | * 根据条件查询专车订单列表 |
| | | * @return |
| | | */ |
| | | List<Map<String,Object>> getTransferOrderList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("roleType") Integer roleType, |
| | | @Param("nowUserId") Integer nowUserId, |
| | | @Param("orderNum") String orderNum, |
| | | @Param("orderSource") Integer orderSource, |
| | | @Param("userName") String userName, |
| | | @Param("userPhone") String userPhone, |
| | | @Param("passengers") String passengers, |
| | | @Param("passengersPhone") String passengersPhone, |
| | | @Param("serverCarModelId") Integer serverCarModelId, |
| | | @Param("driver") String driver, |
| | | @Param("state") Integer state); |
| | | |
| | | /** |
| | | * 根据专车订单ID获取专车订单详情 |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | Map<String,Object> getTransferOrderDetailById(@Param("orderId") Integer orderId); |
| | | } |
| | |
| | | @Param("companyId") Integer companyId, |
| | | @Param("name") String name, |
| | | @Param("state") Integer state); |
| | | |
| | | /** |
| | | * 获取接送机价格设置列表 |
| | | * @param page |
| | | * @param companyId |
| | | * @param name |
| | | * @param state |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getTransferPriceList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("companyId") Integer companyId, |
| | | @Param("name") String name, |
| | | @Param("state") Integer state); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.TDriverFacialFailMapper; |
| | | import com.stylefeng.guns.modular.system.model.TDriverFacialFail; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverFacialFailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 人脸识别失败记录表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author 吕雪 |
| | | * @since 2020-06-05 |
| | | */ |
| | | @Service |
| | | public class TDriverFacialFailServiceImpl extends ServiceImpl<TDriverFacialFailMapper, TDriverFacialFail> implements ITDriverFacialFailService { |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getDriverFacialFailList(Page<Map<String, Object>> page, String beginTime, String endTime, String name, String phone) { |
| | | return this.baseMapper.getDriverFacialFailList(page, beginTime, endTime, name,phone); |
| | | } |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.TOrderTransferMapper; |
| | | import com.stylefeng.guns.modular.system.model.TOrderTransfer; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderTransferService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class TOrderTransferServiceImpl extends ServiceImpl<TOrderTransferMapper, TOrderTransfer> implements ITOrderTransferService { |
| | | @Override |
| | | public List<Map<String, Object>> getTransferOrderList(Page<Map<String, Object>> page, String beginTime, String endTime, Integer roleType, Integer nowUserId, String orderNum, Integer orderSource, String userName, String userPhone, String passengers, String passengersPhone, Integer serverCarModelId, String driver, Integer state) { |
| | | return this.baseMapper.getTransferOrderList(page, beginTime, endTime, roleType, nowUserId, orderNum, orderSource, userName, userPhone, passengers, passengersPhone, serverCarModelId, driver, state); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getTransferOrderDetailById(Integer orderId) { |
| | | return this.baseMapper.getTransferOrderDetailById(orderId); |
| | | } |
| | | } |
| | |
| | | public List<Map<String, Object>> getSpecialPriceList(Page<Map<String, Object>> page, Integer companyId, String name, Integer state) { |
| | | return this.baseMapper.getSpecialPriceList(page, companyId, name, state); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getTransferPriceList(Page<Map<String, Object>> page, Integer companyId, String name, Integer state) { |
| | | return this.baseMapper.getTransferPriceList(page, companyId, name, state); |
| | | } |
| | | } |
| | |
| | | <#NameCon id="name" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCharteredService.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCharteredService.resetSearch()" space="true"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCarModel.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TCarModel.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCarModelTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tCarModel/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TCharteredService.openAddTCarModel()"/> |
| | | <#button name="添加" icon="fa-plus" clickFun="TCarModel.openAddTCarModel()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tCarModel/update")){ |
| | | <#button name="编辑" icon="fa-edit" clickFun="TCharteredService.openTCarModelDetail()" space="true"/> |
| | | <#button name="编辑" icon="fa-edit" clickFun="TCarModel.openTCarModelDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tCarModel/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TCharteredService.delete()" space="true"/> |
| | | <#button name="删除" icon="fa-remove" clickFun="TCarModel.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TCarModelTable"/> |
| | |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="ibox-title"> |
| | | <h5>编辑</h5> |
| | | <h5>详情</h5> |
| | | </div> |
| | | <div class="ibox-content" id="charteredServiceInfoForm"> |
| | | <div class="row row-lg"> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>车辆类型管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="createTime" name="添加时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="phone" name="手机号"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="司机姓名" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TDriverFacialFail.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TDriverFacialFail.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TDriverFacialFailTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tDriverFacialFail/deleteBatch")){ |
| | | <#button name="批量删除" icon="fa-remove" clickFun="TDriverFacialFail.deleteBatch()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TDriverFacialFailTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriverFacialFail/tDriverFacialFail.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="driverFacialFailInfoForm"> |
| | | <div class="row"> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TDriverFacialFailInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TDriverFacialFailInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriverFacialFail/tDriverFacialFail_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="driverFacialFailInfoForm"> |
| | | <input type="hidden" id="id" name="id" value="${item.id}"> |
| | | <div class="row"> |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#label id="createTime" name="记录时间" value="${item.createTime}"/> |
| | | <#label id="driverName" name="司机姓名" value="${driverName}"/> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label head-scu-label">认证截图:</label> |
| | | <div class="col-sm-4"> |
| | | <div id="facialPicturePreId"> |
| | | <div><img width="100px" height="100px" src="${item.facialPicture}"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <#label id="result" name="认证结果" value="认证失败"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#label id="city" name="所属城市" value="${item.city}"/> |
| | | <#label id="driverPhone" name="司机手机号" value="${driverPhone}"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-11 col-sm-offset-5"> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TDriverFacialFailInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tDriverFacialFail/tDriverFacialFail_info.js"></script> |
| | | @} |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-1"> |
| | | <h2 class="h3Class" style="font-weight: 700;">行程录音</h2> |
| | | </div> |
| | | <div class="col-sm-10"> |
| | | <audio id="audio" src="http://www.w3capi.com/upload/audio/audio_example.mp3" controls muted data-enabled="false"> |
| | | <!-- <source src="${item.routeRecord}" type="audio/mpeg">--> |
| | | </audio> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TOrderPrivateCar.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TOrderPrivateCar.resetSearch()" space="true"/> |
| | | <#button name="搜索" icon="fa-search" clickFun="TOrderTransfer.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TOrderTransfer.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TOrderPrivateCarTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tOrderPrivateCar/orderDetail")){ |
| | | <#button name="订单详情" icon="fa-plus" clickFun="TOrderPrivateCar.orderDetail()"/> |
| | | <#button name="订单详情" icon="fa-plus" clickFun="TOrderTransfer.orderDetail()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrderPrivateCar/cancelOrder")){ |
| | | <#button name="取消订单" icon="fa-edit" clickFun="TOrderPrivateCar.cancelOrder()" space="true"/> |
| | | <#button name="取消订单" icon="fa-edit" clickFun="TOrderTransfer.cancelOrder()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrderPrivateCar/orderTrack")){ |
| | | <#button name="订单轨迹" icon="fa-edit" clickFun="TOrderPrivateCar.trajectory()" space="true"/> |
| | | <#button name="订单轨迹" icon="fa-edit" clickFun="TOrderTransfer.trajectory()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrderPrivateCar/deleteOrder")){ |
| | | <#button name="删除记录" icon="fa-remove" clickFun="TOrderPrivateCar.deleteOrder()" space="true"/> |
| | | <#button name="删除记录" icon="fa-remove" clickFun="TOrderTransfer.deleteOrder()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TOrderPrivateCarTable"/> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-1"> |
| | | <h2 class="h3Class" style="font-weight: 700;">行程录音</h2> |
| | | </div> |
| | | <div class="col-sm-10"> |
| | | <audio id="audio" src="http://www.w3capi.com/upload/audio/audio_example.mp3" controls muted data-enabled="false"> |
| | | <!-- <source src="${item.routeRecord}" type="audio/mpeg">--> |
| | | </audio> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>接送机订单管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="insertTime" name="订单时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="orderNum" name="订单编号" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="orderSource" name="订单来源" > |
| | | <option value="">全部</option> |
| | | <option value="1">APP下单</option> |
| | | <option value="2">扫码下单</option> |
| | | <option value="3">小程序下单</option> |
| | | <option value="4">司机下单</option> |
| | | <option value="5">调度下单</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="userName" name="下单用户昵称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="userPhone" name="下单用户手机" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="passengers" name="乘车用户姓名" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="passengersPhone" name="乘车用户手机" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="serverCarModelId" name="车型" > |
| | | <option value="">全部</option> |
| | | @for(obj in carmodelList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="driver" name="接单司机" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">待接单</option> |
| | | <option value="2">待出发</option> |
| | | <option value="3">待到达预约地点</option> |
| | | <option value="4">待乘客上车</option> |
| | | <option value="5">服务中</option> |
| | | <option value="6">完成服务</option> |
| | | <option value="7">待支付</option> |
| | | <option value="8">待评价</option> |
| | | <option value="9">已完成</option> |
| | | <option value="10">已取消</option> |
| | | <option value="11">改派中</option> |
| | | <option value="12">取消待支付</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TOrderTransfer.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TOrderTransfer.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TOrderTransferTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tOrderTransfer/orderDetail")){ |
| | | <#button name="订单详情" icon="fa-plus" clickFun="TOrderTransfer.orderDetail()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrderTransfer/cancelOrder")){ |
| | | <#button name="取消订单" icon="fa-edit" clickFun="TOrderTransfer.cancelOrder()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrderTransfer/orderTrack")){ |
| | | <#button name="订单轨迹" icon="fa-edit" clickFun="TOrderTransfer.trajectory()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrderTransfer/deleteOrder")){ |
| | | <#button name="删除记录" icon="fa-remove" clickFun="TOrderTransfer.deleteOrder()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TOrderTransferTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrderTransfer/tOrderTransfer.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#insertTime' |
| | | ,range: true |
| | | }); |
| | | </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="主键id" underline="true"/> |
| | | <#input id="type" name="类型(1=普通订单,2=摆渡订单)" underline="true"/> |
| | | <#input id="userId" name="用户id" underline="true"/> |
| | | <#input id="driverId" name="接单司机ID" underline="true"/> |
| | | <#input id="carId" name="车辆id" underline="true"/> |
| | | <#input id="orderNum" name="订单号" underline="true"/> |
| | | <#input id="placementLon" name="下单地点经度" underline="true"/> |
| | | <#input id="placementLat" name="下单地点纬度" underline="true"/> |
| | | <#input id="placementAddress" name="下单地点" underline="true"/> |
| | | <#input id="startLon" name="出发地经度值" underline="true"/> |
| | | <#input id="startLat" name="出发地纬度值" underline="true"/> |
| | | <#input id="endLon" name="目的地经度" underline="true"/> |
| | | <#input id="startAddress" name="出发地地点" underline="true"/> |
| | | <#input id="endLat" name="目的地纬度" underline="true"/> |
| | | <#input id="endAddress" name="目的地地点" underline="true"/> |
| | | <#input id="boardingLon" name="上车点经度" underline="true"/> |
| | | <#input id="boardingLat" name="上车点纬度" underline="true"/> |
| | | <#input id="boardingAddress" name="上车点" underline="true"/> |
| | | <#input id="boardingTime" name="上车时间" underline="true"/> |
| | | <#input id="getoffLon" name="下车点经度" underline="true"/> |
| | | <#input id="getoffLat" name="下车点纬度" underline="true"/> |
| | | <#input id="getoffAddress" name="下车地点" underline="true"/> |
| | | <#input id="getoffTime" name="下车时间" underline="true"/> |
| | | <#input id="mileage" name="行驶里程数(米)" underline="true"/> |
| | | <#input id="payManner" name="支付方式(1=未来平台支付,2=其他方式支付)" underline="true"/> |
| | | <#input id="payType" name="支付方式(1=微信,2=支付宝,3=其他)" underline="true"/> |
| | | <#input id="orderMoney" name="订单金额" underline="true"/> |
| | | <#input id="startMoney" name="起步价" underline="true"/> |
| | | <#input id="mileageMoney" name="里程费" underline="true"/> |
| | | <#input id="durationMoney" name="时长费" underline="true"/> |
| | | <#input id="longDistanceMoney" name="远途费" underline="true"/> |
| | | <#input id="parkMoney" name="停车费"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="roadTollMoney" name="过路费" underline="true"/> |
| | | <#input id="redPacketMoney" name="红包抵扣金额" underline="true"/> |
| | | <#input id="couponMoney" name="优惠券抵扣金额" underline="true"/> |
| | | <#input id="redPacketId" name="红包记录id" underline="true"/> |
| | | <#input id="couponId" name="优惠券id" underline="true"/> |
| | | <#input id="discount" name="折扣" underline="true"/> |
| | | <#input id="discountMoney" name="折扣优惠金额" underline="true"/> |
| | | <#input id="activityId" name="折扣活动id" underline="true"/> |
| | | <#input id="companyId" name="公司id" underline="true"/> |
| | | <#input id="payMoney" name="支付金额" underline="true"/> |
| | | <#input id="substitute" name="是否是代下单(0:否,1:是)" underline="true"/> |
| | | <#input id="passengers" name="乘车人" underline="true"/> |
| | | <#input id="passengersPhone" name="乘车人电话" underline="true"/> |
| | | <#input id="state" name="状态(1=待接单,2=待出发,3=待到达预约地点,4=待乘客上车,5=服务中,6=完成服务,7=待支付,8=待评价,9=已完成,10=已取消,11=改派中,12=取消待支付)" underline="true"/> |
| | | <#input id="insertTime" name="下单时间" underline="true"/> |
| | | <#input id="travelTime" name="出行时间" underline="true"/> |
| | | <#input id="snatchOrderTime" name="抢单时间" underline="true"/> |
| | | <#input id="setOutTime" name="司机点出发时间" underline="true"/> |
| | | <#input id="arriveTime" name="司机到达预约地点时间" underline="true"/> |
| | | <#input id="startServiceTime" name="开始服务时间" underline="true"/> |
| | | <#input id="endServiceTime" name="结束服务时间" underline="true"/> |
| | | <#input id="orderType" name="订单类型(1=普通,2=预约)" underline="true"/> |
| | | <#input id="orderSource" name="下单方式(1:APP下单,2:扫码下单,3:小程序下单,4:司机下单,5:调度下单)" underline="true"/> |
| | | <#input id="invoiceId" name="发票id" underline="true"/> |
| | | <#input id="isReassign" name="是否是改派单(1=否,2=是)" underline="true"/> |
| | | <#input id="reassignNotice" name="改派通知(0=没有改派,1=改派中,2=已改派)" underline="true"/> |
| | | <#input id="trackId" name="高德猎鹰上的轨迹id" underline="true"/> |
| | | <#input id="isDelete" name="是否删除 1=否 2=是" underline="true"/> |
| | | <#input id="oldState" name="状态(改派前订单状态)" underline="true"/> |
| | | <#input id="telX" name="移动小号" underline="true"/> |
| | | <#input id="bindId" name="移动小号绑定关系id" underline="true"/> |
| | | <#input id="serverCarModelId" name="接送机车型ID 关联t_server_carmodel表" 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="TOrderTransferInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TOrderTransferInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrderTransfer/tOrderTransfer_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style type="text/css"> |
| | | html, body, #container { |
| | | height: 100%; |
| | | width: 100%; |
| | | } |
| | | |
| | | .input-card .btn{ |
| | | margin-right: 1.2rem; |
| | | width: 9rem; |
| | | } |
| | | |
| | | .input-card .btn:last-child{ |
| | | margin-right: 0; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <input type="hidden" id="id" name="id" value="${item.id}"> |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-4"> |
| | | <h2 class="h3Class" style="font-weight: 700;">订单详情</h2> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#label id="insertTimeStr" name="下单时间" value="${item.insertTimeStr}"/> |
| | | <#label id="orderSourceStr" name="订单来源" value="${item.orderSourceStr}"/> |
| | | <#label id="userName" name="下单用户昵称" value="${item.userName}"/> |
| | | <#label id="passengers" name="乘车用户昵称" value="${item.passengers}"/> |
| | | <#label id="placementAddress" name="起点" value="${item.startAddress}"/> |
| | | <#label id="serverCarModel" name="选择车型" value="${item.serverCarModel}"/> |
| | | <#label id="car" name="接单车辆" value="${item.car}"/> |
| | | <#label id="boardingAddress" name="上车地点" value="${item.boardingAddress}"/> |
| | | <#label id="getoffAddress" name="下车地点" value="${item.getoffAddress}"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#label id="orderNum" name="订单编号" value="${item.orderNum}"/> |
| | | <#label id="travelTimeStr" name="乘车时间" value="${item.travelTimeStr}"/> |
| | | <#label id="userPhone" name="下单用户手机号" value="${item.userPhone}"/> |
| | | <#label id="passengersPhone" name="乘车用户手机号" value="${item.passengersPhone}"/> |
| | | <#label id="endAddress" name="终点" value="${item.endAddress}"/> |
| | | <#label id="driver" name="接单司机" value="${item.driver}"/> |
| | | <#label id="companyName" name="车辆所属机构" value="${item.companyName}"/> |
| | | <#label id="boardingTimeStr" name="上车时间" value="${item.boardingTimeStr}"/> |
| | | <#label id="getoffTimeStr" name="下车时间" value="${item.getoffTimeStr}"/> |
| | | </div> |
| | | </div> |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-4"> |
| | | <h2 class="h3Class" style="font-weight: 700;">费用明细</h2> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | @if(isNotEmpty(item.orderMoney) && item.orderMoney > 0){ |
| | | <div class="col-sm-6 b-r"> |
| | | <#label id="orderMoney" name="订单总价" value="${item.orderMoney}元"/> |
| | | <#label id="travelMoney" name="行程费" value="${item.travelMoney}元"/> |
| | | <#label id="parkMoney" name="停车费" value="${item.parkMoney}元"/> |
| | | <#label id="roadTollMoney" name="过路费" value="${item.roadTollMoney}元"/> |
| | | <#label id="tipMoney" name="小费" value="${item.tipMoney}元"/> |
| | | |
| | | @if(isNotEmpty(item.payMoney)){ |
| | | <#label id="payMoney" name="实际支付费用" value="${item.payMoney}元"/> |
| | | @}else{ |
| | | <#label id="payMoney" name="实际支付费用" value="0.00元"/> |
| | | @} |
| | | |
| | | <#label id="payTypeStr" name="支付方式" value="${item.payTypeStr}"/> |
| | | <#label id="couponMoney" name="优惠券抵扣费用" value="${item.couponMoney}元"/> |
| | | <#label id="redPacketMoney" name="红包抵扣金额" value="${item.redPacketMoney}元"/> |
| | | </div> |
| | | <div class="col-sm-6"> |
| | | <#label id="platIncome" name="平台收益" value="${item.platIncome}元"/> |
| | | <#label id="companyIncome" name="分公司收益" value="${item.companyIncome}元"/> |
| | | <#label id="franchiseeIncome" name="加盟商收益" value="${item.franchiseeIncome}元"/> |
| | | <#label id="driverIncome" name="司机收益" value="${item.driverIncome}元"/> |
| | | </div> |
| | | @}else{ |
| | | <h4 style="margin-left: 10%">暂无费用明细</h4> |
| | | @} |
| | | </div> |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-4"> |
| | | <h2 class="h3Class" style="font-weight: 700;">线路轨迹</h2> |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | | <div class="col-sm-10"> |
| | | <div class="form-horizontal" id="container" style="margin-left: 50px;width: 100%; height: 500px;"></div> |
| | | <div class="input-card" style="margin-left: 50px;"> |
| | | <h4>轨迹回放控制</h4> |
| | | <div class="input-item"> |
| | | <input type="button" class="btn" value="开始动画" id="start" onclick="startAnimation()"/> |
| | | <input type="button" class="btn" value="暂停动画" id="pause" onclick="pauseAnimation()"/> |
| | | <input type="button" class="btn" value="继续动画" id="resume" onclick="resumeAnimation()"/> |
| | | <input type="button" class="btn" value="停止动画" id="stop" onclick="stopAnimation()"/> |
| | | </div> |
| | | <div class="input-item"> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-1"> |
| | | <h2 class="h3Class" style="font-weight: 700;">行程录音</h2> |
| | | </div> |
| | | <div class="col-sm-10"> |
| | | <audio id="audio" src="http://www.w3capi.com/upload/audio/audio_example.mp3" controls muted data-enabled="false"> |
| | | <!-- <source src="${item.routeRecord}" type="audio/mpeg">--> |
| | | </audio> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script> |
| | | <script src="https://webapi.amap.com/maps?v=1.4.8&key=e17d799b2506d05faf7f88320a266803"></script> |
| | | <script src="https://cache.amap.com/lbs/static/addToolbar.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tOrderTransfer/tOrderTransfer_info.js"></script> |
| | | <script> |
| | | $(function (){ |
| | | var myAudio = document.getElementById('audio'); |
| | | console.log(myAudio.dataset.enabled); |
| | | if (myAudio.dataset.enabled === 'false') { |
| | | console.log('audio is disabled'); |
| | | myAudio.pause(); |
| | | } |
| | | }) |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style type="text/css"> |
| | | html, body, #container { |
| | | height: 100%; |
| | | width: 100%; |
| | | } |
| | | |
| | | .input-card .btn{ |
| | | margin-right: 1.2rem; |
| | | width: 9rem; |
| | | } |
| | | |
| | | .input-card .btn:last-child{ |
| | | margin-right: 0; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | <input type="hidden" id="id" name="id" value="${tOrderTransferId}"> |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-4"> |
| | | <h2 class="h3Class" style="font-weight: 700;">线路轨迹</h2> |
| | | </div> |
| | | </div> |
| | | <div class="row" style="margin-top: 30px;"> |
| | | <div class="col-sm-10"> |
| | | <div class="form-horizontal" id="container" style="margin-left: 50px;width: 100%; height: 500px;"></div> |
| | | <div class="input-card" style="margin-left: 50px;"> |
| | | <h4>轨迹回放控制</h4> |
| | | <div class="input-item"> |
| | | <input type="button" class="btn" value="开始动画" id="start" onclick="startAnimation()"/> |
| | | <input type="button" class="btn" value="暂停动画" id="pause" onclick="pauseAnimation()"/> |
| | | <input type="button" class="btn" value="继续动画" id="resume" onclick="resumeAnimation()"/> |
| | | <input type="button" class="btn" value="停止动画" id="stop" onclick="stopAnimation()"/> |
| | | </div> |
| | | <div class="input-item"> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script> |
| | | <script src="https://webapi.amap.com/maps?v=1.4.8&key=e17d799b2506d05faf7f88320a266803"></script> |
| | | <script src="https://cache.amap.com/lbs/static/addToolbar.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tOrderTransfer/tOrderTransfer_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>接送机车型设置管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="车型名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">正常</option> |
| | | <option value="2">禁用</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="Transfer.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="Transfer.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TransferTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tServerCarmodel/addTransfer")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="Transfer.openAddTransfer()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tServerCarmodel/updateTransfer")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="Transfer.updateTOrderEvaluateDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tServerCarmodel/noTransfer")){ |
| | | <#button name="禁用" icon="fa-edit" clickFun="Transfer.no()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tServerCarmodel/yesTransfer")){ |
| | | <#button name="启用" icon="fa-remove" clickFun="Transfer.yes()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TransferTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tServerCarmodel/transfer.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="transferInfoForm"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-11"> |
| | | <#input id="name" name="车型名称"/> |
| | | <#avatar id="img" name="车型图片:" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TransferInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TransferInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tServerCarmodel/transfer_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="serverCarModelInfoForm"> |
| | | <input type="hidden" id="id" value="${data.id}"> |
| | | <div class="row"> |
| | | <div class="col-sm-11"> |
| | | <#input id="name" name="车型名称" value="${data.name}"/> |
| | | <#avatar id="img" name="车型图片:" avatarImg="${data.img}"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TransferInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TransferInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tServerCarmodel/transfer_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .newWidth, .single-line{ |
| | | max-width:150px !important;display: initial !important; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="transferPriceInfoForm"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-11"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">选择车型:</label> |
| | | <div class="col-sm-10"> |
| | | <select class="form-control" id="serverCarModelId" name="serverCarModelId" style="width: 200px;"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in modelList!){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">运价类型说明:</label> |
| | | <div class="col-sm-10"> |
| | | <textarea class="form-control" id="fareTypeNote" name="fareTypeNote" style="height: 100px;"></textarea> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">起步价设置:</label> |
| | | <div class="col-sm-10"> |
| | | 起步价为 <input type="text" oninput="checkIsYuan(this)" name="num1" id="num1" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 起步包含 <input type="text" oninput="checkIsGongLi(this)" name="num2" id="num2" class="form-control newWidth" placeholder="最多3位数"/> 公里, |
| | | <input type="text" oninput="checkIsMinute(this)" name="num3" id="num3" class="form-control newWidth" placeholder="最多3位数"/> 分钟 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">里程费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 超过起步里程后每公里 <input type="text" oninput="checkIsYuan(this)" name="num4" id="num4" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">时长费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 超过起步时长后每分钟 <input type="text" oninput="checkIsYuan(this)" name="num5" id="num5" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">等待费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 司机到达预约地点 <input type="text" oninput="checkIsMinute(this)" name="num6" id="num6" class="form-control newWidth" placeholder="最多3位数"/> 分钟过后开始收取等待费, |
| | | 为 <input type="text" oninput="checkIsYuan(this)" name="num7" id="num7" class="form-control newWidth" placeholder="最多3位数"/> 元/分,不足一分钟按照一分钟计算 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">远途费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 总里程超过 <input type="text" oninput="checkIsGongLi(this)" name="num8" id="num8" class="form-control newWidth" placeholder="最多3位数"/> 公里 |
| | | 不足 <input type="text" oninput="checkIsGongLi(this)" name="num9" id="num9" class="form-control newWidth" placeholder="最多3位数"/> 公里, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num10" id="num10" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 超过 <input type="text" disabled oninput="checkIsGongLi(this)" name="num11" id="num11" class="form-control newWidth" placeholder="最多3位数"/> 公里 |
| | | 不足 <input type="text" oninput="checkIsGongLi(this)" name="num12" id="num12" class="form-control newWidth" placeholder="最多3位数"/> 公里时, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num13" id="num13" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | <br> |
| | | 超过 <input type="text" disabled oninput="checkIsGongLi(this)" name="num14" id="num14" class="form-control newWidth" placeholder="最多3位数"/> 公里以后, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num15" id="num15" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">夜间行驶费用设置:</label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" name="num16" id="num16" class="form-control newWidth" placeholder="选择时间"/> 点为夜间行驶时间, |
| | | 起步价变为 <input type="text" oninput="checkIsYuan(this)" name="num17" id="num17" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 里程费为每公里 <input type="text" oninput="checkIsYuan(this)" name="num18" id="num18" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 时长费为每分钟 <input type="text" oninput="checkIsYuan(this)" name="num19" id="num19" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 远途费为每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num20" id="num20" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num21" id="num21" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num22" id="num22" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">高峰期费用设置:</label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" name="num23" id="num23" class="form-control newWidth" placeholder="选择时间段"/> |
| | | 和 <input type="text" name="num24" id="num24" class="form-control newWidth" placeholder="选择时间段"/> 为高峰期行车时间, |
| | | 起步价变为 <input type="text" oninput="checkIsYuan(this)" name="num25" id="num25" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 里程费为每公里 <input type="text" oninput="checkIsYuan(this)" name="num26" id="num26" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 时长费为每分钟 <input type="text" oninput="checkIsYuan(this)" name="num27" id="num27" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 远途费为每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num28" id="num28" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num29" id="num29" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num30" id="num30" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TransferInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TransferInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemPrice/transfer_info.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#num16' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#num23' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#num24' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | |
| | | var regDouble = /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/; |
| | | var regInt = /^[0-9]{0,3}$/; |
| | | function checkIsYuan(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regDouble.test(num)){ |
| | | layer.msg("【元】输入框不能超过3位数,保留两位小数"); |
| | | } |
| | | } |
| | | function checkIsGongLi(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regDouble.test(num)){ |
| | | layer.msg("【公里】输入框不能超过3位数,保留两位小数"); |
| | | } |
| | | if (obj.id == "num9"){ |
| | | $("#num11").val(num); |
| | | }else if (obj.id == "num12"){ |
| | | $("#num14").val(num); |
| | | } |
| | | } |
| | | function checkIsMinute(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regInt.test(num)){ |
| | | layer.msg("【分钟】输入框不能超过3位数"); |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <style> |
| | | .newWidth, .single-line{ |
| | | max-width:150px !important;display: initial !important; |
| | | } |
| | | </style> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="transferPriceInfoForm"> |
| | | <label style="display: none;" id="id">${item.id}</label> |
| | | <div class="row"> |
| | | <div class="col-sm-111"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">选择车型:</label> |
| | | <div class="col-sm-10"> |
| | | <select class="form-control" id="serverCarModelId" name="serverCarModelId" style="width: 200px;"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in modelList!){ |
| | | <option value="${obj.id}" ${obj.id == item.serverCarModelId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">运价类型说明:</label> |
| | | <div class="col-sm-10"> |
| | | <textarea class="form-control" id="fareTypeNote" name="fareTypeNote" style="height: 100px;">${item.fareTypeNote}</textarea> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">起步价设置:</label> |
| | | <div class="col-sm-10"> |
| | | 起步价为 <input type="text" oninput="checkIsYuan(this)" name="num1" id="num1" value="${json.num1}" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 起步包含 <input type="text" oninput="checkIsGongLi(this)" name="num2" id="num2" value="${json.num2}" class="form-control newWidth" placeholder="最多3位数"/> 公里, |
| | | <input type="text" oninput="checkIsMinute(this)" name="num3" id="num3" value="${json.num3}" class="form-control newWidth" placeholder="最多3位数"/> 分钟 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">里程费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 超过起步里程后每公里 <input type="text" oninput="checkIsYuan(this)" name="num4" id="num4" value="${json.num4}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">时长费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 超过起步时长后每分钟 <input type="text" oninput="checkIsYuan(this)" name="num5" id="num5" value="${json.num5}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">等待费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 司机到达预约地点 <input type="text" oninput="checkIsMinute(this)" name="num6" id="num6" value="${json.num6}" class="form-control newWidth" placeholder="最多3位数"/> 分钟过后开始收取等待费, |
| | | 为 <input type="text" oninput="checkIsYuan(this)" name="num7" id="num7" value="${json.num7}" class="form-control newWidth" placeholder="最多3位数"/> 元/分,不足一分钟按照一分钟计算 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">远途费设置:</label> |
| | | <div class="col-sm-10"> |
| | | 总里程超过 <input type="text" oninput="checkIsGongLi(this)" name="num8" id="num8" value="${json.num8}" class="form-control newWidth" placeholder="最多3位数"/> 公里 |
| | | 不足 <input type="text" oninput="checkIsGongLi(this)" name="num9" id="num9" value="${json.num9}" class="form-control newWidth" placeholder="最多3位数"/> 公里, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num10" id="num10" value="${json.num10}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 超过 <input type="text" disabled oninput="checkIsGongLi(this)" name="num11" id="num11" value="${json.num11}" class="form-control newWidth" placeholder="最多3位数"/> 公里 |
| | | 不足 <input type="text" oninput="checkIsGongLi(this)" name="num12" id="num12" value="${json.num12}" class="form-control newWidth" placeholder="最多3位数"/> 公里时, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num13" value="${json.num13}" id="num13" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | <br> |
| | | 超过 <input type="text" disabled oninput="checkIsGongLi(this)" name="num14" id="num14" value="${json.num14}" class="form-control newWidth" placeholder="最多3位数"/> 公里以后, |
| | | 超出部分每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num15" id="num15" value="${json.num15}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">夜间行驶费用设置:</label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" name="num16" id="num16" value="${json.num16}" class="form-control newWidth" placeholder="选择时间"/> 点为夜间行驶时间, |
| | | 起步价变为 <input type="text" oninput="checkIsYuan(this)" name="num17" id="num17" value="${json.num17}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 里程费为每公里 <input type="text" oninput="checkIsYuan(this)" name="num18" id="num18" value="${json.num18}" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 时长费为每分钟 <input type="text" oninput="checkIsYuan(this)" name="num19" id="num19" value="${json.num19}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 远途费为每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num20" id="num20" value="${json.num20}" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num21" id="num21" value="${json.num21}" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num22" id="num22" value="${json.num22}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">高峰期费用设置:</label> |
| | | <div class="col-sm-10"> |
| | | <input type="text" name="num23" id="num23" value="${json.num23}" class="form-control newWidth" placeholder="选择时间段"/> |
| | | 和 <input type="text" name="num24" id="num24" value="${json.num24}" class="form-control newWidth" placeholder="选择时间段"/> 为高峰期行车时间, |
| | | 起步价变为 <input type="text" oninput="checkIsYuan(this)" name="num25" id="num25" value="${json.num25}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 里程费为每公里 <input type="text" oninput="checkIsYuan(this)" name="num26" id="num26" value="${json.num26}" class="form-control newWidth" placeholder="最多3位数"/> 元, |
| | | 时长费为每分钟 <input type="text" oninput="checkIsYuan(this)" name="num27" id="num27" value="${json.num27}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br> |
| | | <br> |
| | | 远途费为每公里加收 <input type="text" oninput="checkIsYuan(this)" name="num28" id="num28" value="${json.num28}" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num29" id="num29" value="${json.num29}" class="form-control newWidth" placeholder="最多3位数"/> |
| | | 、 <input type="text" oninput="checkIsYuan(this)" name="num30" id="num30" value="${json.num30}" class="form-control newWidth" placeholder="最多3位数"/> 元 |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TransferInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TransferInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemPrice/transfer_info.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#num16' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#num23' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | laydate.render({ |
| | | elem: '#num24' |
| | | ,type: 'time' |
| | | ,range: '-' |
| | | ,format: 'HH:mm' |
| | | }); |
| | | |
| | | var regDouble = /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/; |
| | | var regInt = /^[0-9]{0,3}$/; |
| | | function checkIsYuan(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regDouble.test(num)){ |
| | | layer.msg("【元】输入框不能超过3位数,保留两位小数"); |
| | | } |
| | | } |
| | | function checkIsGongLi(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regDouble.test(num)){ |
| | | layer.msg("【公里】输入框不能超过3位数,保留两位小数"); |
| | | } |
| | | if (obj.id == "num9"){ |
| | | $("#num11").val(num); |
| | | }else if (obj.id == "num12"){ |
| | | $("#num14").val(num); |
| | | } |
| | | } |
| | | function checkIsMinute(obj){ |
| | | var num = $(obj).val(); |
| | | if(!regInt.test(num)){ |
| | | layer.msg("【分钟】输入框不能超过3位数"); |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>接送机价格设置管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="车型名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">正常</option> |
| | | <option value="2">冻结</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="Transfer.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="Transfer.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TSystemPriceTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tSystemPrice/addTransfer")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="Transfer.addTransfer()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tSystemPrice/updateTransfer")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="Transfer.updateTransfer()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tSystemPrice/deleteTransfer")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="Transfer.deleteTransfer()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tSystemPrice/freezeTransfer")){ |
| | | <#button name="冻结" icon="fa-remove" clickFun="Transfer.freezeTransfer()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tSystemPrice/thawTransfer")){ |
| | | <#button name="解冻" icon="fa-remove" clickFun="Transfer.thawTransfer()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TransferTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tSystemPrice/transfer.js"></script> |
| | | @} |
New file |
| | |
| | | /** |
| | | * 人脸识别记录管理初始化 |
| | | */ |
| | | var TDriverFacialFail = { |
| | | id: "TDriverFacialFailTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TDriverFacialFail.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: false}, |
| | | {title: '主键id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '异常记录时间', field: 'createTime', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.createTime != '' && row.createTime != null) { |
| | | var time = row.createTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.createTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '司机姓名', field: 'driverName', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.driverName != '' && row.driverName != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.driverName + '" onfocus="TUser.tooltip()">' + row.driverName + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '手机号', field: 'driverPhone', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.driverPhone != '' && row.driverPhone != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.driverPhone + '" onfocus="TUser.tooltip()">' + row.driverPhone + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '所属城市', field: 'city', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.city != '' && row.city != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.city + '" onfocus="TUser.tooltip()">' + row.city + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '识别结果', field: 'city', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | var btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.carNum + '" onfocus="TUser.tooltip()">人脸认证失败</p>']; |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:'16%', |
| | | formatter: function (value, row) { |
| | | return '<a href="#" onclick="TDriverFacialFail.openTDriverFacialFailDetail('+row.id+')" style="color:cornflowerblue">详情</a>' +' ' + |
| | | '<a href="#" onclick="TDriverFacialFail.delete('+row.id+')" style="color:cornflowerblue">删除</a>' +' ' + |
| | | '<a href="#" onclick="TDriverFacialFail.unsealing('+row.id+')" style="color:cornflowerblue">解封</a>' |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TDriverFacialFail.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TDriverFacialFail.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看人脸识别记录详情 |
| | | */ |
| | | TDriverFacialFail.openTDriverFacialFailDetail = function (tDriverFacialFailId) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '异常记录详情', |
| | | area: ['70%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tDriverFacialFail/tDriverFacialFail_update/' + tDriverFacialFailId |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除人脸识别记录 |
| | | */ |
| | | TDriverFacialFail.delete = function (id, nickname) { |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该记录"; |
| | | }else{ |
| | | nickname = "【"+nickname+"】"; |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除"+ nickname + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "删除", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverFacialFail/delete", function (data) { |
| | | swal("删除成功", "您已经删除了" + nickname + "。", "success"); |
| | | TDriverFacialFail.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tDriverFacialFailId", id); |
| | | ajax.start(); |
| | | }); |
| | | }; |
| | | |
| | | /** |
| | | * 批量删除人脸识别记录 |
| | | */ |
| | | TDriverFacialFail.deleteBatch = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | var ids = ''; |
| | | if (selected.length > 0) { |
| | | for (var i = 0; i < selected.length; i++) { |
| | | ids += selected[i]['id'] + ","; |
| | | } |
| | | ids = ids.substring(0, ids.length - 1); |
| | | } |
| | | console.log(ids); |
| | | if(this.check()){ |
| | | var nickname = TDriverFacialFail.seItem.name; |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该记录"; |
| | | }else{ |
| | | nickname = "【"+nickname+"】"; |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除"+ nickname + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "删除", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverFacialFail/deleteBatch", function (data) { |
| | | swal("删除成功", "您已经删除了" + nickname + "。", "success"); |
| | | TDriverFacialFail.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tDriverFacialFailIds", ids); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 解封司机人脸认证 |
| | | */ |
| | | TDriverFacialFail.unsealing = function (id,nickname) { |
| | | if (nickname == "" || nickname == null || nickname == undefined){ |
| | | nickname = "该记录"; |
| | | }else{ |
| | | nickname = "【"+nickname+"】"; |
| | | } |
| | | swal({ |
| | | title: "您是否确认解封"+ nickname + "?", |
| | | text: "操作解封后,司机该轮人脸认证即可通过,可继续接单是否确认解封!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "解封", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverFacialFail/unsealing", function (data) { |
| | | swal("操作成功", "您已经解封了" + nickname + "。", "success"); |
| | | TDriverFacialFail.table.refresh(); |
| | | }, function (data) { |
| | | swal("操作失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tDriverFacialFailId", id); |
| | | ajax.start(); |
| | | }); |
| | | }; |
| | | |
| | | /** |
| | | * 查询人脸识别记录列表 |
| | | */ |
| | | TDriverFacialFail.search = function () { |
| | | var queryData = {}; |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | TDriverFacialFail.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TDriverFacialFail.resetSearch = function () { |
| | | $("#createTime").val(""); |
| | | $("#name").val(""); |
| | | $("#phone").val(""); |
| | | TDriverFacialFail.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TDriverFacialFail.initColumn(); |
| | | var table = new BSTable(TDriverFacialFail.id, "/tDriverFacialFail/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TDriverFacialFail.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化车辆类型管理详情对话框 |
| | | */ |
| | | var TDriverFacialFailInfoDlg = { |
| | | tDriverFacialFailInfoData : {}, |
| | | validateFields: { |
| | | name: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '类型名称不能为空' |
| | | } |
| | | } |
| | | }, |
| | | seat: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '座位数不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[1-9]\d*$/, |
| | | message: '座位数不正确' |
| | | } |
| | | } |
| | | }, |
| | | brandId: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请选择所属车辆品牌' |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TDriverFacialFailInfoDlg.validate = function () { |
| | | $('#driverFacialFailInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#driverFacialFailInfoForm').bootstrapValidator('validate'); |
| | | return $("#driverFacialFailInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TDriverFacialFailInfoDlg.clearData = function() { |
| | | this.tDriverFacialFailInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TDriverFacialFailInfoDlg.set = function(key, val) { |
| | | this.tDriverFacialFailInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TDriverFacialFailInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TDriverFacialFailInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TDriverFacialFail.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TDriverFacialFailInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('name') |
| | | .set('remark') |
| | | .set('createTime') |
| | | .set('state') |
| | | .set('seat') |
| | | .set('brandId'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TDriverFacialFailInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverFacialFail/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TDriverFacialFail.table.refresh(); |
| | | TDriverFacialFailInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tDriverFacialFailInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TDriverFacialFailInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tDriverFacialFail/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TDriverFacialFail.table.refresh(); |
| | | TDriverFacialFailInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tDriverFacialFailInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("DriverFacialFailInfoForm", TDriverFacialFailInfoDlg.validateFields); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 接送机订单管理初始化 |
| | | */ |
| | | var TOrderTransfer = { |
| | | id: "TOrderTransferTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TOrderTransfer.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '下单时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'8%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.insertTime != '' && row.insertTime != null) { |
| | | var time = row.insertTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insertTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '订单编号', field: 'orderNum', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.orderNum != '' && row.orderNum != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.orderNum + '" onfocus="TUser.tooltip()">' + row.orderNum + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '订单来源', field: 'orderSource', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.orderSource != '' && row.orderSource != null) { |
| | | if (row.orderSource == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="APP下单" onfocus="TUser.tooltip()">APP下单</p>'] |
| | | } else if (row.orderSource == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="扫码下单" onfocus="TUser.tooltip()">扫码下单</p>'] |
| | | } else if (row.orderSource == 3){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="小程序下单" onfocus="TUser.tooltip()">小程序下单</p>'] |
| | | } else if (row.orderSource == 4){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="司机下单" onfocus="TUser.tooltip()">司机下单</p>'] |
| | | } else if (row.orderSource == 5){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="调度下单" onfocus="TUser.tooltip()">调度下单</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '乘车时间', field: 'travelTime', visible: true, align: 'center', valign: 'middle',width:'10%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.travelTime != '' && row.travelTime != null) { |
| | | var time = row.travelTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.travelTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '下单用<br/>户昵称', field: 'userName', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.userName != '' && row.userName != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userName + '" onfocus="TUser.tooltip()">' + row.userName + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '下单用<br/>户手机', field: 'userPhone', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.userPhone != '' && row.userPhone != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userPhone + '" onfocus="TUser.tooltip()">' + row.userPhone + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '乘车用<br/>户姓名', field: 'passengers', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.passengers != '' && row.passengers != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.passengers + '" onfocus="TUser.tooltip()">' + row.passengers + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '乘车用<br/>户手机', field: 'passengersPhone', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.passengersPhone != '' && row.passengersPhone != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.passengersPhone + '" onfocus="TUser.tooltip()">' + row.passengersPhone + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '起点', field: 'startAddress', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.startAddress != '' && row.startAddress != null) { |
| | | var str = row.startAddress; |
| | | var str1 = ""; |
| | | var arr = ""; |
| | | for(var i=0,len=str.length/15;i<len;i++) { |
| | | str1 = str.substr(0,15); |
| | | str = str.replace(str1,''); |
| | | arr += str1 + "<br>"; |
| | | } |
| | | arr = arr.substring(0,arr.length-4); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.startAddress + '" onfocus="TUser.tooltip()">' + arr + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '终点', field: 'endAddress', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.endAddress != '' && row.endAddress != null) { |
| | | var str = row.endAddress; |
| | | var str1 = ""; |
| | | var arr = ""; |
| | | for(var i=0,len=str.length/15;i<len;i++) { |
| | | str1 = str.substr(0,15); |
| | | str = str.replace(str1,''); |
| | | arr += str1 + "<br>"; |
| | | } |
| | | arr = arr.substring(0,arr.length-4); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.endAddress + '" onfocus="TUser.tooltip()">' + arr + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '选择车型', field: 'serverCarModel', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.serverCarModel != '' && row.serverCarModel != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.serverCarModel + '" onfocus="TUser.tooltip()">' + row.serverCarModel + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '接单司机', field: 'driver', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.driver != '' && row.driver != null) { |
| | | var driverName1 = row.driver.replace("-","<br>"); |
| | | var driverName2 = row.driver.replace("-"," "); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + driverName2 + '" onfocus="TUser.tooltip()">' + driverName1 + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '接单车辆', field: 'car', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.car != '' && row.car != null) { |
| | | var car1 = row.car.replace("-","<br>"); |
| | | var car2 = row.car.replace("-"," "); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + car2 + '" onfocus="TUser.tooltip()">' + car1 + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '订单金额', field: 'orderMoney', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.orderMoney != '' && row.orderMoney != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.orderMoney + '" onfocus="TUser.tooltip()">' + row.orderMoney + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.state != '' && row.state != null) { |
| | | if (row.state == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待接单" onfocus="TUser.tooltip()">待接单</p>'] |
| | | } else if (row.state == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待出发" onfocus="TUser.tooltip()">待出发</p>'] |
| | | } else if (row.state == 3){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待到达预约地点" onfocus="TUser.tooltip()">待到达预约地点</p>'] |
| | | } else if (row.state == 4){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待乘客上车" onfocus="TUser.tooltip()">待乘客上车</p>'] |
| | | } else if (row.state == 5){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="服务中" onfocus="TUser.tooltip()">服务中</p>'] |
| | | } else if (row.state == 6){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="完成服务" onfocus="TUser.tooltip()">完成服务</p>'] |
| | | } else if (row.state == 7){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待支付" onfocus="TUser.tooltip()">待支付</p>'] |
| | | } else if (row.state == 8){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待评价" onfocus="TUser.tooltip()">待评价</p>'] |
| | | } else if (row.state == 9){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已完成" onfocus="TUser.tooltip()">已完成</p>'] |
| | | } else if (row.state == 10){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已取消" onfocus="TUser.tooltip()">已取消</p>'] |
| | | } else if (row.state == 11){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="改派中" onfocus="TUser.tooltip()">改派中</p>'] |
| | | } else if (row.state == 12){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="取消待支付" onfocus="TUser.tooltip()">取消待支付</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TOrderTransfer.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TOrderTransfer.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看接送机订单详情 |
| | | */ |
| | | TOrderTransfer.orderDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '接送机订单详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderTransfer/tOrderTransfer_orderDetail/' + TOrderTransfer.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 取消订单 |
| | | */ |
| | | TOrderTransfer.cancelOrder = function(){ |
| | | if (this.check()) { |
| | | var nickname = TOrderTransfer.seItem.orderNum; |
| | | if (nickname == "" || nickname == null || nickname == undefined) { |
| | | nickname = "该订单"; |
| | | } else { |
| | | nickname = "【" + nickname + "】"; |
| | | } |
| | | if (TOrderTransfer.seItem.state == 7 || TOrderTransfer.seItem.state == 8 || TOrderTransfer.seItem.state == 9 || TOrderTransfer.seItem.state == 10 ) { |
| | | swal("取消失败", "【待评价】【已完成】【已取消】状态下不能执行此操作", "warning"); |
| | | return; |
| | | } |
| | | swal({ |
| | | title: "您是否确认取消订单" + nickname + "?", |
| | | text: "请谨慎操作,取消后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "取消订单", |
| | | closeOnConfirm: false |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderTransfer/cancel", function (data) { |
| | | layer.msg("加载中...",{ |
| | | icon:16, |
| | | time:-1 |
| | | }); |
| | | swal("取消订单成功", "您已经成功取消了" + nickname + "。", "success"); |
| | | TOrderTransfer.table.refresh(); |
| | | layer.closeAll() |
| | | }, function (data) { |
| | | swal("取消订单失败", data.responseJSON.message + "!", "warning"); |
| | | layer.closeAll() |
| | | }); |
| | | ajax.set("tOrderTransferId", TOrderTransfer.seItem.id); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 订单轨迹 |
| | | */ |
| | | TOrderTransfer.trajectory = function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '接送机订单轨迹', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrderTransfer/tOrderTransfer_trajectory/' + TOrderTransfer.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除接送机订单 |
| | | */ |
| | | TOrderTransfer.deleteOrder = function () { |
| | | if (this.check()) { |
| | | var orderNum = TOrderTransfer.seItem.orderNum; |
| | | if (orderNum == "" || orderNum == null || orderNum == undefined) { |
| | | orderNum = "该订单"; |
| | | } else { |
| | | orderNum = "【" + orderNum + "】"; |
| | | } |
| | | if (TOrderTransfer.seItem.state != 10) { |
| | | swal("删除失败", "【已取消】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除" + orderNum + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "删除", |
| | | closeOnConfirm: false |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderTransfer/delete", function (data) { |
| | | swal("删除成功", "您已经删除了" + orderNum + "。", "success"); |
| | | TOrderTransfer.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tOrderTransferId", TOrderTransfer.seItem.id); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询接送机订单列表 |
| | | */ |
| | | TOrderTransfer.search = function () { |
| | | var queryData = {}; |
| | | queryData['insertTime'] = $("#insertTime").val(); |
| | | queryData['orderNum'] = $("#orderNum").val(); |
| | | queryData['orderSource'] = $("#orderSource").val(); |
| | | queryData['userName'] = $("#userName").val(); |
| | | queryData['userPhone'] = $("#userPhone").val(); |
| | | queryData['passengers'] = $("#passengers").val(); |
| | | queryData['passengersPhone'] = $("#passengersPhone").val(); |
| | | queryData['serverCarModelId'] = $("#serverCarModelId").val(); |
| | | queryData['driver'] = $("#driver").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | TOrderTransfer.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | TOrderTransfer.resetSearch = function () { |
| | | $("#insertTime").val(""); |
| | | $("#orderNum").val(""); |
| | | $("#orderSource").val(""); |
| | | $("#userName").val(""); |
| | | $("#userPhone").val(""); |
| | | $("#passengers").val(""); |
| | | $("#passengersPhone").val(""); |
| | | $("#serverCarModelId").val(""); |
| | | $("#driver").val(""); |
| | | $("#state").val(""); |
| | | TOrderTransfer.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TOrderTransfer.initColumn(); |
| | | var table = new BSTable(TOrderTransfer.id, "/tOrderTransfer/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | TOrderTransfer.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化专车订单详情对话框 |
| | | */ |
| | | var TOrderTransferInfoDlg = { |
| | | tOrderTransferInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TOrderTransferInfoDlg.clearData = function() { |
| | | this.tOrderTransferInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TOrderTransferInfoDlg.set = function(key, val) { |
| | | this.tOrderTransferInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TOrderTransferInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TOrderTransferInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TOrderTransfer.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TOrderTransferInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('type') |
| | | .set('userId') |
| | | .set('driverId') |
| | | .set('carId') |
| | | .set('orderNum') |
| | | .set('placementLon') |
| | | .set('placementLat') |
| | | .set('placementAddress') |
| | | .set('startLon') |
| | | .set('startLat') |
| | | .set('endLon') |
| | | .set('startAddress') |
| | | .set('endLat') |
| | | .set('endAddress') |
| | | .set('boardingLon') |
| | | .set('boardingLat') |
| | | .set('boardingAddress') |
| | | .set('boardingTime') |
| | | .set('getoffLon') |
| | | .set('getoffLat') |
| | | .set('getoffAddress') |
| | | .set('getoffTime') |
| | | .set('mileage') |
| | | .set('payManner') |
| | | .set('payType') |
| | | .set('orderMoney') |
| | | .set('startMoney') |
| | | .set('mileageMoney') |
| | | .set('durationMoney') |
| | | .set('longDistanceMoney') |
| | | .set('parkMoney') |
| | | .set('roadTollMoney') |
| | | .set('redPacketMoney') |
| | | .set('couponMoney') |
| | | .set('redPacketId') |
| | | .set('couponId') |
| | | .set('discount') |
| | | .set('discountMoney') |
| | | .set('activityId') |
| | | .set('companyId') |
| | | .set('payMoney') |
| | | .set('substitute') |
| | | .set('passengers') |
| | | .set('passengersPhone') |
| | | .set('state') |
| | | .set('insertTime') |
| | | .set('travelTime') |
| | | .set('snatchOrderTime') |
| | | .set('setOutTime') |
| | | .set('arriveTime') |
| | | .set('startServiceTime') |
| | | .set('endServiceTime') |
| | | .set('orderType') |
| | | .set('orderSource') |
| | | .set('invoiceId') |
| | | .set('isReassign') |
| | | .set('reassignNotice') |
| | | .set('trackId') |
| | | .set('isDelete') |
| | | .set('oldState') |
| | | .set('telX') |
| | | .set('bindId') |
| | | .set('serverCarModelId'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TOrderTransferInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderTransfer/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TOrderTransfer.table.refresh(); |
| | | TOrderTransferInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tOrderTransferInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TOrderTransferInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrderTransfer/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TOrderTransfer.table.refresh(); |
| | | TOrderTransferInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tOrderTransferInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | var map = new AMap.Map("container", { |
| | | resizeEnable: true, |
| | | zoom: 14 |
| | | }); |
| | | $(function() { |
| | | getTrajectory(); |
| | | }); |
| | | |
| | | function getTrajectory() { |
| | | $.ajax({ |
| | | url: Feng.ctxPath + '/tOrderTransfer/getOrderTrack', |
| | | type: 'POST', |
| | | data:{ |
| | | orderDetailId: $("#id").val() |
| | | }, |
| | | success: function (res) { |
| | | if(res.status == 200){ |
| | | var data = res.data; |
| | | if(data.length > 0){ |
| | | orderTrack(data); |
| | | }/*else{ |
| | | Feng.error("当前订单没有轨迹"); |
| | | }*/ |
| | | }else{ |
| | | Feng.error(res.msg); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | var marker, lineArr = []; |
| | | |
| | | function orderTrack(data) { |
| | | for(var i in data){ |
| | | var waypoints = []; |
| | | var lon = parseFloat(data[i].lon); |
| | | var lat = parseFloat(data[i].lat); |
| | | waypoints.push(lon); |
| | | waypoints.push(lat); |
| | | lineArr.push(waypoints); |
| | | } |
| | | |
| | | marker = new AMap.Marker({ |
| | | map: map, |
| | | position: lineArr[0], |
| | | icon: "https://webapi.amap.com/images/car.png", |
| | | offset: new AMap.Pixel(-26, -13), |
| | | autoRotation: true, |
| | | angle:-90, |
| | | }); |
| | | |
| | | // 绘制轨迹 |
| | | var polyline = new AMap.Polyline({ |
| | | map: map, |
| | | path: lineArr, |
| | | showDir:true, |
| | | strokeColor: "#28F", //线颜色 |
| | | // strokeOpacity: 1, //线透明度 |
| | | strokeWeight: 6, //线宽 |
| | | // strokeStyle: "solid" //线样式 |
| | | }); |
| | | |
| | | var passedPolyline = new AMap.Polyline({ |
| | | map: map, |
| | | // path: lineArr, |
| | | strokeColor: "#AF5", //线颜色 |
| | | // strokeOpacity: 1, //线透明度 |
| | | strokeWeight: 6, //线宽 |
| | | // strokeStyle: "solid" //线样式 |
| | | }); |
| | | |
| | | |
| | | marker.on('moving', function (e) { |
| | | passedPolyline.setPath(e.passedPath); |
| | | }); |
| | | |
| | | map.setFitView(); |
| | | } |
| | | |
| | | |
| | | function startAnimation () { |
| | | marker.moveAlong(lineArr, 200); |
| | | } |
| | | |
| | | function pauseAnimation () { |
| | | marker.pauseMove(); |
| | | } |
| | | |
| | | function resumeAnimation () { |
| | | marker.resumeMove(); |
| | | } |
| | | |
| | | function stopAnimation () { |
| | | marker.stopMove(); |
| | | } |
New file |
| | |
| | | /** |
| | | * 专车车型设置管理初始化 |
| | | */ |
| | | var Transfer = { |
| | | id: "TransferTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | Transfer.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.insertTime != '' && row.insertTime != null) { |
| | | // var time = row.insertTime.replace(" ",'<br>'); |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insertTime + '" onfocus="TUser.tooltip()">' + row.insertTime + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '车型名称', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.name != '' && row.name != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.name + '" onfocus="TUser.tooltip()">' + row.name + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '车型图片', field: 'img', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | formatter: function (value, row) { |
| | | if (row.img == null || row.img == '') { |
| | | return '<a class = "view" href="javascript:void(0)"><img style="width: 50px;height:50px;" src="' + Feng.ctxPath + '/static/img/NoPIC.png" /></a>'; |
| | | } else { |
| | | return '<a class = "view" href="javascript:void(0)"><img style="width: 90px;height:50px;" src="' + row.img + '" /></a>'; |
| | | } |
| | | }, |
| | | events: 'operateEvents' |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.state != '' && row.state != null) { |
| | | if(row.state == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="正常" onfocus="TUser.tooltip()">正常</p>'] |
| | | }else if(row.state == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="禁用" onfocus="TUser.tooltip()">禁用</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | Transfer.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | Transfer.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加专车车型设置 |
| | | */ |
| | | Transfer.openAddTransfer = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加专车车型设置', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tServerCarmodel/tServerCarmodel_addTransfer' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | Transfer.updateTOrderEvaluateDetail = function(){ |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '修改专车车型设置', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tServerCarmodel/tServerCarmodel_editTransfer?id=' + Transfer.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 禁用 |
| | | */ |
| | | Transfer.no = function () { |
| | | if (this.check()) { |
| | | var name = Transfer.seItem.name; |
| | | if (name == "" || name == null || name == undefined) { |
| | | name = "该车型"; |
| | | } else { |
| | | name = "【" + name + "】"; |
| | | } |
| | | if (Transfer.seItem.state != 1) { |
| | | swal("禁用失败", "【正常】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | swal({ |
| | | title: "您是否确认禁用"+ name + "?", |
| | | text: "请谨慎操作!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "禁用", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tServerCarmodel/opt", function (data) { |
| | | swal("禁用成功", "您已经禁用了" + name + "。", "success"); |
| | | Transfer.table.refresh(); |
| | | }, function (data) { |
| | | swal("禁用失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tServerCarmodelId", Transfer.seItem.id); |
| | | ajax.set("optType", 1); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 启用 |
| | | */ |
| | | Transfer.yes = function () { |
| | | if (this.check()) { |
| | | var name = Transfer.seItem.name; |
| | | if (name == "" || name == null || name == undefined) { |
| | | name = "该车型"; |
| | | } else { |
| | | name = "【" + name + "】"; |
| | | } |
| | | if (Transfer.seItem.state != 2) { |
| | | swal("启用失败", "【禁用】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | swal({ |
| | | title: "您是否确认启用"+ name + "?", |
| | | text: "请谨慎操作!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "启用", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tServerCarmodel/opt", function (data) { |
| | | swal("启用成功", "您已经启用了" + name + "。", "success"); |
| | | Transfer.table.refresh(); |
| | | }, function (data) { |
| | | swal("启用失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tServerCarmodelId", Transfer.seItem.id); |
| | | ajax.set("optType", 2); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询专车车型设置列表 |
| | | */ |
| | | Transfer.search = function () { |
| | | var queryData = {}; |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | Transfer.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | Transfer.resetSearch = function () { |
| | | $("#name").val(""); |
| | | $("#state").val(""); |
| | | Transfer.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = Transfer.initColumn(); |
| | | var table = new BSTable(Transfer.id, "/tServerCarmodel/listTransfer", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | Transfer.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化专车车型设置详情对话框 |
| | | */ |
| | | var TransferInfoDlg = { |
| | | transferInfoData : {}, |
| | | validateFields: { |
| | | name: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '车型名称不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^.{1,15}$/, |
| | | message: '车型名称不能超过15个字' |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TransferInfoDlg.validate = function () { |
| | | $('#transferInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#transferInfoForm').bootstrapValidator('validate'); |
| | | return $("#transferInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TransferInfoDlg.clearData = function() { |
| | | this.transferInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TransferInfoDlg.set = function(key, val) { |
| | | this.transferInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TransferInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TransferInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.Transfer.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TransferInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('type') |
| | | .set('name') |
| | | .set('img') |
| | | .set('state') |
| | | .set('insertTime'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TransferInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tServerCarmodel/addTransfer", function(data){ |
| | | if (500 == data.code){ |
| | | Feng.error(data.message); |
| | | return; |
| | | }else{ |
| | | Feng.success("添加成功!"); |
| | | window.parent.Transfer.table.refresh(); |
| | | TransferInfoDlg.close(); |
| | | } |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.transferInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TransferInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tServerCarmodel/updateTransfer", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.Transfer.table.refresh(); |
| | | TransferInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.transferInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("transferInfoForm", TransferInfoDlg.validateFields); |
| | | // 初始化图片上传 |
| | | var img = new $WebUpload("img"); |
| | | img.setUploadBarId("progressBar"); |
| | | img.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 接送机价格设置管理初始化 |
| | | */ |
| | | var Transfer = { |
| | | id: "TransferTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | Transfer.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '车型名称', field: 'name', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.name != '' && row.name != null) { |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.name + '" onfocus="TUser.tooltip()">' + row.name + '</p>'] |
| | | } |
| | | return btn; |
| | | } |
| | | }, |
| | | {title: '车型图片', field: 'img', visible: true, align: 'center', valign: 'middle',width:'20%', |
| | | formatter: function (value, row) { |
| | | if (row.img == null || row.img == '') { |
| | | return '<a class = "view" href="javascript:void(0)"><img style="width: 50px;height:50px;" src="' + Feng.ctxPath + '/static/img/NoPIC.png" /></a>'; |
| | | } else { |
| | | return '<a class = "view" href="javascript:void(0)"><img style="width: 90px;height:50px;" src="' + row.img + '" /></a>'; |
| | | } |
| | | }, |
| | | events: 'operateEvents' |
| | | }, |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | var btn = ""; |
| | | if(row.state != '' && row.state != null) { |
| | | if(row.state == 1){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="正常" onfocus="TUser.tooltip()">正常</p>'] |
| | | }else if(row.state == 2){ |
| | | btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color: red;" title="冻结" onfocus="TUser.tooltip()">冻结</p>'] |
| | | } |
| | | } |
| | | return btn; |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | Transfer.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | Transfer.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加接送机价格设置 |
| | | */ |
| | | Transfer.addTransfer = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加接送机价格设置', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tSystemPrice/tSystemPrice_addTransfer' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看接送机价格设置详情 |
| | | */ |
| | | Transfer.updateTransfer = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '接送机价格设置详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tSystemPrice/tSystemPrice_updateTransfer/' + Transfer.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除接送机价格设置 |
| | | */ |
| | | Transfer.deleteTransfer = function () { |
| | | if (this.check()) { |
| | | var name = Transfer.seItem.name; |
| | | if (name == "" || name == null || name == undefined){ |
| | | name = "该接送机车型价格配置"; |
| | | }else{ |
| | | name = "【"+name+"】价格配置"; |
| | | } |
| | | swal({ |
| | | title: "您是否确认删除"+ name + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "删除", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/opt", function (data) { |
| | | swal("删除成功", "您已经删除了" + name + "。", "success"); |
| | | Transfer.table.refresh(); |
| | | }, function (data) { |
| | | swal("删除失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tSystemPriceId",Transfer.seItem.id); |
| | | ajax.set("optType",3); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 冻结 |
| | | */ |
| | | Transfer.freezeTransfer = function(){ |
| | | if (this.check()) { |
| | | var name = Transfer.seItem.name; |
| | | if (name == "" || name == null || name == undefined) { |
| | | name = "该接送机车型价格配置"; |
| | | } else { |
| | | name = "【" + name + "】价格配置"; |
| | | } |
| | | if (Transfer.seItem.state != 1) { |
| | | swal("冻结失败", "【正常】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | swal({ |
| | | title: "您是否确认冻结"+ name + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "冻结", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/opt", function (data) { |
| | | swal("冻结成功", "您已经冻结了" + name + "。", "success"); |
| | | Transfer.table.refresh(); |
| | | }, function (data) { |
| | | swal("冻结失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tSystemPriceId",Transfer.seItem.id); |
| | | ajax.set("optType", 1); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 解冻 |
| | | */ |
| | | Transfer.thawTransfer = function(){ |
| | | if (this.check()) { |
| | | var name = Transfer.seItem.name; |
| | | if (name == "" || name == null || name == undefined) { |
| | | name = "该接送机车型价格配置"; |
| | | } else { |
| | | name = "【" + name + "】价格配置"; |
| | | } |
| | | if (Transfer.seItem.state != 2) { |
| | | swal("解冻失败", "【冻结】状态下才能执行此操作", "warning"); |
| | | return; |
| | | } else { |
| | | swal({ |
| | | title: "您是否确认解冻"+ name + "?", |
| | | text: "请谨慎操作,删除后数据无法恢复!", |
| | | type: "warning", |
| | | showCancelButton: true, |
| | | confirmButtonColor: "#DD6B55", |
| | | confirmButtonText: "解冻", |
| | | closeOnConfirm: true |
| | | }, function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/opt", function (data) { |
| | | swal("解冻成功", "您已经解冻了" + name + "。", "success"); |
| | | Transfer.table.refresh(); |
| | | }, function (data) { |
| | | swal("解冻失败", data.responseJSON.message + "!", "warning"); |
| | | }); |
| | | ajax.set("tSystemPriceId",Transfer.seItem.id); |
| | | ajax.set("optType", 2); |
| | | ajax.start(); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询接送机价格设置列表 |
| | | */ |
| | | Transfer.search = function () { |
| | | var queryData = {}; |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | Transfer.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | Transfer.resetSearch = function () { |
| | | $("#name").val(""); |
| | | $("#state").val(""); |
| | | Transfer.search(); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = Transfer.initColumn(); |
| | | var table = new BSTable(Transfer.id, "/tSystemPrice/listTransfer", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | Transfer.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化接送机价格设置详情对话框 |
| | | */ |
| | | var TransferInfoDlg = { |
| | | transferInfoData : {}, |
| | | validateFields: { |
| | | serverCarModelId: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '请选择车型' |
| | | } |
| | | } |
| | | }, |
| | | fareTypeNote: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '运价类型说明不能为空' |
| | | } |
| | | } |
| | | }, |
| | | num1: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num2: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num3: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【分钟】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[0-9]{0,3}$/, |
| | | message: '【分钟】输入框不能超过3位数' |
| | | } |
| | | } |
| | | }, |
| | | num4: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num5: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num6: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【分钟】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^[0-9]{0,3}$/, |
| | | message: '【分钟】输入框不能超过3位数' |
| | | } |
| | | } |
| | | }, |
| | | num7: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num8: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num9: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num10: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num11: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num12: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num13: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num14: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【公里】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【公里】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num15: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num16: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【时间】输入框不能为空' |
| | | } |
| | | } |
| | | }, |
| | | num17: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num18: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num19: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num20: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num21: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num22: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num23: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【时间】输入框不能为空' |
| | | } |
| | | } |
| | | }, |
| | | num24: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【时间】输入框不能为空' |
| | | } |
| | | } |
| | | }, |
| | | num25: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num26: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num27: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num28: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num29: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | }, |
| | | num30: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '【元】输入框不能为空' |
| | | }, |
| | | regexp: { |
| | | regexp: /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/, |
| | | message: '【元】输入框不能超过3位数,保留两位小数' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 验证数据是否为空 |
| | | */ |
| | | TransferInfoDlg.validate = function () { |
| | | $('#transferPriceInfoForm').data("bootstrapValidator").resetForm(); |
| | | $('#transferPriceInfoForm').bootstrapValidator('validate'); |
| | | return $("#transferPriceInfoForm").data('bootstrapValidator').isValid(); |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TransferInfoDlg.clearData = function() { |
| | | this.transferInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TransferInfoDlg.set = function(key, val) { |
| | | this.transferInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TransferInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TransferInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.Transfer.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TransferInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('type') |
| | | .set('companyId') |
| | | .set('serverCarModelId') |
| | | .set('fareTypeNote') |
| | | .set('content'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TransferInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var content = '{'; |
| | | //拼接数据 |
| | | $("input").each(function(){ |
| | | var value = $(this).val(); |
| | | content = content + '"'+$(this)[0].name+'":"'+value+'",'; |
| | | }); |
| | | content = content.substring(0,content.length-1); |
| | | content += '}'; |
| | | console.log(content); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/addTransfer", function(data){ |
| | | if (500 == data.code){ |
| | | Feng.error(data.message); |
| | | return; |
| | | }else{ |
| | | Feng.success("添加成功!"); |
| | | window.parent.Transfer.table.refresh(); |
| | | TransferInfoDlg.close(); |
| | | } |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.transferInfoData); |
| | | ajax.set("content",content); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TransferInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | var content = '{'; |
| | | //拼接数据 |
| | | $("input").each(function(){ |
| | | var value = $(this).val(); |
| | | content = content + '"'+$(this)[0].name+'":"'+value+'",'; |
| | | }); |
| | | content = content.substring(0,content.length-1); |
| | | content += '}'; |
| | | console.log(content); |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tSystemPrice/updateTransfer", function(data){ |
| | | if (500 == data.code){ |
| | | Feng.error(data.message); |
| | | return; |
| | | }else { |
| | | Feng.success("修改成功!"); |
| | | window.parent.Transfer.table.refresh(); |
| | | TransferInfoDlg.close(); |
| | | } |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.transferInfoData); |
| | | ajax.set("id",$("#id").html()); |
| | | ajax.set("content",content); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | Feng.initValidator("transferPriceInfoForm", TransferInfoDlg.validateFields); |
| | | }); |