人员登记,添加表单岗位必填校验修改

kingbase
dshclm 10 months ago
parent 12e4cb0f43
commit 92df044d0b

@ -104,8 +104,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">岗位:</label> <label class="col-sm-4 control-label is-required">岗位:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="post" class="form-control select2-multiple" multiple> <select id="post" class="form-control select2-multiple" required multiple>
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:disabled="${post.status == '1'}" required></option> <option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:disabled="${post.status == '1'}"></option>
</select> </select>
</div> </div>
</div> </div>
@ -215,7 +215,7 @@
</div> </div>
</form> </form>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-offset-5 col-sm-10"> <div class="col-sm-offset-5 col-sm-10">
<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp; <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
@ -227,7 +227,7 @@
<th:block th:include="include :: datetimepicker-js" /> <th:block th:include="include :: datetimepicker-js" />
<script> <script>
var prefix = ctx + "system/user"; var prefix = ctx + "system/user";
$("#form-user-add").validate({ $("#form-user-add").validate({
onkeyup: false, onkeyup: false,
rules:{ rules:{
@ -310,7 +310,7 @@
$.operate.saveTab(prefix + "/add", data); $.operate.saveTab(prefix + "/add", data);
} }
} }
/* 用户管理-新增-选择部门树 */ /* 用户管理-新增-选择部门树 */
function selectDeptTree() { function selectDeptTree() {
var treeId = $("#treeId").val(); var treeId = $("#treeId").val();
@ -324,7 +324,7 @@
}; };
$.modal.openOptions(options); $.modal.openOptions(options);
} }
function doSubmit(index, layero){ function doSubmit(index, layero){
var body = $.modal.getChildFrame(index); var body = $.modal.getChildFrame(index);
$("#treeId").val(body.find('#treeId').val()); $("#treeId").val(body.find('#treeId').val());
@ -340,4 +340,4 @@
}) })
</script> </script>
</body> </body>
</html> </html>

Loading…
Cancel
Save