<%@ 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() {
			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: '#highestGraduationTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
			            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
			        });
					laydate.render({
			            elem: '#firstGraduationTime', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
			            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
			        });
					laydate.render({
			            elem: '#birthday', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
			            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
			        });
					laydate.render({
			            elem: '#professionalGetdate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
			            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
			        });
					laydate.render({
			            elem: '#costengineerGetdate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
			            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
			        });
					laydate.render({
			            elem: '#workstartDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
			            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
			        });
					laydate.render({
			            elem: '#probationEnddate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
			            event: 'focus' //响应事件。如果没有传入event，则按照默认的click
			        });
		});
	</script>
</head>
<body class="hideScroll">
		<form:form id="inputForm" modelAttribute="userInfo" action="${ctx}/hr/userInfo/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<form:hidden path="userOffice.userId"/>
		<form:hidden path="userOffice.companyId"/>
		<form:hidden path="userOffice.id"/>
		<form:hidden path="userId"/>
		<form:hidden path="companyId"/>
			<%-- 以上参数都必须 --%>
		<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"><font color="red">*</font>姓名：</label></td>
					<td class="width-35">
						<form:input path="name" htmlEscape="false"    class="form-control required"/>
					</td>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>性别：</label></td>
					<td class="width-35">
						<form:select path="gender" class="form-control required">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('sex')}" 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 path="nickName" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-15 active"><label class="pull-right">工号：</label></td>
					<td class="width-35">
						<form:input path="jobNumber" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">最高学历：</label></td>
					<td class="width-35">
						<form:select path="highestDegree" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('education_level')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
					<td class="width-15 active"><label class="pull-right">最高学历院校：</label></td>
					<td class="width-35">
						<form:input path="highestSchool" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">最高学历专业：</label></td>
					<td class="width-35">
						<form:input path="highestProfession" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-15 active"><label class="pull-right">最高学历毕业时间：</label></td>
					<td class="width-35">
						<input id="highestGraduationTime" name="highestGraduationTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
							value="<fmt:formatDate value="${userInfo.highestGraduationTime}" pattern="yyyy-MM-dd"/>"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">第一学历：</label></td>
					<td class="width-35">
						<form:select path="firstDegree" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('education_level')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
					<td class="width-15 active"><label class="pull-right">第一学历院校：</label></td>
					<td class="width-35">
						<form:input path="firstSchool" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">第一学历专业：</label></td>
					<td class="width-35">
						<form:input path="firstProfession" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-15 active"><label class="pull-right">第一学历毕业时间：</label></td>
					<td class="width-35">
						<input id="firstGraduationTime" name="firstGraduationTime" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
							value="<fmt:formatDate value="${userInfo.firstGraduationTime}" pattern="yyyy-MM-dd"/>"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">出生日期：</label></td>
					<td class="width-35">
						<input id="birthday" name="birthday" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
							value="<fmt:formatDate value="${userInfo.birthday}" pattern="yyyy-MM-dd"/>"/>
					</td>
					<td class="width-15 active"><label class="pull-right">身份证号：</label></td>
					<td class="width-35">
						<form:input path="idCard" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">职称：</label></td>
					<td class="width-35">
						<form:input path="professionalTitle" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-15 active"><label class="pull-right">获取职称日期：</label></td>
					<td class="width-35">
						<input id="professionalGetdate" name="professionalGetdate" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
							value="<fmt:formatDate value="${userInfo.professionalGetdate}" pattern="yyyy-MM-dd"/>"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">社保账号：</label></td>
					<td class="width-35">
						<form:input path="socialInsuranceAccount" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-15 active"><label class="pull-right">医保账号：</label></td>
					<td class="width-35">
						<form:input path="medicalInsuranceAccount" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">银行账号：</label></td>
					<td class="width-35">
						<form:input path="bankAccount" htmlEscape="false"    class="form-control  number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">公积金账号：</label></td>
					<td class="width-35">
						<form:input path="providentFundAccount" htmlEscape="false"    class="form-control  number"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">QQ号：</label></td>
					<td class="width-35">
						<form:input path="qq" htmlEscape="false"    class="form-control  number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">微信号：</label></td>
					<td class="width-35">
						<form:input path="weixin" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right"><font color="red">*</font>联系电话：</label></td>
					<td class="width-35">
						<form:input path="mobilePhone" htmlEscape="false"    class="form-control required number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">电子邮件：</label></td>
					<td class="width-35">
						<form:input path="email" htmlEscape="false"    class="form-control  email"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">是否造价师（0否，1是）：</label></td>
					<td class="width-35">
						<form:select path="isCostengineer" class="form-control ">
							<form:option value="" label=""/>
							<form:options items="${fns:getDictList('is_costEngineer')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
						</form:select>
					</td>
					<td class="width-15 active"><label class="pull-right">造价师取得日期：</label></td>
					<td class="width-35">
						<input id="costengineerGetdate" name="costengineerGetdate" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
							value="<fmt:formatDate value="${userInfo.costengineerGetdate}" pattern="yyyy-MM-dd"/>"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">报到日期：</label></td>
					<td class="width-35">
						<input id="workstartDate" name="workstartDate" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
							value="<fmt:formatDate value="${userInfo.workstartDate}" pattern="yyyy-MM-dd"/>"/>
					</td>
					<td class="width-15 active"><label class="pull-right">试用岗位：</label></td>
					<td class="width-35">
						<form:input path="probationPosition" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">试用期（n个月）：</label></td>
					<td class="width-35">
						<form:input path="probationDuration" htmlEscape="false"    class="form-control  number"/>
					</td>
					<td class="width-15 active"><label class="pull-right">试用结束日期：</label></td>
					<td class="width-35">
						<input id="probationEnddate" name="probationEnddate" type="text" maxlength="20" class="laydate-icondate form-control layer-date "
							value="<fmt:formatDate value="${userInfo.probationEnddate}" pattern="yyyy-MM-dd"/>"/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">职业资格：</label></td>
					<td class="width-35">
						<form:input path="professionalQualification" htmlEscape="false"    class="form-control "/>
					</td>
					<td class="width-15 active"><label class="pull-right">从事专业：</label></td>
					<td class="width-35">
						<form:input path="engagedJob" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">其他资质：</label></td>
					<td class="width-35" colspan="3">
						<form:input path="otherQualification" htmlEscape="false"    class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">个人简介：</label></td>
					<td class="width-35" colspan="3">
						<form:textarea path="personalProfile" htmlEscape="false"  rows="2"  class="form-control "/>
					</td>
				</tr>
				<tr>
					<td class="width-15 active"><label class="pull-right">备注信息：</label></td>
					<td class="width-35" colspan="3">
						<form:textarea path="remarks" htmlEscape="false" rows="2"    class="form-control "/>
					</td>
				</tr>
		 	</tbody>
		</table>
	</form:form>
</body>
</html>