门店管理;运营商和门店增加数据权限控制
This commit is contained in:
@ -144,14 +144,14 @@
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/* 用户管理-停用 */
|
||||
/* 停用 */
|
||||
function disable(id,phone) {
|
||||
$.modal.confirm("确认是否停用此运营商?<span style='color: red'>停用后此运营商的车辆与门店不会显示在小程序中</span>", function() {
|
||||
$.operate.post(prefix + "/changeStatus", { "id": id, "phone": phone , "status": 1 });
|
||||
})
|
||||
}
|
||||
|
||||
/* 用户管理启用 */
|
||||
/* 启用 */
|
||||
function enable(id,phone) {
|
||||
$.modal.confirm("确认是否启用此运营商?<span style='color: red'>启用运营商后停用前的数据将恢复正常,运营商可登录管理后台。</span>", function() {
|
||||
$.operate.post(prefix + "/changeStatus", { "id": id, "phone": phone , "status": 0 });
|
||||
|
||||
@ -0,0 +1,314 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增门店')" />
|
||||
<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-store-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">门店编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="storeNumber" 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="name" 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="contactPerson" 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="phone" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label ">联系人2:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="contactPerson2" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label ">联系电话2:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phone2" 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">
|
||||
<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}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">门店区域:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="areatreeId" name="cityId" 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 is-required">详细地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="detailedAddress" 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="latitude" 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="longitude" 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">
|
||||
<select name="label" class="form-control m-b" th:with="type=${@dict.getType('key_store_level')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">租车订单分成比例:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="zucheRatio" 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="zudianRatio" 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="daishouRatio" 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="contractDate" 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="startTime" 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="endTime" 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">
|
||||
<select name="operatingNature" class="form-control m-b" th:with="type=${@dict.getType('key_store_operating_nature')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">简介:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="introduction" class="form-control" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">对公账号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="bankAccount" 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 type="hidden" name="image">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="image" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">营业执照:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" name="businessLicenseImg">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="businessLicenseImg" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">门店修改信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('key_store_is_update')}">
|
||||
<input type="radio" th:id="${'extend1_' + dict.dictCode}" name="extend1" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'extend1_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">审核状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('key_store_audit_status')}">
|
||||
<input type="radio" th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||
<label th:for="${'auditStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审核时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="auditTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "operation/store"
|
||||
var areaPrefix = ctx + "system/areaHn";
|
||||
$("#form-store-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
$(document).ready(function () {
|
||||
// 单图上传
|
||||
$("#image").fileinput({
|
||||
uploadUrl: ctx + 'common/newUpload',
|
||||
uploadExtraData: {
|
||||
dataType: '30'
|
||||
},
|
||||
maxFileCount: 1,
|
||||
autoReplace: true,
|
||||
showClose: false,
|
||||
layoutTemplates :{
|
||||
actionDelete:'', //去除上传预览的缩略图中的删除图标
|
||||
actionUpload:'',//去除上传预览缩略图中的上传图片图标;
|
||||
actionZoom:'' //去除上传预览缩略图中的查看详情预览的缩略图标。
|
||||
},
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||
preId = previewId;
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
}).on("filebatchselected", function(event, files) {
|
||||
if(preId !== ''){
|
||||
document.getElementById(preId).remove()
|
||||
}
|
||||
$("#image").fileinput("upload");
|
||||
}).on('fileerror', function (event,data,msg){
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
// 清除当前的预览图 ,并隐藏 【移除】 按钮
|
||||
$(event.target).fileinput('clear').fileinput('unlock')
|
||||
$(event.target).parent().siblings('.fileinput-remove').hide()
|
||||
// 打开失败的信息弹窗
|
||||
$.modal.alertError('上传失败,请稍后重试')
|
||||
}
|
||||
).on("filecleared",function(event, data, msg){
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
});
|
||||
|
||||
$("#businessLicenseImg").fileinput({
|
||||
uploadUrl: ctx + 'common/newUpload',
|
||||
uploadExtraData: {
|
||||
dataType: '30'
|
||||
},
|
||||
maxFileCount: 1,
|
||||
autoReplace: true,
|
||||
showClose: false,
|
||||
layoutTemplates :{
|
||||
actionDelete:'', //去除上传预览的缩略图中的删除图标
|
||||
actionUpload:'',//去除上传预览缩略图中的上传图片图标;
|
||||
actionZoom:'' //去除上传预览缩略图中的查看详情预览的缩略图标。
|
||||
},
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||
preId = previewId;
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
}).on("filebatchselected", function(event, files) {
|
||||
if(preId !== ''){
|
||||
document.getElementById(preId).remove()
|
||||
}
|
||||
$("#businessLicenseImg").fileinput("upload");
|
||||
}).on('fileerror', function (event,data,msg){
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
// 清除当前的预览图 ,并隐藏 【移除】 按钮
|
||||
$(event.target).fileinput('clear').fileinput('unlock')
|
||||
$(event.target).parent().siblings('.fileinput-remove').hide()
|
||||
// 打开失败的信息弹窗
|
||||
$.modal.alertError('上传失败,请稍后重试')
|
||||
}
|
||||
).on("filecleared",function(event, data, msg){
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
});
|
||||
});
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-store-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='auditTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
/*行政区域-新增-选择父行政区域树*/
|
||||
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>
|
||||
@ -0,0 +1,337 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改门店')" />
|
||||
<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-store-edit" th:object="${companyStore}">
|
||||
<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="storeNumber" th:field="*{storeNumber}" 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="name" th:field="*{name}" 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="contactPerson" th:field="*{contactPerson}" 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="phone" th:field="*{phone}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label ">联系人2:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="contactPerson2" th:field="*{contactPerson2}" class="form-control" type="text" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label ">联系电话2:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phone2" th:field="*{phone2}" 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">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">门店区域:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="areatreeId" name="cityId" type="hidden" th:value="${sysAreaHn?.areaCode}" th:field="*{cityId}"/>
|
||||
<input class="form-control" type="text" onclick="selectAreaHnTree()" id="areatreeName" name="cityName" th:field="*{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 is-required">详细地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="detailedAddress" th:field="*{detailedAddress}" 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="latitude" th:field="*{latitude}" 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="longitude" th:field="*{longitude}" 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">
|
||||
<select name="label" class="form-control m-b" th:with="type=${@dict.getType('key_store_level')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{label}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">租车订单分成比例:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="zucheRatio" th:field="*{zucheRatio}" 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="zudianRatio" th:field="*{zudianRatio}" 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="daishouRatio" th:field="*{daishouRatio}" 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="contractDate" th:field="*{contractDate}" 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="startTime" th:field="*{startTime}" 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="endTime" th:field="*{endTime}" 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">
|
||||
<select name="operatingNature" class="form-control m-b" th:with="type=${@dict.getType('key_store_operating_nature')}" required>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{operatingNature}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">简介:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="introduction" th:field="*{introduction}" class="form-control" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">对公账号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="bankAccount" th:field="*{bankAccount}" 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 type="hidden" name="image" th:value="*{image}">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="image" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">营业执照:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" name="businessLicenseImg" th:value="*{businessLicenseImg}">
|
||||
<div class="file-loading">
|
||||
<input class="form-control file-upload" id="businessLicenseImg" name="file" type="file">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">门店修改信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('key_store_is_update')}">
|
||||
<input type="radio" th:id="${'extend1_' + dict.dictCode}" name="extend1" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{extend1}" required>
|
||||
<label th:for="${'extend1_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">审核状态:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-box" th:each="dict : ${@dict.getType('key_store_audit_status')}">
|
||||
<input type="radio" th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:checked="${dict.default}" th:field="*{auditStatus}" required>
|
||||
<label th:for="${'auditStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">审核时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input id="auditTime" name="auditTime" th:value="${#dates.format(companyStore.auditTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "operation/store"
|
||||
var areaPrefix = ctx + "system/areaHn";
|
||||
$("#form-store-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
$(document).ready(function () {
|
||||
|
||||
});
|
||||
layui.use('laydate', function() {
|
||||
var laydate = layui.laydate;
|
||||
laydate.render({
|
||||
elem: '#auditTime',
|
||||
type: 'date'
|
||||
});
|
||||
});
|
||||
|
||||
let preId = '';
|
||||
let initUrl = new Array();
|
||||
initUrl.push([[${companyStore.image}]]);
|
||||
|
||||
$("#image").fileinput({
|
||||
uploadUrl: ctx + 'common/newUpload',
|
||||
uploadExtraData: {
|
||||
dataType: '30'
|
||||
},
|
||||
maxFileCount: 1,
|
||||
autoReplace: true,
|
||||
showClose: false,
|
||||
initialPreview: initUrl,
|
||||
initialPreviewFileType: 'image',
|
||||
initialPreviewAsData: true,
|
||||
layoutTemplates :{
|
||||
actionDelete:'', //去除上传预览的缩略图中的删除图标
|
||||
actionUpload:'',//去除上传预览缩略图中的上传图片图标;
|
||||
// actionZoom:'' //去除上传预览缩略图中的查看详情预览的缩略图标。
|
||||
},
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||
preId = previewId;
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
}).on("filebatchselected", function(event, files) {
|
||||
if(preId !== ''){
|
||||
document.getElementById(preId).remove()
|
||||
}
|
||||
$("#image").fileinput("upload");
|
||||
}).on('fileerror', function (event,data,msg){
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
// 清除当前的预览图 ,并隐藏 【移除】 按钮
|
||||
$(event.target).fileinput('clear').fileinput('unlock')
|
||||
$(event.target).parent().siblings('.fileinput-remove').hide()
|
||||
// 打开失败的信息弹窗
|
||||
$.modal.alertError('上传失败,请稍后重试')
|
||||
}
|
||||
).on("filecleared",function(event, data, msg){
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
});
|
||||
|
||||
let preId2 = '';
|
||||
let initUrl2 = new Array();
|
||||
initUrl2.push([[${companyStore.businessLicenseImg}]]);
|
||||
$("#businessLicenseImg").fileinput({
|
||||
uploadUrl: ctx + 'common/newUpload',
|
||||
uploadExtraData: {
|
||||
dataType: '30'
|
||||
},
|
||||
maxFileCount: 1,
|
||||
autoReplace: true,
|
||||
showClose: false,
|
||||
initialPreview: initUrl2,
|
||||
initialPreviewFileType: 'image',
|
||||
initialPreviewAsData: true,
|
||||
layoutTemplates :{
|
||||
actionDelete:'', //去除上传预览的缩略图中的删除图标
|
||||
actionUpload:'',//去除上传预览缩略图中的上传图片图标;
|
||||
//actionZoom:'' //去除上传预览缩略图中的查看详情预览的缩略图标。
|
||||
},
|
||||
}).on('fileuploaded', function (event, data, previewId, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val(data.response.url)
|
||||
preId2 = previewId;
|
||||
}).on('fileremoved', function (event, id, index) {
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
}).on("filebatchselected", function(event, files) {
|
||||
if(preId2 !== ''){
|
||||
document.getElementById(preId2).remove()
|
||||
}
|
||||
$("#businessLicenseImg").fileinput("upload");
|
||||
}).on('fileerror', function (event,data,msg){
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
// 清除当前的预览图 ,并隐藏 【移除】 按钮
|
||||
$(event.target).fileinput('clear').fileinput('unlock')
|
||||
$(event.target).parent().siblings('.fileinput-remove').hide()
|
||||
// 打开失败的信息弹窗
|
||||
$.modal.alertError('上传失败,请稍后重试')
|
||||
}
|
||||
).on("filecleared",function(event, data, msg){
|
||||
$("input[name='" + event.currentTarget.id + "']").val('')
|
||||
});
|
||||
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-store-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='auditTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
/*行政区域-新增-选择父行政区域树*/
|
||||
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>
|
||||
@ -0,0 +1,226 @@
|
||||
<!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>
|
||||
<select name="operatingCompanyId" id="operatingCompanyId" >
|
||||
<option value="">请选择所属运营商</option>
|
||||
<option th:each="company : ${companyList}" th:value="${company.id}" th:text="${company.companyName}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>门店编码:</label>
|
||||
<input type="text" name="storeNumber"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>门店名称:</label>
|
||||
<input type="text" name="name"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>联系人:</label>
|
||||
<input type="text" name="contactPerson"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>联系电话:</label>
|
||||
<input type="text" name="phone"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>业务范围:</label>
|
||||
<select name="label" th:with="type=${@dict.getType('key_store_level')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>运营性质:</label>
|
||||
<select name="operatingNature" th:with="type=${@dict.getType('key_store_operating_nature')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>审核状态:</label>
|
||||
<select name="auditStatus" th:with="type=${@dict.getType('key_store_audit_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> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="operation:store:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="operation:store:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="operation:store:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="operation:store:export">-->
|
||||
<!-- <i class="fa fa-download"></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:store:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('operation:store:remove')}]];
|
||||
var labelDatas = [[${@dict.getType('key_store_level')}]];
|
||||
var operatingNatureDatas = [[${@dict.getType('key_store_operating_nature')}]];
|
||||
var auditStatusDatas = [[${@dict.getType('key_store_audit_status')}]];
|
||||
var keyCompanyStatus = [[${@dict.getType('key_company_status')}]];
|
||||
var prefix = ctx + "operation/store";
|
||||
|
||||
$(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: '',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'storeNumber',
|
||||
title: '门店编码'
|
||||
},
|
||||
{
|
||||
field: 'name',
|
||||
title: '门店名称'
|
||||
},
|
||||
{
|
||||
field: 'contactPerson',
|
||||
title: '联系人'
|
||||
},
|
||||
{
|
||||
field: 'phone',
|
||||
title: '联系电话'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'provinceName',
|
||||
title: '省'
|
||||
},
|
||||
{
|
||||
field: 'cityName',
|
||||
title: '市'
|
||||
},
|
||||
{
|
||||
field: 'areaName',
|
||||
title: '县'
|
||||
},
|
||||
{
|
||||
field: 'zucheRatio',
|
||||
title: '租车订单分成比例'
|
||||
},
|
||||
{
|
||||
field: 'zudianRatio',
|
||||
title: '租电订单分成比例'
|
||||
},
|
||||
{
|
||||
field: 'daishouRatio',
|
||||
title: '以租代售分成比例'
|
||||
},
|
||||
{
|
||||
field: 'label',
|
||||
title: '业务范围',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(labelDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'operatingCompanyName',
|
||||
title: '所属运营商'
|
||||
},
|
||||
{
|
||||
field: 'operatingNature',
|
||||
title: '运营性质',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(operatingNatureDatas, value);
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'auditStatus',
|
||||
title: '审核状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(auditStatusDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '门店状态',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(keyCompanyStatus, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'auditTime',
|
||||
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.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> ');
|
||||
} 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> ');
|
||||
}
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
/* 停用 */
|
||||
function disable(id,phone) {
|
||||
$.modal.confirm("确认是否停用此门店?<span style='color: red'>停用后门店不可在小程序中查看,门店车辆建议尽快重新分配</span>", function() {
|
||||
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 1 });
|
||||
})
|
||||
}
|
||||
|
||||
/* 启用 */
|
||||
function enable(id,phone) {
|
||||
$.modal.confirm("确认是否启用此门店?<span style='color: red'>启用门店后停用前的数据将恢复正常。</span>", function() {
|
||||
$.operate.post(prefix + "/changeStatus", { "id": id, "status": 0 });
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user