套餐应用到车型

This commit is contained in:
19173159168
2025-08-09 00:13:29 +08:00
parent 9018d8eef1
commit 55ff442dc9
18 changed files with 208 additions and 97 deletions

View File

@ -96,5 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteZcCarModelPackageByModeId">
delete from zc_car_model_package where car_model_id = #{modeId}
</delete>
<delete id="deleteZcCarModelPackageByRuleId">
delete from zc_car_model_package where car_rule_id = #{ruleId}
</delete>
</mapper>

View File

@ -124,7 +124,7 @@
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.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 + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}

View File

@ -163,7 +163,7 @@
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.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-success btn-xs ' + distributeFlag + ' btnOption" href="javascript:void(0)" onclick="distribute(\'' + 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) {

View File

@ -129,7 +129,7 @@
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-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> ');

View File

@ -106,30 +106,7 @@
</select>
</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 is-required"></label>
<div class="col-sm-8">
<input name="cityId" 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="operatorId" 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="provinceId" 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">
@ -144,20 +121,10 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">套餐排序规则</label>
<div class="col-sm-8">
<input name="mealSort" 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="isJoinInvite" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">套餐渠道租车默认 id号待定</label>
<label class="col-sm-3 control-label is-required">套餐渠道</label>
<div class="col-sm-8">
<input name="mealChannel" class="form-control" type="text" required>
</div>

View File

@ -25,9 +25,9 @@
</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-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>-->

View File

@ -7,79 +7,70 @@
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-rentCarRule-edit" th:object="${zcRentCarRule}">
<input name="id" th:field="*{id}" type="hidden">
<input type="hidden" id="carModelIds" name="carModelIds">
<div class="form-group">
<label class="col-sm-3 control-label is-required">套餐名称:</label>
<div class="col-sm-8">
<label class="col-sm-2 control-label is-required">套餐名称:</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{ruleName}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">租赁类型:</label>
<div class="col-sm-8">
<label class="col-sm-2 control-label is-required">租赁类型:</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="${@dict.getLabel('key_rent_type', zcRentCarRule.rentalType)}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">赁天数</label>
<div class="col-sm-8">
<label class="col-sm-2 control-label is-required">车价格(元)</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{rentalPrice}"></div>
</div>
<label class="col-sm-2 control-label">租赁天数:</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{rentalDays}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">租车价格(元)</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="*{rentalPrice}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">押金价格(元)</label>
<div class="col-sm-8">
<label class="col-sm-2 control-label is-required">押金价格(元)</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{depositPrice}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">逾期金额(元)</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="*{overdueFee}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">逾期计费类型:</label>
<div class="col-sm-8">
<label class="col-sm-2 control-label">逾期计费类型:</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="${@dict.getLabel('key_rent_overdue_type', zcRentCarRule.overdueType)}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否支持免押</label>
<div class="col-sm-8">
<div class="form-group">
<label class="col-sm-2 control-label is-required">逾期金额(元)</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="*{overdueFee}"></div>
</div>
<label class="col-sm-2 control-label">是否支持免押:</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="${@dict.getLabel('key_rent_deposit_free', zcRentCarRule.depositFree)}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否支持代扣</label>
<div class="col-sm-8">
<label class="col-sm-2 control-label is-required">所属运营商</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="${company.companyName}"></div>
</div>
<label class="col-sm-2 control-label">是否支持代扣:</label>
<div class="col-sm-4">
<div class="form-control-static" th:text="${@dict.getLabel('key_rent_auto_deduct', zcRentCarRule.autoDeduct)}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">所属运营商</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="${company.companyName}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">租电套餐:</label>
<label class="col-sm-2 control-label is-required">租电套餐</label>
<div class="col-sm-8">
<div class="form-control-static" th:text="${modelRuleNames}"></div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">选择车型:</label>
<div class="col-sm-8">
<select name="operatingCompanyId" id="operatingCompanyId" class="form-control m-b">
<option value="">请选择车型</option>
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}" th:field="*{operatingCompanyId}" ></option>
</select>
<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>
@ -87,6 +78,9 @@
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "operation/rentCarRule";
var modelList = [[${modelList}]]
var statusDatas = [[${@dict.getType('key_company_status')}]];
var batteryTypeDatas = [[${@dict.getType('key_car_battery_type')}]];
$(document).ready(function() {
@ -110,8 +104,75 @@
});
$(function() {
var options = {
data: modelList,
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: 'brandName',
title: '品牌名称',
width: '200'
},
{
field: 'modelName',
title: '车型名称',
width: '200'
},
{
field: 'batteryType',
title: '支持电池类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(batteryTypeDatas, value);
}
},
{
field: 'weight',
title: '整车重量(kg)',
width: '100'
},
{
field: 'maxSpeed',
title: '最高时速(km/h)',
width: '100'
},
{
field: 'status',
title: '状态',
width: '100',
formatter: function(value, row, index) {
return $.table.selectDictLabel(statusDatas, value);
}
}
]
};
$.table.init(options);
});
function submitHandler() {
var rows = $.table.selectFirstColumns();
$("#carModelIds").val(rows.join())
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-rentCarRule-edit').serialize());
}

View File

@ -189,7 +189,7 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-primary btn-xs btnOption" href="javascript:void(0)" onClick="$.operate.edit(\''+row.id+'\', 900, 700)"><i class="fa fa-sticky-note-o"></i> 应用至车型</a>');
actions.push('<a class="btn btn-primary btn-xs btnOption" href="javascript:void(0)" onClick="$.operate.editCustomize(\''+row.id+'\', 1300, 800)"><i class="fa fa-sticky-note-o"></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> ');

View File

@ -138,6 +138,7 @@
<script th:inline="javascript">
var prefix = ctx + "orders/order";
var suborderTypeDatas = [[${@dict.getType('key_order_suborder_type')}]];
var paymentMethodDatas = [[${@dict.getType('key_order_payment_method')}]];
$("#form-order-edit").validate({
focusCleanup: true
});
@ -202,7 +203,10 @@
{
field: 'paymentMethod',
align: 'center',
title: '支付方式'
title: '支付方式',
formatter: function(value, row, index) {
return $.table.selectDictLabel(paymentMethodDatas, value);
}
},
{