运营商管理

This commit is contained in:
majian314
2025-07-01 19:14:02 +08:00
parent 854477eafe
commit 87e606c685
10 changed files with 248 additions and 554 deletions

View File

@ -1,6 +1,8 @@
package com.ruoyi.operation.controller; package com.ruoyi.operation.controller;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -86,6 +88,7 @@ public class CompanyController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(Company company) public AjaxResult addSave(Company company)
{ {
company.setCreateBy(getLoginName());
return toAjax(companyService.insertCompany(company)); return toAjax(companyService.insertCompany(company));
} }
@ -110,6 +113,7 @@ public class CompanyController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult editSave(Company company) public AjaxResult editSave(Company company)
{ {
company.setUpdateBy(getLoginName());
return toAjax(companyService.updateCompany(company)); return toAjax(companyService.updateCompany(company));
} }
@ -124,4 +128,14 @@ public class CompanyController extends BaseController
{ {
return toAjax(companyService.deleteCompanyByIds(ids)); return toAjax(companyService.deleteCompanyByIds(ids));
} }
@Log(title = "运营商管理", businessType = BusinessType.UPDATE)
@RequiresPermissions("operation:company:edit")
@PostMapping("/changeStatus")
@ResponseBody
public AjaxResult changeStatus(Company company)
{
return toAjax(companyService.changeStatus(company));
}
} }

View File

@ -96,9 +96,11 @@ public class Company extends BaseEntity
private Long channelId; private Long channelId;
/** 运营商管理城市 */ /** 运营商管理城市 */
@Excel(name = "运营商管理城市")
private String citys; private String citys;
/** 运营商管理城市 */
@Excel(name = "运营商管理城市")
private String cityName;
/** 支付宝支付模式 */ /** 支付宝支付模式 */
@Excel(name = "支付宝支付模式") @Excel(name = "支付宝支付模式")
private Long aliPayModel; private Long aliPayModel;
@ -366,6 +368,15 @@ public class Company extends BaseEntity
{ {
return citys; return citys;
} }
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public void setAliPayModel(Long aliPayModel) public void setAliPayModel(Long aliPayModel)
{ {
this.aliPayModel = aliPayModel; this.aliPayModel = aliPayModel;
@ -580,6 +591,7 @@ public class Company extends BaseEntity
.append("allowChange", getAllowChange()) .append("allowChange", getAllowChange())
.append("channelId", getChannelId()) .append("channelId", getChannelId())
.append("citys", getCitys()) .append("citys", getCitys())
.append("cityName", getCityName())
.append("aliPayModel", getAliPayModel()) .append("aliPayModel", getAliPayModel())
.append("aliReceivingAccount", getAliReceivingAccount()) .append("aliReceivingAccount", getAliReceivingAccount())
.append("aliKey", getAliKey()) .append("aliKey", getAliKey())

View File

@ -58,4 +58,6 @@ public interface ICompanyService
* @return 结果 * @return 结果
*/ */
public int deleteCompanyById(Long id); public int deleteCompanyById(Long id);
public int changeStatus(Company company);
} }

View File

@ -55,6 +55,7 @@ public class CompanyServiceImpl implements ICompanyService
public int insertCompany(Company company) public int insertCompany(Company company)
{ {
company.setCreateTime(DateUtils.getNowDate()); company.setCreateTime(DateUtils.getNowDate());
company.setUpdateTime(DateUtils.getNowDate());
return companyMapper.insertCompany(company); return companyMapper.insertCompany(company);
} }
@ -94,4 +95,11 @@ public class CompanyServiceImpl implements ICompanyService
{ {
return companyMapper.deleteCompanyById(id); return companyMapper.deleteCompanyById(id);
} }
@Override
public int changeStatus(Company company)
{
company.setUpdateTime(DateUtils.getNowDate());
return companyMapper.updateCompany(company);
}
} }

View File

@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="allowChange" column="allow_change" /> <result property="allowChange" column="allow_change" />
<result property="channelId" column="channel_id" /> <result property="channelId" column="channel_id" />
<result property="citys" column="citys" /> <result property="citys" column="citys" />
<result property="cityName" column="city_name" />
<result property="aliPayModel" column="ali_pay_model" /> <result property="aliPayModel" column="ali_pay_model" />
<result property="aliReceivingAccount" column="ali_receiving_account" /> <result property="aliReceivingAccount" column="ali_receiving_account" />
<result property="aliKey" column="ali_key" /> <result property="aliKey" column="ali_key" />
@ -54,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectCompanyVo"> <sql id="selectCompanyVo">
select id, company_name, contact_name, phone, address, balance, deposit, type, is_delete, allow_split_bill, max_percentage, is_add_rules, sharing_ratio, wechat_pay_model, wechat_receiving_account, wechat_key, charge_mode, charge_param, allow_change, channel_id, citys, ali_pay_model, ali_receiving_account, ali_key, service_order_type, split_order_type, wechat_balance, alipay_balance, invite_reward_mode, invite_reward_param, reward_type, reward_param, is_reservation, reservation_duration, reservation_number, status, del_flag, create_by, create_time, update_by, update_time, extend1, extend2, extend3, extend4, extend5 from company select id, company_name, contact_name, phone, address, balance, deposit, type, is_delete, allow_split_bill, max_percentage, is_add_rules, sharing_ratio, wechat_pay_model, wechat_receiving_account, wechat_key, charge_mode, charge_param, allow_change, channel_id, citys, city_name, ali_pay_model, ali_receiving_account, ali_key, service_order_type, split_order_type, wechat_balance, alipay_balance, invite_reward_mode, invite_reward_param, reward_type, reward_param, is_reservation, reservation_duration, reservation_number, status, del_flag, create_by, create_time, update_by, update_time, extend1, extend2, extend3, extend4, extend5 from company
</sql> </sql>
<select id="selectCompanyList" parameterType="Company" resultMap="CompanyResult"> <select id="selectCompanyList" parameterType="Company" resultMap="CompanyResult">
@ -96,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="reservationNumber != null "> and reservation_number = #{reservationNumber}</if> <if test="reservationNumber != null "> and reservation_number = #{reservationNumber}</if>
<if test="status != null and status != ''"> and status = #{status}</if> <if test="status != null and status != ''"> and status = #{status}</if>
</where> </where>
order by update_time desc
</select> </select>
<select id="selectCompanyById" parameterType="Long" resultMap="CompanyResult"> <select id="selectCompanyById" parameterType="Long" resultMap="CompanyResult">
@ -126,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="allowChange != null">allow_change,</if> <if test="allowChange != null">allow_change,</if>
<if test="channelId != null">channel_id,</if> <if test="channelId != null">channel_id,</if>
<if test="citys != null">citys,</if> <if test="citys != null">citys,</if>
<if test="cityName != null">city_name,</if>
<if test="aliPayModel != null">ali_pay_model,</if> <if test="aliPayModel != null">ali_pay_model,</if>
<if test="aliReceivingAccount != null and aliReceivingAccount != ''">ali_receiving_account,</if> <if test="aliReceivingAccount != null and aliReceivingAccount != ''">ali_receiving_account,</if>
<if test="aliKey != null and aliKey != ''">ali_key,</if> <if test="aliKey != null and aliKey != ''">ali_key,</if>
@ -173,6 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="allowChange != null">#{allowChange},</if> <if test="allowChange != null">#{allowChange},</if>
<if test="channelId != null">#{channelId},</if> <if test="channelId != null">#{channelId},</if>
<if test="citys != null">#{citys},</if> <if test="citys != null">#{citys},</if>
<if test="cityName != null">#{cityName},</if>
<if test="aliPayModel != null">#{aliPayModel},</if> <if test="aliPayModel != null">#{aliPayModel},</if>
<if test="aliReceivingAccount != null and aliReceivingAccount != ''">#{aliReceivingAccount},</if> <if test="aliReceivingAccount != null and aliReceivingAccount != ''">#{aliReceivingAccount},</if>
<if test="aliKey != null and aliKey != ''">#{aliKey},</if> <if test="aliKey != null and aliKey != ''">#{aliKey},</if>
@ -224,6 +228,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="allowChange != null">allow_change = #{allowChange},</if> <if test="allowChange != null">allow_change = #{allowChange},</if>
<if test="channelId != null">channel_id = #{channelId},</if> <if test="channelId != null">channel_id = #{channelId},</if>
<if test="citys != null">citys = #{citys},</if> <if test="citys != null">citys = #{citys},</if>
<if test="cityName != null">city_name = #{cityName},</if>
<if test="aliPayModel != null">ali_pay_model = #{aliPayModel},</if> <if test="aliPayModel != null">ali_pay_model = #{aliPayModel},</if>
<if test="aliReceivingAccount != null and aliReceivingAccount != ''">ali_receiving_account = #{aliReceivingAccount},</if> <if test="aliReceivingAccount != null and aliReceivingAccount != ''">ali_receiving_account = #{aliReceivingAccount},</if>
<if test="aliKey != null and aliKey != ''">ali_key = #{aliKey},</if> <if test="aliKey != null and aliKey != ''">ali_key = #{aliKey},</if>
@ -264,4 +269,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>

View File

@ -658,8 +658,8 @@ label {
.select-list li p, .select-list li label:not(.radio-box){ .select-list li p, .select-list li label:not(.radio-box){
float: left; float: left;
width: 80px; width: 100px;
margin: 5px 0px 0px 0px; margin: 10px 0px 0px 0px;
text-align:right; text-align:right;
} }

View File

@ -2,232 +2,107 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('新增运营商')" /> <th:block th:include="include :: header('新增运营商')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-fileinput-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-company-add"> <form class="form-horizontal m" id="form-company-add">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">公司名称:</label> <label class="col-sm-3 control-label is-required">运营商名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="companyName" class="form-control" type="text" required> <input name="companyName" class="form-control" type="text" maxlength="20" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">联系人姓名:</label> <label class="col-sm-3 control-label is-required">联系人姓名:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="contactName" class="form-control" type="text"> <input name="contactName" class="form-control" type="text" maxlength="20" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">联系电话:</label> <label class="col-sm-3 control-label is-required">联系电话:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="phone" class="form-control" type="text"> <input name="phone" class="form-control fa-phone" type="text" maxlength="11" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">公司地址:</label>
<div class="col-sm-8">
<input name="address" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">账户余额:</label>
<div class="col-sm-8">
<input name="balance" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">押金/保证金金额:</label>
<div class="col-sm-8">
<input name="deposit" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否已删除:</label>
<div class="col-sm-8">
<input name="isDelete" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否允许拆分账单:</label>
<div class="col-sm-8">
<input name="allowSplitBill" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">最大百分比:</label>
<div class="col-sm-8">
<input name="maxPercentage" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否可新增套餐:</label> <label class="col-sm-3 control-label is-required">是否可新增套餐:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="isAddRules" class="form-control" type="text" required> <select name="isAddRules" class="form-control m-b" th:with="type=${@dict.getType('key_is_add_rules')}" required >
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div> </div>
</div> </div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label is-required">租车平台分成比例:</label> <label class="col-sm-3 control-label is-required">租车平台分成比例:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="sharingRatio" class="form-control" type="text" required> <input name="sharingRatio" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">微信支付模式</label> <label class="col-sm-3 control-label is-required">运营商管理城市</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="wechatPayModel" class="form-control" type="text" required> <div class="input-group">
<input id="areatreeId" name="citys" type="hidden" th:value="${sysAreaHn?.areaCode}"/>
<input class="form-control" type="text" onclick="selectAreaHnTree()" id="areatreeName" name="cityName" readonly="true" th:value="${sysAreaHn?.name}" required>
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">地址:</label>
<div class="col-sm-8">
<input name="address" class="form-control" type="text" maxlength="100">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">微信收款商户号:</label> <label class="col-sm-3 control-label is-required">微信收款商户号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="wechatReceivingAccount" class="form-control" type="text" required> <input name="wechatReceivingAccount" class="form-control" type="text" maxlength="500" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">微信收款密钥:</label> <label class="col-sm-3 control-label is-required">微信收款密钥:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="wechatKey" class="form-control" type="text" required> <input name="wechatKey" class="form-control" type="text" maxlength="500" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">计费模式:</label>
<div class="col-sm-8">
<input name="chargeMode" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">计费参数:</label>
<div class="col-sm-8">
<input name="chargeParam" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否允许修改:</label>
<div class="col-sm-8">
<input name="allowChange" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">渠道/通路ID</label>
<div class="col-sm-8">
<input name="channelId" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">运营商管理城市:</label>
<div class="col-sm-8">
<input name="citys" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">支付宝支付模式:</label>
<div class="col-sm-8">
<input name="aliPayModel" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">支付宝收款商户号:</label> <label class="col-sm-3 control-label is-required">支付宝收款商户号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="aliReceivingAccount" class="form-control" type="text" required> <input name="aliReceivingAccount" class="form-control" type="text" maxlength="500" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">支付宝收款密钥:</label> <label class="col-sm-3 control-label is-required">支付宝收款密钥:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="aliKey" class="form-control" type="text" required> <input name="aliKey" class="form-control" type="text" maxlength="500" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">微信公共平台余额:</label>
<div class="col-sm-8">
<input name="wechatBalance" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付宝公共平台余额:</label>
<div class="col-sm-8">
<input name="alipayBalance" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">邀请奖励模式:</label>
<div class="col-sm-8">
<input name="inviteRewardMode" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">邀请奖励参数:</label>
<div class="col-sm-8">
<input name="inviteRewardParam" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">奖励参数:</label>
<div class="col-sm-8">
<input name="rewardParam" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否预约:</label>
<div class="col-sm-8">
<input name="isReservation" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">预约时长:</label>
<div class="col-sm-8">
<input name="reservationDuration" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">预约次数:</label>
<div class="col-sm-8">
<input name="reservationNumber" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">删除标志:</label>
<div class="col-sm-8">
<input name="delFlag" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="extend1" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="extend2" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="extend3" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="extend4" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="extend5" class="form-control" type="text">
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "operation/company" var prefix = ctx + "operation/company"
var areaPrefix = ctx + "system/areaHn";
$("#form-company-add").validate({ $("#form-company-add").validate({
rules:{
phone:{
isPhone:true,
},
},
focusCleanup: true focusCleanup: true
}); });
@ -236,6 +111,25 @@
$.operate.save(prefix + "/add", $('#form-company-add').serialize()); $.operate.save(prefix + "/add", $('#form-company-add').serialize());
} }
} }
/*行政区域-新增-选择父行政区域树*/
function selectAreaHnTree() {
var options = {
title: '行政区域选择',
width: "380",
url: areaPrefix + "/selectAreaHnTree/" + $("#areatreeId").val(),
callBack: doAreaSubmit
};
$.modal.openOptions(options);
}
function doAreaSubmit(index, layero){
var body = $.modal.getChildFrame(index);
$("#areatreeId").val(body.find('#treeId').val());
$("#areatreeName").val(body.find('#treeName').val());
$.modal.close(index);
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -11,7 +11,7 @@
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
<label>公司名称:</label> <label>运营商名称:</label>
<input type="text" name="companyName"/> <input type="text" name="companyName"/>
</li> </li>
<li> <li>
@ -23,112 +23,11 @@
<input type="text" name="phone"/> <input type="text" name="phone"/>
</li> </li>
<li> <li>
<label>公司地址:</label> <label>状态: </label>
<input type="text" name="address"/> <select name="status" th:with="type=${@dict.getType('key_company_status')}">
</li> <option value="">所有</option>
<li> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<label>账户余额:</label> </select>
<input type="text" name="balance"/>
</li>
<li>
<label>押金/保证金金额:</label>
<input type="text" name="deposit"/>
</li>
<li>
<label>是否已删除:</label>
<input type="text" name="isDelete"/>
</li>
<li>
<label>是否允许拆分账单:</label>
<input type="text" name="allowSplitBill"/>
</li>
<li>
<label>最大百分比:</label>
<input type="text" name="maxPercentage"/>
</li>
<li>
<label>是否可新增套餐:</label>
<input type="text" name="isAddRules"/>
</li>
<li>
<label>租车平台分成比例:</label>
<input type="text" name="sharingRatio"/>
</li>
<li>
<label>微信支付模式:</label>
<input type="text" name="wechatPayModel"/>
</li>
<li>
<label>微信收款商户号:</label>
<input type="text" name="wechatReceivingAccount"/>
</li>
<li>
<label>微信收款密钥:</label>
<input type="text" name="wechatKey"/>
</li>
<li>
<label>计费模式:</label>
<input type="text" name="chargeMode"/>
</li>
<li>
<label>计费参数:</label>
<input type="text" name="chargeParam"/>
</li>
<li>
<label>是否允许修改:</label>
<input type="text" name="allowChange"/>
</li>
<li>
<label>渠道/通路ID</label>
<input type="text" name="channelId"/>
</li>
<li>
<label>运营商管理城市:</label>
<input type="text" name="citys"/>
</li>
<li>
<label>支付宝支付模式:</label>
<input type="text" name="aliPayModel"/>
</li>
<li>
<label>支付宝收款商户号:</label>
<input type="text" name="aliReceivingAccount"/>
</li>
<li>
<label>支付宝收款密钥:</label>
<input type="text" name="aliKey"/>
</li>
<li>
<label>微信公共平台余额:</label>
<input type="text" name="wechatBalance"/>
</li>
<li>
<label>支付宝公共平台余额:</label>
<input type="text" name="alipayBalance"/>
</li>
<li>
<label>邀请奖励模式:</label>
<input type="text" name="inviteRewardMode"/>
</li>
<li>
<label>邀请奖励参数:</label>
<input type="text" name="inviteRewardParam"/>
</li>
<li>
<label>奖励参数:</label>
<input type="text" name="rewardParam"/>
</li>
<li>
<label>是否预约:</label>
<input type="text" name="isReservation"/>
</li>
<li>
<label>预约时长:</label>
<input type="text" name="reservationDuration"/>
</li>
<li>
<label>预约次数:</label>
<input type="text" name="reservationNumber"/>
</li> </li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@ -149,9 +48,9 @@
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="operation:company:remove"> <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="operation:company:remove">
<i class="fa fa-remove"></i> 删除 <i class="fa fa-remove"></i> 删除
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:company:export"> <!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:company:export">-->
<i class="fa fa-download"></i> 导出 <!-- <i class="fa fa-download"></i> 导出-->
</a> <!-- </a>-->
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>
@ -162,6 +61,8 @@
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('operation:company:edit')}]]; var editFlag = [[${@permission.hasPermi('operation:company:edit')}]];
var removeFlag = [[${@permission.hasPermi('operation:company:remove')}]]; var removeFlag = [[${@permission.hasPermi('operation:company:remove')}]];
var keyIsAddRules = [[${@dict.getType('key_is_add_rules')}]];
var keyCompanyStatus = [[${@dict.getType('key_company_status')}]];
var prefix = ctx + "operation/company"; var prefix = ctx + "operation/company";
$(function() { $(function() {
@ -182,7 +83,7 @@
}, },
{ {
field: 'companyName', field: 'companyName',
title: '公司名称' title: '运营商名称'
}, },
{ {
field: 'contactName', field: 'contactName',
@ -193,146 +94,69 @@
title: '联系电话' title: '联系电话'
}, },
{ {
field: 'address', field: 'cityName',
title: '公司地址' title: '所在城市'
},
{
field: 'balance',
title: '账户余额'
},
{
field: 'deposit',
title: '押金/保证金金额'
},
{
field: 'type',
title: '公司类型'
},
{
field: 'isDelete',
title: '是否已删除'
},
{
field: 'allowSplitBill',
title: '是否允许拆分账单'
},
{
field: 'maxPercentage',
title: '最大百分比'
}, },
{ {
field: 'isAddRules', field: 'isAddRules',
title: '是否可新增套餐' title: '是否可新增套餐',
formatter: function(value, row, index) {
return $.table.selectDictLabel(keyIsAddRules, value);
}
}, },
{ {
field: 'sharingRatio', field: 'sharingRatio',
title: '租车平台分成比例' title: '租车平台分成比例'
}, },
{ {
field: 'wechatPayModel', field: 'createBy',
title: '微信支付模式' title: '创建人'
}, },
{ {
field: 'wechatReceivingAccount', field: 'updateTime',
title: '微信收款商户号' title: '操作时间',
}, sortable: true
{
field: 'wechatKey',
title: '微信收款密钥'
},
{
field: 'chargeMode',
title: '计费模式'
},
{
field: 'chargeParam',
title: '计费参数'
},
{
field: 'allowChange',
title: '是否允许修改'
},
{
field: 'channelId',
title: '渠道/通路ID'
},
{
field: 'citys',
title: '运营商管理城市'
},
{
field: 'aliPayModel',
title: '支付宝支付模式'
},
{
field: 'aliReceivingAccount',
title: '支付宝收款商户号'
},
{
field: 'aliKey',
title: '支付宝收款密钥'
},
{
field: 'serviceOrderType',
title: '服务费收费订单类型'
},
{
field: 'splitOrderType',
title: '分账订单类型'
},
{
field: 'wechatBalance',
title: '微信公共平台余额'
},
{
field: 'alipayBalance',
title: '支付宝公共平台余额'
},
{
field: 'inviteRewardMode',
title: '邀请奖励模式'
},
{
field: 'inviteRewardParam',
title: '邀请奖励参数'
},
{
field: 'rewardType',
title: '奖励方式'
},
{
field: 'rewardParam',
title: '奖励参数'
},
{
field: 'isReservation',
title: '是否预约'
},
{
field: 'reservationDuration',
title: '预约时长'
},
{
field: 'reservationNumber',
title: '预约次数'
}, },
{ {
field: 'status', field: 'status',
title: '部门状态' title: '状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(keyCompanyStatus, value);
}
}, },
{ {
title: '操作', title: '操作',
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
if (row.status == 1) {
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="enable(\'' + row.id + '\')"><i class="fa fa-edit"></i>启用</a> ');
} else {
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="disable(\'' + row.id + '\')"><i class="fa fa-edit"></i>停用</a> ');
}
return actions.join(''); return actions.join('');
} }
}] }]
}; };
$.table.init(options); $.table.init(options);
}); });
/* 用户管理-停用 */
function disable(id) {
$.modal.confirm("确认是否停用此运营商?<span style='color: red'>停用后此运营商的车辆与门店不会显示在小程序中</span>", function() {
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 });
})
}
/* 用户管理启用 */
function enable(id) {
$.modal.confirm("确认是否启用此运营商?<span style='color: red'>启用运营商后停用前的数据将恢复正常,运营商可登录管理后台。</span>", function() {
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 0 });
})
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -2,69 +2,39 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head> <head>
<th:block th:include="include :: header('修改运营商')" /> <th:block th:include="include :: header('修改运营商')" />
<th:block th:include="include :: select2-css" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: bootstrap-fileinput-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-company-edit" th:object="${company}"> <form class="form-horizontal m" id="form-company-edit" th:object="${company}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">公司名称:</label> <label class="col-sm-3 control-label is-required">运营商名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="companyName" th:field="*{companyName}" class="form-control" type="text" required> <input name="companyName" th:field="*{companyName}" class="form-control" type="text" maxlength="20" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">联系人姓名:</label> <label class="col-sm-3 control-label is-required">联系人姓名:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="contactName" th:field="*{contactName}" class="form-control" type="text"> <input name="contactName" th:field="*{contactName}" class="form-control" type="text" maxlength="20" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">联系电话:</label> <label class="col-sm-3 control-label is-required">联系电话:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="phone" th:field="*{phone}" class="form-control" type="text"> <input name="phone" th:field="*{phone}" class="form-control fa-phone" type="text" maxlength="11" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">公司地址:</label>
<div class="col-sm-8">
<input name="address" th:field="*{address}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">账户余额:</label>
<div class="col-sm-8">
<input name="balance" th:field="*{balance}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">押金/保证金金额:</label>
<div class="col-sm-8">
<input name="deposit" th:field="*{deposit}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否已删除:</label>
<div class="col-sm-8">
<input name="isDelete" th:field="*{isDelete}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否允许拆分账单:</label>
<div class="col-sm-8">
<input name="allowSplitBill" th:field="*{allowSplitBill}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">最大百分比:</label>
<div class="col-sm-8">
<input name="maxPercentage" th:field="*{maxPercentage}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">是否可新增套餐:</label> <label class="col-sm-3 control-label is-required">是否可新增套餐:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="isAddRules" th:field="*{isAddRules}" class="form-control" type="text" required> <select name="isAddRules" class="form-control m-b" th:with="type=${@dict.getType('key_is_add_rules')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{isAddRules}" required></option>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -73,126 +43,63 @@
<input name="sharingRatio" th:field="*{sharingRatio}" class="form-control" type="text" required> <input name="sharingRatio" th:field="*{sharingRatio}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">微信支付模式</label> <label class="col-sm-3 control-label is-required">运营商管理城市</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="wechatPayModel" th:field="*{wechatPayModel}" class="form-control" type="text" required> <div class="input-group">
<input id="areatreeId" name="citys" type="hidden" th:value="${sysAreaHn?.areaCode}" th:field="*{citys}"/>
<input class="form-control" type="text" onclick="selectAreaHnTree()" id="areatreeName" name="cityName" readonly="true" th:value="${sysAreaHn?.name}" th:field="*{cityName}" required>
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">地址:</label>
<div class="col-sm-8">
<input name="address" th:field="*{address}" class="form-control" type="text" maxlength="100">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">微信收款商户号:</label> <label class="col-sm-3 control-label is-required">微信收款商户号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="wechatReceivingAccount" th:field="*{wechatReceivingAccount}" class="form-control" type="text" required> <input name="wechatReceivingAccount" th:field="*{wechatReceivingAccount}" class="form-control" type="text" maxlength="500" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">微信收款密钥:</label> <label class="col-sm-3 control-label is-required">微信收款密钥:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="wechatKey" th:field="*{wechatKey}" class="form-control" type="text" required> <input name="wechatKey" th:field="*{wechatKey}" class="form-control" type="text" maxlength="500" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">计费模式:</label>
<div class="col-sm-8">
<input name="chargeMode" th:field="*{chargeMode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">计费参数:</label>
<div class="col-sm-8">
<input name="chargeParam" th:field="*{chargeParam}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否允许修改:</label>
<div class="col-sm-8">
<input name="allowChange" th:field="*{allowChange}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">渠道/通路ID</label>
<div class="col-sm-8">
<input name="channelId" th:field="*{channelId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">运营商管理城市:</label>
<div class="col-sm-8">
<input name="citys" th:field="*{citys}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">支付宝支付模式:</label>
<div class="col-sm-8">
<input name="aliPayModel" th:field="*{aliPayModel}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">支付宝收款商户号:</label> <label class="col-sm-3 control-label is-required">支付宝收款商户号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="aliReceivingAccount" th:field="*{aliReceivingAccount}" class="form-control" type="text" required> <input name="aliReceivingAccount" th:field="*{aliReceivingAccount}" class="form-control" type="text" maxlength="500" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">支付宝收款密钥:</label> <label class="col-sm-3 control-label is-required">支付宝收款密钥:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="aliKey" th:field="*{aliKey}" class="form-control" type="text" required> <input name="aliKey" th:field="*{aliKey}" class="form-control" type="text" maxlength="500" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">微信公共平台余额:</label>
<div class="col-sm-8">
<input name="wechatBalance" th:field="*{wechatBalance}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付宝公共平台余额:</label>
<div class="col-sm-8">
<input name="alipayBalance" th:field="*{alipayBalance}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">邀请奖励模式:</label>
<div class="col-sm-8">
<input name="inviteRewardMode" th:field="*{inviteRewardMode}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">邀请奖励参数:</label>
<div class="col-sm-8">
<input name="inviteRewardParam" th:field="*{inviteRewardParam}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">奖励参数:</label>
<div class="col-sm-8">
<input name="rewardParam" th:field="*{rewardParam}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否预约:</label>
<div class="col-sm-8">
<input name="isReservation" th:field="*{isReservation}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">预约时长:</label>
<div class="col-sm-8">
<input name="reservationDuration" th:field="*{reservationDuration}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">预约次数:</label>
<div class="col-sm-8">
<input name="reservationNumber" th:field="*{reservationNumber}" class="form-control" type="text">
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "operation/company"; var prefix = ctx + "operation/company";
var areaPrefix = ctx + "system/areaHn";
$("#form-company-edit").validate({ $("#form-company-edit").validate({
rules:{
phone:{
isPhone:true,
},
},
focusCleanup: true focusCleanup: true
}); });
@ -201,6 +108,46 @@
$.operate.save(prefix + "/edit", $('#form-company-edit').serialize()); $.operate.save(prefix + "/edit", $('#form-company-edit').serialize());
} }
} }
/* 用户管理-修改-选择部门树 */
function selectDeptTree() {
var deptId = $.common.isEmpty($("#treeId").val()) ? "431200000000" : $("#treeId").val();
var url = ctx + "system/dept/selectDeptTree/" + deptId;
var options = {
title: '选择部门',
width: "380",
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero){
var tree = layero.find("iframe")[0].contentWindow.$._tree;
var body = $.modal.getChildFrame(index);
$("#treeId").val(body.find('#treeId').val());
$("#treeName").val(body.find('#treeName').val());
$.modal.close(index);
}
/*行政区域-新增-选择父行政区域树*/
function selectAreaHnTree() {
var options = {
title: '行政区域选择',
width: "380",
url: areaPrefix + "/selectAreaHnTree/" + $("#areatreeId").val(),
callBack: doAreaSubmit
};
$.modal.openOptions(options);
}
function doAreaSubmit(index, layero){
var body = $.modal.getChildFrame(index);
$("#areatreeId").val(body.find('#treeId').val());
$("#areatreeName").val(body.find('#treeName').val());
$.modal.close(index);
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -200,23 +200,11 @@
// }, // },
{ {
field: 'cityName', field: 'cityName',
title: '' title: ''
}, },
{ {
field: 'districtName', field: 'districtName',
title: '' title: ''
},
{
field: 'townName',
title: '乡/镇'
},
{
field: 'villageName',
title: '村'
},
{
field: 'groupName',
title: '办案室'
}, },
// { // {
// field: 'createTime', // field: 'createTime',