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,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 });
})