ZhiYeJianKang/职业健康平台后端/target/dzzyb/webpage/modules/assessment/plan/planForm.jsp
2025-02-20 15:25:59 +08:00

94 lines
3.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
<title>添加计划</title>
<meta name="decorator" content="default"/>
<script type="text/javascript">
var validateForm;
function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
if(validateForm.form()){
$("#inputForm").submit();
return true;
}
return false;
}
$(document).ready(function() {
$("#name").focus();
validateForm = $("#inputForm").validate({
submitHandler: function(form){
loading('正在提交,请稍等...');
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
laydate.render({
elem: '#startTime',
type: 'datetime',
format: 'yyyy-MM-dd HH:mm:ss',
value: new Date(),
min: 0,
btns: ['now', 'confirm']
});
laydate.render({
elem: '#endTime',
type: 'datetime',
format: 'yyyy-MM-dd HH:mm:ss',
value: new Date(),
min: 0,
btns: ['now', 'confirm']
});
laydate.render({
elem: '#year',
type: 'year',
format: 'yyyy',
value: new Date(),
});
});
</script>
</head>
<body>
<form:form id="inputForm" modelAttribute="plan" action="${ctx}/assessment/plan/save" method="post" class="form-horizontal">
<form:hidden path="id"/>
<sys:message content="${message}"/>
<table class="table table-bordered table-condensed dataTables-example dataTable no-footer">
<tbody>
<tr>
<td class=" width-15 active"><label class="pull-right">计划名称:</label></td>
<td class="width-35" ><form:input path="title" htmlEscape="false" maxlength="50" class="form-control required"/></td>
<td class="width-15 active"><label class="pull-right">是否启用:</label></td>
<td class="width-35" ><form:select path="enable" class="form-control required">
<form:options items="${fns:getDictList('plan_enable')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select></td>
</tr>
<tr>
<td class=" width-15 active"><label class="pull-right">年份:</label></td>
<td class="width-35" ><form:input type="text" path="year" id="year" name="year" class="layui-input required" style="width: 80px;display: inline-block"/></td>
<td class="width-15 active"><label class="pull-right">考核指标体系:</label></td>
<td class="width-35" ><form:select path="assessmentSystemId" class="form-control required">
<form:option value="">请选择</form:option>
<c:forEach items="${systems}" var="system">
<form:option value="${system.id}">${system.name}</form:option>
</c:forEach>
</form:select></td>
</tr>
<%-- <tr>
<td class="width-15 active"><label class="pull-right"><font color="red">*</font>计划开始时间:</label></td>
<td class="width-35" ><input type="text" id="startTime" name="startTime" readonly class="layui-input" ></td>
<td class="width-15 active"><label class="pull-right"><font color="red">*</font>计划结束时间:</label></td>
<td class="width-35" ><input type="text" id="endTime" name="startTime" readonly class="layui-input" ></td
</tr>--%>
</tbody>
</table>
</form:form>
</body>
</html>