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

141 lines
5.5 KiB
HTML

<!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-advanceddept-add">
<div class="form-group">
<label class="col-sm-3 control-label">年度:</label>
<div class="col-sm-8">
<input required name="year" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">部门:</label>
<div class="col-sm-8">
<select name="dept" id="dept" class="form-control m-b">
<option value="">请选择</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">评选人:</label>
<div class="col-sm-8">
<select name="commit" id="commit" class="form-control m-b">
<option value="">请选择</option>
</select>
<!-- <input required name="commit" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">评选时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input required name="time" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核人:</label>
<div class="col-sm-8">
<select name="confirm" id="confirm" class="form-control m-b">
<option value="">请选择</option>
</select>
<!-- <input name="confirm" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否显示:</label>
<div class="col-sm-8">
<input name="show" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">主要事迹附件上传:</label>
<div class="col-sm-8">
<input required name="events" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">指标综合评分:</label>
<div class="col-sm-8">
<input name="score" class="form-control" type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">完成进度:</label>
<div class="col-sm-8">
<input name="process" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">综合排名:</label>
<div class="col-sm-8">
<input name="sort" class="form-control" type="text">
</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/advanceddept"
$("#form-advanceddept-add").validate({
onkeyup: false,
focusCleanup: true
});
$.ajax({
type: "post",
url: ctx + "base/personnel/personnelList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.id+'">'+d.name+'</option>';
})
$("#commit")[0].innerHTML=opt;
$("#confirm")[0].innerHTML=opt;
}
});
$.ajax({
type: "post",
url: ctx + "base/personnel/deptList",
data: {
},
success: function(data) {
var opt = '';
data.data.forEach(d=>{
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
})
$("#dept")[0].innerHTML=opt;
}
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-advanceddept-add').serialize());
}
}
$("input[name='time']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>