From bb4c1e2bdfa12698acf582aa07e05c6f11778195 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期二, 14 一月 2025 11:28:41 +0800 Subject: [PATCH] 计费规则 --- ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html | 480 ++++++++++++++++++++++++++++++------------ ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html | 4 ManagementOKTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js | 40 +++ ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java | 47 +++ ManagementOKTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js | 38 +++ 5 files changed, 456 insertions(+), 153 deletions(-) diff --git a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java index 78e8867..f500e74 100644 --- a/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java +++ b/ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCompanyController.java @@ -23,10 +23,7 @@ import com.stylefeng.guns.core.log.LogObjectHolder; import org.springframework.web.bind.annotation.RequestParam; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; /** * 分公司管理控制器 @@ -294,7 +291,7 @@ */ @RequestMapping(value = "/add") @ResponseBody - public Object add(TCompany tCompany,@RequestParam String subArr,String account,String password) { + public Object add(TCompany tCompany,@RequestParam String subArr,String account,String password,String content) { //判断账号是否已存在 int count = userService.selectCount(new EntityWrapper<User>().eq("account", account) .eq("status",1)); @@ -320,6 +317,14 @@ user.setName(tCompany.getName()); user.setSex(1); userService.insert(user); + + // 添加计费规则 + TSystemPrice tSystemPrice = new TSystemPrice(); + tSystemPrice.setCompanyId(tCompany.getId()); + tSystemPrice.setType(2); + tSystemPrice.setState(1); + tSystemPrice.setContent(content); + systemPriceService.insert(tSystemPrice); //添加经营区域 addSocpe(subArr,tCompany.getId()); @@ -355,7 +360,7 @@ */ @RequestMapping(value = "/addFranchisee") @ResponseBody - public Object addFranchisee(TCompany tCompany,String account,String password) { + public Object addFranchisee(TCompany tCompany,String account,String password,String content) { //判断账号是否已存在 int count = userService.selectCount( new EntityWrapper<User>().eq("account", account) @@ -385,6 +390,14 @@ user.setName(tCompany.getName()); user.setSex(1); userService.insert(user); + + // 添加计费规则 + TSystemPrice tSystemPrice = new TSystemPrice(); + tSystemPrice.setCompanyId(tCompany.getId()); + tSystemPrice.setType(2); + tSystemPrice.setState(1); + tSystemPrice.setContent(content); + systemPriceService.insert(tSystemPrice); return SUCCESS_TIP; } @@ -417,7 +430,7 @@ */ @RequestMapping(value = "/update") @ResponseBody - public Object update(TCompany tCompany,@RequestParam String subArr,String account,String password,Integer userId) { + public Object update(TCompany tCompany,@RequestParam String subArr,String account,String password,Integer userId,String content) { //判断账号 User user = userService.selectById(userId); if (SinataUtil.isNotEmpty(account) && SinataUtil.isNotEmpty(password)){ @@ -436,6 +449,15 @@ tCompanyService.updateById(tCompany); user.setName(tCompany.getName()); userService.updateById(user); + + // 修改计费规则 + TSystemPrice tSystemPrice = systemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("companyId", tCompany.getId()) + .eq("type", 2) + .last("LIMIT 1")); + if (Objects.nonNull(tSystemPrice)){ + tSystemPrice.setContent(content); + systemPriceService.updateById(tSystemPrice); + } //添加经营区域 addSocpe(subArr,tCompany.getId()); @@ -462,7 +484,7 @@ */ @RequestMapping(value = "/updateFranchisee") @ResponseBody - public Object updateFranchisee(TCompany tCompany,String account,String password,Integer userId) { + public Object updateFranchisee(TCompany tCompany,String account,String password,Integer userId,String content) { //判断账号 User user = userService.selectById(userId); if (!user.getAccount().equals(account)){ @@ -481,6 +503,15 @@ user.setName(tCompany.getName()); userService.updateById(user); + // 修改计费规则 + TSystemPrice tSystemPrice = systemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("companyId", tCompany.getId()) + .eq("type", 2) + .last("LIMIT 1")); + if (Objects.nonNull(tSystemPrice)){ + tSystemPrice.setContent(content); + systemPriceService.updateById(tSystemPrice); + } + return SUCCESS_TIP; } diff --git a/ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html b/ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html index 64d2575..e397dff 100644 --- a/ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html +++ b/ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html @@ -227,7 +227,7 @@ <div style="float: left;width: 1200px;margin-left: 50px;"> - <div class="form-group exclusivePriceSettings"> + <div class="form-group content"> <h3 style="color: #377CCD;margin-bottom: 20px;">在线计费规则</h3> <div class="form-group"> <label class="col-sm-2 control-label">起步价设置:</label> @@ -255,7 +255,7 @@ </div> </div> - <div class="form-group waitFee"> + <div class="form-group"> <label class="col-sm-2 control-label">等待费设置:</label> <div class="col-sm-10"> 司机到达预约地点 <input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" class="form-control newWidth" placeholder="最多3位数"/> 分钟过后开始收取等待费, diff --git a/ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html b/ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html index b4d7c1c..50d79b0 100644 --- a/ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html +++ b/ManagementOKTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html @@ -40,153 +40,59 @@ </div> - <div class="form-group exclusivePriceSettings"> - <h3 style="color: #377CCD;margin-bottom: 20px;">在线计费规则</h3> - <div class="form-group"> - <label class="col-sm-2 control-label">起步价设置:</label> - <div class="col-sm-10"> - 起步价为 <input type="text" onblur="checkIsYuan(this)" name="num1" id="num1" class="form-control newWidth" placeholder="最多3位数"/> 元, - 起步包含 <input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num2" id="num2" class="form-control newWidth" placeholder="最多3位数"/> 公里, - <input type="text" onblur="checkIsMinute(this)" name="num3" id="num3" class="form-control newWidth" placeholder="最多3位数"/> 分钟 - <br/> + <div class="form-group"> + <label class="col-sm-3 control-label">软件使用费:</label> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label"></label> + <div class="col-sm-5"> + <div class="col-sm-3"> + <span class="control-label">订单扣除固定费用</span> + </div> + <div class="col-sm-3"> + <input type="text" class="form-control" id="fixedDeduction" name="fixedDeduction"> + </div> + <div class="col-sm-2"> + <span class="control-label">元</span> </div> </div> + <div class="col-sm-4"> + <div class="col-sm-3"> + <span class="control-label">线上下单扣除</span> + </div> + <div class="col-sm-3"> + <input type="text" class="form-control" id="percentageDeduction" name="percentageDeduction"> + </div> + <div class="col-sm-2"> + <span class="control-label">%</span> + </div> + </div> + </div> - <div class="form-group"> - <label class="col-sm-2 control-label">里程费设置:</label> - <div class="col-sm-10"> - 超过起步里程后每公里 <input type="text" onblur="checkIsYuan(this)" name="num4" id="num4" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br/> - </div> + <div class="form-group"> + <label class="col-sm-3 control-label"></label> + <div class="col-sm-5"> + <span class="control-label" style="color: #c1c1c1">人工、一键下单、电召订单使用</span> </div> + <div class="col-sm-4"> + <span class="control-label" style="color: #c1c1c1">线上下单使用</span> + </div> + </div> - <div class="form-group"> - <label class="col-sm-2 control-label">时长费设置:</label> - <div class="col-sm-10"> - 超过起步时长后每分钟 <input type="text" onblur="checkIsYuan(this)" name="num5" id="num5" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br/> + <div class="form-group"> + <label class="col-sm-3 control-label">司机接单限制:</label> + <div class="col-sm-9"> + <div class="col-sm-1"> + <span class="control-label">余额低于</span> + </div> + <div class="col-sm-3"> + <input type="text" class="form-control" id="driverRestriction" name="driverRestriction"> + </div> + <div class="col-sm-2"> + <span class="control-label">元不可接单</span> </div> </div> - - <div class="form-group waitFee"> - <label class="col-sm-2 control-label">等待费设置:</label> - <div class="col-sm-10"> - 司机到达预约地点 <input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" class="form-control newWidth" placeholder="最多3位数"/> 分钟过后开始收取等待费, - 为 <input type="text" onblur="checkIsYuan(this)" name="num30" id="num30" class="form-control newWidth" placeholder="最多3位数"/> 元/分,不足一分钟按照一分钟计算 - <br/> - </div> - </div> - - <div class="form-group"> - <label class="col-sm-2 control-label">远途费设置:</label> - <div class="col-sm-10"> - 总里程超过 <input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num6" id="num6" class="form-control newWidth" placeholder="最多3位数"/> 公里 - 不足 <input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num7" id="num7" class="form-control newWidth" placeholder="最多3位数"/> 公里, - 超出部分每公里加收 <input type="text" onblur="checkIsYuan(this, 'exclusivePriceSettings')" name="num8" id="num8" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br> - <br> - 超过 <input type="text" disabled onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num9" id="num9" class="form-control newWidth" placeholder="最多3位数"/> 公里 - 不足 <input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num10" id="num10" class="form-control newWidth" placeholder="最多3位数"/> 公里时, - 超出部分每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num11" id="num11" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br/> - <br> - 超过 <input type="text" disabled onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num12" id="num12" class="form-control newWidth" placeholder="最多3位数"/> 公里以后, - 超出部分每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num13" id="num13" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br/> - </div> - </div> - - <div class="form-group"> - <label class="col-sm-2 control-label">夜间行驶费用设置:</label> - <div class="col-sm-10"> - <input type="text" name="num14" id="num14" class="form-control newWidth" placeholder="选择时间"/> 点为夜间行驶时间, - 起步价变为 <input type="text" onblur="checkIsYuan(this)" name="num15" id="num15" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br> - <br> - 里程费为每公里 <input type="text" onblur="checkIsYuan(this)" name="num16" id="num16" class="form-control newWidth" placeholder="最多3位数"/> 元, - 时长费为每分钟 <input type="text" onblur="checkIsYuan(this)" name="num17" id="num17" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br> - <br> - 远途费为每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num18" id="num18" class="form-control newWidth" placeholder="最多3位数"/> - 、 <input type="text" onblur="checkIsYuan(this)" name="num19" id="num19" class="form-control newWidth" placeholder="最多3位数"/> - 、 <input type="text" onblur="checkIsYuan(this)" name="num20" id="num20" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br/> - </div> - </div> - - <div class="form-group"> - <label class="col-sm-2 control-label">高峰期费用设置:</label> - <div class="col-sm-10"> - <input type="text" name="num21" id="num21" class="form-control newWidth" placeholder="选择时间段"/> - 和 <input type="text" name="num22" id="num22" class="form-control newWidth" placeholder="选择时间段"/> 为高峰期行车时间, - 起步价变为 <input type="text" onblur="checkIsYuan(this)" name="num23" id="num23" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br> - <br> - 里程费为每公里 <input type="text" onblur="checkIsYuan(this)" name="num24" id="num24" class="form-control newWidth" placeholder="最多3位数"/> 元, - 时长费为每分钟 <input type="text" onblur="checkIsYuan(this)" name="num25" id="num25" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br> - <br> - 远途费为每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num26" id="num26" class="form-control newWidth" placeholder="最多3位数"/> - 、 <input type="text" onblur="checkIsYuan(this)" name="num27" id="num27" class="form-control newWidth" placeholder="最多3位数"/> - 、 <input type="text" onblur="checkIsYuan(this)" name="num28" id="num28" class="form-control newWidth" placeholder="最多3位数"/> 元 - <br/> - </div> - </div> - - - <div class="form-group"> - <label class="col-sm-3 control-label">软件使用费:</label> - </div> - <div class="form-group"> - <label class="col-sm-3 control-label"></label> - <div class="col-sm-5"> - <div class="col-sm-3"> - <span class="control-label">订单扣除固定费用</span> - </div> - <div class="col-sm-3"> - <input type="text" class="form-control" id="fixedDeduction" name="fixedDeduction" value="${item.fixedDeduction}"> - </div> - <div class="col-sm-2"> - <span class="control-label">元</span> - </div> - </div> - <div class="col-sm-4"> - <div class="col-sm-3"> - <span class="control-label">线上下单扣除</span> - </div> - <div class="col-sm-3"> - <input type="text" class="form-control" id="percentageDeduction" name="percentageDeduction" value="${item.percentageDeduction}"> - </div> - <div class="col-sm-2"> - <span class="control-label">%</span> - </div> - </div> - </div> - - <div class="form-group"> - <label class="col-sm-3 control-label"></label> - <div class="col-sm-5"> - <span class="control-label" style="color: #c1c1c1">人工、一键下单、电召订单使用</span> - </div> - <div class="col-sm-4"> - <span class="control-label" style="color: #c1c1c1">线上下单使用</span> - </div> - </div> - - <div class="form-group"> - <label class="col-sm-3 control-label">司机接单限制:</label> - <div class="col-sm-9"> - <div class="col-sm-1"> - <span class="control-label">余额低于</span> - </div> - <div class="col-sm-3"> - <input type="text" class="form-control" id="driverRestriction" name="driverRestriction" value="${item.driverRestriction}"> - </div> - <div class="col-sm-2"> - <span class="control-label">元不可接单</span> - </div> - </div> - </div> + </div> <div class="form-group"> <label class="col-sm-3 control-label">登录账号:</label> @@ -201,7 +107,104 @@ </div> </div> - </div> + <div style="float: left;width: 1200px;margin-left: 50px;"> + <div class="form-group content"> + <h3 style="color: #377CCD;margin-bottom: 20px;">在线计费规则</h3> + <div class="form-group"> + <label class="col-sm-2 control-label">起步价设置:</label> + <div class="col-sm-10"> + 起步价为 <input type="text" onblur="checkIsYuan(this)" name="num1" id="num1" class="form-control newWidth" placeholder="最多3位数"/> 元, + 起步包含 <input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num2" id="num2" class="form-control newWidth" placeholder="最多3位数"/> 公里, + <input type="text" onblur="checkIsMinute(this)" name="num3" id="num3" class="form-control newWidth" placeholder="最多3位数"/> 分钟 + <br/> + </div> + </div> + + <div class="form-group"> + <label class="col-sm-2 control-label">里程费设置:</label> + <div class="col-sm-10"> + 超过起步里程后每公里 <input type="text" onblur="checkIsYuan(this)" name="num4" id="num4" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br/> + </div> + </div> + + <div class="form-group"> + <label class="col-sm-2 control-label">时长费设置:</label> + <div class="col-sm-10"> + 超过起步时长后每分钟 <input type="text" onblur="checkIsYuan(this)" name="num5" id="num5" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br/> + </div> + </div> + + <div class="form-group"> + <label class="col-sm-2 control-label">等待费设置:</label> + <div class="col-sm-10"> + 司机到达预约地点 <input type="text" onblur="checkIsMinute(this)" name="num29" id="num29" class="form-control newWidth" placeholder="最多3位数"/> 分钟过后开始收取等待费, + 为 <input type="text" onblur="checkIsYuan(this)" name="num30" id="num30" class="form-control newWidth" placeholder="最多3位数"/> 元/分,不足一分钟按照一分钟计算 + <br/> + </div> + </div> + + <div class="form-group"> + <label class="col-sm-2 control-label">远途费设置:</label> + <div class="col-sm-10"> + 总里程超过 <input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num6" id="num6" class="form-control newWidth" placeholder="最多3位数"/> 公里 + 不足 <input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num7" id="num7" class="form-control newWidth" placeholder="最多3位数"/> 公里, + 超出部分每公里加收 <input type="text" onblur="checkIsYuan(this, 'exclusivePriceSettings')" name="num8" id="num8" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br> + <br> + 超过 <input type="text" disabled onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num9" id="num9" class="form-control newWidth" placeholder="最多3位数"/> 公里 + 不足 <input type="text" onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num10" id="num10" class="form-control newWidth" placeholder="最多3位数"/> 公里时, + 超出部分每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num11" id="num11" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br/> + <br> + 超过 <input type="text" disabled onblur="checkIsGongLi(this, 'exclusivePriceSettings')" name="num12" id="num12" class="form-control newWidth" placeholder="最多3位数"/> 公里以后, + 超出部分每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num13" id="num13" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br/> + </div> + </div> + + <div class="form-group"> + <label class="col-sm-2 control-label">夜间行驶费用设置:</label> + <div class="col-sm-10"> + <input type="text" name="num14" id="num14" class="form-control newWidth" placeholder="选择时间"/> 点为夜间行驶时间, + 起步价变为 <input type="text" onblur="checkIsYuan(this)" name="num15" id="num15" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br> + <br> + 里程费为每公里 <input type="text" onblur="checkIsYuan(this)" name="num16" id="num16" class="form-control newWidth" placeholder="最多3位数"/> 元, + 时长费为每分钟 <input type="text" onblur="checkIsYuan(this)" name="num17" id="num17" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br> + <br> + 远途费为每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num18" id="num18" class="form-control newWidth" placeholder="最多3位数"/> + 、 <input type="text" onblur="checkIsYuan(this)" name="num19" id="num19" class="form-control newWidth" placeholder="最多3位数"/> + 、 <input type="text" onblur="checkIsYuan(this)" name="num20" id="num20" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br/> + </div> + </div> + + <div class="form-group"> + <label class="col-sm-2 control-label">高峰期费用设置:</label> + <div class="col-sm-10"> + <input type="text" name="num21" id="num21" class="form-control newWidth" placeholder="选择时间段"/> + 和 <input type="text" name="num22" id="num22" class="form-control newWidth" placeholder="选择时间段"/> 为高峰期行车时间, + 起步价变为 <input type="text" onblur="checkIsYuan(this)" name="num23" id="num23" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br> + <br> + 里程费为每公里 <input type="text" onblur="checkIsYuan(this)" name="num24" id="num24" class="form-control newWidth" placeholder="最多3位数"/> 元, + 时长费为每分钟 <input type="text" onblur="checkIsYuan(this)" name="num25" id="num25" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br> + <br> + 远途费为每公里加收 <input type="text" onblur="checkIsYuan(this)" name="num26" id="num26" class="form-control newWidth" placeholder="最多3位数"/> + 、 <input type="text" onblur="checkIsYuan(this)" name="num27" id="num27" class="form-control newWidth" placeholder="最多3位数"/> + 、 <input type="text" onblur="checkIsYuan(this)" name="num28" id="num28" class="form-control newWidth" placeholder="最多3位数"/> 元 + <br/> + </div> + </div> + + </div> + </div> + + </div> @@ -217,4 +220,199 @@ </div> </div> <script src="${ctxPath}/static/modular/system/tCompany/franchisee_info.js"></script> +<script type="text/javascript"> + laydate.render({ + elem: '#setupTime' + }); + laydate.render({ + elem: '#licenseTime' + }); + laydate.render({ + elem: '#licenseStartTime' + }); + laydate.render({ + elem: '#licenseEndTime' + }); + laydate.render({ + elem: '.p1 #num14' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.p1 #num21' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.p1 #num22' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + + laydate.render({ + elem: '.p2 #num14' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.p2 #num21' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.p2 #num22' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + + laydate.render({ + elem: '.p3 #num14' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.p3 #num21' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.p3 #num22' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + + laydate.render({ + elem: '.wp1 #num14' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.wp1 #num21' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.wp1 #num22' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + + laydate.render({ + elem: '.wp2 #num14' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.wp2 #num21' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.wp2 #num22' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + + laydate.render({ + elem: '.wp3 #num14' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.wp3 #num21' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.wp3 #num22' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + + laydate.render({ + elem: '.exclusivePriceSettings #num14' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.exclusivePriceSettings #num21' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.exclusivePriceSettings #num22' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + + laydate.render({ + elem: '.onePriceSetting #num14' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.onePriceSetting #num21' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + laydate.render({ + elem: '.onePriceSetting #num22' + ,type: 'time' + ,range: '-' + ,format: 'HH:mm' + }); + + var regDouble = /^(0|[1-9]\d{0,2})(\.\d{1,2})?$/; + var regInt = /^[0-9]{0,3}$/; + function checkIsYuan(obj){ + var num = $(obj).val(); + if(!regDouble.test(num)){ + layer.msg("【元】输入框不能超过3位数,保留两位小数"); + $(obj).val(''); + } + } + function checkIsGongLi(obj, clazz){ + var num = $(obj).val(); + if(!regDouble.test(num)){ + layer.msg("【公里】输入框不能超过3位数,保留两位小数"); + $(obj).val(''); + } + if (obj.id == "num7"){ + $("." + clazz + " #num9").val(num); + }else if (obj.id == "num10"){ + $("." + clazz + " #num12").val(num); + } + } + function checkIsMinute(obj){ + var num = $(obj).val(); + if(!regInt.test(num)){ + layer.msg("【分钟】输入框不能超过3位数"); + $(obj).val(''); + } + } + +</script> @} diff --git a/ManagementOKTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js b/ManagementOKTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js index 142915c..abd0475 100644 --- a/ManagementOKTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js +++ b/ManagementOKTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js @@ -336,7 +336,23 @@ return } - + var content = '{'; + //拼接数据 + $(".content input[type='text']").each(function(){ + var value = $(this).val(); + if('' == value){ + b = true; + Feng.info("请填写完整配置"); + return + } + content = content + '"'+$(this)[0].name+'":"'+value+'",'; + }); + content = content.substring(0,content.length-1); + content += '}'; + console.log(content); + if(b){ + return + } //提交信息 var ajax = new $ax(Feng.ctxPath + "/tCompany/addFranchisee", function(data){ if ("error" == data){ @@ -353,6 +369,7 @@ ajax.set("isTaxi",1); ajax.set("account",$("#account").val()); ajax.set("password",$("#password").val()); + ajax.set("content",content); ajax.start(); } @@ -560,7 +577,23 @@ if(b){ return } - + var content = '{'; + //拼接数据 + $(".content input[type='text']").each(function(){ + var value = $(this).val(); + if('' == value){ + b = true; + Feng.info("请填写完整配置"); + return + } + content = content + '"'+$(this)[0].name+'":"'+value+'",'; + }); + content = content.substring(0,content.length-1); + content += '}'; + console.log(content); + if(b){ + return + } //提交信息 var ajax = new $ax(Feng.ctxPath + "/tCompany/updateFranchisee", function(data){ @@ -590,6 +623,7 @@ ajax.set("account",$("#account").val()); ajax.set("password",$("#password").val()); ajax.set("userId",$("#userId").val()); + ajax.set("content",content); ajax.start(); } diff --git a/ManagementOKTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js b/ManagementOKTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js index 0299ae9..eacb3e8 100644 --- a/ManagementOKTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js +++ b/ManagementOKTravel/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js @@ -186,6 +186,25 @@ let driverRestriction = $('#driverRestriction').val(); regexp(driverRestriction, "司机接单限制") + + var content = '{'; + //拼接数据 + $(".content input[type='text']").each(function(){ + var value = $(this).val(); + if('' == value){ + b = true; + Feng.info("请填写完整配置"); + return + } + content = content + '"'+$(this)[0].name+'":"'+value+'",'; + }); + content = content.substring(0,content.length-1); + content += '}'; + console.log(content); + if(b){ + return + } + //提交信息 var ajax = new $ax(Feng.ctxPath + "/tCompany/add", function(data){ if ("error" == data){ @@ -203,6 +222,7 @@ ajax.set("subArr",JSON.stringify(subArr)); ajax.set("account",$("#account").val()); ajax.set("password",$("#password").val()); + ajax.set("content",content); ajax.start(); } @@ -249,6 +269,25 @@ let driverRestriction = $('#driverRestriction').val(); regexp(driverRestriction, "司机接单限制") + + var content = '{'; + //拼接数据 + $(".content input[type='text']").each(function(){ + var value = $(this).val(); + if('' == value){ + b = true; + Feng.info("请填写完整配置"); + return + } + content = content + '"'+$(this)[0].name+'":"'+value+'",'; + }); + content = content.substring(0,content.length-1); + content += '}'; + console.log(content); + if(b){ + return + } + //提交信息 var ajax = new $ax(Feng.ctxPath + "/tCompany/update", function(data){ if ("error" == data){ @@ -279,6 +318,7 @@ ajax.set("account",$("#account").val()); ajax.set("password",$("#password").val()); ajax.set("userId",$("#userId").val()); + ajax.set("content",content); ajax.start(); } -- Gitblit v1.7.1