|
|
|
<!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-train-edit" th:object="${tdTrain}">
|
|
|
|
<input name="ID" th:field="*{ID}" type="hidden">
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label is-required">所属地市:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="AREAID" th:field="*{AREAID}" class="form-control" type="text" required>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">所属区县:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="FRAMEWORK" th:field="*{FRAMEWORK}" 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="USERNAME" th:field="*{USERNAME}" 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="deptName" th:field="*{deptName}" 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="trainType" class="form-control m-b" th:with="type=${@dict.getType('sys_usertrain_typer')}">
|
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{trainType}"></option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">培训对象:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<select name="trainSubject" class="form-control m-b" th:with="type=${@dict.getType('sys_usertrain_obj')}">
|
|
|
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{trainSubject}"></option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">培训地点:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<textarea name="trainAddress" class="form-control">[[*{trainAddress}]]</textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">培训日期:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<div class="input-daterange input-group">
|
|
|
|
<input type="text" class="input-sm form-control" th:value="${#dates.format(tdTrain.trainDate, 'yyyy-MM-dd')}" name="trainDate" id="laydate-startTime" placeholder="开始日期"/>
|
|
|
|
<span class="input-group-addon">到</span>
|
|
|
|
<input type="text" class="input-sm form-control" th:value="${#dates.format(tdTrain.trainTimeend, 'yyyy-MM-dd')}" name="trainTimeend" id="laydate-endTime" placeholder="结束日期"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-3 control-label">培训人员:</label>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<input name="trainName" th:field="*{trainName}" 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 + "system/train";
|
|
|
|
$("#form-train-edit").validate({
|
|
|
|
focusCleanup: true
|
|
|
|
});
|
|
|
|
layui.use('laydate', function(){
|
|
|
|
var laydate = layui.laydate;
|
|
|
|
|
|
|
|
var startDate = laydate.render({
|
|
|
|
elem: '#laydate-startTime',
|
|
|
|
theme: 'molv',
|
|
|
|
trigger: 'click',
|
|
|
|
done: function(value, date) {
|
|
|
|
// 结束时间大于开始时间
|
|
|
|
if (value !== '') {
|
|
|
|
endDate.config.min.year = date.year;
|
|
|
|
endDate.config.min.month = date.month - 1;
|
|
|
|
endDate.config.min.date = date.date;
|
|
|
|
} else {
|
|
|
|
endDate.config.min.year = '';
|
|
|
|
endDate.config.min.month = '';
|
|
|
|
endDate.config.min.date = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
var endDate = laydate.render({
|
|
|
|
elem: '#laydate-endTime',
|
|
|
|
theme: 'molv',
|
|
|
|
trigger: 'click',
|
|
|
|
done: function(value, date) {
|
|
|
|
// Start date cannot be after end date
|
|
|
|
if (value !== '') {
|
|
|
|
startDate.config.max = {
|
|
|
|
year: date.year,
|
|
|
|
month: date.month - 1,
|
|
|
|
date: date.date
|
|
|
|
};
|
|
|
|
} else {
|
|
|
|
startDate.config.max = {
|
|
|
|
year: '',
|
|
|
|
month: '',
|
|
|
|
date: ''
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
function submitHandler() {
|
|
|
|
if ($.validate.form()) {
|
|
|
|
$.operate.save(prefix + "/edit", $('#form-train-edit').serialize());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$("input[name='createDate']").datetimepicker({
|
|
|
|
format: "yyyy-mm-dd",
|
|
|
|
minView: "month",
|
|
|
|
autoclose: true
|
|
|
|
});
|
|
|
|
|
|
|
|
$("input[name='updateDate']").datetimepicker({
|
|
|
|
format: "yyyy-mm-dd",
|
|
|
|
minView: "month",
|
|
|
|
autoclose: true
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|