cyx-ament-pc/cyx-admin/src/main/resources/templates/base/personnel/add.html

174 lines
7.6 KiB
HTML
Raw Normal View History

2023-08-24 09:43:00 +08:00
<!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" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-personnel-add">
<div class="row">
<div class="form-group col-sm-6 col-md-6">
2023-09-08 18:01:20 +08:00
<label class="col-sm-4 control-label">支部名称:</label>
<div class="col-sm-8">
2023-09-08 18:01:20 +08:00
<select name="branchId" id="branchId" class="form-control">
<option value="">请选择</option>
</select>
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">人员姓名:</label>
<div class="col-sm-8">
<input name="name" class="form-control" type="text">
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">性别:</label>
<div class="col-sm-8">
<select required name="sex" id="sex" class="form-control ">
<option value="1"></option>
<option value="2"></option>
</select>
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">民族:</label>
<div class="col-sm-8">
<input name="nation" class="form-control" type="text">
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">部门:</label>
<div class="col-sm-8">
<select name="deptId" id="deptId" class="form-control">
<option value="">请选择</option>
</select>
<!-- <input name="deptId" class="form-control" type="text">-->
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">手机号码:</label>
<div class="col-sm-8">
<input name="mphone" class="form-control" type="text">
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">邮箱:</label>
<div class="col-sm-8">
<input name="email" class="form-control" type="text">
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">籍贯:</label>
<div class="col-sm-8">
<input name="nativePlace" class="form-control" type="text">
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">岗位:</label>
<div class="col-sm-8">
<input name="post" class="form-control" type="text">
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">职务:</label>
<div class="col-sm-8">
<input name="duties" class="form-control" type="text">
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">职称:</label>
<div class="col-sm-8">
<input name="title" class="form-control" type="text">
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">参加工作时间</label>
<div class="col-sm-8">
2023-08-24 09:43:00 +08:00
<input name="workDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
</div>
</div>
<!-- <div class="form-group col-sm-6 col-md-6">-->
<!-- <label class="col-sm-4 control-label">支部ID</label>-->
<!-- <div class="col-sm-8">-->
<!-- <input name="branchId" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">入党时间:</label>
<div class="col-sm-8">
2023-08-24 09:43:00 +08:00
<input name="partyDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
</div>
</div>
<div class="form-group col-sm-6 col-md-6">
<label class="col-sm-4 control-label">党内职务:</label>
<div class="col-sm-8">
<input name="partyDuties" class="form-control" type="text">
</div>
2023-08-24 09:43:00 +08:00
</div>
<div class="form-group col-sm-12 col-md-12">
<label class="col-sm-2 control-label">备注:</label>
<div class="col-sm-9">
<textarea name="remark" class="form-control"></textarea>
</div>
2023-08-24 09:43:00 +08:00
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "base/personnel"
$("#form-personnel-add").validate({
focusCleanup: true
});
2023-08-31 10:19:10 +08:00
$(document).ready(function () {
$.ajax({
type: "post",
url: ctx + "base/personnel/deptList",
data: {
},
success: function(data) {
var opt = '<option value="">请选择</option>';
data.data.forEach(d=>{
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
})
$("#deptId")[0].innerHTML=opt;
}
});
2023-09-08 18:01:20 +08:00
$.ajax({
type: "post",
url: ctx + "base/personnel/branchList",
data: {
},
success: function(data) {
var opt = '<option value="">请选择</option>';
data.data.forEach(d=>{
opt += '<option value="'+d.branchId+'">'+d.branchName+'</option>';
})
$("#branchId")[0].innerHTML=opt;
}
});
2023-08-31 10:19:10 +08:00
})
2023-08-24 09:43:00 +08:00
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-personnel-add').serialize());
}
}
$("input[name='workDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='partyDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>