This commit is contained in:
19173159168
2025-07-11 00:03:54 +08:00
parent 5bbf431c3f
commit 092d866283
21 changed files with 1648 additions and 169 deletions

View File

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.operation.mapper.ZcCarModelMapper">
<resultMap type="ZcCarModel" id="ZcCarModelResult">
<result property="id" column="id" />
<result property="modelName" column="model_name" />
<result property="brandId" column="brand_id" />
<result property="brandName" column="brand_name" />
<result property="batteryType" column="battery_type" />
<result property="maxSpeed" column="max_speed" />
<result property="weight" column="weight" />
<result property="status" column="status" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="extend1" column="extend1" />
<result property="extend2" column="extend2" />
<result property="extend3" column="extend3" />
</resultMap>
<sql id="selectZcCarModelVo">
select id, model_name, brand_id, brand_name, battery_type, max_speed, weight, status, del_flag, create_by, create_time, update_by, update_time, remark, extend1, extend2, extend3 from zc_car_model
</sql>
<select id="selectZcCarModelList" parameterType="ZcCarModel" resultMap="ZcCarModelResult">
<include refid="selectZcCarModelVo"/>
<where>
<if test="modelName != null and modelName != ''"> and model_name like concat('%', #{modelName}, '%')</if>
<if test="brandName != null and brandName != ''"> and brand_name like concat('%', #{brandName}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectZcCarModelById" parameterType="Long" resultMap="ZcCarModelResult">
<include refid="selectZcCarModelVo"/>
where id = #{id}
</select>
<insert id="insertZcCarModel" parameterType="ZcCarModel" useGeneratedKeys="true" keyProperty="id">
insert into zc_car_model
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="modelName != null and modelName != ''">model_name,</if>
<if test="brandId != null">brand_id,</if>
<if test="brandName != null and brandName != ''">brand_name,</if>
<if test="batteryType != null">battery_type,</if>
<if test="maxSpeed != null">max_speed,</if>
<if test="weight != null">weight,</if>
<if test="status != null">status,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="extend1 != null">extend1,</if>
<if test="extend2 != null">extend2,</if>
<if test="extend3 != null">extend3,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="modelName != null and modelName != ''">#{modelName},</if>
<if test="brandId != null">#{brandId},</if>
<if test="brandName != null and brandName != ''">#{brandName},</if>
<if test="batteryType != null">#{batteryType},</if>
<if test="maxSpeed != null">#{maxSpeed},</if>
<if test="weight != null">#{weight},</if>
<if test="status != null">#{status},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="extend1 != null">#{extend1},</if>
<if test="extend2 != null">#{extend2},</if>
<if test="extend3 != null">#{extend3},</if>
</trim>
</insert>
<update id="updateZcCarModel" parameterType="ZcCarModel">
update zc_car_model
<trim prefix="SET" suffixOverrides=",">
<if test="modelName != null and modelName != ''">model_name = #{modelName},</if>
<if test="brandId != null">brand_id = #{brandId},</if>
<if test="brandName != null and brandName != ''">brand_name = #{brandName},</if>
<if test="batteryType != null">battery_type = #{batteryType},</if>
<if test="maxSpeed != null">max_speed = #{maxSpeed},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="status != null">status = #{status},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="extend1 != null">extend1 = #{extend1},</if>
<if test="extend2 != null">extend2 = #{extend2},</if>
<if test="extend3 != null">extend3 = #{extend3},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZcCarModelById" parameterType="Long">
delete from zc_car_model where id = #{id}
</delete>
<delete id="deleteZcCarModelByIds" parameterType="String">
delete from zc_car_model where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.operation.mapper.ZcCarModelPackageMapper">
<resultMap type="ZcCarModelPackage" id="ZcCarModelPackageResult">
<result property="id" column="id" />
<result property="carModelId" column="car_model_id" />
<result property="carRuleId" column="car_rule_id" />
<result property="sortOrder" column="sort_order" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectZcCarModelPackageVo">
select id, car_model_id, car_rule_id, sort_order, del_flag, create_by, create_time, update_by, update_time, remark from zc_car_model_package
</sql>
<select id="selectZcCarModelPackageList" parameterType="ZcCarModelPackage" resultMap="ZcCarModelPackageResult">
<include refid="selectZcCarModelPackageVo"/>
<where>
</where>
</select>
<select id="selectZcCarModelPackageById" parameterType="Long" resultMap="ZcCarModelPackageResult">
<include refid="selectZcCarModelPackageVo"/>
where id = #{id}
</select>
<insert id="insertZcCarModelPackage" parameterType="ZcCarModelPackage" useGeneratedKeys="true" keyProperty="id">
insert into zc_car_model_package
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="carModelId != null">car_model_id,</if>
<if test="carRuleId != null">car_rule_id,</if>
<if test="sortOrder != null">sort_order,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="carModelId != null">#{carModelId},</if>
<if test="carRuleId != null">#{carRuleId},</if>
<if test="sortOrder != null">#{sortOrder},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<insert id="batchInsert">
INSERT INTO zc_car_model_package (car_model_id, car_rule_id,create_time)
VALUES
<foreach collection="list" item="item" separator=",">
(#{item.carModelId}, #{item.carRuleId}, #{item.createTime})
</foreach>
</insert>
<update id="updateZcCarModelPackage" parameterType="ZcCarModelPackage">
update zc_car_model_package
<trim prefix="SET" suffixOverrides=",">
<if test="carModelId != null">car_model_id = #{carModelId},</if>
<if test="carRuleId != null">car_rule_id = #{carRuleId},</if>
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteZcCarModelPackageById" parameterType="Long">
delete from zc_car_model_package where id = #{id}
</delete>
<delete id="deleteZcCarModelPackageByIds" parameterType="String">
delete from zc_car_model_package where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -1166,6 +1166,21 @@ var table = {
return url;
},
// 修改信息
editCustomize: function(id,width,height) {
table.set();
if($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {
var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
if ($.common.isEmpty(row)) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
var url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]);
$.modal.open("修改" + table.options.modalName, url,width,height);
} else {
$.modal.open("修改" + table.options.modalName, $.operate.editUrl(id),width,height);
}
},
// 修改信息
edit: function(id) {
table.set();
if($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {

View File

@ -0,0 +1,147 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增车型管理')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-carModel-add">
<input type="hidden" id="rentCarRuleIds" name="rentCarRuleIds">
<div class="form-group">
<label class="col-sm-2 control-label is-required">品牌名称:</label>
<div class="col-sm-6">
<input name="brandName" class="form-control" type="text" maxlength="20" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label is-required">车型名称:</label>
<div class="col-sm-6">
<input name="modelName" class="form-control" type="text" maxlength="20" required>
</div>
</div>
<h4 class="form-header h4">关联套餐</h4>
<div class="row">
<div class="col-sm-12">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "operation/carModel"
var rentCarRuleList = [[${rentCarRuleList}]]
var rentalTypeDatas = [[${@dict.getType('key_rent_type')}]];
var overdueTypeDatas = [[${@dict.getType('key_rent_overdue_type')}]];
var depositFreeDatas = [[${@dict.getType('key_rent_deposit_free')}]];
var autoDeductDatas = [[${@dict.getType('key_rent_auto_deduct')}]];
$("#form-carModel-add").validate({
focusCleanup: true
});
$(function() {
var options = {
data: rentCarRuleList,
sidePagination: "client",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
clickToSelect: true,
maintainSelected: true,
columns: [{
checkbox: true,
formatter:function (value, row, index) {
if($.common.isEmpty(value)) {
return { checked: row.flag };
} else {
return { checked: value }
}
}
},
{
field: 'id',
title: '规则ID',
visible: false
},
{
field: 'ruleName',
title: '套餐名称'
},
{
field: 'ruleCode',
title: '套餐编码',
formatter: function(value, row, index) {
return '<a href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\', 900, 700)">' + value + '</a>';
}
},
{
field: 'rentalType',
title: '租赁类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(rentalTypeDatas, value);
}
},
{
field: 'rentalDays',
title: '租赁天数'
},
{
field: 'rentalPrice',
title: '租车价格(元)'
},
{
field: 'depositPrice',
title: '押金价格(元)'
},
{
field: 'overdueFee',
title: '逾期金额(元)'
},
{
field: 'overdueType',
title: '逾期计费类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(overdueTypeDatas, value);
}
},
{
field: 'depositFree',
title: '是否支持免押',
formatter: function(value, row, index) {
return $.table.selectDictLabel(depositFreeDatas, value);
}
},
{
field: 'autoDeduct',
title: '是否支持代扣',
formatter: function(value, row, index) {
return $.table.selectDictLabel(autoDeductDatas, value);
}
},
{
field: 'remark',
title: '关联电池套餐'
},
{
field: 'updateTime',
title: '操作时间',
sortable: true
}]
};
$.table.init(options);
});
function submitHandler() {
var rows = $.table.selectFirstColumns();
$("#rentCarRuleIds").val(rows.join())
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-carModel-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,145 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('车型管理列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>品牌名称:</label>
<input type="text" name="brandName"/>
</li>
<li>
<label>车型名称:</label>
<input type="text" name="modelName"/>
</li>
<li>
<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>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.addCustomize(null,1300,700)" shiro:hasPermission="operation:carModel:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.editCustomize(null,1300,700)" shiro:hasPermission="operation:carModel:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="operation:carModel:remove">
<i class="fa fa-remove"></i> 删除
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('operation:carModel:edit')}]];
var removeFlag = [[${@permission.hasPermi('operation:carModel:remove')}]];
var statusDatas = [[${@dict.getType('key_company_status')}]];
var prefix = ctx + "operation/carModel";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "车型管理",
columns: [{
checkbox: true
},
{
field: 'id',
title: '车型ID',
visible: false
},
{
field: 'brandName',
title: '品牌名称',
width: '200'
},
{
field: 'modelName',
title: '车型名称',
width: '400'
},
{
field: 'status',
title: '状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(statusDatas, value);
}
},
{
field: 'createBy',
title: '创建者'
},
{
field: 'createTime',
title: '创建时间'
},
{
field: 'updateBy',
title: '更新者'
},
{
field: 'updateTime',
title: '更新时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.editCustomize(\'' + row.id + '\',1300,700)"><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("确认启用该车型", function() {
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 0 });
})
}
</script>
</body>
</html>

View File

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改车型管理')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-carModel-edit" th:object="${zcCarModel}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">品牌名称:</label>
<div class="col-sm-8">
<input name="brandName" th:field="*{brandName}" 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="modelName" th:field="*{modelName}" 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">
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "operation/carModel";
$("#form-carModel-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-carModel-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -14,118 +14,7 @@
<label>商品标题:</label>
<input type="text" name="title"/>
</li>
<li>
<label>商品描述:</label>
<input type="text" name="detail"/>
</li>
<li>
<label>图标:</label>
<input type="text" name="icon"/>
</li>
<li>
<label>电压:</label>
<input type="text" name="voltage"/>
</li>
<li>
<label>电容:</label>
<input type="text" name="ah"/>
</li>
<li>
<label>最大里程:</label>
<input type="text" name="maxMileage"/>
</li>
<li>
<label>最小里程 默认0</label>
<input type="text" name="minMileage"/>
</li>
<li>
<label>押金:</label>
<input type="text" name="depositPrice"/>
</li>
<li>
<label>租金:</label>
<input type="text" name="rentPrice"/>
</li>
<li>
<label>计时方式:</label>
<select name="durationType" th:with="type=${@dict.getType('key_battey_duration_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>租赁时长:</label>
<input type="text" name="duration"/>
</li>
<li>
<label>盗抢险:</label>
<input type="text" name="insurancePrice"/>
</li>
<li>
<label>是否强制投保 默认0 false</label>
<input type="text" name="compulsoryInsurance"/>
</li>
<li>
<label>保险有效时长 默认12个月</label>
<input type="text" name="insuranceDuration"/>
</li>
<li>
<label>换电次数:</label>
<input type="text" name="changeNum"/>
</li>
<li>
<label>1、有限次数 2无限次数</label>
<select name="changeType" th:with="type=${@dict.getType('key_battey_change_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label></label>
<input type="text" name="isDelete"/>
</li>
<li>
<label></label>
<input type="text" name="cityId"/>
</li>
<li>
<label></label>
<input type="text" name="operatorId"/>
</li>
<li>
<label></label>
<input type="text" name="provinceId"/>
</li>
<li>
<label>电池类型:</label>
<input type="text" name="categoryId"/>
</li>
<li>
<label>套餐类型 换电/租电:</label>
<select name="mealType" th:with="type=${@dict.getType('key_battey_meal_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>套餐排序规则:</label>
<input type="text" name="mealSort"/>
</li>
<li>
<label></label>
<input type="text" name="isJoinInvite"/>
</li>
<li>
<label>套餐渠道租车默认 id号待定</label>
<input type="text" name="mealChannel"/>
</li>
<li>
<label>购买限制类型:</label>
<select name="buyLimitType" th:with="type=${@dict.getType('key_battey_buy_limit_type')}">
<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>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -136,18 +25,18 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="operation:rentBatteyRule:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="operation:rentBatteyRule:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="operation:rentBatteyRule:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:rentBatteyRule:export">
<i class="fa fa-download"></i> 导出
</a>
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="operation:rentBatteyRule:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="operation:rentBatteyRule:edit">-->
<!-- <i class="fa fa-edit"></i> 修改-->
<!-- </a>-->
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="operation:rentBatteyRule:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:rentBatteyRule:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
@ -206,7 +95,7 @@
},
{
field: 'minMileage',
title: '最小里程 默认0'
title: '最小里程'
},
{
field: 'depositPrice',
@ -233,39 +122,17 @@
},
{
field: 'compulsoryInsurance',
title: '是否强制投保 默认0 false'
title: '是否强制投保'
},
{
field: 'insuranceDuration',
title: '保险有效时长 默认12个月'
title: '保险有效时长'
},
{
field: 'changeNum',
title: '换电次数'
},
{
field: 'changeType',
title: '1、有限次数 2无限次数',
formatter: function(value, row, index) {
return $.table.selectDictLabel(changeTypeDatas, value);
}
},
{
field: 'isDelete',
title: ''
},
{
field: 'cityId',
title: ''
},
{
field: 'operatorId',
title: ''
},
{
field: 'provinceId',
title: ''
},
{
field: 'categoryId',
title: '电池类型'
@ -281,13 +148,10 @@
field: 'mealSort',
title: '套餐排序规则'
},
{
field: 'isJoinInvite',
title: ''
},
{
field: 'mealChannel',
title: '套餐渠道租车默认 id号待定'
title: '套餐渠道租车默认'
},
{
field: 'buyLimitType',
@ -296,16 +160,17 @@
return $.table.selectDictLabel(buyLimitTypeDatas, 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>');
return actions.join('');
}
}]
// {
// 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>');
// return actions.join('');
// }
// }
]
};
$.table.init(options);
});

View File

@ -164,6 +164,10 @@
return $.table.selectDictLabel(autoDeductDatas, value);
}
},
{
field: 'remark',
title: '关联电池套餐'
},
{
field: 'status',
title: '状态',

View File

@ -197,9 +197,9 @@
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 + '\',\'' + row.phone + '\')"><i class="fa fa-edit"></i>启用</a> ');
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 + '\',\'' + row.phone + '\')"><i class="fa fa-edit"></i>停用</a> ');
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('');
}
@ -209,14 +209,14 @@
});
/* 停用 */
function disable(id,phone) {
function disable(id) {
$.modal.confirm("确认是否停用此门店?<span style='color: red'>停用后门店不可在小程序中查看,门店车辆建议尽快重新分配</span>", function() {
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 });
})
}
/* 启用 */
function enable(id,phone) {
function enable(id) {
$.modal.confirm("确认是否启用此门店?<span style='color: red'>启用门店后停用前的数据将恢复正常。</span>", function() {
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 0 });
})