岗位名称编码唯一校验
This commit is contained in:
@ -38,8 +38,8 @@
|
||||
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=2.2.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.2.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=2.3.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.3.0}"></script>
|
||||
<script src="http://tajs.qq.com/stats?sId=62048022"></script>
|
||||
<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<link th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.min.css?v=2.2.0}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.min.css?v=2.3.0}" rel="stylesheet"/>
|
||||
<style type="text/css">
|
||||
.nav > li:hover .dropdown-menu {display: block;}
|
||||
</style>
|
||||
@ -136,7 +136,7 @@
|
||||
<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="http://tajs.qq.com/stats?sId=62048022"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.2.0}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.3.0}"></script>
|
||||
<script th:src="@{/ruoyi/index.js}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
</body>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<link href="../static/css/style.css" th:href="@{css/style.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/login.min.css" th:href="@{css/login.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.min.css" th:href="@{/ruoyi/css/ry-ui.min.css?v=2.2.0}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.min.css" th:href="@{/ruoyi/css/ry-ui.min.css?v=2.3.0}" rel="stylesheet"/>
|
||||
<!--[if lt IE 9]>
|
||||
<meta http-equiv="refresh" content="0;ie.html" />
|
||||
<![endif]-->
|
||||
@ -82,7 +82,7 @@
|
||||
<script src="../static/ajax/libs/iCheck/icheck.min.js" th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
|
||||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="http://tajs.qq.com/stats?sId=62048022"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.min.js" th:src="@{/ruoyi/js/ry-ui.min.js?v=2.2.0}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.min.js" th:src="@{/ruoyi/js/ry-ui.min.js?v=2.3.0}"></script>
|
||||
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -94,13 +94,43 @@
|
||||
<div class="ibox-content no-padding">
|
||||
<div class="panel-body">
|
||||
<div class="panel-group" id="version">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v23">v2.3.0</a><code class="pull-right">2018.08.06</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v23" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>支持表格不分页开关控制</li>
|
||||
<li>修改字典类型同步修改字典数据</li>
|
||||
<li>代码生成新增修改后缀处理</li>
|
||||
<li>代码生成新增实体toString</li>
|
||||
<li>代码生成非字符串去除!=''</li>
|
||||
<li>导出数据前加载遮罩层</li>
|
||||
<li>部门删除校验条件修改</li>
|
||||
<li>搜索查询下载优化</li>
|
||||
<li>手机打开弹出层自适应</li>
|
||||
<li>角色岗位禁用显示置灰</li>
|
||||
<li>角色禁用不显示菜单</li>
|
||||
<li>新增导出权限</li>
|
||||
<li>角色权限唯一校验</li>
|
||||
<li>岗位名称编码唯一校验</li>
|
||||
<li>TreeTable优化</li>
|
||||
<li>支持多数据源</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v22">v2.2.0</a><code class="pull-right">2018.07.23</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v22" class="panel-collapse collapse in">
|
||||
<div id="v22" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>修复批量生成代码异常问题</li>
|
||||
|
@ -5,18 +5,18 @@
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-post-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label ">岗位编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postCode" id="postCode"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">岗位名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postName" id="postName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label ">岗位编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postCode" id="postCode"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">显示顺序:</label>
|
||||
<div class="col-sm-8">
|
||||
@ -52,17 +52,53 @@
|
||||
|
||||
$("#form-post-add").validate({
|
||||
rules:{
|
||||
postCode:{
|
||||
required:true,
|
||||
},
|
||||
postName:{
|
||||
required:true,
|
||||
remote: {
|
||||
url: ctx + "system/post/checkPostNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"postName" : function() {
|
||||
return $.trim($("#postName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
postCode:{
|
||||
required:true,
|
||||
remote: {
|
||||
url: ctx + "system/post/checkPostCodeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"postCode" : function() {
|
||||
return $.trim($("#postCode").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
postSort:{
|
||||
required:true,
|
||||
digits:true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"postCode": {
|
||||
remote: "岗位编码已经存在"
|
||||
},
|
||||
"postName": {
|
||||
remote: "岗位名称已经存在"
|
||||
}
|
||||
},
|
||||
submitHandler:function(form){
|
||||
$.operate.save(prefix + "/add", $('#form-post-add').serialize());
|
||||
}
|
||||
|
@ -6,18 +6,18 @@
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-post-edit" th:object="${post}">
|
||||
<input id="postId" name="postId" type="hidden" th:field="*{postId}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label ">岗位编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postCode" id="postCode" th:field="*{postCode}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">岗位名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postName" id="postName" th:field="*{postName}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label ">岗位编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="postCode" id="postCode" th:field="*{postCode}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">显示顺序:</label>
|
||||
<div class="col-sm-8">
|
||||
@ -53,17 +53,59 @@
|
||||
|
||||
$("#form-post-edit").validate({
|
||||
rules:{
|
||||
postCode:{
|
||||
required:true,
|
||||
},
|
||||
postName:{
|
||||
required:true,
|
||||
remote: {
|
||||
url: ctx + "system/post/checkPostNameUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"postId": function() {
|
||||
return $("input[name='postId']").val();
|
||||
},
|
||||
"postName" : function() {
|
||||
return $.trim($("#postName").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
postCode:{
|
||||
required:true,
|
||||
remote: {
|
||||
url: ctx + "system/post/checkPostCodeUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"postId": function() {
|
||||
return $("input[name='postId']").val();
|
||||
},
|
||||
"postCode" : function() {
|
||||
return $.trim($("#postCode").val());
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
postSort:{
|
||||
required:true,
|
||||
digits:true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"postCode": {
|
||||
remote: "岗位编码已经存在"
|
||||
},
|
||||
"postName": {
|
||||
remote: "岗位名称已经存在"
|
||||
}
|
||||
},
|
||||
submitHandler:function(form){
|
||||
$.operate.save(prefix + "/edit", $('#form-post-edit').serialize());
|
||||
}
|
||||
|
Reference in New Issue
Block a user