| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | |
| | | |
| | | model.addAttribute("item",tBranchOfficeResp); |
| | | LogObjectHolder.me().set(tBranchOffice); |
| | | |
| | | |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 5) |
| | | .eq("companyId", tBranchOfficeId).last("LIMIT 1")); |
| | | if(null != tSystemConfig){ |
| | | JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); |
| | | JSONArray array = jsonObject.getJSONArray("ChargeStandard"); |
| | | JSONArray objects = new JSONArray(); |
| | | for (int i = 0; i < array.size(); i++) { |
| | | JSONObject jsonObject1 = JSONObject.parseObject(JSONObject.toJSONString(array.get(i))); |
| | | if(i == 0){ |
| | | jsonObject1.put("key",0); |
| | | }else { |
| | | jsonObject1.put("key",1); |
| | | } |
| | | objects.add(jsonObject1); |
| | | } |
| | | |
| | | TSystemConfig config = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 8) |
| | | .eq("companyId", tBranchOfficeId).last("LIMIT 1")); |
| | | JSONObject jsonObj = JSONObject.parseObject(config.getContent()); |
| | | Integer zcOne = jsonObj.getInteger("num1"); |
| | | String serviceTel = jsonObj.getString("num2"); |
| | | Integer zcTwo = jsonObj.getInteger("num3"); |
| | | model.addAttribute("zcOne", zcOne); |
| | | model.addAttribute("serviceTel", serviceTel); |
| | | model.addAttribute("zcTwo", zcTwo); |
| | | model.addAttribute("array",objects); |
| | | JSONObject extraCost = JSONObject.parseObject(jsonObject.getString("ExtraCost")); |
| | | model.addAttribute("ExtraCost",extraCost); |
| | | }else{ |
| | | model.addAttribute("zcOne",1); |
| | | model.addAttribute("serviceTel", ""); |
| | | model.addAttribute("zcTwo", 1); |
| | | model.addAttribute("array",null); |
| | | model.addAttribute("ExtraCost",null); |
| | | } |
| | | return PREFIX + "tBranchOffice_edit.html"; |
| | | } |
| | | |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); |
| | | model.addAttribute("num2",jsonObject.getInteger("num2")); |
| | | model.addAttribute("num3",jsonObject.getInteger("num3")); |
| | | TSystemConfig tSystemConfig1 = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 5) |
| | | .eq("companyId", tBranchOfficeId).last("LIMIT 1")); |
| | | if(null != tSystemConfig1){ |
| | | JSONObject jsonObject2 = JSONObject.parseObject(tSystemConfig1.getContent()); |
| | | JSONArray array = jsonObject2.getJSONArray("ChargeStandard"); |
| | | JSONArray objects = new JSONArray(); |
| | | for (int i = 0; i < array.size(); i++) { |
| | | JSONObject jsonObject1 = JSONObject.parseObject(JSONObject.toJSONString(array.get(i))); |
| | | if(i == 0){ |
| | | jsonObject1.put("key",0); |
| | | }else { |
| | | jsonObject1.put("key",1); |
| | | } |
| | | objects.add(jsonObject1); |
| | | } |
| | | |
| | | TSystemConfig config = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 8) |
| | | .eq("companyId", tBranchOfficeId).last("LIMIT 1")); |
| | | JSONObject jsonObj = JSONObject.parseObject(config.getContent()); |
| | | Integer zcOne = jsonObj.getInteger("num1"); |
| | | String serviceTel = jsonObj.getString("num2"); |
| | | Integer zcTwo = jsonObj.getInteger("num3"); |
| | | model.addAttribute("zcOne", zcOne); |
| | | model.addAttribute("serviceTel", serviceTel); |
| | | model.addAttribute("zcTwo", zcTwo); |
| | | model.addAttribute("array",objects); |
| | | JSONObject extraCost = JSONObject.parseObject(jsonObject2.getString("ExtraCost")); |
| | | model.addAttribute("ExtraCost",extraCost); |
| | | }else{ |
| | | model.addAttribute("zcOne",1); |
| | | model.addAttribute("serviceTel", ""); |
| | | model.addAttribute("zcTwo", 1); |
| | | model.addAttribute("array",null); |
| | | model.addAttribute("ExtraCost",null); |
| | | } |
| | | return PREFIX + "tBranchOfficeDetail.html"; |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW) |
| | | public Object add(TBranchOffice tBranchOffice) { |
| | | int count = tBranchOfficeService.selectCount(new EntityWrapper<TBranchOffice>().eq("branchOfficeName", tBranchOffice.getBranchOfficeName())); |
| | | public Object add(TBranchOffice tBranchOffice, Integer systemPriceType, String systemPriceContent, Integer isTaxiCar, Integer holiday, String serviceTel) { |
| | | int count = tBranchOfficeService.selectCount(new EntityWrapper<TBranchOffice>().eq("branchOfficeName", tBranchOffice.getBranchOfficeName()).ne("status", 3)); |
| | | if(count>0){ |
| | | return new SuccessTip(500,"该分公司名称已存在!"); |
| | | } |
| | | int count1 = userService.selectCount(new EntityWrapper<User>().eq("account", tBranchOffice.getAccount())); |
| | | int count1 = userService.selectCount(new EntityWrapper<User>().eq("account", tBranchOffice.getAccount()).ne("status", 3)); |
| | | if (count1 > 0){ |
| | | return new SuccessTip(500,"该账号已存在!"); |
| | | } |
| | |
| | | user.setSex(1); |
| | | userService.insert(user); |
| | | |
| | | //添加价格规则 |
| | | TSystemConfig tSystemConfig = new TSystemConfig(); |
| | | tSystemConfig.setCompanyId(tBranchOffice.getId()); |
| | | tSystemConfig.setType(systemPriceType); |
| | | tSystemConfig.setContent(systemPriceContent); |
| | | tSystemConfigService.insert(tSystemConfig); |
| | | |
| | | tSystemConfig = new TSystemConfig(); |
| | | tSystemConfig.setType(8); |
| | | tSystemConfig.setCompanyId(tBranchOffice.getId()); |
| | | tSystemConfig.setContent("{\"num1\":" + isTaxiCar + ",\"num2\":\"" + serviceTel + "\",\"num3\":" + holiday + "}"); |
| | | tSystemConfigService.insert(tSystemConfig); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | TBranchOffice tBranchOffice = tBranchOfficeService.selectById(tBranchOfficeId); |
| | | tBranchOffice.setStatus(StatusEnum.DELETE.getCode()); |
| | | tBranchOfficeService.updateById(tBranchOffice); |
| | | List<User> users = userService.selectList(new EntityWrapper<User>().eq("role_type", 2).eq("object_id", tBranchOfficeId)); |
| | | for (User user : users) { |
| | | user.setStatus(3); |
| | | userService.updateById(user); |
| | | } |
| | | tSystemConfigService.delete(new EntityWrapper<TSystemConfig>().eq("type", 5).eq("companyId", tBranchOfficeId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改 |
| | |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW) |
| | | public Object update(TBranchOffice tBranchOffice) { |
| | | public Object update(TBranchOffice tBranchOffice, Integer systemPriceType, String systemPriceContent, Integer holiday, Integer isTaxiCar, String serviceTel) { |
| | | TBranchOffice branchOffice = tBranchOfficeService.selectById(tBranchOffice.getId()); |
| | | User user = userService.selectOne(new EntityWrapper<User>() |
| | | .eq("role_type", 2) |
| | |
| | | }else { |
| | | if (!tBranchOffice.getAccount().equals(user.getAccount())){ |
| | | //判断账号是否已存在 |
| | | int count = userService.selectCount(new EntityWrapper<User>().eq("account", tBranchOffice.getAccount())); |
| | | int count = userService.selectCount(new EntityWrapper<User>().eq("account", tBranchOffice.getAccount()).ne("status", 3)); |
| | | if (count > 0){ |
| | | return new SuccessTip(500,"该账号已存在!"); |
| | | } |
| | |
| | | } |
| | | |
| | | TBranchOffice office = tBranchOfficeService.selectOne(new EntityWrapper<TBranchOffice>().eq("branchOfficeName", tBranchOffice.getBranchOfficeName()) |
| | | .last("LIMIT 1")); |
| | | .ne("status", 3).last("LIMIT 1")); |
| | | if(Objects.nonNull(office) && !tBranchOffice.getId().equals(office.getId())){ |
| | | return new SuccessTip(500,"该分公司名称已存在!"); |
| | | } |
| | |
| | | } |
| | | tBranchOffice.setPrincipal(tBranchOffice.getPrincipal().replace(" ","")); |
| | | tBranchOfficeService.updateById(tBranchOffice); |
| | | |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 5).eq("companyId", tBranchOffice.getId())); |
| | | if(null == tSystemConfig){ |
| | | tSystemConfig = new TSystemConfig(); |
| | | tSystemConfig.setType(systemPriceType); |
| | | tSystemConfig.setCompanyId(tBranchOffice.getId()); |
| | | tSystemConfig.setContent(systemPriceContent); |
| | | tSystemConfigService.insert(tSystemConfig); |
| | | }else{ |
| | | tSystemConfig.setContent(systemPriceContent); |
| | | tSystemConfigService.updateById(tSystemConfig); |
| | | } |
| | | |
| | | tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 8).eq("companyId", tBranchOffice.getId())); |
| | | if(null == tSystemConfig){ |
| | | tSystemConfig = new TSystemConfig(); |
| | | tSystemConfig.setType(8); |
| | | tSystemConfig.setCompanyId(tBranchOffice.getId()); |
| | | tSystemConfig.setContent("{\"num1\":" + isTaxiCar + ",\"num2\":\"" + serviceTel + "\",\"num3\":" + holiday + "}"); |
| | | tSystemConfigService.insert(tSystemConfig); |
| | | }else{ |
| | | tSystemConfig.setContent("{\"num1\":" + isTaxiCar + ",\"num2\":\"" + serviceTel + "\",\"num3\":" + holiday + "}"); |
| | | tSystemConfigService.updateById(tSystemConfig); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.stylefeng.guns.GunsApplication; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.state.Order; |
| | |
| | | model.addAttribute("addressLon",map.get("addressLon")); |
| | | model.addAttribute("addressLat",map.get("addressLat")); |
| | | // 查询广东全区域数据 查询广东所有的代理商 |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .eq("provinceCode", "440000")); |
| | | Wrapper<TAgent> status = new EntityWrapper<TAgent>().eq("status", 1); |
| | | if(null != agentId){ |
| | | status.eq("id", agentId); |
| | | } |
| | | List<TAgent> tAgentList = tAgentService.selectList(status); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | // 查询统计在线司机,待接单,服务中,已完成,已取消 |
| | | List<TDriver> onLineDriver = tDriverService.selectList(new EntityWrapper<TDriver>() |
| | |
| | | |
| | | @RequestMapping("/getMap") |
| | | @ResponseBody |
| | | public Object getMap(Integer agentId,Integer type,Model model) { |
| | | Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 3 && Objects.nonNull(objectId)){ |
| | | agentId = objectId; |
| | | public Object getMap(Integer agentId) { |
| | | Map<String, Object> maps = new HashMap<>(); |
| | | |
| | | Wrapper<TOrder> last = new EntityWrapper<TOrder>().eq("state", 301).eq("status", 1); |
| | | if(null != agentId){ |
| | | last.eq("agentId", agentId); |
| | | } |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | // 查询所有代理商 |
| | | List<TAgent> agentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .ne("status", StatusEnum.DELETE.getCode()) |
| | | .ne("principal","")); |
| | | |
| | | map.put("agentList",agentList); |
| | | if(Objects.nonNull(agentId)){ |
| | | // 查询当前代理商 |
| | | TAgent tAgent = tAgentService.selectById(agentId); |
| | | Map<String, String> mapAddress = geocode(tAgent.getProvinceName()+tAgent.getCityName()); |
| | | map.put("addressLon",mapAddress.get("addressLon")); |
| | | map.put("addressLat",mapAddress.get("addressLat")); |
| | | // 查询统计在线司机,待接单,服务中,已完成,已取消 |
| | | List<TDriver> onLineDriver = tDriverService.selectList(new EntityWrapper<TDriver>() |
| | | .eq("agentId", agentId)); |
| | | List<TAgent> tAgentAllList = tAgentService.selectList(new EntityWrapper<TAgent>()); |
| | | List<Integer> allIds = tAgentAllList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | tOrderService.getDataStatisticsCountByIdsGetMap(allIds,map); |
| | | |
| | | // 查询服务中的订单列表 |
| | | List<TOrderServerResp> orderServerRespList = tOrderService.getDataStatisticsServerListByIds(allIds); |
| | | List<TOrder> orderList = tOrderService.selectList(new EntityWrapper<TOrder>()); |
| | | // 查询司机 |
| | | for (TOrderServerResp tOrderServerResp : orderServerRespList) { |
| | | TDriver tDriver = tDriverService.selectById(tOrderServerResp.getDriverId()); |
| | | tOrderServerResp.setAvatar(tDriver.getAvatar()); |
| | | tOrderServerResp.setDriverName(tDriver.getName()); |
| | | List<TOrder> collect = orderList.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) && |
| | | (order.getState().equals(OrderStateEnum.WAIT_PAY.getCode()) |
| | | || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) |
| | | || order.getState().equals(OrderStateEnum.FINISH.getCode()))).collect(Collectors.toList()); |
| | | // 驾龄 |
| | | if(Objects.nonNull(tDriver.getFirstCertificateTime())){ |
| | | Period period = Period.between(LocalDate.now(), DateUtil.dateToLocalDate(tDriver.getFirstCertificateTime())); |
| | | tOrderServerResp.setDrivingExperience(Math.max(Math.abs(period.getYears()), 1)); |
| | | }else { |
| | | tOrderServerResp.setDrivingExperience(0); |
| | | } |
| | | // 代驾次数 |
| | | tOrderServerResp.setValetDrivingCount(collect.size()); |
| | | // 行驶时间 |
| | | long goTime = 0; |
| | | for (TOrder tOrder : collect) { |
| | | // 下车时间 |
| | | Date getoffTime = tOrder.getGetoffTime(); |
| | | // 上车时间 |
| | | Date boardingTime = tOrder.getBoardingTime(); |
| | | long minutes = Duration.between(DateUtil.dateToLocalDateTime(getoffTime), DateUtil.dateToLocalDateTime(boardingTime)).toMinutes(); |
| | | goTime += Math.abs(minutes); |
| | | } |
| | | tOrderServerResp.setGoTime(Long.valueOf(goTime).intValue()); |
| | | // 行驶里程 |
| | | if(CollectionUtils.isEmpty(collect)){ |
| | | tOrderServerResp.setMileageTraveled(0); |
| | | }else { |
| | | int sum = collect.stream().mapToInt(TOrder::getActualMileage).sum(); |
| | | tOrderServerResp.setMileageTraveled(sum/1000); |
| | | } |
| | | } |
| | | map.put("serverList",orderServerRespList); |
| | | // 查询今天所有订单 |
| | | List<TOrder> allList = tOrderService.getDataStatisticsAllList(agentId,type); |
| | | List<List<String>> list = new ArrayList<>(allList.size()); |
| | | for (TOrder tOrder : allList) { |
| | | List<String> obj = new ArrayList<>(3); |
| | | obj.add(tOrder.getStartLng()); |
| | | obj.add(tOrder.getStartLat()); |
| | | obj.add(String.valueOf(tOrder.getState())); |
| | | list.add(obj); |
| | | } |
| | | map.put("allList",list); |
| | | List<List<String>> list1 = new ArrayList<>(); |
| | | for (TDriver tDriver : onLineDriver) { |
| | | List<String> obj = new ArrayList<>(3); |
| | | String value = redisUtil.getValue("DRIVER" + tDriver.getId()); |
| | | if(ToolUtil.isEmpty(value)){ |
| | | continue; |
| | | } |
| | | obj.add(value.split(",")[0]);// 经度 |
| | | obj.add(value.split(",")[1]);// 纬度 |
| | | obj.add(String.valueOf(tDriver.getServerStatus()));// 服务状态 |
| | | list1.add(obj); |
| | | } |
| | | map.put("onLineDriverCount",list1.size()); |
| | | // 拿到所有在线司机地址 |
| | | map.put("onLineDriver",list1); |
| | | }else { |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .eq("provinceCode", "440000")); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | // 查询统计在线司机,待接单,服务中,已完成,已取消 |
| | | List<TDriver> onLineDriver = tDriverService.selectList(new EntityWrapper<TDriver>() |
| | | .in("agentId", ids)); |
| | | |
| | | Map<String, String> mapAddress = geocode("广东省广州市"); |
| | | map.put("addressLon",mapAddress.get("addressLon")); |
| | | map.put("addressLat",mapAddress.get("addressLat")); |
| | | |
| | | List<TAgent> tAgentAllList = tAgentService.selectList(new EntityWrapper<TAgent>()); |
| | | List<Integer> allIds = tAgentAllList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | tOrderService.getDataStatisticsCountByIdsGetMap(allIds,map); |
| | | |
| | | // 查询服务中的订单列表 |
| | | List<TOrderServerResp> orderServerRespList = tOrderService.getDataStatisticsServerListByIds(allIds); |
| | | List<TOrder> orderList = tOrderService.selectList(new EntityWrapper<TOrder>()); |
| | | // 查询司机 |
| | | for (TOrderServerResp tOrderServerResp : orderServerRespList) { |
| | | TDriver tDriver = tDriverService.selectById(tOrderServerResp.getDriverId()); |
| | | tOrderServerResp.setAvatar(tDriver.getAvatar()); |
| | | tOrderServerResp.setDriverName(tDriver.getName()); |
| | | List<TOrder> collect = orderList.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) && |
| | | (order.getState().equals(OrderStateEnum.WAIT_PAY.getCode()) |
| | | || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) |
| | | || order.getState().equals(OrderStateEnum.FINISH.getCode()))).collect(Collectors.toList()); |
| | | // 驾龄 |
| | | if(Objects.nonNull(tDriver.getFirstCertificateTime())){ |
| | | Period period = Period.between(LocalDate.now(), DateUtil.dateToLocalDate(tDriver.getFirstCertificateTime())); |
| | | tOrderServerResp.setDrivingExperience(Math.max(Math.abs(period.getYears()), 1)); |
| | | }else { |
| | | tOrderServerResp.setDrivingExperience(0); |
| | | } |
| | | // 代驾次数 |
| | | tOrderServerResp.setValetDrivingCount(collect.size()); |
| | | // 行驶时间 |
| | | long goTime = 0; |
| | | for (TOrder tOrder : collect) { |
| | | // 下车时间 |
| | | Date getoffTime = tOrder.getGetoffTime(); |
| | | // 上车时间 |
| | | Date boardingTime = tOrder.getBoardingTime(); |
| | | long minutes = Duration.between(DateUtil.dateToLocalDateTime(getoffTime), DateUtil.dateToLocalDateTime(boardingTime)).toMinutes(); |
| | | goTime += Math.abs(minutes); |
| | | } |
| | | tOrderServerResp.setGoTime(Long.valueOf(goTime).intValue()); |
| | | // 行驶里程 |
| | | if(CollectionUtils.isEmpty(collect)){ |
| | | tOrderServerResp.setMileageTraveled(0); |
| | | }else { |
| | | int sum = collect.stream().mapToInt(TOrder::getActualMileage).sum(); |
| | | tOrderServerResp.setMileageTraveled(sum/1000); |
| | | } |
| | | } |
| | | map.put("serverList",orderServerRespList); |
| | | |
| | | // 查询今天所有订单 |
| | | List<TOrder> allList = tOrderService.getDataStatisticsAllListByIds(allIds,type); |
| | | List<List<String>> list = new ArrayList<>(allList.size()); |
| | | for (TOrder tOrder : allList) { |
| | | List<String> obj = new ArrayList<>(3); |
| | | obj.add(tOrder.getStartLng()); |
| | | obj.add(tOrder.getStartLat()); |
| | | obj.add(String.valueOf(tOrder.getState())); |
| | | list.add(obj); |
| | | } |
| | | map.put("allList",list); |
| | | List<List<String>> list1 = new ArrayList<>(); |
| | | for (TDriver tDriver : onLineDriver) { |
| | | List<String> obj = new ArrayList<>(3); |
| | | String value = redisUtil.getValue("DRIVER" + tDriver.getId()); |
| | | if(ToolUtil.isEmpty(value)){ |
| | | continue; |
| | | } |
| | | obj.add(value.split(",")[0]);// 经度 |
| | | obj.add(value.split(",")[1]);// 纬度 |
| | | obj.add(String.valueOf(tDriver.getServerStatus()));// 服务状态 |
| | | list1.add(obj); |
| | | } |
| | | map.put("onLineDriverCount",list1.size()); |
| | | // 拿到所有在线司机地址 |
| | | map.put("onLineDriver",list1); |
| | | List<TOrder> tOrders = tOrderService.selectList(last.last(" and UNIX_TIMESTAMP(createTime) + 7200 >= UNIX_TIMESTAMP(NOW())")); |
| | | List<Map<String, Object>> cancel = new ArrayList<>(); |
| | | for (TOrder order : tOrders) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("lonLat", order.getStartLng() + "," + order.getStartLat()); |
| | | cancel.add(map); |
| | | } |
| | | return map; |
| | | maps.put("cancel", cancel); |
| | | Wrapper<TDriver> eq = new EntityWrapper<TDriver>().eq("serverStatus", 1).eq("approvalStatus", 2).eq("status", 1); |
| | | if(null != agentId){ |
| | | eq.eq("agentId", agentId); |
| | | } |
| | | List<TDriver> tDrivers = tDriverService.selectList(eq); |
| | | List<Map<String, Object>> leisure = new ArrayList<>(); |
| | | for (TDriver tDriver : tDrivers) { |
| | | String value = redisUtil.getValue("DRIVER" + tDriver.getId()); |
| | | if(ToolUtil.isEmpty(value)){ |
| | | continue; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("name", tDriver.getName()); |
| | | map.put("lonLat", value); |
| | | leisure.add(map); |
| | | } |
| | | maps.put("leisure", leisure); |
| | | |
| | | Wrapper<TOrder> en = new EntityWrapper<TOrder>().in("state", Arrays.asList(103, 104, 105, 106)).eq("status", 1); |
| | | if(null != agentId){ |
| | | en.eq("agentId", agentId); |
| | | } |
| | | List<TOrder> tOrders1 = tOrderService.selectList(en); |
| | | List<Map<String, Object>> receivedOrder = new ArrayList<>(); |
| | | for (TOrder order : tOrders1) { |
| | | String value = redisUtil.getValue("DRIVER" + order.getDriverId()); |
| | | if(ToolUtil.isEmpty(value)){ |
| | | continue; |
| | | } |
| | | TDriver tDriver = tDriverService.selectById(order.getDriverId()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("name", tDriver.getName()); |
| | | map.put("lonLat", value); |
| | | receivedOrder.add(map); |
| | | } |
| | | maps.put("receivedOrder", receivedOrder); |
| | | |
| | | |
| | | Wrapper<TOrder> en1 = new EntityWrapper<TOrder>().eq("state", 102).eq("status", 1); |
| | | if(null != agentId){ |
| | | en1.eq("agentId", agentId); |
| | | } |
| | | List<TOrder> tOrders2 = tOrderService.selectList(en1); |
| | | List<Map<String, Object>> service = new ArrayList<>(); |
| | | for (TOrder order : tOrders2) { |
| | | TDriver tDriver = tDriverService.selectById(order.getDriverId()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("name", tDriver.getName()); |
| | | map.put("lonLat", order.getStartLng() + "," + order.getStartLat()); |
| | | service.add(map); |
| | | } |
| | | maps.put("service", service); |
| | | |
| | | |
| | | List<TOrder> tOrders3 = tOrderService.selectList(new EntityWrapper<TOrder>().eq("state", 101).eq("hallOrder", 1).eq("status", 1)); |
| | | List<Map<String, Object>> lobby = new ArrayList<>(); |
| | | for (TOrder order : tOrders3) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("lonLat", order.getStartLng() + "," + order.getStartLat()); |
| | | lobby.add(map); |
| | | } |
| | | maps.put("lobby", lobby); |
| | | return maps; |
| | | } |
| | | |
| | | @RequestMapping("/getServerOrder") |
| | |
| | | }else { |
| | | // 查询广东全区域数据 查询广东所有的代理商 |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .eq("provinceCode", "440000")); |
| | | .eq("status", 1)); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | // 统计代理商 |
| | | tAgentService.getDataStatisticsByIds(ids,model,map); |
| | |
| | | <result column="endLng" property="endLng" /> |
| | | <result column="boardingTime" property="boardingTime" /> |
| | | <result column="getoffTime" property="getoffTime" /> |
| | | <result column="boardingAddress" property="boardingAddress"/> |
| | | <result column="boardingLng" property="boardingLng"/> |
| | | <result column="boardingLat" property="boardingLat"/> |
| | | <result column="debusAddress" property="debusAddress"/> |
| | | <result column="debusLng" property="debusLng"/> |
| | | <result column="debusLat" property="debusLat"/> |
| | | <result column="estimatedPrice" property="estimatedPrice" /> |
| | | <result column="orderMoney" property="orderMoney" /> |
| | | <result column="payMoney" property="payMoney" /> |
| | |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 开户银行 |
| | | */ |
| | | @TableField(value = "bankDeposit") |
| | | @ApiModelProperty(value = "开户银行") |
| | | private String bankDeposit; |
| | | |
| | | /** |
| | | * 银行账户 |
| | | */ |
| | | @TableField(value = "bankAccount") |
| | | @ApiModelProperty(value = "银行账户") |
| | | private String bankAccount; |
| | | |
| | | @TableField(value = "serviceCalls") |
| | | @ApiModelProperty(value = "客服电话") |
| | | private String serviceCalls; |
| | |
| | | |
| | | public void setAreaId(String areaId) { |
| | | this.areaId = areaId; |
| | | } |
| | | |
| | | public String getBankDeposit() { |
| | | return bankDeposit; |
| | | } |
| | | |
| | | public void setBankDeposit(String bankDeposit) { |
| | | this.bankDeposit = bankDeposit; |
| | | } |
| | | |
| | | public String getBankAccount() { |
| | | return bankAccount; |
| | | } |
| | | |
| | | public void setBankAccount(String bankAccount) { |
| | | this.bankAccount = bankAccount; |
| | | } |
| | | |
| | | public String getArea() { |
| | |
| | | */ |
| | | private Date getoffTime; |
| | | /** |
| | | * 上车地址 |
| | | */ |
| | | private String boardingAddress; |
| | | /** |
| | | * 上车经度 |
| | | */ |
| | | private String boardingLng; |
| | | /** |
| | | * 上车纬度 |
| | | */ |
| | | private String boardingLat; |
| | | /** |
| | | * 下车地址 |
| | | */ |
| | | private String debusAddress; |
| | | /** |
| | | * 下车经度 |
| | | */ |
| | | private String debusLng; |
| | | /** |
| | | * 下车纬度 |
| | | */ |
| | | private String debusLat; |
| | | /** |
| | | * 预估价 |
| | | */ |
| | | private BigDecimal estimatedPrice; |
| | |
| | | this.estimatedPrice = estimatedPrice; |
| | | } |
| | | |
| | | public String getBoardingAddress() { |
| | | return boardingAddress; |
| | | } |
| | | |
| | | public void setBoardingAddress(String boardingAddress) { |
| | | this.boardingAddress = boardingAddress; |
| | | } |
| | | |
| | | public String getBoardingLng() { |
| | | return boardingLng; |
| | | } |
| | | |
| | | public void setBoardingLng(String boardingLng) { |
| | | this.boardingLng = boardingLng; |
| | | } |
| | | |
| | | public String getBoardingLat() { |
| | | return boardingLat; |
| | | } |
| | | |
| | | public void setBoardingLat(String boardingLat) { |
| | | this.boardingLat = boardingLat; |
| | | } |
| | | |
| | | public String getDebusAddress() { |
| | | return debusAddress; |
| | | } |
| | | |
| | | public void setDebusAddress(String debusAddress) { |
| | | this.debusAddress = debusAddress; |
| | | } |
| | | |
| | | public String getDebusLng() { |
| | | return debusLng; |
| | | } |
| | | |
| | | public void setDebusLng(String debusLng) { |
| | | this.debusLng = debusLng; |
| | | } |
| | | |
| | | public String getDebusLat() { |
| | | return debusLat; |
| | | } |
| | | |
| | | public void setDebusLat(String debusLat) { |
| | | this.debusLat = debusLat; |
| | | } |
| | | |
| | | public BigDecimal getOrderMoney() { |
| | | return orderMoney; |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | |
| | | * 内容 |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 分公司id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | |
| | | |
| | | public Integer getId() { |
| | |
| | | this.content = content; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | |
| | | model.addAttribute("endAddress",tOrder.getEndAddress());//终点 |
| | | model.addAttribute("endLng",tOrder.getEndLng());// 终点经度 |
| | | model.addAttribute("endLat",tOrder.getEndLat());// 终点纬度 |
| | | model.addAttribute("boardingAddress", tOrder.getBoardingAddress());//上车点 |
| | | model.addAttribute("debusAddress", tOrder.getDebusAddress());//下车点 |
| | | |
| | | if(Objects.nonNull(tOrder.getStartTime())){ |
| | | model.addAttribute("startTime",new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tOrder.getStartTime()));//乘车时间 |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: produce |
| | | active: local |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | |
| | | --- |
| | | |
| | | spring: |
| | | profiles: local |
| | | datasource: |
| | | url: jdbc:mysql://192.168.110.80:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: root |
| | |
| | | |
| | | --- |
| | | |
| | | spring: |
| | | profiles: produce |
| | | datasource: |
| | | url: jdbc:mysql://127.0.0.1:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: f4OfRjqoN3jSiNGiUoiNsQdOBtCOKYRj |
| | | db-name: super_save_driving #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | | --- |
| | | |
| | | filePath: /usr/local/server/app/orderPostionFile/ #存储订单轨迹文件路径 |
| | | #filePath: C:/orderPostionFile/ #存储订单轨迹文件路径 |
| | |
| | | # RedisÊý¾Ý¿âË÷Òý£¨Ä¬ÈÏΪ0£© |
| | | spring.redis.database=0 |
| | | # Redis·þÎñÆ÷µØÖ· |
| | | spring.redis.host=127.0.0.1 |
| | | ## Redis·þÎñÆ÷Á¬½Ó¶Ë¿Ú |
| | | spring.redis.port=16379 |
| | | ## Redis·þÎñÆ÷Á¬½ÓÃÜÂ루ĬÈÏΪ¿Õ£© |
| | | spring.redis.password=cKsEeyffDXG5PzNg8CIbrWxFluXrCprZ |
| | | #spring.redis.host=127.0.0.1 |
| | | ### Redis·þÎñÆ÷Á¬½Ó¶Ë¿Ú |
| | | #spring.redis.port=16379 |
| | | ### Redis·þÎñÆ÷Á¬½ÓÃÜÂ루ĬÈÏΪ¿Õ£© |
| | | #spring.redis.password=cKsEeyffDXG5PzNg8CIbrWxFluXrCprZ |
| | | |
| | | ## Redis·þÎñÆ÷µØÖ· |
| | | #spring.redis.host=127.0.0.1 |
| | | ## Redis·þÎñÆ÷Á¬½Ó¶Ë¿Ú |
| | | #spring.redis.port=6379 |
| | | ## Redis·þÎñÆ÷Á¬½ÓÃÜÂ루ĬÈÏΪ¿Õ£© |
| | | #spring.redis.password=123456 |
| | | spring.redis.host=127.0.0.1 |
| | | # Redis·þÎñÆ÷Á¬½Ó¶Ë¿Ú |
| | | spring.redis.port=6379 |
| | | # Redis·þÎñÆ÷Á¬½ÓÃÜÂ루ĬÈÏΪ¿Õ£© |
| | | spring.redis.password=123456 |
| | | |
| | | # Á¬½Ó³Ø×î´óÁ¬½ÓÊý£¨Ê¹ÓøºÖµ±íʾûÓÐÏÞÖÆ£© |
| | | spring.redis.jedis.pool.max-active=1024 |
| | |
| | | <div class="row" style="border-style: none none solid; border-color: #e7eaec; border-width: 1px 0px;"> |
| | | <ul class="breadcrumb" style="height: 45px; line-height: 45px; padding-left: 20px;"> |
| | | <li><a href="#" class="statistics">运营数据总览</a></li> |
| | | <li><a href="#" class="map">车辆地图总览</a></li> |
| | | <li><a href="#" class="order">订单热点图</a></li> |
| | | <li><a href="#" class="map">地图总览</a></li> |
| | | </ul> |
| | | </div> |
| | | |
| | |
| | | </select> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <button type="button" class="btn btn-primary" onclick="getData()" style="height: 33px"> |
| | | <button type="button" class="btn btn-primary" onclick="getMapData()" style="height: 33px"> |
| | | <i class="fa fa-search"></i> 查询 |
| | | </button> |
| | | <button type="button" class="btn btn-primary button-margin" onclick="reset()" style="height: 33px"> |
| | |
| | | <label id="onLineDriverCount">${onLineDriverCount}</label> |
| | | <label>人</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row content" id="orderDiv"> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="cursor: pointer;text-align: left;"> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <select class="input-group" id="orderType" style="width: 180px;height: 33px" name="orderType"> |
| | | <option value="">请选择订单类型</option> |
| | | <option value="1">未接单</option> |
| | | <option value="2">服务中</option> |
| | | <option value="3">已完成</option> |
| | | <option value="4">已取消</option> |
| | | </select> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <button type="button" class="btn btn-primary " onclick="getDataOrder()" style="height: 33px"> |
| | | <i class="fa fa-search"></i> 查询 |
| | | </button> |
| | | <button type="button" class="btn btn-primary button-margin" onclick="resetOrder()" style="height: 33px"> |
| | | <i class="fa fa-trash"></i> 重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-10" > |
| | | <input hidden id="allList" value="${allList}"> |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="cursor: pointer;text-align: left;"> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div id="containerOrder" ></div> |
| | | <div id="panelOrder" ></div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="cursor: pointer;text-align: left;"> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label>未接单</label> |
| | | <label>未接单:</label> |
| | | <label id="pendingOrderCount">${pendingOrderCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label>服务中</label> |
| | | <label>服务中:</label> |
| | | <label id="serverCount">${serverCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label>已完成</label> |
| | | <label>已完成:</label> |
| | | <label id="finishCount">${finishCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label>已取消</label> |
| | | <label>已取消:</label> |
| | | <label id="cancelCount">${cancelCount}</label> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal" id="serverOrder" style="overflow:scroll;width: 100%; height:650px;"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | queryOrderCount() |
| | | break; |
| | | case "map": |
| | | map("",113.264434,23.129162); |
| | | break; |
| | | case "order": |
| | | mapOrder(""); |
| | |
| | | ajax.start(); |
| | | } |
| | | |
| | | function getDataOrder(){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tHomePage/getMap", function (data) { |
| | | document.getElementById("onLineDriverCount").innerText=data.onLineDriverCount |
| | | document.getElementById("pendingOrderCount").innerText=data.pendingOrderCount |
| | | document.getElementById("serverCount").innerText=data.serverCount |
| | | document.getElementById("finishCount").innerText=data.finishCount |
| | | document.getElementById("cancelCount").innerText=data.cancelCount |
| | | $('#allList').val(data.allList); |
| | | console.log(data.allList) |
| | | mapOrder(data.allList) |
| | | getOrderData() |
| | | |
| | | }, function (data) { |
| | | }); |
| | | ajax.set("agentId",$("#agentId").val()); |
| | | ajax.set("type",$("#orderType").val()); |
| | | ajax.start(); |
| | | } |
| | | function resetOrder(){ |
| | | $("#agentId").val('') |
| | | $("#orderType").val('') |
| | | var ajax = new $ax(Feng.ctxPath + "/tHomePage/getMap", function (data) { |
| | | document.getElementById("onLineDriverCount").innerText=data.onLineDriverCount |
| | | document.getElementById("pendingOrderCount").innerText=data.pendingOrderCount |
| | | document.getElementById("serverCount").innerText=data.serverCount |
| | | document.getElementById("finishCount").innerText=data.finishCount |
| | | document.getElementById("cancelCount").innerText=data.cancelCount |
| | | $('#allList').val(data.allList); |
| | | mapOrder(data.allList) |
| | | getOrderData() |
| | | }, function (data) { |
| | | }); |
| | | ajax.set("agentId",$("#agentId").val()); |
| | | ajax.set("type",$("#orderType").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | function map(e,addressLon,addressLat){ |
| | | window._AMapSecurityConfig = { |
| | | securityJsCode:'b62d9146929db08c4c2f4537d045320d', |
| | | }; |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | // 创建地图实例 |
| | | var map = new AMap.Map("container", { |
| | | zoom: 13, |
| | | center: [103.924660,30.588548], |
| | | resizeEnable: true |
| | | }); |
| | | |
| | | AMapLoader.reset() // 需要把这个reset一下 |
| | | AMapLoader.load({ |
| | | "key": "1d43098bcd98ab124623e7e4bcc9595e", // 申请好的Web端开发者Key,首次调用 load 时必填 |
| | | "version": "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 |
| | | "plugins": ['AMap.Driving'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 |
| | | "AMapUI": { // 是否加载 AMapUI,缺省不加载 |
| | | "version": '1.1', // AMapUI 版本 |
| | | "plugins":['overlay/SimpleMarker'], // 需要加载的 AMapUI ui插件 |
| | | }, |
| | | "Loca":{ // 是否加载 Loca, 缺省不加载 |
| | | "version": '2.0' // Loca 版本 |
| | | }, |
| | | }).then((AMap)=>{ |
| | | //初始化地图对象,加载地图 |
| | | var map = new AMap.Map('container', { |
| | | viewMode: '2D', // 默认使用 2D 模式,如果希望使用带有俯仰角的 3D 模式,请设置 viewMode: '3D', |
| | | zoom:10, //初始化地图层级 |
| | | center: [addressLon,addressLat] //初始化地图中心点 |
| | | }); |
| | | // map.clearMap(); // 清除地图覆盖物 |
| | | // 经纬度坐标数组 |
| | | const onLineDriver = $('#onLineDriver').val(); |
| | | var list1 = JSON.stringify(onLineDriver) |
| | | const jsonArr = JSON.parse(list1) |
| | | const jsonArr1 = JSON.parse(jsonArr); |
| | | console.log(jsonArr1) |
| | | M = jsonArr1; |
| | | M.forEach(function(marker) { |
| | | new AMap.Marker({ |
| | | map: map, |
| | | icon: marker[2]==1?'https://csxdj.obs.cn-south-1.myhuaweicloud.com/c1d2f38187de40daa353fcc70993288e.png':'https://csxdj.obs.cn-south-1.myhuaweicloud.com/c1d2f38187de40daa353fcc70993288e.png', |
| | | position: [marker[0], marker[1]], |
| | | offset: new AMap.Pixel(-13, -30) |
| | | }); |
| | | }); |
| | | let texts = []; |
| | | function getMapData() { |
| | | map.remove(texts); |
| | | var ajax = new $ax(Feng.ctxPath + "/tHomePage/getMap", function (data) { |
| | | let lobby = data.lobby;//大厅 |
| | | let service = data.service;//服务中 |
| | | let receivedOrder = data.receivedOrder;//已接单 |
| | | let leisure = data.leisure;//空闲 |
| | | let cancel = data.cancel;//流失 |
| | | |
| | | // var center = map.getCenter(); |
| | | // var centerText = '当前中心点坐标:' + center.getLng() + ',' + center.getLat(); |
| | | // 添加事件监听, 使地图自适应显示到合适的范围 |
| | | AMap.event.addDomListener(document.getElementById('container'), 'click', function() { |
| | | var newCenter = map.setFitView(); |
| | | }); |
| | | }).catch((e)=>{ |
| | | console.error(e); //加载错误提示 |
| | | }); |
| | | } |
| | | for (let i = 0; i < cancel.length; i++) { |
| | | let lonLat = cancel[i].lonLat; |
| | | let positon = lonLat.split(","); |
| | | var text = new AMap.Text({ |
| | | text:'流 失', |
| | | anchor:'center', // 设置文本标记锚点 |
| | | draggable:true, |
| | | cursor:'pointer', |
| | | style:{ |
| | | // 'padding': '.75rem 1.25rem', |
| | | // 'margin-bottom': '1rem', |
| | | // 'border-radius': '.25rem', |
| | | // 'background-color': 'white', |
| | | // 'width': '15rem', |
| | | 'border-width': 0, |
| | | 'box-shadow': '0 2px 6px 0 rgba(114, 124, 245, .5)', |
| | | 'text-align': 'center', |
| | | 'font-size': '16px', |
| | | 'color': 'red' |
| | | }, |
| | | position: [parseFloat(positon[0]),parseFloat(positon[1])] |
| | | }); |
| | | text.setMap(map); |
| | | texts.push(text); |
| | | } |
| | | for (let i = 0; i < lobby.length; i++) { |
| | | let lonLat = lobby[i].lonLat; |
| | | let positon = lonLat.split(","); |
| | | var text = new AMap.Text({ |
| | | text:'大 厅', |
| | | anchor:'center', // 设置文本标记锚点 |
| | | draggable:true, |
| | | cursor:'pointer', |
| | | style:{ |
| | | 'border-width': 0, |
| | | 'box-shadow': '0 2px 6px 0 rgba(114, 124, 245, .5)', |
| | | 'text-align': 'center', |
| | | 'font-size': '16px', |
| | | 'color': 'blue' |
| | | }, |
| | | position: [parseFloat(positon[0]),parseFloat(positon[1])] |
| | | }); |
| | | text.setMap(map); |
| | | texts.push(text); |
| | | } |
| | | |
| | | function mapOrder(e){ |
| | | window._AMapSecurityConfig = { |
| | | securityJsCode:'b62d9146929db08c4c2f4537d045320d', |
| | | }; |
| | | AMapLoader.reset() // 需要把这个reset一下 |
| | | AMapLoader.load({ |
| | | "key": "1d43098bcd98ab124623e7e4bcc9595e", // 申请好的Web端开发者Key,首次调用 load 时必填 |
| | | "version": "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 |
| | | "plugins": ['AMap.Driving'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等 |
| | | "AMapUI": { // 是否加载 AMapUI,缺省不加载 |
| | | "version": '1.1', // AMapUI 版本 |
| | | "plugins":['overlay/SimpleMarker'], // 需要加载的 AMapUI ui插件 |
| | | }, |
| | | "Loca":{ // 是否加载 Loca, 缺省不加载 |
| | | "version": '2.0' // Loca 版本 |
| | | }, |
| | | }).then((AMap)=>{ |
| | | //初始化地图对象,加载地图 |
| | | var map = new AMap.Map('containerOrder', { |
| | | viewMode: '2D', // 默认使用 2D 模式,如果希望使用带有俯仰角的 3D 模式,请设置 viewMode: '3D', |
| | | zoom:10, //初始化地图层级 |
| | | center: [113.264434,23.129162] //初始化地图中心点 |
| | | }); |
| | | // map.clearMap(); // 清除地图覆盖物 |
| | | // 经纬度坐标数组 |
| | | var allList; |
| | | if(e==""){ |
| | | allList = $('#allList').val(); |
| | | var list = JSON.stringify(allList) |
| | | const jsonArray = JSON.parse(list) |
| | | const jsonArray1 = JSON.parse(jsonArray); |
| | | console.log(jsonArray1) |
| | | M = jsonArray1; |
| | | }else{ |
| | | M=e; |
| | | } |
| | | console.log(M) |
| | | M.forEach(function(marker) { |
| | | new AMap.Marker({ |
| | | map: map, |
| | | icon: marker[2]==301?'https://csxdj.obs.cn-south-1.myhuaweicloud.com/8a6bb84da305438faba9fa1552c59f64.png':((marker[2]==109||marker[2]==107||marker[2]==108)?'https://csxdj.obs.cn-south-1.myhuaweicloud.com/6132e18884e24916a507b4b55d38d07b.png': |
| | | (marker[2]==101?'https://csxdj.obs.cn-south-1.myhuaweicloud.com/7461e4a7e4004c548e91aafa538246a1.png':'https://csxdj.obs.cn-south-1.myhuaweicloud.com/d8739241fa36482b80df7cacac2cc3d1.png') |
| | | ), |
| | | position: [marker[0], marker[1]], |
| | | offset: new AMap.Pixel(-13, -30) |
| | | }); |
| | | }); |
| | | // var center = map.getCenter(); |
| | | // var centerText = '当前中心点坐标:' + center.getLng() + ',' + center.getLat(); |
| | | // 添加事件监听, 使地图自适应显示到合适的范围 |
| | | AMap.event.addDomListener(document.getElementById('containerOrder'), 'click', function() { |
| | | var newCenter = map.setFitView(); |
| | | }); |
| | | }).catch((e)=>{ |
| | | console.error(e); //加载错误提示 |
| | | }); |
| | | } |
| | | for (let i = 0; i < leisure.length; i++) { |
| | | let name = leisure[i].name; |
| | | let lonLat = leisure[i].lonLat; |
| | | let positon = lonLat.split(","); |
| | | var text = new AMap.Text({ |
| | | text:name, |
| | | anchor:'center', // 设置文本标记锚点 |
| | | draggable:true, |
| | | cursor:'pointer', |
| | | style:{ |
| | | 'border-width': 0, |
| | | 'box-shadow': '0 2px 6px 0 rgba(114, 124, 245, .5)', |
| | | 'text-align': 'center', |
| | | 'font-size': '16px', |
| | | 'color': 'white', |
| | | 'background-color':'green' |
| | | }, |
| | | position: [parseFloat(positon[0]),parseFloat(positon[1])] |
| | | }); |
| | | text.setMap(map); |
| | | texts.push(text); |
| | | } |
| | | |
| | | function getOrderData(){ |
| | | $.ajax({ |
| | | url: Feng.ctxPath + '/tHomePage/getServerOrder', |
| | | type: 'POST', |
| | | data: { |
| | | agentId: $("#agentId").val() |
| | | }, |
| | | success: function (res) { |
| | | var order = res.serverList |
| | | var str = '<table><tr><h3>服务中</h3></tr><hr/><br>'; |
| | | if(order.length > 0){ |
| | | for(var i in order){ |
| | | console.log(order[i].startTime) |
| | | str += |
| | | '<tr><img src=' + order[i].avatar + ' style="height: 40px;width: 40px"></img>' + order[i].driverName +'</tr><br>' + |
| | | '<table><tr><td class="name1">驾龄</td><td class="name1">' + order[i].drivingExperience + '年'+'</td><td class="name1">代驾次数</td><td class="name1">' + order[i].valetDrivingCount + '次'+'</td></tr><br></table>' + |
| | | '<table><br><tr><td class="name1">出行时间</td><td class="name1">' + order[i].startTime + '</td></tr>' + |
| | | '<tr><td class="name1">起点</td><td class="name1">' + order[i].startAddress + '</td></tr>' + |
| | | '<tr><td class="name1">终点</td><td class="name1">' + order[i].endAddress + '</td></tr></table><br>' + |
| | | '<table><tr><td class="name1">预估费用</td><td class="name1">' + order[i].estimatedPrice + '元'+'</td><td class="name1">行驶里程</td><td class="name1">' + order[i].mileageTraveled + '公里'+'</td></tr>' + |
| | | '<tr><td class="name1">等待时间</td><td class="name1">' + order[i].waitTime + '分钟'+'</td><td class="name1">行驶时间</td><td class="name1">' + order[i].goTime + '分钟'+'</td></tr></table><hr/>'; |
| | | } |
| | | } |
| | | str += '</table>'; |
| | | $('#serverOrder').html(str); |
| | | } |
| | | }); |
| | | } |
| | | for (let i = 0; i < service.length; i++) { |
| | | let name = service[i].name; |
| | | let lonLat = service[i].lonLat; |
| | | let positon = lonLat.split(","); |
| | | var text = new AMap.Text({ |
| | | text:name, |
| | | anchor:'center', // 设置文本标记锚点 |
| | | draggable:true, |
| | | cursor:'pointer', |
| | | style:{ |
| | | 'border-width': 0, |
| | | 'box-shadow': '0 2px 6px 0 rgba(114, 124, 245, .5)', |
| | | 'text-align': 'center', |
| | | 'font-size': '16px', |
| | | 'color': 'white', |
| | | 'background-color':'red' |
| | | }, |
| | | position: [parseFloat(positon[0]),parseFloat(positon[1])] |
| | | }); |
| | | text.setMap(map); |
| | | texts.push(text); |
| | | } |
| | | |
| | | for (let i = 0; i < receivedOrder.length; i++) { |
| | | let name = receivedOrder[i].name; |
| | | let lonLat = receivedOrder[i].lonLat; |
| | | let positon = lonLat.split(","); |
| | | var text = new AMap.Text({ |
| | | text:name, |
| | | anchor:'center', // 设置文本标记锚点 |
| | | draggable:true, |
| | | cursor:'pointer', |
| | | style:{ |
| | | 'border-width': 0, |
| | | 'box-shadow': '0 2px 6px 0 rgba(114, 124, 245, .5)', |
| | | 'text-align': 'center', |
| | | 'font-size': '16px', |
| | | 'color': 'black', |
| | | 'background-color':'yellow' |
| | | }, |
| | | position: [parseFloat(positon[0]),parseFloat(positon[1])] |
| | | }); |
| | | text.setMap(map); |
| | | texts.push(text); |
| | | } |
| | | }, function (data) { |
| | | }); |
| | | ajax.set("agentId", $("#agentId").val()); |
| | | ajax.start(); |
| | | } |
| | | |
| | | getMapData(); |
| | | setInterval(function () { |
| | | getMapData(); |
| | | }, 30000); |
| | | |
| | | </script> |
| | | @} |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">价格规则</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" id="rules" style="text-align: left" > |
| | | @if(null != array){ |
| | | @for(ChargeStandard in array){ |
| | | <div name="rulesForm"> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >时间段</span> |
| | | <span class="control-label" > ${ChargeStandard.num1} </span> |
| | | <span class="control-label" >—</span> |
| | | <span class="control-label" > ${ChargeStandard.num2} </span> |
| | | <span class="control-label" >代驾里程</span> |
| | | <span class="control-label" > ${ChargeStandard.num3} </span> |
| | | <span class="control-label" >公里,起步价</span> |
| | | <span class="control-label" > ${ChargeStandard.num4} </span> |
| | | <span class="control-label" >元,超出里程每</span> |
| | | <span class="control-label" > ${ChargeStandard.num5} </span> |
| | | <span class="control-label" >公里,收费</span> |
| | | <span class="control-label" > ${ChargeStandard.num6} </span> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >长途里程</span> |
| | | <span class="control-label" > ${ChargeStandard.num7} </span> |
| | | <span class="control-label" >—</span> |
| | | <span class="control-label" > ${ChargeStandard.num8} </span> |
| | | <span class="control-label" >公里,收费</span> |
| | | <span class="control-label" > ${ChargeStandard.num9} </span> |
| | | <span class="control-label" >元,超出里程每</span> |
| | | <span class="control-label" > ${ChargeStandard.num10} </span> |
| | | <span class="control-label" >公里,收费</span> |
| | | <span class="control-label" > ${ChargeStandard.num11} </span> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @} |
| | | |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">客服信息</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >客服电话</span> |
| | | <span class="control-label" >${serviceTel}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">额外费用</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >等待</span> |
| | | <span class="control-label" >${ExtraCost.num1}</span> |
| | | <span class="control-label" >分钟,收取</span> |
| | | <span class="control-label" >${ExtraCost.num2}</span> |
| | | <span class="control-label" >元,超出</span> |
| | | <span class="control-label" >${ExtraCost.num3}</span> |
| | | <span class="control-label" >分钟,收取</span> |
| | | <span class="control-label" >${ExtraCost.num4}</span> |
| | | <span class="control-label" >元/分钟</span> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >恶劣天气</span> |
| | | <span class="control-label" >${ExtraCost.num5}</span> |
| | | <span class="control-label" >公里以内,加收</span> |
| | | <span class="control-label" >${ExtraCost.num6}</span> |
| | | <span class="control-label" >元,超出</span> |
| | | <span class="control-label" >${ExtraCost.num7}</span> |
| | | <span class="control-label" >公里,收取订单的</span> |
| | | <span class="control-label" >${ExtraCost.num8}</span> |
| | | <span class="control-label" >倍计费,最高收取</span> |
| | | <span class="control-label" >${ExtraCost.num9}</span> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >节假日 每单加收</span> |
| | | <span class="control-label" >${ExtraCost.num10}</span> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">基础费用</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <input hidden id="array"> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" id="rules" style="text-align: left" > |
| | | <div name="rulesForm"> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >时间段</span> |
| | | <input class="control-label" id="num1" name="num1" type="text" placeholder="00:00" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >——</span> |
| | | <input class="control-label" id="num2" name="num2" type="text" placeholder="00:00" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >代驾里程</span> |
| | | <input class="control-label" id="num3" name="num3" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,起步价</span> |
| | | <input class="control-label" id="num4" name="num4" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出里程每</span> |
| | | <input class="control-label" id="num5" name="num5" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num6" name="num6" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | |
| | | <span class="fa fa-plus" onclick="TBranchOfficeInfoDlg.addBox()"></span> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >长途里程</span> |
| | | <input class="control-label" id="num7" name="num7" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >——</span> |
| | | <input class="control-label" id="num8" name="num8" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num9" name="num9" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出里程每</span> |
| | | <input class="control-label" id="num10" name="num10" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num11" name="num11" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">客服信息</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >客服电话</span> |
| | | <input class="control-label" id="num22" name="num22" style="height: 30px;width: 150px"> |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">额外费用</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >等待</span> |
| | | <input class="control-label" id="num12" name="num12" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >分钟,收取</span> |
| | | <input class="control-label" id="num13" name="num13" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出</span> |
| | | <input class="control-label" id="num14" name="num14" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >分钟,收取</span> |
| | | <input class="control-label" id="num15" name="num15" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/分钟</span> |
| | | </div> |
| | | <input hidden id="zcOne" value=""> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="col-sm-1"> |
| | | <input type="checkbox" class="js-switch1" id="isTaxiCar" checked/> |
| | | </div> |
| | | <div class="initialLevel col-sm-10 control-label form-group" id="isTaxiCar_div"> |
| | | <span class="control-label" >恶劣天气</span> |
| | | <input class="control-label" id="num16" name="num16" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里以内,加收</span> |
| | | <input class="control-label" id="num17" name="num17" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出</span> |
| | | <input class="control-label" id="num18" name="num18" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收取订单的</span> |
| | | <input class="control-label" id="num19" name="num19" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >倍计费,最高收取</span> |
| | | <input class="control-label" id="num20" name="num20" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="col-sm-1"> |
| | | <input type="checkbox" class="js-switch2" id="holiday" checked/> |
| | | </div> |
| | | <div class="initialLevel col-sm-10 control-label form-group" id="holiday_div" > |
| | | <span class="control-label" >节假日 每单加收</span> |
| | | <input class="control-label" id="num21" name="num21" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10" style="text-align: center"> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TBranchOfficeInfoDlg.close()"/> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--<div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" underline="true"/> |
| | | <#input id="agentId" name="代理商id" underline="true"/> |
| | | <#input id="principal" name="负责人姓名" underline="true"/> |
| | | <#input id="principalPhone" name="负责人电话" underline="true"/> |
| | | <#input id="email" name="邮箱" underline="true"/> |
| | | <#input id="provinceCode" name="代理区域省编号" underline="true"/> |
| | | <#input id="provinceName" name="代理区域省名称"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="cityCode" name="代理区域市编号" underline="true"/> |
| | | <#input id="cityName" name="代理区域市名称" underline="true"/> |
| | | <#input id="districtCode" name="代理区域区编号" underline="true"/> |
| | | <#input id="districtName" name="代理区域区名称" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" underline="true"/> |
| | | <#input id="createTime" name="添加时间" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TBranchOfficeInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TBranchOfficeInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div>--> |
| | | <script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice_info.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice.js"></script> |
| | | <script type="text/javascript"> |
| | | var elem1 = document.querySelector(".js-switch1"); |
| | | var init1 = new Switchery(elem1); |
| | | |
| | | $('.js-switch1').change(function () { |
| | | if($(this).is(":checked")){ |
| | | $('#isTaxiCar_div').show(); |
| | | }else{ |
| | | $('#isTaxiCar_div').hide() |
| | | } |
| | | }) |
| | | |
| | | var elem2 = document.querySelector(".js-switch2"); |
| | | var init2 = new Switchery(elem2); |
| | | $('.js-switch2').change(function () { |
| | | if($(this).is(":checked")){ |
| | | $('#holiday_div').show(); |
| | | }else{ |
| | | $('#holiday_div').hide() |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | $("input[name=num3]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num4]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num5]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num6]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num7]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num8]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num9]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num10]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num11]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num12]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | |
| | | |
| | | $("input[name=num13]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num14]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num15]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num16]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num17]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num18]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num19]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num20]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | |
| | | |
| | | /*function regexp(value){ |
| | | var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(value)){ |
| | | if(parseInt(value) <= 0){ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }*/ |
| | | function regexp(value){ |
| | | var reg=/^(\d+.?)?\d{0,2}$/;//由 1-9开头 的正则表达式 整数 两位小数 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(value)){ |
| | | if(value == 0){ |
| | | Feng.error("请输入大于0的整数或保留两位小数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入整数或保留两位小数"); |
| | | return; |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group"> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label" >登录账号:</label> |
| | | <input id="account" name="account" type="text" maxlength="20" placeholder="请输入" style="height: 30px"> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group"> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label" >登录密码:</label> |
| | | <input id="password" name="password" type="password" maxlength="20" placeholder="请输入密码" style="height: 30px"> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group"> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <span style="color:red">*</span> |
| | | <label class="control-label" >确认密码:</label> |
| | | <input id="rePassword" name="rePassword" type="password" maxlength="20" placeholder="请输入确认密码" style="height: 30px"> |
| | | </div> |
| | |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">基础费用</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <input hidden id="array" value="${array}"> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" id="rules" style="text-align: left" > |
| | | @if(null == array){ |
| | | <div name="rulesForm"> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >时间段</span> |
| | | <input class="control-label" id="num1" name="num1" type="text" placeholder="00:00" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >——</span> |
| | | <input class="control-label" id="num2" name="num2" type="text" placeholder="00:00" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >代驾里程</span> |
| | | <input class="control-label" id="num3" name="num3" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,起步价</span> |
| | | <input class="control-label" id="num4" name="num4" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出里程每</span> |
| | | <input class="control-label" id="num5" name="num5" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num6" name="num6" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | |
| | | <span class="fa fa-plus" onclick="TBranchOfficeInfoDlg.addBox()"></span> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >长途里程</span> |
| | | <input class="control-label" id="num7" name="num7" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >——</span> |
| | | <input class="control-label" id="num8" name="num8" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num9" name="num9" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出里程每</span> |
| | | <input class="control-label" id="num10" name="num10" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num11" name="num11" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @if(null != array){ |
| | | @for(ChargeStandard in array){ |
| | | <div name="rulesForm"> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >时间段</span> |
| | | <input class="control-label" id="num1" name="num1" value="${ChargeStandard.num1}" type="text" placeholder="00:00" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >——</span> |
| | | <input class="control-label" id="num2" name="num2" value="${ChargeStandard.num2}" type="text" placeholder="00:00" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >代驾里程</span> |
| | | <input class="control-label" id="num3" name="num3" value="${ChargeStandard.num3}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,起步价</span> |
| | | <input class="control-label" id="num4" name="num4" value="${ChargeStandard.num4}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出里程每</span> |
| | | <input class="control-label" id="num5" name="num5" value="${ChargeStandard.num5}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num6" name="num6" value="${ChargeStandard.num6}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | |
| | | @if(ChargeStandard.key == 0){ |
| | | <span class="fa fa-plus" onclick="TSystemConfig.addBox()"></span> |
| | | @} |
| | | @if(ChargeStandard.key == 1){ |
| | | <span class="fa fa-remove" onclick="TSystemConfig.delBox(this)"></span> |
| | | @} |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >长途里程</span> |
| | | <input class="control-label" id="num7" name="num7" value="${ChargeStandard.num7}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >——</span> |
| | | <input class="control-label" id="num8" name="num8" value="${ChargeStandard.num8}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num9" name="num9" value="${ChargeStandard.num9}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出里程每</span> |
| | | <input class="control-label" id="num10" name="num10" value="${ChargeStandard.num10}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收费</span> |
| | | <input class="control-label" id="num11" name="num11" value="${ChargeStandard.num11}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | | @} |
| | | @} |
| | | |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">客服信息</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >客服电话</span> |
| | | <input class="control-label" id="num22" name="num22" value="${serviceTel}" style="height: 30px;width: 150px"> |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">额外费用</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" style="text-align: left" > |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <span class="control-label" >等待</span> |
| | | <input class="control-label" id="num12" name="num12" value="${ExtraCost != null ? ExtraCost.num1 : ''}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >分钟,收取</span> |
| | | <input class="control-label" id="num13" name="num13" value="${ExtraCost != null ? ExtraCost.num2 : ''}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出</span> |
| | | <input class="control-label" id="num14" name="num14" value="${ExtraCost != null ? ExtraCost.num3 : ''}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >分钟,收取</span> |
| | | <input class="control-label" id="num15" name="num15" value="${ExtraCost != null ? ExtraCost.num4 : ''}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元/分钟</span> |
| | | </div> |
| | | <input hidden id="zcOne" value="${zcOne}"> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="col-sm-1"> |
| | | <input type="checkbox" class="js-switch1" id="isTaxiCar" |
| | | @if(isNotEmpty(zcOne)){ |
| | | ${1 == zcOne ? 'checked=checked' : ''} |
| | | @} |
| | | /> |
| | | </div> |
| | | <div class="initialLevel col-sm-10 control-label form-group" id="isTaxiCar_div" ${1 == zcOne ? '' : 'hidden'}> |
| | | <span class="control-label" >恶劣天气</span> |
| | | <input class="control-label" id="num16" name="num16" value="${ExtraCost != null ? ExtraCost.num5 : ''}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里以内,加收</span> |
| | | <input class="control-label" id="num17" name="num17" value="${ExtraCost != null ? ExtraCost.num6 : ''}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元,超出</span> |
| | | <input class="control-label" id="num18" name="num18" value="${ExtraCost != null ? ExtraCost.num7 : ''}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >公里,收取订单的</span> |
| | | <input class="control-label" id="num19" name="num19" value="${ExtraCost != null ? ExtraCost.num8 : ''}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >倍计费,最高收取</span> |
| | | <input class="control-label" id="num20" name="num20" value="${ExtraCost != null ? ExtraCost.num9 : ''}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="col-sm-1"> |
| | | <input type="checkbox" class="js-switch2" id="holiday" |
| | | @if(isNotEmpty(zcTwo)){ |
| | | ${1 == zcTwo ? 'checked=checked' : ''} |
| | | @} |
| | | /> |
| | | </div> |
| | | <div class="initialLevel col-sm-10 control-label form-group" id="holiday_div" ${1 == zcTwo ? '' : 'hidden'}> |
| | | <span class="control-label" >节假日 每单加收</span> |
| | | <input class="control-label" id="num21" name="num21" value="${ExtraCost != null ? ExtraCost.num10 : ''}" type="number" min="0" style="height: 30px;width: 80px"> |
| | | <span class="control-label" >元</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--<div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" value="${item.id}" underline="true"/> |
| | | <#input id="agentId" name="代理商id" value="${item.agentId}" underline="true"/> |
| | | <#input id="principal" name="负责人姓名" value="${item.principal}" underline="true"/> |
| | | <#input id="principalPhone" name="负责人电话" value="${item.principalPhone}" underline="true"/> |
| | | <#input id="email" name="邮箱" value="${item.email}" underline="true"/> |
| | | <#input id="provinceCode" name="代理区域省编号" value="${item.provinceCode}" underline="true"/> |
| | | <#input id="provinceName" name="代理区域省名称" value="${item.provinceName}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="cityCode" name="代理区域市编号" value="${item.cityCode}" underline="true"/> |
| | | <#input id="cityName" name="代理区域市名称" value="${item.cityName}" underline="true"/> |
| | | <#input id="districtCode" name="代理区域区编号" value="${item.districtCode}" underline="true"/> |
| | | <#input id="districtName" name="代理区域区名称" value="${item.districtName}" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> |
| | | <#input id="createTime" name="添加时间" value="${item.createTime}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TBranchOfficeInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TBranchOfficeInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div>--> |
| | | <script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice_info.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tBranchOffice/tBranchOffice.js"></script> |
| | | <script type="text/javascript"> |
| | | var elem1 = document.querySelector(".js-switch1"); |
| | | var init1 = new Switchery(elem1); |
| | | |
| | | $('.js-switch1').change(function () { |
| | | if($(this).is(":checked")){ |
| | | $('#isTaxiCar_div').show(); |
| | | }else{ |
| | | $('#isTaxiCar_div').hide() |
| | | } |
| | | }) |
| | | |
| | | var elem2 = document.querySelector(".js-switch2"); |
| | | var init2 = new Switchery(elem2); |
| | | $('.js-switch2').change(function () { |
| | | if($(this).is(":checked")){ |
| | | $('#holiday_div').show(); |
| | | }else{ |
| | | $('#holiday_div').hide() |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | $("input[name=num3]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num4]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num5]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num6]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num7]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num8]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num9]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num10]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num11]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num12]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | |
| | | |
| | | $("input[name=num13]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num14]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num15]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num16]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num17]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num18]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num19]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | $("input[name=num20]").bind('input',function(){ |
| | | var value = $(this).val() |
| | | regexp(value) |
| | | }) |
| | | |
| | | |
| | | /*function regexp(value){ |
| | | var reg=/^[1-9]\d*$/;//由 1-9开头 的正则表达式 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(value)){ |
| | | if(parseInt(value) <= 0){ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入大于0的正整数"); |
| | | return; |
| | | } |
| | | }*/ |
| | | function regexp(value){ |
| | | var reg=/^(\d+.?)?\d{0,2}$/;//由 1-9开头 的正则表达式 整数 两位小数 |
| | | //先判断是否为整数 在判断 是否在 1-总页 整数范围之内 |
| | | if(reg.test(value)){ |
| | | if(value == 0){ |
| | | Feng.error("请输入大于0的整数或保留两位小数"); |
| | | return; |
| | | } |
| | | }else{ |
| | | Feng.error("请输入整数或保留两位小数"); |
| | | return; |
| | | } |
| | | } |
| | | </script> |
| | | @} |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >上车地点:</label> |
| | | <label>${startAddress}</label> |
| | | <label>${boardingAddress}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">上车时间:</label> |
| | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >下车地点:</label> |
| | | <label>${endAddress}</label> |
| | | <label>${debusAddress}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >下车时间:</label> |
| | |
| | | @} |
| | | |
| | | @if(startLng != null){ |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">基础费用</label> |
| | |
| | | }, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | if(row.userType !== 1){ |
| | | return '<a href="#" onclick="TBranchOffice.searchTBranchOfficeDetail('+row.id+')" style="color:blue">详情</a>' |
| | | }else { |
| | | return '<a href="#" onclick="TBranchOffice.searchTBranchOfficeDetail('+row.id+')" style="color:blue">详情</a>' +' ' + |
| | | '<a href="#" onclick="TBranchOffice.delete('+row.id+')" style="color:red">删除</a>' |
| | | } |
| | | return '<a href="#" onclick="TBranchOffice.searchTBranchOfficeDetail('+row.id+')" style="color:blue">详情</a>' |
| | | } |
| | | } |
| | | ]; |
| | |
| | | } |
| | | } |
| | | }, |
| | | emergencyPhone: { |
| | | num22: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '代理商抽成不能为空' |
| | | message: '客服电话不能为空' |
| | | } |
| | | } |
| | | }, |
| | | account: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '登录账号不能为空' |
| | | } |
| | | } |
| | | }, |
| | | password: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '登录密码不能为空' |
| | | }, |
| | | identical: { |
| | | field: 'rePassword', |
| | | message: '两次密码不一致' |
| | | }, |
| | | } |
| | | }, |
| | | rePassword: { |
| | | validators: { |
| | | notEmpty: { |
| | | message: '密码不能为空' |
| | | }, |
| | | identical: { |
| | | field: 'password', |
| | | message: '两次密码不一致' |
| | | }, |
| | | } |
| | | } |
| | | // emergencyPhone: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '代理商抽成不能为空' |
| | | // } |
| | | // } |
| | | // }, |
| | | // account: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '登录账号不能为空' |
| | | // } |
| | | // } |
| | | // }, |
| | | // password: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '登录密码不能为空' |
| | | // }, |
| | | // identical: { |
| | | // field: 'rePassword', |
| | | // message: '两次密码不一致' |
| | | // }, |
| | | // } |
| | | // }, |
| | | // rePassword: { |
| | | // validators: { |
| | | // notEmpty: { |
| | | // message: '密码不能为空' |
| | | // }, |
| | | // identical: { |
| | | // field: 'password', |
| | | // message: '两次密码不一致' |
| | | // }, |
| | | // } |
| | | // } |
| | | } |
| | | }; |
| | | |
| | |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | let account = $('#account').val(); |
| | | let password = $('#password').val(); |
| | | let rePassword = $('#rePassword').val(); |
| | | if(null == account || '' == account){ |
| | | Feng.error("账号不能为空"); |
| | | return |
| | | } |
| | | if(null == password || '' == password){ |
| | | Feng.error("密码不能为空"); |
| | | return |
| | | } |
| | | if(null == rePassword || '' == rePassword || password != rePassword){ |
| | | Feng.error("密码不一致"); |
| | | return |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tBranchOffice/add", function(data){ |
| | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | var json1=[]; |
| | | for (let i = 0; i < $('input[name="num1"]').length; i++) { |
| | | var arr = {} |
| | | arr['num1'] = $($('input[name="num1"]')[i]).val(); |
| | | arr['num2'] = $($('input[name="num2"]')[i]).val(); |
| | | arr['num3'] = Number($($('input[name="num3"]')[i]).val()); |
| | | arr['num4'] = Number($($('input[name="num4"]')[i]).val()); |
| | | arr['num5'] = Number($($('input[name="num5"]')[i]).val()); |
| | | arr['num6'] = Number($($('input[name="num6"]')[i]).val()); |
| | | arr['num7'] = Number($($('input[name="num7"]')[i]).val()); |
| | | arr['num8'] = Number($($('input[name="num8"]')[i]).val()); |
| | | arr['num9'] = Number($($('input[name="num9"]')[i]).val()); |
| | | arr['num10'] = Number($($('input[name="num10"]')[i]).val()); |
| | | arr['num11'] = Number($($('input[name="num11"]')[i]).val()); |
| | | json1.push(arr) |
| | | } |
| | | |
| | | var ExtraCost = {}; |
| | | ExtraCost['num1'] = Number($('#num12').val()); |
| | | ExtraCost['num2'] = Number($('#num13').val()); |
| | | ExtraCost['num3'] = Number($('#num14').val()); |
| | | ExtraCost['num4'] = Number($('#num15').val()); |
| | | ExtraCost['num5'] = Number($('#num16').val()); |
| | | ExtraCost['num6'] = Number($('#num17').val()); |
| | | ExtraCost['num7'] = Number($('#num18').val()); |
| | | ExtraCost['num8'] = Number($('#num19').val()); |
| | | ExtraCost['num9'] = Number($('#num20').val()); |
| | | ExtraCost['num10'] = Number($('#num21').val()); |
| | | |
| | | var reqData = {}; |
| | | reqData['ChargeStandard'] = json1; |
| | | reqData['ExtraCost'] = ExtraCost; |
| | | // ajax.set("content",JSON.stringify(reqData)); |
| | | // ajax.set("type",5); |
| | | this.tBranchOfficeInfoData.systemPriceType = 5; |
| | | this.tBranchOfficeInfoData.systemPriceContent = JSON.stringify(reqData); |
| | | this.tBranchOfficeInfoData.holiday = $('#holiday').is(":checked") ? 1 : 0; |
| | | this.tBranchOfficeInfoData.isTaxiCar = $('#isTaxiCar').is(":checked") ? 1 : 0; |
| | | this.tBranchOfficeInfoData.serviceTel = $('#num22').val(); |
| | | ajax.set(this.tBranchOfficeInfoData); |
| | | ajax.start(); |
| | | } |
| | |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | var json1=[]; |
| | | for (let i = 0; i < $('input[name="num1"]').length; i++) { |
| | | var arr = {} |
| | | arr['num1'] = $($('input[name="num1"]')[i]).val(); |
| | | arr['num2'] = $($('input[name="num2"]')[i]).val(); |
| | | arr['num3'] = Number($($('input[name="num3"]')[i]).val()); |
| | | arr['num4'] = Number($($('input[name="num4"]')[i]).val()); |
| | | arr['num5'] = Number($($('input[name="num5"]')[i]).val()); |
| | | arr['num6'] = Number($($('input[name="num6"]')[i]).val()); |
| | | arr['num7'] = Number($($('input[name="num7"]')[i]).val()); |
| | | arr['num8'] = Number($($('input[name="num8"]')[i]).val()); |
| | | arr['num9'] = Number($($('input[name="num9"]')[i]).val()); |
| | | arr['num10'] = Number($($('input[name="num10"]')[i]).val()); |
| | | arr['num11'] = Number($($('input[name="num11"]')[i]).val()); |
| | | json1.push(arr) |
| | | } |
| | | |
| | | var ExtraCost = {}; |
| | | ExtraCost['num1'] = Number($('#num12').val()); |
| | | ExtraCost['num2'] = Number($('#num13').val()); |
| | | ExtraCost['num3'] = Number($('#num14').val()); |
| | | ExtraCost['num4'] = Number($('#num15').val()); |
| | | ExtraCost['num5'] = Number($('#num16').val()); |
| | | ExtraCost['num6'] = Number($('#num17').val()); |
| | | ExtraCost['num7'] = Number($('#num18').val()); |
| | | ExtraCost['num8'] = Number($('#num19').val()); |
| | | ExtraCost['num9'] = Number($('#num20').val()); |
| | | ExtraCost['num10'] = Number($('#num21').val()); |
| | | |
| | | var reqData = {}; |
| | | reqData['ChargeStandard'] = json1; |
| | | reqData['ExtraCost'] = ExtraCost; |
| | | // ajax.set("content",JSON.stringify(reqData)); |
| | | // ajax.set("type",5); |
| | | this.tBranchOfficeInfoData.systemPriceType = 5; |
| | | this.tBranchOfficeInfoData.systemPriceContent = JSON.stringify(reqData); |
| | | this.tBranchOfficeInfoData.holiday = $('#holiday').is(":checked") ? 1 : 0; |
| | | this.tBranchOfficeInfoData.isTaxiCar = $('#isTaxiCar').is(":checked") ? 1 : 0; |
| | | this.tBranchOfficeInfoData.serviceTel = $('#num22').val(); |
| | | ajax.set(this.tBranchOfficeInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | TBranchOfficeInfoDlg.addBox = function (){ |
| | | var i = $('input[name="num1"]').length + 1; |
| | | var a ="<div>\n" + |
| | | " <div class=\"initialLevel col-sm-12 control-label form-group\" >\n" + |
| | | " <span class=\"control-label\" >时间段</span>\n" + |
| | | " <input class=\"control-label\" id=\"num1-"+i+"\" name=\"num1\" type=\"text\" placeholder=\"00:00\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >——</span>\n" + |
| | | " <input class=\"control-label\" id=\"num2-"+i+"\" name=\"num2\" type=\"text\" placeholder=\"00:00\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >代驾里程</span>\n" + |
| | | " <input class=\"control-label\" id=\"num3-"+i+"\" name=\"num3\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >公里,起步价</span>\n" + |
| | | " <input class=\"control-label\" id=\"num4-"+i+"\" name=\"num4\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >元,超出里程每</span>\n" + |
| | | " <input class=\"control-label\" id=\"num5-"+i+"\" name=\"num5\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >公里,收费</span>\n" + |
| | | " <input class=\"control-label\" id=\"num6-"+i+"\" name=\"num6\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >元</span>\n" + |
| | | " <span class=\"fa fa-remove\" onclick=\"TBranchOfficeInfoDlg.delBox(this)\"></span>\n" + |
| | | " </div>\n" + |
| | | " <div class=\"initialLevel col-sm-12 control-label form-group\" >\n" + |
| | | " <span class=\"control-label\" >长途里程</span>\n" + |
| | | " <input class=\"control-label\" id=\"num7-"+i+"\" name=\"num7\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >——</span>\n" + |
| | | " <input class=\"control-label\" id=\"num8-"+i+"\" name=\"num8\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >公里,收费</span>\n" + |
| | | " <input class=\"control-label\" id=\"num9-"+i+"\" name=\"num9\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >元,超出里程每</span>\n" + |
| | | " <input class=\"control-label\" id=\"num10-"+i+"\" name=\"num10\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >公里,收费</span>\n" + |
| | | " <input class=\"control-label\" id=\"num11-"+i+"\" name=\"num11\" type=\"number\" style=\"height: 30px;width: 80px\">\n" + |
| | | " <span class=\"control-label\" >元</span>\n" + |
| | | " </div>\n" + |
| | | " </div>" |
| | | |
| | | $("#rules").append($(a)) |
| | | // laydate.render({ |
| | | // elem: '#num1-'+i, |
| | | // type: 'time', |
| | | // format: 'HH:mm', |
| | | // range: false, |
| | | // lang:'zn' |
| | | // }); |
| | | // laydate.render({ |
| | | // elem: '#num2-'+i, |
| | | // type: 'time', |
| | | // format: 'HH:mm', |
| | | // range: false, |
| | | // lang:'zn' |
| | | // }); |
| | | } |
| | | |
| | | TBranchOfficeInfoDlg.delBox = function (o) { |
| | | $(o).parent("div").parent("div").remove() |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | $(function() { |
| | | Feng.initValidator("branchOfficeInfoForm", TBranchOfficeInfoDlg.validateFields); |
| | | }); |