Files
RuoYi/ruoyi-admin/src/main/resources/templates/system/post/add.html

98 lines
3.1 KiB
HTML
Raw Normal View History

2018-07-09 08:44:52 +08:00
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
2019-03-31 12:56:04 +08:00
<head>
<th:block th:include="include :: header('新增岗位')" />
</head>
2018-07-09 08:44:52 +08:00
<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">
2019-12-31 16:34:24 +08:00
<label class="col-sm-3 control-label is-required">岗位名称:</label>
2018-07-09 08:44:52 +08:00
<div class="col-sm-8">
2019-02-25 13:19:06 +08:00
<input class="form-control" type="text" name="postName" id="postName" required>
2018-07-09 08:44:52 +08:00
</div>
</div>
<div class="form-group">
2019-12-31 16:34:24 +08:00
<label class="col-sm-3 control-label is-required">岗位编码:</label>
2018-07-09 08:44:52 +08:00
<div class="col-sm-8">
2019-02-25 13:19:06 +08:00
<input class="form-control" type="text" name="postCode" id="postCode" required>
2018-07-09 08:44:52 +08:00
</div>
</div>
<div class="form-group">
2019-12-31 16:34:24 +08:00
<label class="col-sm-3 control-label is-required">显示顺序:</label>
2018-07-09 08:44:52 +08:00
<div class="col-sm-8">
2019-02-25 13:19:06 +08:00
<input class="form-control" type="text" name="postSort" id="postSort" required>
2018-07-09 08:44:52 +08:00
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">岗位状态:</label>
2018-08-23 17:06:31 +08:00
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
2018-08-23 17:06:31 +08:00
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
2018-07-09 08:44:52 +08:00
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
2018-08-23 20:34:23 +08:00
<textarea id="remark" name="remark" class="form-control"></textarea>
2018-07-09 08:44:52 +08:00
</div>
</div>
</form>
</div>
2019-03-31 12:56:04 +08:00
<th:block th:include="include :: footer" />
2018-07-09 08:44:52 +08:00
<script type="text/javascript">
2018-10-03 21:44:14 +08:00
var prefix = ctx + "system/post";
2018-07-09 08:44:52 +08:00
$("#form-post-add").validate({
onkeyup: false,
2018-07-09 08:44:52 +08:00
rules:{
2018-08-05 11:05:26 +08:00
postName:{
remote: {
url: ctx + "system/post/checkPostNameUnique",
type: "post",
dataType: "json",
data: {
"postName" : function() {
2018-08-23 17:06:31 +08:00
return $.common.trim($("#postName").val());
2018-08-05 11:05:26 +08:00
}
}
}
2018-07-09 08:44:52 +08:00
},
2018-08-05 11:05:26 +08:00
postCode:{
remote: {
url: ctx + "system/post/checkPostCodeUnique",
type: "post",
dataType: "json",
data: {
"postCode" : function() {
2018-08-23 17:06:31 +08:00
return $.common.trim($("#postCode").val());
2018-08-05 11:05:26 +08:00
}
}
}
2018-07-09 08:44:52 +08:00
},
postSort:{
digits:true
},
},
2018-08-05 11:05:26 +08:00
messages: {
"postCode": {
remote: "岗位编码已经存在"
},
"postName": {
remote: "岗位名称已经存在"
}
2019-02-25 13:19:06 +08:00
},
focusCleanup: true
2018-07-09 08:44:52 +08:00
});
2018-10-03 21:44:14 +08:00
function submitHandler() {
2018-10-03 23:11:09 +08:00
if ($.validate.form()) {
2018-10-03 21:44:14 +08:00
$.operate.save(prefix + "/add", $('#form-post-add').serialize());
}
}
2018-07-09 08:44:52 +08:00
</script>
</body>
</html>