运营商管理

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;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -86,6 +88,7 @@ public class CompanyController extends BaseController
@ResponseBody
public AjaxResult addSave(Company company)
{
company.setCreateBy(getLoginName());
return toAjax(companyService.insertCompany(company));
}
@ -110,6 +113,7 @@ public class CompanyController extends BaseController
@ResponseBody
public AjaxResult editSave(Company company)
{
company.setUpdateBy(getLoginName());
return toAjax(companyService.updateCompany(company));
}
@ -124,4 +128,14 @@ public class CompanyController extends BaseController
{
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;
/** 运营商管理城市 */
@Excel(name = "运营商管理城市")
private String citys;
/** 运营商管理城市 */
@Excel(name = "运营商管理城市")
private String cityName;
/** 支付宝支付模式 */
@Excel(name = "支付宝支付模式")
private Long aliPayModel;
@ -366,6 +368,15 @@ public class Company extends BaseEntity
{
return citys;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public void setAliPayModel(Long aliPayModel)
{
this.aliPayModel = aliPayModel;
@ -580,6 +591,7 @@ public class Company extends BaseEntity
.append("allowChange", getAllowChange())
.append("channelId", getChannelId())
.append("citys", getCitys())
.append("cityName", getCityName())
.append("aliPayModel", getAliPayModel())
.append("aliReceivingAccount", getAliReceivingAccount())
.append("aliKey", getAliKey())

View File

@ -58,4 +58,6 @@ public interface ICompanyService
* @return 结果
*/
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)
{
company.setCreateTime(DateUtils.getNowDate());
company.setUpdateTime(DateUtils.getNowDate());
return companyMapper.insertCompany(company);
}
@ -94,4 +95,11 @@ public class CompanyServiceImpl implements ICompanyService
{
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="channelId" column="channel_id" />
<result property="citys" column="citys" />
<result property="cityName" column="city_name" />
<result property="aliPayModel" column="ali_pay_model" />
<result property="aliReceivingAccount" column="ali_receiving_account" />
<result property="aliKey" column="ali_key" />
@ -54,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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>
<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="status != null and status != ''"> and status = #{status}</if>
</where>
order by update_time desc
</select>
<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="channelId != null">channel_id,</if>
<if test="citys != null">citys,</if>
<if test="cityName != null">city_name,</if>
<if test="aliPayModel != null">ali_pay_model,</if>
<if test="aliReceivingAccount != null and aliReceivingAccount != ''">ali_receiving_account,</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="channelId != null">#{channelId},</if>
<if test="citys != null">#{citys},</if>
<if test="cityName != null">#{cityName},</if>
<if test="aliPayModel != null">#{aliPayModel},</if>
<if test="aliReceivingAccount != null and aliReceivingAccount != ''">#{aliReceivingAccount},</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="channelId != null">channel_id = #{channelId},</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="aliReceivingAccount != null and aliReceivingAccount != ''">ali_receiving_account = #{aliReceivingAccount},</if>
<if test="aliKey != null and aliKey != ''">ali_key = #{aliKey},</if>
@ -264,4 +269,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
</mapper>
</mapper>

View File

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

View File

@ -2,232 +2,107 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<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>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-company-add">
<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">
<input name="companyName" class="form-control" type="text" required>
<input name="companyName" class="form-control" type="text" maxlength="20" required>
</div>
</div>
<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">
<input name="contactName" class="form-control" type="text">
<input name="contactName" class="form-control" type="text" maxlength="20" required>
</div>
</div>
<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">
<input name="phone" class="form-control" type="text">
<input name="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" 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">
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否可新增套餐:</label>
<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 class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label is-required">租车平台分成比例:</label>
<div class="col-sm-8">
<input name="sharingRatio" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">微信支付模式</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">运营商管理城市</label>
<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 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">
<label class="col-sm-3 control-label is-required">微信收款商户号:</label>
<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 class="form-group">
<label class="col-sm-3 control-label is-required">微信收款密钥:</label>
<div class="col-sm-8">
<input name="wechatKey" 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="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>
<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="aliReceivingAccount" class="form-control" type="text" required>
<input name="aliReceivingAccount" 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="aliKey" 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="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">
<input name="aliKey" class="form-control" type="text" maxlength="500" required>
</div>
</div>
</form>
</div>
<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">
var prefix = ctx + "operation/company"
var areaPrefix = ctx + "system/areaHn";
$("#form-company-add").validate({
rules:{
phone:{
isPhone:true,
},
},
focusCleanup: true
});
@ -236,6 +111,25 @@
$.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>
</body>
</html>
</html>

View File

@ -11,7 +11,7 @@
<div class="select-list">
<ul>
<li>
<label>公司名称:</label>
<label>运营商名称:</label>
<input type="text" name="companyName"/>
</li>
<li>
@ -23,112 +23,11 @@
<input type="text" name="phone"/>
</li>
<li>
<label>公司地址:</label>
<input type="text" name="address"/>
</li>
<li>
<label>账户余额:</label>
<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"/>
<label>状态: </label>
<select name="status" th:with="type=${@dict.getType('key_company_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<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">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:company:export">
<i class="fa fa-download"></i> 导出
</a>
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:company:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
@ -162,6 +61,8 @@
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('operation:company:edit')}]];
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";
$(function() {
@ -182,7 +83,7 @@
},
{
field: 'companyName',
title: '公司名称'
title: '运营商名称'
},
{
field: 'contactName',
@ -193,146 +94,69 @@
title: '联系电话'
},
{
field: 'address',
title: '公司地址'
},
{
field: 'balance',
title: '账户余额'
},
{
field: 'deposit',
title: '押金/保证金金额'
},
{
field: 'type',
title: '公司类型'
},
{
field: 'isDelete',
title: '是否已删除'
},
{
field: 'allowSplitBill',
title: '是否允许拆分账单'
},
{
field: 'maxPercentage',
title: '最大百分比'
field: 'cityName',
title: '所在城市'
},
{
field: 'isAddRules',
title: '是否可新增套餐'
title: '是否可新增套餐',
formatter: function(value, row, index) {
return $.table.selectDictLabel(keyIsAddRules, value);
}
},
{
field: 'sharingRatio',
title: '租车平台分成比例'
},
{
field: 'wechatPayModel',
title: '微信支付模式'
field: 'createBy',
title: '创建人'
},
{
field: 'wechatReceivingAccount',
title: '微信收款商户号'
},
{
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: 'updateTime',
title: '操作时间',
sortable: true
},
{
field: 'status',
title: '部门状态'
title: '状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(keyCompanyStatus, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
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-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-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 + ' 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('');
}
}]
};
$.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>
</body>
</html>
</html>

View File

@ -2,69 +2,39 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<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>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-company-edit" th:object="${company}">
<input name="id" th:field="*{id}" type="hidden">
<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">
<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 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">
<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 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">
<input name="phone" th:field="*{phone}" 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="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>
<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 is-required">是否可新增套餐:</label>
<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 class="form-group">
@ -73,126 +43,63 @@
<input name="sharingRatio" th:field="*{sharingRatio}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">微信支付模式</label>
<div class="form-group">
<label class="col-sm-3 control-label is-required">运营商管理城市</label>
<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 class="form-group">
<label class="col-sm-3 control-label is-required">微信收款商户号:</label>
<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 class="form-group">
<label class="col-sm-3 control-label is-required">微信收款密钥:</label>
<div class="col-sm-8">
<input name="wechatKey" th:field="*{wechatKey}" 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="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>
<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="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 class="form-group">
<label class="col-sm-3 control-label is-required">支付宝收款密钥:</label>
<div class="col-sm-8">
<input name="aliKey" th:field="*{aliKey}" 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="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">
<input name="aliKey" th:field="*{aliKey}" class="form-control" type="text" maxlength="500" required>
</div>
</div>
</form>
</div>
<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">
var prefix = ctx + "operation/company";
var areaPrefix = ctx + "system/areaHn";
$("#form-company-edit").validate({
rules:{
phone:{
isPhone:true,
},
},
focusCleanup: true
});
@ -201,6 +108,46 @@
$.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>
</body>
</html>
</html>

View File

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