From accbb6091a09327389f2d9363921213951eefdb6 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期二, 05 八月 2025 20:48:21 +0800 Subject: [PATCH] 提交新版本 --- ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/PushUtil.java | 92 + ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SpecialAreaBillingServiceImpl.java | 23 ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SpecialAreaBillingMapper.xml | 16 ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_edit.html | 8 ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/specialAreaBilling_info.js | 356 +++++ ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderPrivateCarService.java | 16 ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java | 3 ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SpecialAreaBilling.java | 113 + ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tOrderPrivateCar_orderDetail.html | 138 ++ ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling.html | 59 ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling_edit.html | 140 ++ ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/electricFence.js | 377 ++++++ ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarConfirmController.java | 219 +++ ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tOrderPrivateCar.html | 107 + ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java | 10 ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/specialAreaBilling.js | 169 ++ ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java | 12 ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSpecialAreaBillingController.java | 147 ++ ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js | 3 ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar.js | 524 ++++++++ ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html | 7 ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderPrivateCarServiceImpl.java | 5 ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml | 129 ++ ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSpecialAreaBillingService.java | 24 ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html | 8 ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js | 1 ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tPubWithdrawal/tPubWithdrawal.js | 22 ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderPrivateCar.java | 23 ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tAbnormalOrder.html | 100 + ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar_info.js | 271 ++++ ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_updateFranchisee.html | 7 ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling_add.html | 136 ++ ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detailFranchisee.html | 7 ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tAbnormalOrder.js | 342 +++++ ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderPrivateCarMapper.java | 16 ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSpecialAreaBillingMapper.java | 26 ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detail.html | 8 ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/toConfirmMoney.html | 34 38 files changed, 3,658 insertions(+), 40 deletions(-) diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java index 05ec077..4de0533 100644 --- a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java @@ -118,7 +118,8 @@ Integer roleType = ShiroKit.getUser().getRoleType(); if (1 == roleType){ //查询分公司 - List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); + List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2) + .ne("flag",3)); model.addAttribute("companyList",companyList); }else if (2 == roleType){ TCompany tCompany = tCompanyService.selectById(ShiroKit.getUser().getObjectId()); diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java index bc8208a..3878d4f 100644 --- a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java @@ -130,11 +130,13 @@ } tPubWithdrawalService.updateById(tPubWithdrawal); - Map<String,String> map = new HashMap<>(); - map.put("id", String.valueOf(tPubWithdrawal.getId())); - map.put("state", String.valueOf(stateObj)); - String result = HttpRequestUtil.postRequest(PushURL.withdraw_auth_url, map); - System.out.println("提现审核接口 :【recordId="+tPubWithdrawal.getId().toString()+"】,调用接口:"+result); +// Map<String,String> map = new HashMap<>(); +// map.put("id", String.valueOf(tPubWithdrawal.getId())); +// map.put("state", String.valueOf(stateObj)); +// String result = HttpRequestUtil.postRequest(PushURL.withdraw_auth_url, map); +// System.out.println("提现审核接口 :【recordId="+tPubWithdrawal.getId().toString()+"】,调用接口:"+result); + + // 支付宝提现 //增加系统消息 TSystemNotice notice = new TSystemNotice(); diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarConfirmController.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarConfirmController.java new file mode 100644 index 0000000..8c5a8db --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarConfirmController.java @@ -0,0 +1,219 @@ +package com.stylefeng.guns.modular.system.controller.specialTrain; + +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.mapper.EntityWrapper; +import com.baomidou.mybatisplus.plugins.Page; +import com.stylefeng.guns.core.base.controller.BaseController; +import com.stylefeng.guns.core.common.constant.factory.PageFactory; +import com.stylefeng.guns.core.shiro.ShiroKit; +import com.stylefeng.guns.core.util.DateUtil; +import com.stylefeng.guns.core.util.ExcelExportUtil; +import com.stylefeng.guns.core.util.SinataUtil; +import com.stylefeng.guns.core.util.ToolUtil; +import com.stylefeng.guns.modular.system.controller.util.PushUtil; +import com.stylefeng.guns.modular.system.dao.OrderCancelMapper; +import com.stylefeng.guns.modular.system.model.*; +import com.stylefeng.guns.modular.system.service.*; +import com.stylefeng.guns.modular.system.util.HttpRequestUtil; +import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; +import com.stylefeng.guns.modular.system.util.PushURL; +import com.stylefeng.guns.modular.system.util.ResultUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStreamReader; +import java.math.BigDecimal; +import java.util.*; + +/** + * 专车订单控制器 + * + * @author fengshuonan + * @Date 2020-09-02 17:28:59 + */ +@Controller +@RequestMapping("/tOrderPrivateCarConfirm") +public class TOrderPrivateCarConfirmController extends BaseController { + + private String PREFIXCONFIRM = "/system/tOrderPrivateCarConfirm/"; + + @Autowired + private ITOrderPrivateCarService tOrderPrivateCarService; + + @Autowired + private ITServerCarmodelService tServerCarmodelService; + + @Autowired + private ITOrderPositionService tOrderPositionService; + + @Autowired + private ITDriverService tDriverService; + + @Autowired + private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; + + @Resource + private OrderCancelMapper orderCancelMapper; + + @Value("${pushMinistryOfTransport}") + private boolean pushMinistryOfTransport; + + @Value("${filePath}") + private String filePath; + + + /** + * 跳转到修改专车订单 + */ + @RequestMapping("/tOrderPrivateCar_orderDetail/{tOrderPrivateCarId}") + public String tOrderPrivateCarUpdate(@PathVariable Integer tOrderPrivateCarId, Model model) { + Map<String, Object> item = tOrderPrivateCarService.getPrivateCarOrderDetailById(tOrderPrivateCarId); + model.addAttribute("item",item); + return PREFIXCONFIRM + "tOrderPrivateCar_orderDetail.html"; + } + + /** + * 跳转到专车订单首页 + */ + @RequestMapping("") + public String confirmIndex(Model model) { + //服务专车车型 + List<TServerCarmodel> carmodelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 1).eq("state", 1) + ); + model.addAttribute("carmodelList",carmodelList); + return PREFIXCONFIRM + "tOrderPrivateCar.html"; + } + + + + + /** + * 跳转到确认金额页面 + */ + @RequestMapping("/toConfirmMoney/{tOrderPrivateCarId}") + public String toConfirmMoney(@PathVariable Integer tOrderPrivateCarId, Model model) { + Map<String, Object> item = tOrderPrivateCarService.getPrivateCarOrderDetailById(tOrderPrivateCarId); + model.addAttribute("item",item); + return PREFIXCONFIRM + "toConfirmMoney.html"; + } + + + + /** + * 获取专车订单列表 + */ + @RequestMapping(value = "/listConfirm") + @ResponseBody + public Object listConfirm(String insertTime, + String orderNum, + Integer orderSource, + String userName, + String userPhone, + String passengers, + String passengersPhone, + Integer serverCarModelId, + String driver, + Integer state, + Integer smsNumber) { + String beginTime = null; + String endTime = null; + if (SinataUtil.isNotEmpty(insertTime)){ + String[] timeArray = insertTime.split(" - "); + beginTime = timeArray[0]; + endTime = timeArray[1]; + } + Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); + page.setRecords(tOrderPrivateCarService.getPrivateCarOrderListConfirm(page,beginTime,endTime,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),orderNum,orderSource,userName,userPhone,passengers,passengersPhone,serverCarModelId,driver,state,smsNumber)); + return super.packForBT(page); + } + + + + private ResultUtil resultUtil; + + /** + * 获取订单轨迹 + * @param orderDetailId + * @return + */ + @ResponseBody + @RequestMapping(value = "/getOrderTrack", method = RequestMethod.POST) + public ResultUtil getOrderTrack(String orderDetailId){ + if(ToolUtil.isNotEmpty(orderDetailId)){ + try { +// List<TOrderPosition> list = tOrderPositionService.selectList(new EntityWrapper<TOrderPosition>().eq("orderType", 1).eq("orderId", orderDetailId).orderBy("insertTime")); + /*if(list.size() == 0){ + return ResultUtil.error("该订单没有运行轨迹"); + }*/ + //将数据存储到文件中 + File file = new File(filePath + orderDetailId + "_1.txt"); + if(!file.exists()){ + return ResultUtil.success(new ArrayList<>()); + } + //读取文件(字符流) + BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8")); + //循环取出数据 + String str = null; + StringBuffer sb = new StringBuffer(); + while ((str = in.readLine()) != null) { + sb.append(str); + } + List<TOrderPosition> list = JSONArray.parseArray(sb.toString(), TOrderPosition.class); + resultUtil = ResultUtil.success(list); + }catch (Exception e){ + e.printStackTrace(); + resultUtil = ResultUtil.runErr(); + } + }else { + resultUtil = ResultUtil.paranErr(); + } + return resultUtil; + } + + @Autowired + private ITCompanyService companyService; + + @Autowired + private ITDriverService driverService; + + @Autowired + private IIncomeService incomeService; + + + + + @Autowired + private PushUtil pushUtil; + /** + * 支付专车订单 + */ + @RequestMapping(value = "/confirmMoney") + @ResponseBody + public Object confirmMoney(Integer id,BigDecimal money) { + TOrderPrivateCar orderPrivateCar = tOrderPrivateCarService.selectById(id); + orderPrivateCar.setAbnormalMoney(orderPrivateCar.getOrderMoney()); + orderPrivateCar.setOrderMoney(money); + orderPrivateCar.setIsException(0); + orderPrivateCar.updateById(); + // 推送消息 + TOrderPrivateCar finalOrderPrivateCar = orderPrivateCar; + + new Thread(new Runnable() { + @Override + public void run() { + pushUtil.pushOrderState(1, finalOrderPrivateCar.getUserId(), finalOrderPrivateCar.getId(), 1, finalOrderPrivateCar.getState()); + pushUtil.pushOrderState(2, finalOrderPrivateCar.getDriverId(), finalOrderPrivateCar.getId(), 1, finalOrderPrivateCar.getState()); + } + }).start(); + return SUCCESS_TIP; + } +} diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java index 3da9322..fce77c8 100644 --- a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java @@ -10,6 +10,7 @@ import com.stylefeng.guns.core.util.ExcelExportUtil; import com.stylefeng.guns.core.util.SinataUtil; import com.stylefeng.guns.core.util.ToolUtil; +import com.stylefeng.guns.modular.system.controller.util.PushUtil; import com.stylefeng.guns.modular.system.dao.OrderCancelMapper; import com.stylefeng.guns.modular.system.model.*; import com.stylefeng.guns.modular.system.service.*; @@ -78,10 +79,12 @@ @RequestMapping("") public String index(Model model) { //服务专车车型 - List<TServerCarmodel> carmodelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 1).eq("state", 1)); + List<TServerCarmodel> carmodelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 1).eq("state", 1) + ); model.addAttribute("carmodelList",carmodelList); return PREFIX + "tOrderPrivateCar.html"; } + /** * 跳转到专车订单首页 @@ -110,8 +113,9 @@ public String toChangeMoney(@PathVariable Integer tOrderPrivateCarId, Model model) { Map<String, Object> item = tOrderPrivateCarService.getPrivateCarOrderDetailById(tOrderPrivateCarId); model.addAttribute("item",item); - return PREFIX + "toChangeMoney.html"; + return PREFIX + "toChangeMoney.html.html"; } + /** * 跳转到出租车订单轨迹页面 */ @@ -148,6 +152,7 @@ page.setRecords(tOrderPrivateCarService.getPrivateCarOrderList(page,beginTime,endTime,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),orderNum,orderSource,userName,userPhone,passengers,passengersPhone,serverCarModelId,driver,state,smsNumber)); return super.packForBT(page); } + /** * 获取专车订单列表 @@ -241,7 +246,6 @@ orderPrivateCar.updateById(); return SUCCESS_TIP; } - @RequestMapping(value = "/frozenOrder") @ResponseBody diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSpecialAreaBillingController.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSpecialAreaBillingController.java new file mode 100644 index 0000000..ef1d21a --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSpecialAreaBillingController.java @@ -0,0 +1,147 @@ +package com.stylefeng.guns.modular.system.controller.specialTrain; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +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.base.tips.ErrorTip; +import com.stylefeng.guns.core.common.constant.factory.PageFactory; +import com.stylefeng.guns.core.log.LogObjectHolder; +import com.stylefeng.guns.core.shiro.ShiroKit; +import com.stylefeng.guns.core.util.SinataUtil; +import com.stylefeng.guns.modular.system.model.SpecialAreaBilling; +import com.stylefeng.guns.modular.system.model.TLocation; +import com.stylefeng.guns.modular.system.model.TServerCarmodel; +import com.stylefeng.guns.modular.system.model.TSystemPrice; +import com.stylefeng.guns.modular.system.service.ITServerCarmodelService; +import com.stylefeng.guns.modular.system.service.ITSpecialAreaBillingService; +import com.stylefeng.guns.modular.system.service.ITSystemPriceService; +import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; +import com.stylefeng.guns.modular.system.util.ResultUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +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-08-29 10:50:13 + */ +@Controller +@RequestMapping("/specialAreaBilling") +public class TSpecialAreaBillingController extends BaseController { + + private String PREFIX = "/system/specialAreaBilling/"; + + @Autowired + private ITSpecialAreaBillingService specialAreaBillingService; + + + /** + * 跳转到专车价格设置首页 + */ + @RequestMapping("") + public String index() { + return PREFIX + "specialAreaBilling.html"; + } + + /** + * 跳转到添加专车价格设置 + */ + @RequestMapping("/add") + public String add(Model model) { + return PREFIX + "specialAreaBilling_add.html"; + } + /** + * 跳转到添加专车价格设置 + */ + @RequestMapping("/edit/{id}") + public String edit(@PathVariable("id") Integer id,Model model) { + SpecialAreaBilling specialAreaBilling = specialAreaBillingService.selectById(id); + model.addAttribute("data",specialAreaBilling); + return PREFIX + "specialAreaBilling_edit.html"; + } + /** + * 跳转到添加专车价格设置 + */ + @RequestMapping("/detail") + public String update(Model model) { + return PREFIX + "specialAreaBilling_detail.html"; + } + + + + /** + * 获取专车价格设置列表 + */ + @RequestMapping(value = "/list") + @ResponseBody + public Object list(String areaName) { + Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); + page.setRecords(specialAreaBillingService.list(page,areaName)); + return super.packForBT(page); + } + @RequestMapping(value = "/addSpecialAreaBilling") + @ResponseBody + public Object addSpecialAreaBilling(String areaName,String priceCoefficient,String remark,Integer state,String coordinate) { + SpecialAreaBilling specialAreaBilling = new SpecialAreaBilling(); + specialAreaBilling.setAreaName(areaName); + specialAreaBilling.setPriceCoefficient(Double.parseDouble(priceCoefficient)); + specialAreaBilling.setRemark(remark); + specialAreaBilling.setCoordinate(coordinate); + specialAreaBilling.setState(state); + specialAreaBilling.setInsertTime(new Date()); + specialAreaBillingService.insert(specialAreaBilling); + return ResultUtil.success(); + } + @RequestMapping(value = "/editSpecialAreaBilling") + @ResponseBody + public Object editSpecialAreaBilling(Integer id,String areaName,String priceCoefficient,String remark,Integer state,String coordinate) { + SpecialAreaBilling specialAreaBilling = specialAreaBillingService.selectById(id); + specialAreaBilling.setAreaName(areaName); + specialAreaBilling.setPriceCoefficient(Double.parseDouble(priceCoefficient)); + specialAreaBilling.setRemark(remark); + specialAreaBilling.setCoordinate(coordinate); + specialAreaBilling.setState(state); + specialAreaBillingService.updateById(specialAreaBilling); + return ResultUtil.success(); + } + @RequestMapping(value = "/delete") + @ResponseBody + public Object delete(Integer id) { + SpecialAreaBilling specialAreaBilling = specialAreaBillingService.selectById(id); + specialAreaBilling.setState(3); + specialAreaBillingService.updateById(specialAreaBilling); + return ResultUtil.success(); + } + @RequestMapping(value = "/freeze") + @ResponseBody + public Object freeze(Integer id) { + SpecialAreaBilling specialAreaBilling = specialAreaBillingService.selectById(id); + specialAreaBilling.setState(2); + specialAreaBillingService.updateById(specialAreaBilling); + return ResultUtil.success(); + } + + @RequestMapping(value = "/thaw") + @ResponseBody + public Object thaw(Integer id) { + SpecialAreaBilling specialAreaBilling = specialAreaBillingService.selectById(id); + specialAreaBilling.setState(1); + specialAreaBillingService.updateById(specialAreaBilling); + return ResultUtil.success(); + } + +} diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/PushUtil.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/PushUtil.java new file mode 100644 index 0000000..c984073 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/PushUtil.java @@ -0,0 +1,92 @@ +package com.stylefeng.guns.modular.system.controller.util; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.stylefeng.guns.modular.system.util.GDMapElectricFenceUtil; +import com.stylefeng.guns.modular.system.util.RedisUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Component; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestTemplate; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStreamReader; +import java.math.BigDecimal; +import java.math.MathContext; +import java.math.RoundingMode; +import java.util.*; + +/** + * socket推单处理类 + */ +@Component +public class PushUtil { + + private Logger log = LoggerFactory.getLogger(PushUtil.class); + + @Autowired + private RestTemplate internalRestTemplate; + + + @Autowired + private GDMapElectricFenceUtil gdMapElectricFenceUtil; + + + @Autowired + private RedisUtil redisUtil; + + private Map<String, JSONObject> pushMap = new HashMap<>();//存储需要定时推送的数据 + + private Map<String, Timer> taskMap = new HashMap<>();//存储定时推送的定时器 + + + + /** + * 推送订单状态 + * @param type 1=用户,2=司机 + * @param uid 对象id + * @param orderId 订单id + * @param orderType 订单类型(1=专车,2=快车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=公务用车) + * @param state 订单状态(1=待接单,2=待出发,3=待到达预约地点,4=待乘客上车,5=服务中,6=完成服务,7=待支付,8=待评价,9=已完成,10=已取消,11=改派中) + */ + public void pushOrderState(Integer type, Integer uid, Integer orderId, Integer orderType, Integer state){ + JSONObject jsonObject = new JSONObject(); + jsonObject.put("code", 200); + jsonObject.put("msg", "SUCCESS"); + jsonObject.put("method", "ORDER_STATUS"); + Map<String, Object> map = new HashMap<>(); + map.put("orderId", orderId); + map.put("orderType", orderType); + map.put("state", state); + jsonObject.put("data", map); + + //调用推送 + HttpHeaders headers = new HttpHeaders(); + // 以表单的方式提交 + headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + //将请求头部和参数合成一个请求 + MultiValueMap<String, Object> params = new LinkedMultiValueMap<>(); + params.add("msg", jsonObject.toJSONString()); + params.add("id", String.valueOf(uid)); + params.add("type", String.valueOf(type)); + HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers); + String s = internalRestTemplate.postForObject("http://message-push/netty/sendMsgToClient",requestEntity , String.class); + JSONObject jsonObject1 = JSON.parseObject(s, JSONObject.class); + if(jsonObject1.getIntValue("code") != 200){ + log.error(jsonObject1.getString("msg")); + } + } + + + +} diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderPrivateCarMapper.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderPrivateCarMapper.java index 6939fa5..4fe0780 100644 --- a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderPrivateCarMapper.java +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderPrivateCarMapper.java @@ -37,6 +37,22 @@ @Param("driver") String driver, @Param("state") Integer state, @Param("smsNumber") Integer smsNumber); + // 待确认订单列表 + List<Map<String,Object>> getPrivateCarOrderListConfirm(@Param("page") Page<Map<String, Object>> page, + @Param("beginTime") String beginTime, + @Param("endTime") String endTime, + @Param("roleType") Integer roleType, + @Param("nowUserId") Integer nowUserId, + @Param("orderNum") String orderNum, + @Param("orderSource") Integer orderSource, + @Param("userName") String userName, + @Param("userPhone") String userPhone, + @Param("passengers") String passengers, + @Param("passengersPhone") String passengersPhone, + @Param("serverCarModelId") Integer serverCarModelId, + @Param("driver") String driver, + @Param("state") Integer state, + @Param("smsNumber") Integer smsNumber); /** * 根据专车订单ID获取专车订单详情 diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSpecialAreaBillingMapper.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSpecialAreaBillingMapper.java new file mode 100644 index 0000000..30e1238 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSpecialAreaBillingMapper.java @@ -0,0 +1,26 @@ +package com.stylefeng.guns.modular.system.dao; + +import com.baomidou.mybatisplus.mapper.BaseMapper; +import com.baomidou.mybatisplus.plugins.Page; +import com.stylefeng.guns.modular.system.model.SpecialAreaBilling; +import com.stylefeng.guns.modular.system.model.TOrderPrivateCar; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * <p> + * 订单-专车 Mapper 接口 + * </p> + * + * @author 吕雪 + * @since 2020-09-02 + */ +public interface TSpecialAreaBillingMapper extends BaseMapper<SpecialAreaBilling> { + + + List<Map<String, Object>> list(@Param("page") Page<Map<String, Object>> page, + @Param("areaName") String areaName); + +} diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SpecialAreaBillingMapper.xml b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SpecialAreaBillingMapper.xml new file mode 100644 index 0000000..3a64df7 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SpecialAreaBillingMapper.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.stylefeng.guns.modular.system.dao.TSpecialAreaBillingMapper"> + + + <select id="list" resultType="java.util.Map"> + SELECT t1.* from t_special_area_billing t1 + <where> + t1.state !=3 + <if test="areaName != null and areaName != ''"> + and t1.areaName LIKE CONCAT('%',#{areaName},'%') + </if> + </where> + order by t1.id desc + </select> +</mapper> diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml index ce393f7..cea6a78 100644 --- a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml @@ -204,6 +204,135 @@ </where> order by ot.id desc </select> + <select id="getPrivateCarOrderListConfirm" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> + SELECT + ui.nickName as userName, + ui.phone as userPhone, + CONCAT(di.`name`, '-', di.phone) as driver, + CONCAT(cb.`name`, '-', ci.carLicensePlate) as car, + sc.`name` as serverCarModel, + ot.id, + ot.type, + ot.userId, + ot.driverId, + ot.carId, + ot.orderNum, + ot.placementLon, + ot.placementLat, + ot.placementAddress, + ot.startLon, + ot.startLat, + ot.endLon, + ot.startAddress, + ot.endLat, + ot.endAddress, + ot.boardingLon, + ot.boardingLat, + ot.boardingAddress, + ot.boardingTime, + ot.getoffLon, + ot.getoffLat, + ot.getoffAddress, + ot.getoffTime, + ot.mileage, + ot.payManner, + ot.payType, + ot.orderMoney, + ot.startMoney, + ot.mileageMoney, + ot.durationMoney, + ot.longDistanceMoney, + ot.parkMoney, + ot.roadTollMoney, + ot.redPacketMoney, + ot.couponMoney, + ot.redPacketId, + ot.couponId, + ot.discount, + ot.discountMoney, + ot.activityId, + ot.companyId, + ot.payMoney, + ot.substitute, + ot.passengers, + ot.passengersPhone, + ot.state, + ot.insertTime, + ot.travelTime, + ot.snatchOrderTime, + ot.setOutTime, + ot.arriveTime, + ot.startServiceTime, + ot.endServiceTime, + ot.orderType, + ot.orderSource, + ot.invoiceId, + ot.isReassign, + ot.reassignNotice, + ot.trackId, + ot.isDelete, + ot.oldState, + ot.telX, + ot.bindId, + ot.serverCarModelId + FROM + t_order_private_car as ot + LEFT JOIN + t_user as ui ON ui.id = ot.userId + LEFT JOIN + t_driver as di ON di.id = ot.driverId + LEFT JOIN + t_car as ci ON ci.id = ot.carId + LEFT JOIN + t_car_brand as cb ON cb.id = ci.carBrandId + LEFT JOIN + t_server_carmodel as sc ON sc.id = ot.serverCarModelId + <where> + ot.isDelete = 1 + AND ot.type = 1 + <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''"> + AND (ot.insertTime BETWEEN CONCAT(#{beginTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')) + </if> + <if test="orderNum != null and orderNum != ''"> + AND ot.orderNum LIKE CONCAT('%', #{orderNum}, '%') + </if> + <if test="orderSource != null and orderSource != ''"> + AND ot.orderSource = #{orderSource} + </if> + <if test="userName != null and userName != ''"> + AND ui.nickName LIKE CONCAT('%', #{userName}, '%') + </if> + <if test="userPhone != null and userPhone != ''"> + AND ui.phone LIKE CONCAT('%', #{userPhone}, '%') + </if> + <if test="passengers != null and passengers != ''"> + AND ot.passengers LIKE CONCAT('%', #{passengers}, '%') + </if> + <if test="passengersPhone != null and passengersPhone != ''"> + AND ot.passengersPhone LIKE CONCAT('%', #{passengersPhone}, '%') + </if> + <if test="serverCarModelId != null and serverCarModelId != ''"> + AND ot.serverCarModelId = #{serverCarModelId} + </if> + <if test="driver != null and driver != ''"> + AND (di.`name` LIKE CONCAT('%', #{driver}, '%') OR di.phone LIKE CONCAT('%', #{driver}, '%')) + </if> + <if test="state != null and state != ''"> + AND ot.state = #{state} + </if> + <if test="smsNumber != null and smsNumber != ''"> + AND ot.smsNumber = #{smsNumber} + </if> + <if test="roleType != null and roleType != '' and roleType == 2"> + AND (ot.companyId = #{nowUserId} OR FIND_IN_SET(ot.companyId, (SELECT GROUP_CONCAT(id) as ids FROM t_company WHERE superiorId = #{nowUserId} GROUP BY superiorId))) + </if> + <if test="roleType != null and roleType != '' and roleType == 3"> + AND ot.companyId = #{nowUserId} + </if> + and ot.isException = 1 + </where> + order by ot.id desc + </select> <!--根据专车订单ID获取专车订单详情--> <select id="getPrivateCarOrderDetailById" resultType="map"> diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SpecialAreaBilling.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SpecialAreaBilling.java new file mode 100644 index 0000000..2b8f618 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SpecialAreaBilling.java @@ -0,0 +1,113 @@ +package com.stylefeng.guns.modular.system.model; + +import com.baomidou.mybatisplus.activerecord.Model; +import com.baomidou.mybatisplus.annotations.TableId; +import com.baomidou.mybatisplus.annotations.TableName; +import com.baomidou.mybatisplus.enums.IdType; + +import java.io.Serializable; +import java.util.Date; + +/** + * <p> + * 特殊区域价格设置 + * </p> + * + * @author stylefeng + * @since 2020-06-17 + */ +@TableName("t_special_area_billing") +public class SpecialAreaBilling extends Model<SpecialAreaBilling> { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + /** + * 区域名称 + */ + private String areaName; + /** + * 价格系数 + */ + private double priceCoefficient; + /** + * 备注 + */ + private String remark; + /** + * 电子围栏坐标(多组以下划线分隔) + */ + private String coordinate; + /** + * 电子围栏gid(多组以下划线分隔) + */ + private String gid; + /** + * 状态(1=正常,2=冻结,3=删除) + */ + private Integer state; + /** + * 添加时间 + */ + private Date insertTime; + @Override + protected Serializable pkVal() { + return this.id; + } + public String getAreaName() { + return areaName; + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public double getPriceCoefficient() { + return priceCoefficient; + } + + public void setPriceCoefficient(double priceCoefficient) { + this.priceCoefficient = priceCoefficient; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getCoordinate() { + return coordinate; + } + + public void setCoordinate(String coordinate) { + this.coordinate = coordinate; + } + + public String getGid() { + return gid; + } + + public void setGid(String gid) { + this.gid = gid; + } + + public Integer getState() { + return state; + } + + public void setState(Integer state) { + this.state = state; + } + + public Date getInsertTime() { + return insertTime; + } + + public void setInsertTime(Date insertTime) { + this.insertTime = insertTime; + } +} diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderPrivateCar.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderPrivateCar.java index 868cb51..357f65f 100644 --- a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderPrivateCar.java +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderPrivateCar.java @@ -22,6 +22,7 @@ * @since 2020-09-02 */ @TableName("t_order_private_car") + public class TOrderPrivateCar extends Model<TOrderPrivateCar> { private static final long serialVersionUID = 1L; @@ -31,6 +32,10 @@ */ @TableId(value = "id", type = IdType.AUTO) private Integer id; + /** + * 异常订单 1是0否 + */ + private Integer isException; /** * 类型(1=普通订单,2=摆渡订单) */ @@ -296,9 +301,7 @@ * 是否异常 1=是,0=否 */ private Integer isAbnormal; - @ApiModelProperty(value = "是否异常 1=是 0=否") - @TableField("isException") - private Integer isException; + @ApiModelProperty(value = "修改后的价格") @TableField("updatePrice") private BigDecimal updatePrice; @@ -334,13 +337,7 @@ this.lastPushTime = lastPushTime; } - public Integer getIsException() { - return isException; - } - public void setIsException(Integer isException) { - this.isException = isException; - } public BigDecimal getUpdatePrice() { return updatePrice; @@ -991,4 +988,12 @@ ", serverCarModelId=" + serverCarModelId + "}"; } + + public Integer getIsException() { + return isException; + } + + public void setIsException(Integer isException) { + this.isException = isException; + } } diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderPrivateCarService.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderPrivateCarService.java index 1639904..12f67f8 100644 --- a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderPrivateCarService.java +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderPrivateCarService.java @@ -37,6 +37,22 @@ @Param("driver") String driver, @Param("state") Integer state, Integer smsNumber); + // 待确认订单列表 + List<Map<String,Object>> getPrivateCarOrderListConfirm(@Param("page") Page<Map<String, Object>> page, + @Param("beginTime") String beginTime, + @Param("endTime") String endTime, + @Param("roleType") Integer roleType, + @Param("nowUserId") Integer nowUserId, + @Param("orderNum") String orderNum, + @Param("orderSource") Integer orderSource, + @Param("userName") String userName, + @Param("userPhone") String userPhone, + @Param("passengers") String passengers, + @Param("passengersPhone") String passengersPhone, + @Param("serverCarModelId") Integer serverCarModelId, + @Param("driver") String driver, + @Param("state") Integer state, + Integer smsNumber); /** * 根据专车订单ID获取专车订单详情 diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSpecialAreaBillingService.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSpecialAreaBillingService.java new file mode 100644 index 0000000..32da378 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSpecialAreaBillingService.java @@ -0,0 +1,24 @@ +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.SpecialAreaBilling; +import com.stylefeng.guns.modular.system.model.TOrderPrivateCar; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * <p> + * 订单-专车 服务类 + * </p> + * + * @author 吕雪 + * @since 2020-09-02 + */ +public interface ITSpecialAreaBillingService extends IService<SpecialAreaBilling> { + + + List<Map<String, Object>> list(Page<Map<String, Object>> page, String areaName); +} diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SpecialAreaBillingServiceImpl.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SpecialAreaBillingServiceImpl.java new file mode 100644 index 0000000..6c9048b --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SpecialAreaBillingServiceImpl.java @@ -0,0 +1,23 @@ +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.TSpecialAreaBillingMapper; +import com.stylefeng.guns.modular.system.model.SpecialAreaBilling; +import com.stylefeng.guns.modular.system.service.ITSpecialAreaBillingService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Map; + +@Service +@Transactional +public class SpecialAreaBillingServiceImpl extends ServiceImpl<TSpecialAreaBillingMapper, SpecialAreaBilling> implements ITSpecialAreaBillingService { + + + @Override + public List<Map<String, Object>> list(Page<Map<String, Object>> page, String areaName) { + return this.baseMapper.list(page,areaName); + } +} diff --git a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderPrivateCarServiceImpl.java b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderPrivateCarServiceImpl.java index 11b2156..4223ebd 100644 --- a/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderPrivateCarServiceImpl.java +++ b/ManagementZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderPrivateCarServiceImpl.java @@ -26,6 +26,11 @@ Integer smsNumber) { return this.baseMapper.getPrivateCarOrderList(page, beginTime, endTime, roleType, nowUserId, orderNum, orderSource, userName, userPhone, passengers, passengersPhone, serverCarModelId, driver, state,smsNumber); } + @Override + public List<Map<String, Object>> getPrivateCarOrderListConfirm(Page<Map<String, Object>> page, String beginTime, String endTime, Integer roleType, Integer nowUserId, String orderNum, Integer orderSource, String userName, String userPhone, String passengers, String passengersPhone, Integer serverCarModelId, String driver, Integer state, + Integer smsNumber) { + return this.baseMapper.getPrivateCarOrderListConfirm(page, beginTime, endTime, roleType, nowUserId, orderNum, orderSource, userName, userPhone, passengers, passengersPhone, serverCarModelId, driver, state,smsNumber); + } @Override public Map<String, Object> getPrivateCarOrderDetailById(Integer orderId) { diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling.html new file mode 100644 index 0000000..ea773ff --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling.html @@ -0,0 +1,59 @@ +@layout("/common/_container.html"){ +<div class="row"> + <div class="col-sm-12"> + <div class="ibox float-e-margins"> + <div class="ibox-title"> + <h5>特殊区域计费</h5> + </div> + <div class="ibox-content"> + <div class="row row-lg"> + <div class="col-sm-12"> + <div class="row"> + <div class="col-sm-3"> + <#TimeCon id="createTime" name="添加时间" isTime="false"/> + </div> + <div class="col-sm-3"> + <#NameCon id="areaName" name="区域名称" /> + </div> + <div class="col-sm-3"> + <#button name="搜索" icon="fa-search" clickFun="SpecialAreaBilling.search()"/> + <#button name="重置" icon="fa-trash" clickFun="SpecialAreaBilling.resetSearch()" space="true"/> + </div> + <div class="col-sm-3"> + <input type="file" name="file" style="width:0px;height:0px;" id="uploadEventFile" onchange="TCar.exportCar()"> + </div> + </div> + <div class="hidden-xs" id="TCarTableToolbar" role="group"> + @if(shiro.hasPermission("/SpecialAreaBilling/add")){ + <#button name="添加" icon="fa-plus" clickFun="SpecialAreaBilling.add()"/> + @} + @if(shiro.hasPermission("/SpecialAreaBilling/edit")){ + <#button name="修改" icon="fa-edit" clickFun="SpecialAreaBilling.edit()" space="true"/> + @} + @if(shiro.hasPermission("/SpecialAreaBilling/delete")){ + <#button name="删除" icon="fa-remove" clickFun="SpecialAreaBilling.delete()" space="true"/> + @} + @if(shiro.hasPermission("/SpecialAreaBilling/freeze")){ + <#button name="冻结" icon="fa-remove" clickFun="SpecialAreaBilling.freeze()" space="true"/> + @} + @if(shiro.hasPermission("/SpecialAreaBilling/thaw")){ + <#button name="解冻" icon="fa-remove" clickFun="SpecialAreaBilling.thaw()" space="true"/> + @} + + </div> + <#table id="SpecialAreaBillingTable"/> + + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/specialAreaBilling/specialAreaBilling.js"></script> +<script> + laydate.render({ + elem: '#createTime' + ,range: true + }); +</script> +@} diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling_add.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling_add.html new file mode 100644 index 0000000..e4f862a --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling_add.html @@ -0,0 +1,136 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins" xmlns="http://www.w3.org/1999/html"> + <div class="ibox-content"> + <div class="form-horizontal" id="siteInfoForm"> + <div class="row"> + <div class="col-sm-12"> + <div class=""> + <h3 style="margin-left: 100px;">特殊区域价格设置新增</h3> + </div> + <div class="form-group"> + <label class="col-sm-2 control-label">*区域名称:</label> + <div class="col-sm-6"> + <input type="text" class="form-control" id="areaName" name="areaName"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-2 control-label">*价格系数:</label> + <div class="col-sm-6"> + <input type="text" class="form-control" id="priceCoefficient" name="priceCoefficient"> + </div> + </div> + 注:若行程终点在此电子围栏里则需根据车型计费价格*价格系数计算金额,例如:常区专车车型费用为30, + </br> + 此区域价格系数为1.2,若行程终点在此区域则计算价格为36(30*1.2) + <div class="form-group"> + <label class="col-sm-2 control-label">备注:</label> + <div class="col-sm-6"> + <input type="text" class="form-control" id="remark" name="remark"> + </div> + </div> + + <div class="form-group"> + <label class="col-sm-2 control-label">状态:</label> + <div class="col-sm-10"> + <div class="form-group"> + <div class="col-sm-9"> + <input type="checkbox" class="js-switch" id="state" checked/> + </div> + </div> + </div> + </div> + + <div class=""> + <h3 style="margin-left: 100px;margin-top: 70px;">区域范围</h3> + </div> + <div class="form-group"> + + + </div> + + <div class="form-group" id="areaType2Div" > + <label class="col-sm-2 control-label">电子围栏:</label> + <div class="col-sm-8"> + <div id="container" style="height: 350px;width: 1000px;"></div> + <div class='info' style="margin-top:10px;position: absolute; z-index: 999; left: 20px; width: 450px;">操作说明:圆和矩形通过拖拽来绘制,其他覆盖物通过点击来绘制</div> + <div class="input-card" style='margin-top:28px;width: 100rem; z-index: 999; bottom: 20px;'> + <div class="input-item"> + <!--<input type="radio" name='func' checked="" value='marker'><span class="input-text">画点</span>--> + <!--<input type="radio" name='func' value='polyline'><span class="input-text">画折线</span> --> + <input type="radio" name='func' value='polygon'><span class="input-text" style='width:5rem;'>画多边形</span> + <!--<input type="radio" name='func' value='rectangle'><span class="input-text" style='width:5rem;'>画矩形</span> --> + <input type="radio" name='func' value='circle'><span class="input-text" style='width:5rem;'>画圆</span> + </div> + <div class="input-item"> + <input id="clear" type="button" class="btn" value="清除" /> + <input id="close" type="button" class="btn" value="关闭绘图" /> + <input type="button" class="btn" value="开始编辑" onclick="editAll()" /> + <input type="button" class="btn" value="结束编辑" onclick="closeEdit()" /> + </div> + </div> + </div> + <div class="col-sm-2"> + <div class="form-group"> + <label style='color:grey'>行政区边界查询</label> + <div class="input-group"> + <div class="input-group-btn"> + <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" + type="button">行政级别 + </button> + </div> + <select id="level" class="form-control"> + <option value="district">区</option> + <option value="city">市</option> + <option value="province">省</option> + </select> + + </div> + </div> + <div class="form-group"> + <div class="input-group"> + <div class="input-group-btn"> + <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" + type="button">名称/adcode + </button> + </div> + <input id='district' class="layui-input form-control" type="text" value=''> + </div> + </div> + <input id="find" type="button" class="btn btn-primary btn-sm" value="查询" /> + </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="TSiteInfoDlg.addSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSiteInfoDlg.close()"/> + </div> + </div> + </div> + + </div> +</div> +<script type="text/javascript"> + window._AMapSecurityConfig = { + securityJsCode:'74ded7b46116084074e0bd314bca7b1d', + } +</script> +<script src="https://webapi.amap.com/maps?v=1.4.15&key=83a918fd5e6ed82be74e3056d403dbe6&plugin=AMap.MouseTool,AMap.DistrictSearch,AMap.PolyEditor,AMap.RectangleEditor,AMap.CircleEditor"></script> +<script src="${ctxPath}/static/modular/system/specialAreaBilling/electricFence.js"></script> +<script src="${ctxPath}/static/modular/system/specialAreaBilling/specialAreaBilling_info.js"></script> + +<script> + $(function() { + var elem = document.querySelector(".js-switch"); + var init = new Switchery(elem); + laydate.render({ + elem: '#assessment' + ,type: 'time' + ,range: true + }); + }); + +</script> +@} diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling_edit.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling_edit.html new file mode 100644 index 0000000..4dfd6cb --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/specialAreaBilling/specialAreaBilling_edit.html @@ -0,0 +1,140 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins" xmlns="http://www.w3.org/1999/html"> + <div class="ibox-content"> + <div class="form-horizontal" id="siteInfoForm"> + <div class="row"> + <input type="hidden" id="id" name="id" value="${data.id}"> + + <div class="col-sm-12"> + <div class=""> + <h3 style="margin-left: 100px;">特殊区域价格设置编辑</h3> + </div> + <div class="form-group"> + <label class="col-sm-2 control-label">*区域名称:</label> + <div class="col-sm-6"> + <input type="text" class="form-control" id="areaName" name="areaName" value="${data.areaName}"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-2 control-label">*价格系数:</label> + <div class="col-sm-6"> + <input type="text" class="form-control" id="priceCoefficient" name="priceCoefficient" value="${data.priceCoefficient}"> + </div> + </div> + 注:若行程终点在此电子围栏里则需根据车型计费价格*价格系数计算金额,例如:常区专车车型费用为30, + </br> + 此区域价格系数为1.2,若行程终点在此区域则计算价格为36(30*1.2) + <div class="form-group"> + <label class="col-sm-2 control-label">备注:</label> + <div class="col-sm-6"> + <input type="text" class="form-control" id="remark" name="remark" value="${data.remark}"> + </div> + </div> + + <div class="form-group"> + <label class="col-sm-2 control-label">状态:</label> + <div class="col-sm-10"> + <div class="form-group"> + <div class="col-sm-9"> + <input type="checkbox" class="js-switch" id="state" + ${1 != data.state ? '' : 'checked=checked'} + /> + </div> + </div> + </div> + </div> + + <div class=""> + <h3 style="margin-left: 100px;margin-top: 70px;">区域范围</h3> + </div> + <div class="form-group"> + + + </div> + + <div class="form-group" id="areaType2Div" > + <label class="col-sm-2 control-label">电子围栏:</label> + <div class="col-sm-8"> + <div id="container" style="height: 350px;width: 1000px;"></div> + <div class='info' style="margin-top:10px;position: absolute; z-index: 999; left: 20px; width: 450px;">操作说明:圆和矩形通过拖拽来绘制,其他覆盖物通过点击来绘制</div> + <div class="input-card" style='margin-top:28px;width: 100rem; z-index: 999; bottom: 20px;'> + <div class="input-item"> + <!--<input type="radio" name='func' checked="" value='marker'><span class="input-text">画点</span>--> + <!--<input type="radio" name='func' value='polyline'><span class="input-text">画折线</span> --> + <input type="radio" name='func' value='polygon'><span class="input-text" style='width:5rem;'>画多边形</span> + <!--<input type="radio" name='func' value='rectangle'><span class="input-text" style='width:5rem;'>画矩形</span> --> + <input type="radio" name='func' value='circle'><span class="input-text" style='width:5rem;'>画圆</span> + </div> + <div class="input-item"> + <input id="clear" type="button" class="btn" value="清除" /> + <input id="close" type="button" class="btn" value="关闭绘图" /> + <input type="button" class="btn" value="开始编辑" onclick="editAll()" /> + <input type="button" class="btn" value="结束编辑" onclick="closeEdit()" /> + </div> + </div> + </div> + <div class="col-sm-2"> + <div class="form-group"> + <label style='color:grey'>行政区边界查询</label> + <div class="input-group"> + <div class="input-group-btn"> + <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" + type="button">行政级别 + </button> + </div> + <select id="level" class="form-control"> + <option value="district">区</option> + <option value="city">市</option> + <option value="province">省</option> + </select> + + </div> + </div> + <div class="form-group"> + <div class="input-group"> + <div class="input-group-btn"> + <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" + type="button">名称/adcode + </button> + </div> + <input id='district' class="layui-input form-control" type="text" value=''> + </div> + </div> + <input id="find" type="button" class="btn btn-primary btn-sm" value="查询" /> + </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="TSiteInfoDlg.editSubmit()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSiteInfoDlg.close()"/> + </div> + </div> + </div> + + </div> +</div> +<script type="text/javascript"> + window._AMapSecurityConfig = { + securityJsCode:'74ded7b46116084074e0bd314bca7b1d', + } +</script> +<script src="https://webapi.amap.com/maps?v=1.4.15&key=83a918fd5e6ed82be74e3056d403dbe6&plugin=AMap.MouseTool,AMap.DistrictSearch,AMap.PolyEditor,AMap.RectangleEditor,AMap.CircleEditor"></script> +<script src="${ctxPath}/static/modular/system/specialAreaBilling/electricFence.js"></script> +<script src="${ctxPath}/static/modular/system/specialAreaBilling/specialAreaBilling_info.js"></script> + +<script> + $(function() { + var elem = document.querySelector(".js-switch"); + var init = new Switchery(elem); + laydate.render({ + elem: '#assessment' + ,type: 'time' + ,range: true + }); + }); + +</script> +@} diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html index 1bf1096..1a28d1e 100644 --- a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html @@ -239,7 +239,13 @@ </div> </div> </div> - + <div class="form-group" style="display: flex"> + <label class="col-sm-2 control-label">预约单前</label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="limitationTime" name="limitationTime" > + </div> + 分钟前不派单给司机 + </div> <div class="form-group"> <label class="col-sm-2 control-label">是否需要摆渡车:</label> <div class="col-sm-9" style="display: flex;align-items: center;"> diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html index 2fad501..684d284 100644 --- a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html @@ -173,6 +173,13 @@ </fieldset> </div> </div> + <div class="form-group" style="display: flex"> + <label class="col-sm-2 control-label">预约单前</label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="limitationTime" name="limitationTime" > + </div> + 分钟前不派单给司机 + </div> <div class="form-group"> <label class="col-sm-3 control-label">是否需要摆渡车:</label> <div class="col-sm-9" style="display: flex;align-items: center;"> diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detail.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detail.html index be5f014..fa3c399 100644 --- a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detail.html +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detail.html @@ -296,7 +296,13 @@ </div> </div> </div> - + <div class="form-group" style="display: flex"> + <label class="col-sm-2 control-label">预约单前</label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="limitationTime" name="limitationTime"value="${item.limitationTime}"> + </div> + 分钟前不派单给司机 + </div> <div class="form-group"> <label class="col-sm-2 control-label">是否需要摆渡车:</label> <div class="col-sm-9" style="display: flex;align-items: center;"> diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detailFranchisee.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detailFranchisee.html index d8ed2a4..8372fe7 100644 --- a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detailFranchisee.html +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detailFranchisee.html @@ -197,6 +197,13 @@ </fieldset> </div> </div> + <div class="form-group" style="display: flex"> + <label class="col-sm-2 control-label">预约单前</label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="limitationTime" name="limitationTime"value="${item.limitationTime}"> + </div> + 分钟前不派单给司机 + </div> <div class="form-group"> <label class="col-sm-3 control-label">是否需要摆渡车:</label> <div class="col-sm-9" style="display: flex;align-items: center;"> diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_edit.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_edit.html index 1825272..c03c77e 100644 --- a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_edit.html +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_edit.html @@ -279,7 +279,13 @@ </div> </div> </div> - + <div class="form-group" style="display: flex"> + <label class="col-sm-2 control-label">预约单前</label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="limitationTime" name="limitationTime"value="${item.limitationTime}"> + </div> + 分钟前不派单给司机 + </div> <div class="form-group"> <label class="col-sm-2 control-label">是否需要摆渡车:</label> <div class="col-sm-9" style="display: flex;align-items: center;"> diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_updateFranchisee.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_updateFranchisee.html index beae44f..1a020a4 100644 --- a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_updateFranchisee.html +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_updateFranchisee.html @@ -203,6 +203,13 @@ </fieldset> </div> </div> + <div class="form-group" style="display: flex"> + <label class="col-sm-2 control-label">预约单前</label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="limitationTime" name="limitationTime"value="${item.limitationTime}"> + </div> + 分钟前不派单给司机 + </div> <div class="form-group"> <label class="col-sm-3 control-label">是否需要摆渡车:</label> <div class="col-sm-9" style="display: flex;align-items: center;"> diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tAbnormalOrder.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tAbnormalOrder.html new file mode 100644 index 0000000..a0843a8 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tAbnormalOrder.html @@ -0,0 +1,100 @@ +@layout("/common/_container.html"){ +<div class="row" xmlns="http://www.w3.org/1999/html"> + <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"> + <form id="tOrderPrivateCarForm" role="form" action="${ctxPath}/tOrderPrivateCar/getExcel" target="_blank" method="post"> + <div class="col-sm-12"> + + <div class="row"> + <div class="col-sm-3"> + <#TimeCon id="insertTime" name="订单时间" isTime="false"/> + </div> + <div class="col-sm-3"> + <#NameCon id="orderNum" name="订单编号" /> + </div> + <div class="col-sm-3"> + <#SelectCon id="orderSource" name="订单来源" > + <option value="">全部</option> + <option value="1">APP下单</option> + <option value="2">推荐下单</option> + <option value="3">小程序下单</option> + <option value="4">司机下单</option> + <option value="5">调度下单</option> + </#SelectCon> + </div> + <div class="col-sm-3"> + <#NameCon id="userName" name="下单用户昵称" /> + </div> + <div class="col-sm-3"> + <#NameCon id="userPhone" name="下单用户手机" /> + </div> + <div class="col-sm-3"> + <#NameCon id="passengers" name="乘车用户姓名" /> + </div> + <div class="col-sm-3"> + <#NameCon id="passengersPhone" name="乘车用户手机" /> + </div> + <div class="col-sm-3"> + <#SelectCon id="serverCarModelId" name="车型" > + <option value="">全部</option> + @for(obj in carmodelList){ + <option value="${obj.id}">${obj.name}</option> + @} + </#SelectCon> + </div> + <div class="col-sm-3"> + <#NameCon id="driver" name="接单司机" /> + </div> + <div class="col-sm-3"> + <#SelectCon id="state" name="状态" > + <option value="">全部</option> + <option value="1">待接单</option> + <option value="2">待出发</option> + <option value="3">待到达预约地点</option> + <option value="4">待乘客上车</option> + <option value="5">服务中</option> + <option value="6">完成服务</option> + <option value="7">待支付</option> + <option value="8">待评价</option> + <option value="9">已完成</option> + <option value="10">已取消</option> + <option value="11">改派中</option> + <option value="12">取消待支付</option> + </#SelectCon> + </div> + <div class="col-sm-3"> + <#SelectCon id="smsNumber" name="催收次数" > + <option value="">全部</option> + <option value="1">1</option> + <option value="2">2</option> + <option value="3">3</option> + </#SelectCon> + </div> + <div class="col-sm-3"> + <#button name="搜索" icon="fa-search" clickFun="TAbnormalOrder.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TAbnormalOrder.resetSearch()" space="true"/> + </div> + </div> + </form> + <div class="hidden-xs" id="TAbnormalOrderTableToolbar" role="group"> + </div> + <#table id="TAbnormalOrderTable"/> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tOrderPrivateCarConfirm/tAbnormalOrder.js"></script> +<script> + laydate.render({ + elem: '#insertTime' + ,range: true + }); +</script> +@} diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tOrderPrivateCar.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tOrderPrivateCar.html new file mode 100644 index 0000000..3e808b1 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tOrderPrivateCar.html @@ -0,0 +1,107 @@ +@layout("/common/_container.html"){ +<div class="row" xmlns="http://www.w3.org/1999/html"> + <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"> + <form id="tOrderPrivateCarForm" role="form" action="${ctxPath}/tOrderPrivateCar/getExcel" target="_blank" method="post"> + <div class="col-sm-12"> + + <div class="row"> + <div class="col-sm-3"> + <#TimeCon id="insertTime" name="订单时间" isTime="false"/> + </div> + <div class="col-sm-3"> + <#NameCon id="orderNum" name="订单编号" /> + </div> + <div class="col-sm-3"> + <#SelectCon id="orderSource" name="订单来源" > + <option value="">全部</option> + <option value="1">APP下单</option> + <option value="2">推荐下单</option> + <option value="3">小程序下单</option> + <option value="4">司机下单</option> + <option value="5">调度下单</option> + </#SelectCon> + </div> + <div class="col-sm-3"> + <#NameCon id="userName" name="下单用户昵称" /> + </div> + <div class="col-sm-3"> + <#NameCon id="userPhone" name="下单用户手机" /> + </div> + <div class="col-sm-3"> + <#NameCon id="passengers" name="乘车用户姓名" /> + </div> + <div class="col-sm-3"> + <#NameCon id="passengersPhone" name="乘车用户手机" /> + </div> + <div class="col-sm-3"> + <#SelectCon id="serverCarModelId" name="车型" > + <option value="">全部</option> + @for(obj in carmodelList){ + <option value="${obj.id}">${obj.name}</option> + @} + </#SelectCon> + </div> + <div class="col-sm-3"> + <#NameCon id="driver" name="接单司机" /> + </div> + <div class="col-sm-3"> + <#SelectCon id="state" name="状态" > + <option value="">全部</option> + <option value="1">待接单</option> + <option value="2">待出发</option> + <option value="3">待到达预约地点</option> + <option value="4">待乘客上车</option> + <option value="5">服务中</option> + <option value="6">完成服务</option> + <option value="7">待支付</option> + <option value="8">待评价</option> + <option value="9">已完成</option> + <option value="10">已取消</option> + <option value="11">改派中</option> + <option value="12">取消待支付</option> + </#SelectCon> + </div> + <div class="col-sm-3"> + <#SelectCon id="smsNumber" name="催收次数" > + <option value="">全部</option> + <option value="1">1</option> + <option value="2">2</option> + <option value="3">3</option> + </#SelectCon> + </div> + <div class="col-sm-3"> + <#button name="搜索" icon="fa-search" clickFun="TOrderPrivateCar.search()"/> + <#button name="重置" icon="fa-trash" clickFun="TOrderPrivateCar.resetSearch()" space="true"/> + </div> + </div> + </form> + <div class="hidden-xs" id="TOrderPrivateCarTableToolbar" role="group"> + @if(shiro.hasPermission("/tOrderPrivateCarConfirm/orderDetail")){ + <#button name="订单详情" icon="fa-plus" clickFun="TOrderPrivateCar.orderDetail()"/> + @} + @if(shiro.hasPermission("/tOrderPrivateCarConfirm/confirmMoney")){ + <#button name="确认" icon="fa-edit" clickFun="TOrderPrivateCar.confirmMoney()" space="true"/> + @} + + </div> + <#table id="TOrderPrivateCarTable"/> + </div> + </div> + </div> + </div> + </div> +</div> +<script src="${ctxPath}/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar.js"></script> +<script> + laydate.render({ + elem: '#insertTime' + ,range: true + }); +</script> +@} diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tOrderPrivateCar_orderDetail.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tOrderPrivateCar_orderDetail.html new file mode 100644 index 0000000..2c98c94 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/tOrderPrivateCar_orderDetail.html @@ -0,0 +1,138 @@ +@layout("/common/_container.html"){ +<style type="text/css"> + html, body, #container { + height: 100%; + width: 100%; + } + + .input-card .btn{ + margin-right: 1.2rem; + width: 9rem; + } + + .input-card .btn:last-child{ + margin-right: 0; + } +</style> +<div class="ibox float-e-margins"> + <div class="ibox-content"> + <div class="form-horizontal"> + <input type="hidden" id="id" name="id" value="${item.id}"> + <div class="row" style="margin-top: 30px;"> + <div class="col-sm-4"> + <h2 class="h3Class" style="font-weight: 700;">订单详情</h2> + </div> + </div> + <div class="row"> + <div class="col-sm-6 b-r"> + <#label id="insertTimeStr" name="下单时间" value="${item.insertTimeStr}"/> + <!--<#label id="orderSourceStr" name="订单来源" value="${item.orderSourceStr}"/>--> + <#label id="userName" name="下单用户昵称" value="${item.userName}"/> + <#label id="passengers" name="乘车用户昵称" value="${item.passengers}"/> + <#label id="placementAddress" name="起点" value="${item.startAddress}"/> + <#label id="serverCarModel" name="选择车型" value="${item.serverCarModel}"/> + <#label id="car" name="接单车辆" value="${item.car}"/> + <#label id="boardingAddress" name="上车地点" value="${item.boardingAddress}"/> + <#label id="getoffAddress" name="下车地点" value="${item.getoffAddress}"/> + </div> + + <div class="col-sm-6"> + <#label id="orderNum" name="订单编号" value="${item.orderNum}"/> + <#label id="travelTimeStr" name="乘车时间" value="${item.travelTimeStr}"/> + <#label id="userPhone" name="下单用户手机号" value="${item.userPhone}"/> + <#label id="passengersPhone" name="乘车用户手机号" value="${item.passengersPhone}"/> + <#label id="endAddress" name="终点" value="${item.endAddress}"/> + <#label id="driver" name="接单司机" value="${item.driver}"/> + <#label id="companyName" name="车辆所属机构" value="${item.companyName}"/> + <#label id="boardingTimeStr" name="上车时间" value="${item.boardingTimeStr}"/> + <#label id="getoffTimeStr" name="下车时间" value="${item.getoffTimeStr}"/> + </div> + </div> + <div class="row" style="margin-top: 30px;"> + <div class="col-sm-4"> + <h2 class="h3Class" style="font-weight: 700;">费用明细</h2> + </div> + </div> + <div class="row"> + @if(isNotEmpty(item.orderMoney) && item.orderMoney > 0){ + <div class="col-sm-6"> + <#label id="orderMoney" name="订单总价" value="${item.orderMoney}元"/> + @if(isNotEmpty(item.priceType)){ + @if(item.priceType == 1){ + <#label id="priceType" name="收费方式" value="按里程费"/> + @} else if(item.priceType == 2){ + 按预估费收费 + <#label id="priceType" name="收费方式" value="按预估费收费"/> + @}else{ + <#label id="priceType" name="收费方式" value="手动录入"/> + @} + @}else{ + <#label id="priceType" name="收费方式" value=""/> + @} + <#label id="abnormalMoney" name="异常金额" value="${item.abnormalMoney}元"/> + <#label id="travelMoney" name="起步价" value="-"/> + <#label id="travelMoney" name="里程费" value="-"/> + <#label id="durationMoney" name="时长费" value="-"/> + <#label id="waitMoney" name="等待费" value="-"/> + <#label id="parkMoney" name="停车费" value="-"/> + <#label id="roadTollMoney" name="过路费" value="-"/> + <#label id="longDistanceMoney" name="远途费" value="-"/> + <#label id="tipMoney" name="首单免费" value="-"/> + @if(isNotEmpty(item.discountMoney)){ + <#label id="discountMoney" name="折扣优惠金额" value="-"/> + @} + @if(isNotEmpty(item.payMoney)){ + <#label id="payMoney" name="实际支付费用" value="${item.payMoney}元"/> + @}else{ + <#label id="payMoney" name="实际支付费用" value="0.00元"/> + @} + + <#label id="payTypeStr" name="支付方式" value="${item.payTypeStr}"/> + <#label id="couponMoney" name="优惠券抵扣费用" value="-"/> + <#label id="redPacketMoney" name="红包抵扣金额" value="-"/> + </div> + <!--<div class="col-sm-3"> + <#label id="startMileage" name="起步里程" value="${item.startMileage}"/> + <#label id="mileageKilometers" name="公里数" value="${item.mileageKilometers}"/> + + </div>--> + <div class="col-sm-6"> + <#label id="platIncome" name="平台收益" value="${item.platIncome}元"/> + <#label id="companyIncome" name="分公司收益" value="${item.companyIncome}元"/> + <#label id="franchiseeIncome" name="加盟商收益" value="${item.franchiseeIncome}元"/> + <#label id="driverIncome" name="司机收益" value="${item.driverIncome}元"/> + </div> + @}else{ + <h4 style="margin-left: 10%">暂无费用明细</h4> + @} + </div> + <div class="row" style="margin-top: 30px;"> + <div class="col-sm-4"> + <h2 class="h3Class" style="font-weight: 700;">线路轨迹</h2> + </div> + </div> + <div class="row"> + <div class="col-sm-10"> + <div class="form-horizontal" id="container" style="margin-left: 50px;width: 100%; height: 500px;"></div> + <div class="input-card" style="margin-left: 50px;"> + <h4>轨迹回放控制</h4> + <div class="input-item"> + <input type="button" class="btn" value="开始动画" id="start" onclick="startAnimation()"/> + <input type="button" class="btn" value="暂停动画" id="pause" onclick="pauseAnimation()"/> + <input type="button" class="btn" value="继续动画" id="resume" onclick="resumeAnimation()"/> + <input type="button" class="btn" value="停止动画" id="stop" onclick="stopAnimation()"/> + </div> + <div class="input-item"> + </div> + </div> + </div> + </div> + + </div> + </div> +</div> +<script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script> +<script src="https://webapi.amap.com/maps?v=1.4.8&key=83a918fd5e6ed82be74e3056d403dbe6"></script> +<script src="https://cache.amap.com/lbs/static/addToolbar.js"></script> +<script src="${ctxPath}/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar_info.js"></script> +@} diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/toConfirmMoney.html b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/toConfirmMoney.html new file mode 100644 index 0000000..8bf2b43 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCarConfirm/toConfirmMoney.html @@ -0,0 +1,34 @@ +@layout("/common/_container.html"){ +<div class="ibox float-e-margins" xmlns="http://www.w3.org/1999/html"> + <div class="ibox-content"> + <div class="form-horizontal"> + <input type="hidden" id="id" value="${item.id}"> + <div class="row"> + <div class="col-sm-6 b-r"> + 收费类型: @if(isNotEmpty(item.priceType)){ + @if(item.priceType == 1){ + 按里程费 + @}else if(item.priceType == 2){ + 按预估费收费 + @}else{ + 手动录入 + @} + @} + </br> + <#input id="orderMoney" value="${item.orderMoney}" 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="TOrderPrivateCarInfoDlg.confirmMoney()"/> + <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" + clickFun="TOrderPrivateCarInfoDlg.close()"/> + </div> + </div> + </div> + + </div> +</div> +<script src="${ctxPath}/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar_info.js"></script> +@} diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/electricFence.js b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/electricFence.js new file mode 100644 index 0000000..d98b147 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/electricFence.js @@ -0,0 +1,377 @@ +var map = new AMap.Map('container',{ + resizeEnable: true, + zoom:15, + center: [102.2667, 27.8833] // 西昌坐标 +}); +setCenterCoordinate(); +function setCenterCoordinate() { + var locationsStr = $("#locationList1").val(); + if ("" != locationsStr && null != locationsStr) { + var locations = JSON.parse(locationsStr); + var gid = locations[0].coordinate; + var path = convertData(gid); + var center = path[0]; + map.setCenter(center) + } +} +function setElectricFence() { + var locationsStr = $("#locationList1").val(); + if ("" != locationsStr && null != locationsStr) { + var locations = JSON.parse(locationsStr); + for (let i = 0; i < locations.length; i++) { + console.log(locations[i]) + var gid = locations[i].coordinate + if (gid == null || gid == "") { + continue; + } + var path = convertData(gid) + var polygon = new AMap.Polygon({ + path: path, + strokeWeight: 1, + fillOpacity: 0.4, + fillColor: '#00b0ff', + strokeColor: '#80d8ff' + }); + map.add(polygon); + } + } +} + +function convertData(data) { + var coordinates = data.split(';'); + var path = []; + for (var i = 0; i < coordinates.length; i++) { + var coordinate = coordinates[i].split(','); + var lng = parseFloat(coordinate[0]); + var lat = parseFloat(coordinate[1]); + path.push([lng, lat]); + } + return path; +} + +var value = ""; +map.getCity( + callback=function (result) { + value = result.city; + drawBounds(); + } +); + + +var mouseTool = new AMap.MouseTool(map); +//监听draw事件可获取画好的覆盖物 +var overlays = []; +var name = null; +var coordinate = '';//存储坐标 +var objs = {//存储各种类型的覆盖物对象 + "polyline":[], + "polygon":[], + "rectangle":[], + "circle":[] +}; +var editors = []; +mouseTool.on('draw',function(e){ + overlays.push(e.obj); + console.log(e.obj.getPath()); + + switch (name) { + case 'polyline':{//折线图 + var polyline = e.obj.getPath(); + getCoordinate(polyline); + objs.polyline.push(e.obj); + break; + } + case 'polygon':{//多边形 + var polygon = e.obj.getPath(); + getCoordinate(polygon); + objs.polygon.push(e.obj); + break; + } + case 'rectangle':{//矩形 + var rectangle = e.obj.getPath(); + getCoordinate(rectangle); + objs.rectangle.push(e.obj); + break; + } + case 'circle':{//圆形 + var center = e.obj.getCenter(); + var radius = e.obj.getRadius(); + if(radius > 5000){ + Feng.error("创建电子围栏失败,圆半径不能大于5000米"); + return; + } + coordinate += center.lng + ',' + center.lat + ';' + radius + "_"; + objs.circle.push(e.obj); + break; + } + } + console.log(coordinate); +}) + + +var district = null; +var polygons=[]; +function drawBounds() { + if(value == ''){ + value = '北京市'; + } + + //加载行政区划插件 + if(!district){ + //实例化DistrictSearch + var opts = { + subdistrict: 0, //获取边界不需要返回下级行政区 + extensions: 'all', //返回行政区边界坐标组等具体信息 + level: 'district' //查询行政级别为 市 + }; + district = new AMap.DistrictSearch(opts); + } + //行政区查询 + district.setLevel(document.getElementById('level').value) + district.search(value, function(status, result) { + map.remove(polygons)//清除上次结果 + polygons = []; + var bounds = result.districtList[0].boundaries; + if (bounds) { + for (var i = 0, l = bounds.length; i < l; i++) { + //生成行政区划polygon + var polygon = new AMap.Polygon({ + strokeWeight: 1, + path: bounds[i], + fillOpacity: 0.4, + fillColor: '#80d8ff', + strokeColor: '#0091ea' + }); + polygons.push(polygon); + } + } + map.add(polygons) + map.setFitView(polygons);//视口自适应 + }); +} + +document.getElementById('find').onclick = function () { + value = document.getElementById('district').value; + if(value == ''){ + value = "北京市"; + } + drawBounds() +}; +document.getElementById('district').onkeydown = function(e) { + if (e.keyCode === 13) { + value = document.getElementById('district').value; + if(value == ''){ + value = "北京市"; + } + drawBounds(); + return false; + } + return true; +}; + + + + +//处理坐标结果 +function getCoordinate(arr){ + var str = ''; + for(var i = 0; i < arr.length; i++){ + var lng = arr[i].lng; + var lat = arr[i].lat; + str += lng + ',' + lat + ';'; + } + coordinate += str.substring(0, str.length - 1) + "_"; +} + + +function draw(type){ + switch(type){ + case 'marker':{ + mouseTool.marker({ + //同Marker的Option设置 + }); + break; + } + case 'polyline':{ + mouseTool.polyline({ + strokeColor:'#80d8ff' + //同Polyline的Option设置 + }); + break; + } + case 'polygon':{ + mouseTool.polygon({ + fillColor:'#00b0ff', + strokeColor:'#80d8ff' + //同Polygon的Option设置 + }); + break; + } + case 'rectangle':{ + mouseTool.rectangle({ + fillColor:'#00b0ff', + strokeColor:'#80d8ff' + //同Polygon的Option设置 + }); + break; + } + case 'circle':{ + mouseTool.circle({ + fillColor:'#00b0ff', + strokeColor:'#80d8ff' + //同Circle的Option设置 + }); + break; + } + } +} +var radios = document.getElementsByName('func'); +for(var i=0;i<radios.length;i+=1){ + radios[i].onchange = function(e){ + draw(e.target.value) + name = e.target.value; + } +} +// draw('marker') + +document.getElementById('clear').onclick = function(){ + map.remove(overlays) + overlays = []; + coordinate = ''; + objs.circle = []; + objs.rectangle = []; + objs.polygon = []; + objs.polyline = []; + closeEdit(); +} +document.getElementById('close').onclick = function(){ + mouseTool.close()//关闭,并清除覆盖物 + for(var i=0;i<radios.length;i+=1){ + radios[i].checked = false; + } + closeEdit(); +} + + +//点击提交处理函数 +function submitCoordinate(){ + var name = $('#addressName').val(); + if('' == name){ + Feng.error('请填写地址名称'); + return; + } + if('' == coordinate){ + Feng.error('请在地图上规划区域'); + return; + } + coordinate = coordinate.substring(0, coordinate.length - 1); + +} + +function editAll() { + coordinate = ''; + editors = []; + //折线 + for(var i in objs.polyline){ + var polyline = objs.polyline[i]; + var polyEditor = new AMap.PolyEditor(map, polyline) + polyEditor.on('addnode', function(event) { + // log.info('触发事件:addnode') + }) + + polyEditor.on('adjust', function(event) { + // log.info('触发事件:adjust') + }) + + polyEditor.on('removenode', function(event) { + // log.info('触发事件:removenode') + }) + + polyEditor.on('end', function(e) { + var polyline = e.target.getPath(); + getCoordinate(polyline); + }) + editors.push(polyEditor); + polyEditor.open(); + } + + //多边形 + for(var i in objs.polygon){ + var polygon = objs.polygon[i]; + var polyEditor = new AMap.PolyEditor(map, polygon) + + polyEditor.on('addnode', function(event) { + // log.info('触发事件:addnode') + }) + + polyEditor.on('adjust', function(event) { + // log.info('触发事件:adjust') + }) + + polyEditor.on('removenode', function(event) { + // log.info('触发事件:removenode') + }) + + polyEditor.on('end', function(e) { + var polygon = e.target.getPath(); + getCoordinate(polygon); + }) + editors.push(polyEditor); + polyEditor.open(); + } + + + //矩形 + for(var i in objs.rectangle){ + var rectangle = objs.rectangle[i]; + var rectangleEditor = new AMap.RectangleEditor(map, rectangle) + + rectangleEditor.on('adjust', function(event) { + // log.info('触发事件:adjust') + }) + + rectangleEditor.on('end', function(e) { + var polygon = e.target.getPath(); + getCoordinate(polygon); + }) + editors.push(rectangleEditor); + rectangleEditor.open(); + } + + //圆形 + for(var i in objs.circle){ + var circle = objs.circle[i]; + var circleEditor = new AMap.CircleEditor(map, circle) + + circleEditor.on('move', function(event) { + // log.info('触发事件:move') + }) + + circleEditor.on('adjust', function(e) { + var radius = e.target.getRadius(); + if(radius > 5000){ + Feng.error("创建电子围栏失败,圆半径不能大于5000米"); + return; + } + }) + + circleEditor.on('end', function(e) { + var center = e.target.getCenter(); + var radius = e.target.getRadius(); + coordinate += center.lng + ',' + center.lat + ';' + radius + "_"; + }) + editors.push(circleEditor); + circleEditor.open(); + } +} + + +function closeEdit() { + for(var i in editors){ + var editor = editors[i]; + editor.close(); + } +} +$(function () { + setElectricFence() +}) \ No newline at end of file diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/specialAreaBilling.js b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/specialAreaBilling.js new file mode 100644 index 0000000..55a508a --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/specialAreaBilling.js @@ -0,0 +1,169 @@ +/** + * 跨城站点管理管理初始化 + */ +var SpecialAreaBilling = { + id: "SpecialAreaBillingTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +SpecialAreaBilling.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, + {title: '站点名称', field: 'areaName', visible: true, align: 'center', valign: 'middle'}, + {title: '计费系数', field: 'priceCoefficient', visible: true, align: 'center', valign: 'middle'}, + {title: '备注', field: 'remark', visible: true, align: 'center', valign: 'middle'}, + {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; + } + } + ]; +}; + +/** + * 检查是否选中 + */ +SpecialAreaBilling.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + SpecialAreaBilling.seItem = selected[0]; + return true; + } +}; + +/** + * 点击添加跨城站点管理 + */ +SpecialAreaBilling.add = function () { + var index = layer.open({ + type: 2, + title: '添加特殊区域计费', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/specialAreaBilling/add' + }); + this.layerIndex = index; +}; + +/** + * 打开查看跨城站点管理详情 + */ +SpecialAreaBilling.edit = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '编辑特殊区域计费', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/specialAreaBilling/edit/' + SpecialAreaBilling.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 删除车辆管理 + */ +SpecialAreaBilling.delete = function () { + if (this.check()) { + swal({ + title: "您是否确认删除?", + text: "请谨慎操作,删除后数据无法恢复!", + type: "warning", + showCancelButton: true, + confirmButtonColor: "#DD6B55", + confirmButtonText: "删除", + closeOnConfirm: true + }, function () { + var ajax = new $ax(Feng.ctxPath + "/specialAreaBilling/delete", function (data) { + swal("删除成功", "您已经成功删除了。", "success"); + TCar.table.refresh(); + }, function (data) { + swal("删除失败", data.responseJSON.message+"!", "warning"); + }); + ajax.set("id",SpecialAreaBilling.seItem.id); + ajax.start(); + }); + } +};SpecialAreaBilling.freeze = function () { + if (this.check()) { + swal({ + title: "您是否确认冻结?", + type: "warning", + showCancelButton: true, + confirmButtonColor: "#DD6B55", + confirmButtonText: "冻结", + closeOnConfirm: true + }, function () { + var ajax = new $ax(Feng.ctxPath + "/specialAreaBilling/freeze", function (data) { + Feng.success("冻结成功"); + SpecialAreaBilling.table.refresh(); + }, function (data) { + swal("删除失败", data.responseJSON.message+"!", "warning"); + }); + ajax.set("id",SpecialAreaBilling.seItem.id); + ajax.start(); + }); + } +}; +SpecialAreaBilling.thaw = function () { + if (this.check()) { + swal({ + title: "您是否确认解冻?", + type: "warning", + showCancelButton: true, + confirmButtonColor: "#DD6B55", + confirmButtonText: "解冻", + closeOnConfirm: true + }, function () { + var ajax = new $ax(Feng.ctxPath + "/specialAreaBilling/thaw", function (data) { + Feng.success("解冻成功"); + SpecialAreaBilling.table.refresh(); + }, function (data) { + swal("删除失败", data.responseJSON.message+"!", "warning"); + }); + ajax.set("id",SpecialAreaBilling.seItem.id); + ajax.start(); + }); + } +}; + +/** + * 查询跨城站点管理列表 + */ +SpecialAreaBilling.search = function () { + var queryData = {}; + queryData['areaName'] = $("#areaName").val(); + SpecialAreaBilling.table.refresh({query: queryData}); +}; + +SpecialAreaBilling.resetSearch = function () { + $("#areaName").val(""); + SpecialAreaBilling.search(); +}; + +$(function () { + var defaultColunms = SpecialAreaBilling.initColumn(); + var table = new BSTable(SpecialAreaBilling.id, "/specialAreaBilling/list", defaultColunms); + table.setPaginationType("server"); + SpecialAreaBilling.table = table.init(); +}); diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/specialAreaBilling_info.js b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/specialAreaBilling_info.js new file mode 100644 index 0000000..3020c8d --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/specialAreaBilling/specialAreaBilling_info.js @@ -0,0 +1,356 @@ +/** + * 初始化跨城站点管理详情对话框 + */ +var TSiteInfoDlg = { + tSiteInfoData : {}, + validateFields: { + name: { + validators: { + notEmpty: { + message: '站点名称不能为空' + } + } + }, + provinceCode: { + validators: { + notEmpty: { + message: '请选择站点所属省' + } + } + }, + } +}; + +/** + * 验证数据是否为空 + */ +TSiteInfoDlg.validate = function () { + $('#siteInfoForm').data("bootstrapValidator").resetForm(); + $('#siteInfoForm').bootstrapValidator('validate'); + return $("#siteInfoForm").data('bootstrapValidator').isValid(); +}; + + +/** + * 清除数据 + */ +TSiteInfoDlg.clearData = function() { + this.tSiteInfoData = {}; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TSiteInfoDlg.set = function(key, val) { + this.tSiteInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; + return this; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TSiteInfoDlg.get = function(key) { + return $("#" + key).val(); +} + +/** + * 关闭此对话框 + */ +TSiteInfoDlg.close = function() { + parent.layer.close(window.parent.TSite.layerIndex); +} + +/** + * 收集数据 + */ +TSiteInfoDlg.collectData = function() { + this + .set('id') + .set('name') + .set('province') + .set('provinceCode') + .set('city') + .set('cityCode') + .set('district') + .set('districtCode') + .set('state') + .set('insertTime') + .set('insertUserId'); +} + +/** + * 提交添加 + */ +TSiteInfoDlg.addSubmit = function() { + + var areaName = $("#areaName").val(); + if ("" == areaName ){ + Feng.error("请填写特殊区域名称"); + return; + } + var priceCoefficient = $("#priceCoefficient").val(); + if ("" == priceCoefficient ){ + Feng.error("请填写价格系数"); + return; + } + var subArr=[]; + $(".areaValueClass").each(function () { + subArr.push({ + coordinate:$(this).find("input[name*='coordinate1']").val(), + }) + }); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/specialAreaBilling/addSpecialAreaBilling", function(data){ + if(data.status == 200){ + Feng.success("添加成功!"); + window.parent.SpecialAreaBilling.table.refresh(); + TSiteInfoDlg.close(); + }else{ + Feng.error(data.msg); + } + },function(data){ + Feng.error("添加失败!" + data.responseJSON.message + "!"); + }); + ajax.set("areaName",areaName); + ajax.set("priceCoefficient",priceCoefficient); + ajax.set("remark",$("#remark").val()); + var state = $("#state").is(":checked"); + var status = 1; + if (state){ + status = 1; + } else { + status = 2; + } + ajax.set("state",status); + ajax.set("coordinate",coordinate); + ajax.start(); +} +/** + * 提交添加 + */ +TSiteInfoDlg.addSubmit = function() { + + var areaName = $("#areaName").val(); + if ("" == areaName ){ + Feng.error("请填写特殊区域名称"); + return; + } + var priceCoefficient = $("#priceCoefficient").val(); + if ("" == priceCoefficient ){ + Feng.error("请填写价格系数"); + return; + } + var subArr=[]; + $(".areaValueClass").each(function () { + subArr.push({ + coordinate:$(this).find("input[name*='coordinate1']").val(), + }) + }); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/specialAreaBilling/addSpecialAreaBilling", function(data){ + if(data.status == 200){ + Feng.success("添加成功!"); + window.parent.SpecialAreaBilling.table.refresh(); + TSiteInfoDlg.close(); + }else{ + Feng.error(data.msg); + } + },function(data){ + Feng.error("添加失败!" + data.responseJSON.message + "!"); + }); + ajax.set("areaName",areaName); + ajax.set("priceCoefficient",priceCoefficient); + ajax.set("remark",$("#remark").val()); + var state = $("#state").is(":checked"); + var status = 1; + if (state){ + status = 1; + } else { + status = 2; + } + ajax.set("state",status); + ajax.set("coordinate",coordinate); + ajax.start(); +} +TSiteInfoDlg.editSubmit = function() { + + var areaName = $("#areaName").val(); + if ("" == areaName ){ + Feng.error("请填写特殊区域名称"); + return; + } + var priceCoefficient = $("#priceCoefficient").val(); + if ("" == priceCoefficient ){ + Feng.error("请填写价格系数"); + return; + } + var subArr=[]; + $(".areaValueClass").each(function () { + subArr.push({ + coordinate:$(this).find("input[name*='coordinate1']").val(), + }) + }); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/specialAreaBilling/editSpecialAreaBilling", function(data){ + if(data.status == 200){ + Feng.success("修改!"); + window.parent.SpecialAreaBilling.table.refresh(); + TSiteInfoDlg.close(); + }else{ + Feng.error(data.msg); + } + },function(data){ + Feng.error("添加失败!" + data.responseJSON.message + "!"); + }); + ajax.set("areaName",areaName); + ajax.set("priceCoefficient",priceCoefficient); + ajax.set("remark",$("#remark").val()); + ajax.set("id",$("#id").val()); + var state = $("#state").is(":checked"); + var status = 1; + if (state){ + status = 1; + } else { + status = 2; + } + ajax.set("state",status); + ajax.set("coordinate",coordinate); + ajax.start(); +} + +/** + * 提交修改 + */ + +$(function() { + Feng.initValidator("siteInfoForm", TSiteInfoDlg.validateFields); +}); + + +//省改变 +TSiteInfoDlg.provinceChange = function (e) { + var provinceCode=$(e).val(); + var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ + if(data!=null){ + var content='<option value="">选择市</option>'; + $.each(data, function(k,v) { + content += "<option value='"+v.code+"'>"+v.name+"</option>"; + }); + $("#cityCode").empty().append(content); + $("#districtCode").empty().append('<option value="">选择区</option>'); + } + }); + ajax.set("code",provinceCode); + ajax.start(); +} +//市改变 +TSiteInfoDlg.cityChange = function (e) { + var cityCode=$(e).val(); + var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ + if(data!=null){ + var content='<option value="">选择区</option>'; + $.each(data, function(k,v) { + content += "<option value='"+v.code+"'>"+v.name+"</option>"; + }); + $("#districtCode").empty().append(content); + } + }); + ajax.set("code",cityCode); + ajax.start(); +} +/** + * 类型改变执行 + * @param e + */ +TSiteInfoDlg.areaTypeClick = function (e) { + if (1 == e){//行政区域 + $("#areaType1Div").show(); + $("#areaType2Div").hide(); + } else if (2 == e){ + $("#areaType2Div").show(); + $("#areaType1Div").hide(); + } +} + +//站点区域省改变 +TSiteInfoDlg.provinceChange1 = function (e) { + var provinceCode=$(e).val(); + var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ + if(data!=null){ + var content='<option value="">选择市</option>'; + $.each(data, function(k,v) { + content += "<option value='"+v.code+"'>"+v.name+"</option>"; + }); + $("#cityCode1").empty().append(content); + $("#districtCode1").empty().append('<option value="">选择区</option>'); + } + }); + ajax.set("code",provinceCode); + ajax.start(); +} +//站点区域市改变 +TSiteInfoDlg.cityChange1 = function (e) { + var cityCode=$(e).val(); + var ajax = new $ax(Feng.ctxPath + "/tCompany/change", function(data){ + if(data!=null){ + var content='<option value="">选择区</option>'; + $.each(data, function(k,v) { + content += "<option value='"+v.code+"'>"+v.name+"</option>"; + }); + $("#districtCode1").empty().append(content); + } + }); + ajax.set("code",cityCode); + ajax.start(); +} + +/** + * 添加区域 + */ +TSiteInfoDlg.addArea = function () { + + var areaType = $("input[name='areaType']:checked").val(); + var b = false; + $(".areaValueClass").each(function () { + var areaType1 = $(this).find("input[name*='areaType1']").val(); + if(areaType != areaType1){ + b = true; + return + } + }); + if(b){ + Feng.error("电子围栏和行政区域不能混合使用"); + return; + } + + if (1 == areaType){ + var provinceCode1 = $("#provinceCode1").val(); + var province1 = $("#provinceCode1 option:selected").text(); + var cityCode1 = $("#cityCode1").val(); + var city1 = $("#cityCode1 option:selected").text(); + var districtCode1 = $("#districtCode1").val(); + var district1 = $("#districtCode1 option:selected").text(); + if ("" == provinceCode1){ + Feng.error("请选择行政区域所属省"); + return; + } + }else if (2 == areaType) { + if("" == coordinate){ + Feng.error('请在地图上规划区域'); + return; + } + } +} +//删除数据 +function deleteSub(e) { + $(e).parent().parent().remove(); +} \ No newline at end of file diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js index 26cf6d9..eeadc27 100644 --- a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js +++ b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js @@ -160,6 +160,7 @@ .set('scopeCode') .set('idCardPositive') .set('idCardReverse') + .set('limitationTime') .set('serviceScope'); } diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js index 1e3d9a5..77b2aa4 100644 --- a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js +++ b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js @@ -153,7 +153,8 @@ .set('scopeCode') .set('idCardPositive') .set('idCardReverse') - .set('serviceScope'); + .set('limitationTime') + .set('serviceScope'); } /** diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tAbnormalOrder.js b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tAbnormalOrder.js new file mode 100644 index 0000000..05b9c04 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tAbnormalOrder.js @@ -0,0 +1,342 @@ +/** + * 专车订单管理初始化 + */ +var TAbnormalOrder = { + id: "TAbnormalOrderTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TAbnormalOrder.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键id', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '下单时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'8%', + formatter: function (value, row) { + var btn = ""; + if(row.insertTime != '' && row.insertTime != null) { + var time = row.insertTime.replace(" ",'<br>'); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insertTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] + } + return btn; + } + }, + {title: '订单编号', field: 'orderNum', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.orderNum != '' && row.orderNum != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.orderNum + '" onfocus="TUser.tooltip()">' + row.orderNum + '</p>'] + } + return btn; + } + }, + {title: '订单来源', field: 'orderSource', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.orderSource != '' && row.orderSource != null) { + if (row.orderSource == 1){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="APP下单" onfocus="TUser.tooltip()">APP下单</p>'] + } else if (row.orderSource == 2){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="推荐下单" onfocus="TUser.tooltip()">推荐下单</p>'] + } else if (row.orderSource == 3){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="小程序下单" onfocus="TUser.tooltip()">小程序下单</p>'] + } else if (row.orderSource == 4){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="司机下单" onfocus="TUser.tooltip()">司机下单</p>'] + } else if (row.orderSource == 5){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="调度下单" onfocus="TUser.tooltip()">调度下单</p>'] + } + } + return btn; + } + }, + {title: '乘车时间', field: 'travelTime', visible: true, align: 'center', valign: 'middle',width:'10%', + formatter: function (value, row) { + var btn = ""; + if(row.travelTime != '' && row.travelTime != null) { + var time = row.travelTime.replace(" ",'<br>'); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.travelTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] + } + return btn; + } + }, + {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, + {title: '下单用<br/>户昵称', field: 'userName', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.userName != '' && row.userName != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userName + '" onfocus="TUser.tooltip()">' + row.userName + '</p>'] + } + return btn; + } + }, + {title: '下单用<br/>户手机', field: 'userPhone', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.userPhone != '' && row.userPhone != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userPhone + '" onfocus="TUser.tooltip()">' + row.userPhone + '</p>'] + } + return btn; + } + }, + {title: '乘车用<br/>户姓名', field: 'passengers', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.passengers != '' && row.passengers != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.passengers + '" onfocus="TUser.tooltip()">' + row.passengers + '</p>'] + } + return btn; + } + }, + {title: '乘车用<br/>户手机', field: 'passengersPhone', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.passengersPhone != '' && row.passengersPhone != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.passengersPhone + '" onfocus="TUser.tooltip()">' + row.passengersPhone + '</p>'] + } + return btn; + } + }, + {title: '起点', field: 'startAddress', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.startAddress != '' && row.startAddress != null) { + var str = row.startAddress; + var str1 = ""; + var arr = ""; + for(var i=0,len=str.length/15;i<len;i++) { + str1 = str.substr(0,15); + str = str.replace(str1,''); + arr += str1 + "<br>"; + } + arr = arr.substring(0,arr.length-4); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.startAddress + '" onfocus="TUser.tooltip()">' + arr + '</p>'] + } + return btn; + } + }, + {title: '终点', field: 'endAddress', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.endAddress != '' && row.endAddress != null) { + var str = row.endAddress; + var str1 = ""; + var arr = ""; + for(var i=0,len=str.length/15;i<len;i++) { + str1 = str.substr(0,15); + str = str.replace(str1,''); + arr += str1 + "<br>"; + } + arr = arr.substring(0,arr.length-4); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.endAddress + '" onfocus="TUser.tooltip()">' + arr + '</p>'] + } + return btn; + } + }, + {title: '选择车型', field: 'serverCarModel', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.serverCarModel != '' && row.serverCarModel != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.serverCarModel + '" onfocus="TUser.tooltip()">' + row.serverCarModel + '</p>'] + } + return btn; + } + }, + {title: '接单司机', field: 'driver', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.driver != '' && row.driver != null) { + var driverName1 = row.driver.replace("-","<br>"); + var driverName2 = row.driver.replace("-"," "); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + driverName2 + '" onfocus="TUser.tooltip()">' + driverName1 + '</p>'] + } + return btn; + } + }, + {title: '接单车辆', field: 'car', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.car != '' && row.car != null) { + var car1 = row.car.replace("-","<br>"); + var car2 = row.car.replace("-"," "); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + car2 + '" onfocus="TUser.tooltip()">' + car1 + '</p>'] + } + return btn; + } + }, + {title: '订单金额', field: 'orderMoney', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.orderMoney != '' && row.orderMoney != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.orderMoney + '" onfocus="TUser.tooltip()">' + row.orderMoney + '</p>'] + } + return btn; + } + }, + {title: '异常金额', field: 'abnormalMoney', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.abnormalMoney != '' && row.abnormalMoney != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.abnormalMoney + '" onfocus="TUser.tooltip()">' + row.abnormalMoney + '</p>'] + } + return btn; + } + }, + {title: '催收次数', field: 'smsNumber', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.smsNumber != '' && row.smsNumber != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.smsNumber + '" onfocus="TUser.tooltip()">' + row.smsNumber + '</p>'] + } + return btn; + } + }, + {title: '冻结状态', field: 'isFrozen', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.isFrozen != '' && row.isFrozen != null && row.isFrozen==2) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="冻结" onfocus="TUser.tooltip()">冻结</p>'] + } + return btn; + } + }, + {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.state != '' && row.state != null) { + if (row.state == 1){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待接单" onfocus="TUser.tooltip()">待接单</p>'] + } else if (row.state == 2){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待出发" onfocus="TUser.tooltip()">待出发</p>'] + } else if (row.state == 3){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待到达预约地点" onfocus="TUser.tooltip()">待到达预约地点</p>'] + } else if (row.state == 4){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待乘客上车" onfocus="TUser.tooltip()">待乘客上车</p>'] + } else if (row.state == 5){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="服务中" onfocus="TUser.tooltip()">服务中</p>'] + } else if (row.state == 6){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="完成服务" onfocus="TUser.tooltip()">完成服务</p>'] + } else if (row.state == 7){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待支付" onfocus="TUser.tooltip()">待支付</p>'] + } else if (row.state == 8){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待评价" onfocus="TUser.tooltip()">待评价</p>'] + } else if (row.state == 9){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已完成" onfocus="TUser.tooltip()">已完成</p>'] + } else if (row.state == 10){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已取消" onfocus="TUser.tooltip()">已取消</p>'] + } else if (row.state == 11){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="改派中" onfocus="TUser.tooltip()">改派中</p>'] + } else if (row.state == 12){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="取消待支付" onfocus="TUser.tooltip()">取消待支付</p>'] + } + } + return btn; + } + } + ]; +}; + +/** + * 检查是否选中 + */ +TAbnormalOrder.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TAbnormalOrder.seItem = selected[0]; + return true; + } +}; + +/** + * 打开查看专车订单详情 + */ +TAbnormalOrder.orderDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '专车订单详情', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrderPrivateCar/tOrderPrivateCar_orderDetail/' + TAbnormalOrder.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 订单轨迹 + */ +TAbnormalOrder.trajectory = function(){ + if (this.check()) { + var index = layer.open({ + type: 2, + title: '专车订单轨迹', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrderPrivateCar/tOrderPrivateCar_trajectory/' + TAbnormalOrder.seItem.id + }); + this.layerIndex = index; + } +} + +/** + * 查询专车订单列表 + */ +TAbnormalOrder.search = function () { + var queryData = {}; + queryData['insertTime'] = $("#insertTime").val(); + queryData['orderNum'] = $("#orderNum").val(); + queryData['orderSource'] = $("#orderSource").val(); + queryData['userName'] = $("#userName").val(); + queryData['userPhone'] = $("#userPhone").val(); + queryData['passengers'] = $("#passengers").val(); + queryData['passengersPhone'] = $("#passengersPhone").val(); + queryData['serverCarModelId'] = $("#serverCarModelId").val(); + queryData['driver'] = $("#driver").val(); + queryData['state'] = $("#state").val(); + queryData['smsNumber'] = $("#smsNumber").val(); + TAbnormalOrder.table.refresh({query: queryData}); +}; + +TAbnormalOrder.resetSearch = function () { + $("#insertTime").val(""); + $("#orderNum").val(""); + $("#orderSource").val(""); + $("#userName").val(""); + $("#userPhone").val(""); + $("#passengers").val(""); + $("#passengersPhone").val(""); + $("#serverCarModelId").val(""); + $("#driver").val(""); + $("#state").val(""); + $("#smsNumber").val(""); + TAbnormalOrder.search(); +}; + +TAbnormalOrder.downloadExcel=function(){ + window.location.href=Feng.ctxPath + "/tOrderPrivateCar/getExcel?insertTime="+$("#insertTime").val() + +"&orderNum="+$("#orderNum").val() + +"&userName="+$("#userName").val() + +"&userPhone="+$("#userPhone").val() + +"&passengers="+$("#passengers").val() + +"&passengersPhone="+$("#passengersPhone").val() + +"&serverCarModelId="+$("#serverCarModelId").val() + +"&driver="+$("#driver").val() + +"&smsNumber="+$("#smsNumber").val() + +"&state="+$("#state").val(); +}; + +$(function () { + var defaultColunms = TAbnormalOrder.initColumn(); + var table = new BSTable(TAbnormalOrder.id, "/tOrderPrivateCar/abnormalList", defaultColunms); + table.setPaginationType("server"); + TAbnormalOrder.table = table.init(); +}); diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar.js b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar.js new file mode 100644 index 0000000..cc7bd24 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar.js @@ -0,0 +1,524 @@ +/** + * 专车订单管理初始化 + */ +var TOrderPrivateCar = { + id: "TOrderPrivateCarTable", //表格id + seItem: null, //选中的条目 + table: null, + layerIndex: -1 +}; + +/** + * 初始化表格的列 + */ +TOrderPrivateCar.initColumn = function () { + return [ + {field: 'selectItem', radio: true}, + {title: '主键id', field: 'id', visible: false, align: 'center', valign: 'middle'}, + {title: '下单时间', field: 'insertTime', visible: true, align: 'center', valign: 'middle',width:'8%', + formatter: function (value, row) { + var btn = ""; + if(row.insertTime != '' && row.insertTime != null) { + var time = row.insertTime.replace(" ",'<br>'); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.insertTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] + } + return btn; + } + }, + {title: '订单编号', field: 'orderNum', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.orderNum != '' && row.orderNum != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.orderNum + '" onfocus="TUser.tooltip()">' + row.orderNum + '</p>'] + } + return btn; + } + }, + {title: '订单来源', field: 'orderSource', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.orderSource != '' && row.orderSource != null) { + if (row.orderSource == 1){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="APP下单" onfocus="TUser.tooltip()">APP下单</p>'] + } else if (row.orderSource == 2){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="推荐下单" onfocus="TUser.tooltip()">推荐下单</p>'] + } else if (row.orderSource == 3){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="小程序下单" onfocus="TUser.tooltip()">小程序下单</p>'] + } else if (row.orderSource == 4){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="司机下单" onfocus="TUser.tooltip()">司机下单</p>'] + } else if (row.orderSource == 5){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="调度下单" onfocus="TUser.tooltip()">调度下单</p>'] + } + } + return btn; + } + }, + {title: '乘车时间', field: 'travelTime', visible: true, align: 'center', valign: 'middle',width:'10%', + formatter: function (value, row) { + var btn = ""; + if(row.travelTime != '' && row.travelTime != null) { + var time = row.travelTime.replace(" ",'<br>'); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.travelTime + '" onfocus="TUser.tooltip()">' + time + '</p>'] + } + return btn; + } + }, + {title: '用户id', field: 'userId', visible: false, align: 'center', valign: 'middle'}, + {title: '下单用<br/>户昵称', field: 'userName', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.userName != '' && row.userName != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userName + '" onfocus="TUser.tooltip()">' + row.userName + '</p>'] + } + return btn; + } + }, + {title: '下单用<br/>户手机', field: 'userPhone', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.userPhone != '' && row.userPhone != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userPhone + '" onfocus="TUser.tooltip()">' + row.userPhone + '</p>'] + } + return btn; + } + }, + {title: '乘车用<br/>户姓名', field: 'passengers', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.passengers != '' && row.passengers != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.passengers + '" onfocus="TUser.tooltip()">' + row.passengers + '</p>'] + } + return btn; + } + }, + {title: '乘车用<br/>户手机', field: 'passengersPhone', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.passengersPhone != '' && row.passengersPhone != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.passengersPhone + '" onfocus="TUser.tooltip()">' + row.passengersPhone + '</p>'] + } + return btn; + } + }, + {title: '起点', field: 'startAddress', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.startAddress != '' && row.startAddress != null) { + var str = row.startAddress; + var str1 = ""; + var arr = ""; + for(var i=0,len=str.length/15;i<len;i++) { + str1 = str.substr(0,15); + str = str.replace(str1,''); + arr += str1 + "<br>"; + } + arr = arr.substring(0,arr.length-4); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.startAddress + '" onfocus="TUser.tooltip()">' + arr + '</p>'] + } + return btn; + } + }, + {title: '终点', field: 'endAddress', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.endAddress != '' && row.endAddress != null) { + var str = row.endAddress; + var str1 = ""; + var arr = ""; + for(var i=0,len=str.length/15;i<len;i++) { + str1 = str.substr(0,15); + str = str.replace(str1,''); + arr += str1 + "<br>"; + } + arr = arr.substring(0,arr.length-4); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.endAddress + '" onfocus="TUser.tooltip()">' + arr + '</p>'] + } + return btn; + } + }, + {title: '选择车型', field: 'serverCarModel', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.serverCarModel != '' && row.serverCarModel != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.serverCarModel + '" onfocus="TUser.tooltip()">' + row.serverCarModel + '</p>'] + } + return btn; + } + }, + {title: '接单司机', field: 'driver', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.driver != '' && row.driver != null) { + var driverName1 = row.driver.replace("-","<br>"); + var driverName2 = row.driver.replace("-"," "); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + driverName2 + '" onfocus="TUser.tooltip()">' + driverName1 + '</p>'] + } + return btn; + } + }, + {title: '接单车辆', field: 'car', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.car != '' && row.car != null) { + var car1 = row.car.replace("-","<br>"); + var car2 = row.car.replace("-"," "); + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + car2 + '" onfocus="TUser.tooltip()">' + car1 + '</p>'] + } + return btn; + } + }, + {title: '订单金额', field: 'orderMoney', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.orderMoney != '' && row.orderMoney != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.orderMoney + '" onfocus="TUser.tooltip()">' + row.orderMoney + '</p>'] + } + return btn; + } + }, + {title: '异常金额', field: 'abnormalMoney', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.abnormalMoney != '' && row.abnormalMoney != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.abnormalMoney + '" onfocus="TUser.tooltip()">' + row.abnormalMoney + '</p>'] + } + return btn; + } + }, + {title: '催收次数', field: 'smsNumber', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.smsNumber != '' && row.smsNumber != null) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.smsNumber + '" onfocus="TUser.tooltip()">' + row.smsNumber + '</p>'] + } + return btn; + } + }, + {title: '冻结状态', field: 'isFrozen', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.isFrozen != '' && row.isFrozen != null && row.isFrozen==2) { + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="冻结" onfocus="TUser.tooltip()">冻结</p>'] + } + return btn; + } + }, + {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + var btn = ""; + if(row.state != '' && row.state != null) { + if (row.state == 1){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待接单" onfocus="TUser.tooltip()">待接单</p>'] + } else if (row.state == 2){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待出发" onfocus="TUser.tooltip()">待出发</p>'] + } else if (row.state == 3){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待到达预约地点" onfocus="TUser.tooltip()">待到达预约地点</p>'] + } else if (row.state == 4){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待乘客上车" onfocus="TUser.tooltip()">待乘客上车</p>'] + } else if (row.state == 5){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="服务中" onfocus="TUser.tooltip()">服务中</p>'] + } else if (row.state == 6){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="完成服务" onfocus="TUser.tooltip()">完成服务</p>'] + } else if (row.state == 7){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待支付" onfocus="TUser.tooltip()">待支付</p>'] + } else if (row.state == 8){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待评价" onfocus="TUser.tooltip()">待评价</p>'] + } else if (row.state == 9){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已完成" onfocus="TUser.tooltip()">已完成</p>'] + } else if (row.state == 10){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已取消" onfocus="TUser.tooltip()">已取消</p>'] + } else if (row.state == 11){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="改派中" onfocus="TUser.tooltip()">改派中</p>'] + } else if (row.state == 12){ + btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="取消待支付" onfocus="TUser.tooltip()">取消待支付</p>'] + } + } + return btn; + } + } + ]; +}; + +/** + * 检查是否选中 + */ +TOrderPrivateCar.check = function () { + var selected = $('#' + this.id).bootstrapTable('getSelections'); + if(selected.length == 0){ + Feng.info("请先选中表格中的某一记录!"); + return false; + }else{ + TOrderPrivateCar.seItem = selected[0]; + return true; + } +}; + +/** + * 打开查看专车订单详情 + */ +TOrderPrivateCar.orderDetail = function () { + if (this.check()) { + var index = layer.open({ + type: 2, + title: '专车订单详情', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrderPrivateCarConfirm/tOrderPrivateCar_orderDetail/' + TOrderPrivateCar.seItem.id + }); + this.layerIndex = index; + } +}; + +/** + * 平台支付 + */ +TOrderPrivateCar.platPay = function(){ + if (this.check()) { + var nickname = TOrderPrivateCar.seItem.orderNum; + if (nickname == "" || nickname == null || nickname == undefined) { + nickname = "该订单"; + } else { + nickname = "【" + nickname + "】"; + } + if (TOrderPrivateCar.seItem.state != 7) { + swal("支付失败", "【待支付】状态下才能执行此操作", "warning"); + return; + } + swal({ + title: "您是否确认支付订单" + nickname + "?", + text: "请谨慎操作,支付后数据无法恢复!", + type: "warning", + showCancelButton: true, + confirmButtonColor: "#DD6B55", + confirmButtonText: "支付订单", + closeOnConfirm: false + }, function () { + var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/platPay", function (data) { + if(data=="error"){ + swal("支付订单失败,当前订单平台已支付", "warning"); + layer.closeAll() + }else{ + layer.msg("加载中...",{ + icon:16, + time:-1 + }); + swal("支付订单成功", "您已经成功支付了" + nickname + "。", "success"); + TOrderPrivateCar.table.refresh(); + layer.closeAll() + } + + }, function (data) { + swal("支付订单失败", data.responseJSON.message + "!", "warning"); + layer.closeAll() + }); + ajax.set("tOrderPrivateCarId", TOrderPrivateCar.seItem.id); + ajax.start(); + }); + } +} + +TOrderPrivateCar.changeMoney = function(){ + if (this.check()) { + if (TOrderPrivateCar.seItem.state != 7) { + swal("操作失败", "【待支付】状态下才能执行此操作", "warning"); + return; + }else{ + var index = layer.open({ + type: 2, + title: '修改金额', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrderPrivateCarConfirm/toChangeMoney/' + TOrderPrivateCar.seItem.id + }); + this.layerIndex = index; + } + + } +} +TOrderPrivateCar.confirmMoney = function(){ + if (this.check()) { + + var index = layer.open({ + type: 2, + title: '确认', + area: ['50%', '50%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrderPrivateCarConfirm/toConfirmMoney/' + TOrderPrivateCar.seItem.id + }); + this.layerIndex = index; + + } +} +TOrderPrivateCar.frozenOrder = function(){ + if (this.check()) { + if (TOrderPrivateCar.seItem.state != 8 && TOrderPrivateCar.seItem.state != 9 ) { + swal("操作失败", "【已完成】状态下才能执行此操作", "warning"); + return; + }else{ + var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/frozenOrder", function (data) { + swal("操作订单成功", "您已经成功操作了。", "success"); + TOrderPrivateCar.table.refresh(); + layer.closeAll() + }, function (data) { + swal("操作订单失败", data.responseJSON.message + "!", "warning"); + layer.closeAll() + }); + ajax.set("tOrderPrivateCarId", TOrderPrivateCar.seItem.id); + ajax.start(); + } + + } +} +/** + * 取消订单 + */ +TOrderPrivateCar.cancelOrder = function(){ + if (this.check()) { + var nickname = TOrderPrivateCar.seItem.orderNum; + if (nickname == "" || nickname == null || nickname == undefined) { + nickname = "该订单"; + } else { + nickname = "【" + nickname + "】"; + } + if (TOrderPrivateCar.seItem.state == 7 || TOrderPrivateCar.seItem.state == 8 || TOrderPrivateCar.seItem.state == 9 || TOrderPrivateCar.seItem.state == 10 ) { + swal("取消失败", "【待评价】【已完成】【已取消】状态下不能执行此操作", "warning"); + return; + } + swal({ + title: "您是否确认取消订单" + nickname + "?", + text: "请谨慎操作,取消后数据无法恢复!", + type: "warning", + showCancelButton: true, + confirmButtonColor: "#DD6B55", + confirmButtonText: "取消订单", + closeOnConfirm: false + }, function () { + var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/cancel", function (data) { + layer.msg("加载中...",{ + icon:16, + time:-1 + }); + swal("取消订单成功", "您已经成功取消了" + nickname + "。", "success"); + TOrderPrivateCar.table.refresh(); + layer.closeAll() + }, function (data) { + swal("取消订单失败", data.responseJSON.message + "!", "warning"); + layer.closeAll() + }); + ajax.set("tOrderPrivateCarId", TOrderPrivateCar.seItem.id); + ajax.start(); + }); + } +} + +/** + * 订单轨迹 + */ +TOrderPrivateCar.trajectory = function(){ + if (this.check()) { + var index = layer.open({ + type: 2, + title: '专车订单轨迹', + area: ['100%', '100%'], //宽高 + fix: false, //不固定 + maxmin: true, + content: Feng.ctxPath + '/tOrderPrivateCar/tOrderPrivateCar_trajectory/' + TOrderPrivateCar.seItem.id + }); + this.layerIndex = index; + } +} + + +/** + * 删除专车订单 + */ +TOrderPrivateCar.deleteOrder = function () { + if (this.check()) { + var orderNum = TOrderPrivateCar.seItem.orderNum; + if (orderNum == "" || orderNum == null || orderNum == undefined) { + orderNum = "该订单"; + } else { + orderNum = "【" + orderNum + "】"; + } + if (TOrderPrivateCar.seItem.state != 10) { + swal("删除失败", "【已取消】状态下才能执行此操作", "warning"); + return; + } + swal({ + title: "您是否确认删除" + orderNum + "?", + text: "请谨慎操作,删除后数据无法恢复!", + type: "warning", + showCancelButton: true, + confirmButtonColor: "#DD6B55", + confirmButtonText: "删除", + closeOnConfirm: false + }, function () { + var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/delete", function (data) { + swal("删除成功", "您已经删除了" + orderNum + "。", "success"); + TOrderPrivateCar.table.refresh(); + }, function (data) { + swal("删除失败", data.responseJSON.message + "!", "warning"); + }); + ajax.set("tOrderPrivateCarId", TOrderPrivateCar.seItem.id); + ajax.start(); + }); + } +}; + +/** + * 查询专车订单列表 + */ +TOrderPrivateCar.search = function () { + var queryData = {}; + queryData['insertTime'] = $("#insertTime").val(); + queryData['orderNum'] = $("#orderNum").val(); + queryData['orderSource'] = $("#orderSource").val(); + queryData['userName'] = $("#userName").val(); + queryData['userPhone'] = $("#userPhone").val(); + queryData['passengers'] = $("#passengers").val(); + queryData['passengersPhone'] = $("#passengersPhone").val(); + queryData['serverCarModelId'] = $("#serverCarModelId").val(); + queryData['driver'] = $("#driver").val(); + queryData['state'] = $("#state").val(); + queryData['smsNumber'] = $("#smsNumber").val(); + TOrderPrivateCar.table.refresh({query: queryData}); +}; + +TOrderPrivateCar.resetSearch = function () { + $("#insertTime").val(""); + $("#orderNum").val(""); + $("#orderSource").val(""); + $("#userName").val(""); + $("#userPhone").val(""); + $("#passengers").val(""); + $("#passengersPhone").val(""); + $("#serverCarModelId").val(""); + $("#driver").val(""); + $("#state").val(""); + $("#smsNumber").val(""); + TOrderPrivateCar.search(); +}; + +TOrderPrivateCar.downloadExcel=function(){ + //$("#tOrderPrivateCarForm").submit(); + window.location.href=Feng.ctxPath + "/tOrderPrivateCar/getExcel?insertTime="+$("#insertTime").val() + +"&orderNum="+$("#orderNum").val() + +"&userName="+$("#userName").val() + +"&userPhone="+$("#userPhone").val() + +"&passengers="+$("#passengers").val() + +"&passengersPhone="+$("#passengersPhone").val() + +"&serverCarModelId="+$("#serverCarModelId").val() + +"&driver="+$("#driver").val() + +"&smsNumber="+$("#smsNumber").val() + +"&state="+$("#state").val(); +}; + +$(function () { + var defaultColunms = TOrderPrivateCar.initColumn(); + var table = new BSTable(TOrderPrivateCar.id, "/tOrderPrivateCarConfirm/listConfirm", defaultColunms); + table.setPaginationType("server"); + TOrderPrivateCar.table = table.init(); +}); diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar_info.js b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar_info.js new file mode 100644 index 0000000..2811c43 --- /dev/null +++ b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCarConfirm/tOrderPrivateCar_info.js @@ -0,0 +1,271 @@ +/** + * 初始化专车订单详情对话框 + */ +var TOrderPrivateCarInfoDlg = { + tOrderPrivateCarInfoData : {} +}; + +/** + * 清除数据 + */ +TOrderPrivateCarInfoDlg.clearData = function() { + this.tOrderPrivateCarInfoData = {}; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TOrderPrivateCarInfoDlg.set = function(key, val) { + this.tOrderPrivateCarInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; + return this; +} + +/** + * 设置对话框中的数据 + * + * @param key 数据的名称 + * @param val 数据的具体值 + */ +TOrderPrivateCarInfoDlg.get = function(key) { + return $("#" + key).val(); +} + +/** + * 关闭此对话框 + */ +TOrderPrivateCarInfoDlg.close = function() { + parent.layer.close(window.parent.TOrderPrivateCar.layerIndex); +} + +/** + * 收集数据 + */ +TOrderPrivateCarInfoDlg.collectData = function() { + this + .set('id') + .set('type') + .set('userId') + .set('driverId') + .set('carId') + .set('orderNum') + .set('placementLon') + .set('placementLat') + .set('placementAddress') + .set('startLon') + .set('startLat') + .set('endLon') + .set('startAddress') + .set('endLat') + .set('endAddress') + .set('boardingLon') + .set('boardingLat') + .set('boardingAddress') + .set('boardingTime') + .set('getoffLon') + .set('getoffLat') + .set('getoffAddress') + .set('getoffTime') + .set('mileage') + .set('payManner') + .set('payType') + .set('orderMoney') + .set('startMoney') + .set('mileageMoney') + .set('durationMoney') + .set('longDistanceMoney') + .set('parkMoney') + .set('roadTollMoney') + .set('redPacketMoney') + .set('couponMoney') + .set('redPacketId') + .set('couponId') + .set('discount') + .set('discountMoney') + .set('activityId') + .set('companyId') + .set('payMoney') + .set('substitute') + .set('passengers') + .set('passengersPhone') + .set('state') + .set('insertTime') + .set('travelTime') + .set('snatchOrderTime') + .set('setOutTime') + .set('arriveTime') + .set('startServiceTime') + .set('endServiceTime') + .set('orderType') + .set('orderSource') + .set('invoiceId') + .set('isReassign') + .set('reassignNotice') + .set('trackId') + .set('isDelete') + .set('oldState') + .set('telX') + .set('bindId') + .set('serverCarModelId'); +} + +/** + * 提交添加 + */ +TOrderPrivateCarInfoDlg.addSubmit = function() { + + this.clearData(); + this.collectData(); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/add", function(data){ + Feng.success("添加成功!"); + window.parent.TOrderPrivateCar.table.refresh(); + TOrderPrivateCarInfoDlg.close(); + },function(data){ + Feng.error("添加失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tOrderPrivateCarInfoData); + ajax.start(); +} + +/** + * 提交修改 + */ +TOrderPrivateCarInfoDlg.editSubmit = function() { + + this.clearData(); + this.collectData(); + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/update", function(data){ + Feng.success("修改成功!"); + window.parent.TOrderPrivateCar.table.refresh(); + TOrderPrivateCarInfoDlg.close(); + },function(data){ + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set(this.tOrderPrivateCarInfoData); + ajax.start(); +} +TOrderPrivateCarInfoDlg.changeMoney= function(){ + var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/changeMoney", function(data){ + Feng.success("修改成功!"); + window.parent.TOrderPrivateCar.table.refresh(); + TOrderPrivateCarInfoDlg.close(); + },function(data){ + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set("id",$("#id").val()); + ajax.set("money",$("#orderMoney").val()); + ajax.start(); +} +TOrderPrivateCarInfoDlg.confirmMoney= function(){ + var ajax = new $ax(Feng.ctxPath + "/tOrderPrivateCar/confirmMoney", function(data){ + Feng.success("修改成功!"); + window.parent.TOrderPrivateCar.table.refresh(); + TOrderPrivateCarInfoDlg.close(); + },function(data){ + Feng.error("修改失败!" + data.responseJSON.message + "!"); + }); + ajax.set("id",$("#id").val()); + ajax.set("money",$("#orderMoney").val()); + ajax.start(); +} +var map = new AMap.Map("container", { + resizeEnable: true, + zoom: 14 +}); +$(function() { + getTrajectory(); +}); + +function getTrajectory() { + $.ajax({ + url: Feng.ctxPath + '/tOrderPrivateCar/getOrderTrack', + type: 'POST', + data:{ + orderDetailId: $("#id").val() + }, + success: function (res) { + if(res.status == 200){ + var data = res.data; + if(data.length > 0){ + orderTrack(data); + }/*else{ + Feng.error("当前订单没有轨迹"); + }*/ + }else{ + Feng.error(res.msg); + } + } + }); +} + +var marker, lineArr = []; + +function orderTrack(data) { + for(var i in data){ + var waypoints = []; + var lon = parseFloat(data[i].lon); + var lat = parseFloat(data[i].lat); + waypoints.push(lon); + waypoints.push(lat); + lineArr.push(waypoints); + } + + marker = new AMap.Marker({ + map: map, + position: lineArr[0], + icon: "https://webapi.amap.com/images/car.png", + offset: new AMap.Pixel(-26, -13), + autoRotation: true, + angle:-90, + }); + + // 绘制轨迹 + var polyline = new AMap.Polyline({ + map: map, + path: lineArr, + showDir:true, + strokeColor: "#28F", //线颜色 + // strokeOpacity: 1, //线透明度 + strokeWeight: 6, //线宽 + // strokeStyle: "solid" //线样式 + }); + + var passedPolyline = new AMap.Polyline({ + map: map, + // path: lineArr, + strokeColor: "#AF5", //线颜色 + // strokeOpacity: 1, //线透明度 + strokeWeight: 6, //线宽 + // strokeStyle: "solid" //线样式 + }); + + + marker.on('moving', function (e) { + passedPolyline.setPath(e.passedPath); + }); + + map.setFitView(); +} + + +function startAnimation () { + marker.moveAlong(lineArr, 200); +} + +function pauseAnimation () { + marker.pauseMove(); +} + +function resumeAnimation () { + marker.resumeMove(); +} + +function stopAnimation () { + marker.stopMove(); +} diff --git a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tPubWithdrawal/tPubWithdrawal.js b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tPubWithdrawal/tPubWithdrawal.js index d349938..9ee6b93 100644 --- a/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tPubWithdrawal/tPubWithdrawal.js +++ b/ManagementZYTravel/guns-admin/src/main/webapp/static/modular/system/tPubWithdrawal/tPubWithdrawal.js @@ -34,7 +34,7 @@ return btn; } }, - {title: '银行卡号', field: 'code', visible: true, align: 'center', valign: 'middle', + {title: '支付宝账号', field: 'code', visible: true, align: 'center', valign: 'middle', formatter: function (value, row) { var btn = ""; if(row.code != '' && row.code != null) { @@ -43,25 +43,11 @@ return btn; } }, - {title: '开户行', field: 'bankName', visible: true, align: 'center', valign: 'middle', - formatter: function (value, row) { - var btn = ""; - if(row.bankName != '' && row.bankName != null) { - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.bankName + '" onfocus="TUser.tooltip()">' + row.bankName + '</p>'] - } - return btn; - } - }, + {title: '提现方式', field: 'withdrawalType', visible: true, align: 'center', valign: 'middle', formatter: function (value, row) { - var btn = ""; - if(row.withdrawalType != '' && row.withdrawalType != null) { - if (row.withdrawalType == 1){ - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="银行卡" onfocus="TUser.tooltip()">银行卡</p>'] - } else if (row.withdrawalType == 2){ - btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="线下" onfocus="TUser.tooltip()">线下</p>'] - } - } + var btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="支付宝" onfocus="TUser.tooltip()">支付宝</p>'] + return btn; } }, -- Gitblit v1.7.1