| | |
| | | */ |
| | | @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; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 跳转到接送机车型设置首页 |
| | | */ |
| | | @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") |
| | |
| | | */ |
| | | 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); |
| | | } |
| | |
| | | @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); |
| | | } |
| | |
| | | <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> |
| | |
| | | </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 String createTime; |
| | | private Date createTime; |
| | | /** |
| | | * 是否删除 1=否 2=是 |
| | | */ |
| | | private String isDelete; |
| | | private Integer isDelete; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | |
| | | this.facialPicture = facialPicture; |
| | | } |
| | | |
| | | public String getCreateTime() { |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(String createTime) { |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getIsDelete() { |
| | | public Integer getIsDelete() { |
| | | return isDelete; |
| | | } |
| | | |
| | | public void setIsDelete(String isDelete) { |
| | | public void setIsDelete(Integer isDelete) { |
| | | this.isDelete = isDelete; |
| | | } |
| | | |
| | |
| | | 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> |
| | |
| | | */ |
| | | 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); |
| | | } |
| | |
| | | @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); |
| | | } |
| | |
| | | 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> |
| | |
| | | @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); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | <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"> |
| | |
| | | <#NameCon id="phone" name="手机号"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="name" name="名称" /> |
| | | <#NameCon id="name" name="司机姓名" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TDriverFacialFail.search()"/> |
| | |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="driverFacialFailInfoForm"> |
| | | <div class="row"> |
| | | <div class="col-sm-11"> |
| | | <#input id="name" name="类型名称" /> |
| | | <#select id="seat" name="座位数:"> |
| | | <option value="5">5座</option> |
| | | <option value="7">7座</option> |
| | | </#select> |
| | | <#select id="brandId" name="所属车辆品牌:" > |
| | | <option value="">选择所属车辆品牌</option> |
| | | @for(obj in brandList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </#select> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">备注:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea type="text/plain" class="form-control" name="remark" id="remark" style="width:100%;height:150px;"></textarea> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | |
| | | <div class="form-horizontal" id="driverFacialFailInfoForm"> |
| | | <input type="hidden" id="id" name="id" value="${item.id}"> |
| | | <div class="row"> |
| | | <div class="col-sm-11"> |
| | | <#input id="name" name="类型名称" value="${item.name}"/> |
| | | <#select id="seat" name="座位数:"> |
| | | <option value="5" ${5 == item.seat ? 'selected=selected' : ''}>5座</option> |
| | | <option value="7" ${7 == item.seat ? 'selected=selected' : ''}>7座</option> |
| | | </#select> |
| | | <#select id="brandId" name="所属车辆品牌:" > |
| | | <option value="">选择所属车辆品牌</option> |
| | | @for(obj in brandList){ |
| | | <option value="${obj.id}" ${obj.id == item.brandId ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </#select> |
| | | <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">备注:</label> |
| | | <div class="col-sm-9"> |
| | | <textarea type="text/plain" class="form-control" name="remark" id="remark" style="width:100%;height:150px;">${item.remark}</textarea> |
| | | <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-10 col-sm-offset-5"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TDriverFacialFailInfoDlg.editSubmit()"/> |
| | | <div class="col-sm-11 col-sm-offset-5"> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TDriverFacialFailInfoDlg.close()"/> |
| | | </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"> |
| | | <#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 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); |
| | | }); |