新增用户部门必填校验

dep_wangsr
RuoYi 7 years ago committed by Limy
parent 322c411b31
commit 14e8a8e922

@ -2,7 +2,7 @@ $("#form-user-add").validate({
rules:{ rules:{
loginName:{ loginName:{
required:true, required:true,
minlength: 5, minlength: 2,
remote: { remote: {
url: ctx + "system/user/checkUserNameUnique", url: ctx + "system/user/checkUserNameUnique",
type: "post", type: "post",
@ -21,6 +21,9 @@ $("#form-user-add").validate({
userName:{ userName:{
required:true, required:true,
}, },
deptName:{
required:true,
},
password:{ password:{
required:true, required:true,
minlength: 6 minlength: 6

@ -3,6 +3,9 @@ $("#form-user-edit").validate({
userName:{ userName:{
required:true, required:true,
}, },
deptName:{
required:true,
},
password:{ password:{
required:true, required:true,
minlength: 6 minlength: 6

@ -18,7 +18,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">部门名称:</label> <label class="col-sm-3 control-label">部门名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="text" onclick="selectDeptTree()" readonly="true" id="treeName"> <input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" readonly="true" id="treeName">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

@ -19,7 +19,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">部门名称:</label> <label class="col-sm-3 control-label">部门名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="text" onclick="selectDeptTree()" readonly="true" id="treeName" th:value="${user.dept.deptName}"> <input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" readonly="true" id="treeName" th:value="${user.dept.deptName}">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

Loading…
Cancel
Save