<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/WEB-INF/tld/fns.tld" prefix="fns" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<div class="increased-cont" style="padding: 0 70px 20px 70px;">
	<h2>企业人员变动-新员工入职，可在保单中增加被保险人。</h2>
	<form id="add_detail_list_form">
		<input type="hidden" name="ins_insurance_slip_id" id="ins_insurance_slip_id" value="${preservationVo.ins_insurance_slip_id}">
		<input type="hidden" name="revise_type" value="1">
		<input type="hidden" name="product_code" value="${orderVo.product_code}">
		<input type="hidden" name="sign" id="add_sign" value="0"><%--0暂存，1提交--%>
		<div class="increased-time clearfix">
			<div class="time">
				<span>生效时间</span>
				<input title="生效时间" type="text" data-val="required" readonly name="inception_date" id="add_inception_date" onclick="laydate({elem:'#add_inception_date',istime: true,istoday: false,min: '${min}',max: '${max}', format: 'YYYY-MM-DD'})">
			</div>
			<%--<form id="uploadForm" name="uploadForm" method="post" enctype="multipart/form-data" action='<c:url value="/pc/preservation/resultSet/uploadRoleFile"/>' >--%>
			<div class="upload">
				<c:if test="${fn:contains(orderVo.product_code,'TYX')}">
					<a href="<c:url value='/resources/files/批量导入范本.xls'/>">批量导入范本.xls</a>
				</c:if>
				<c:if test="${fn:contains(orderVo.product_code,'GZZRX')}">
					<a href="<c:url value='/resources/files/雇主批量导入范本.xls'/>">雇主批量导入范本.xls</a>
				</c:if>
				<a href="javascript:;" class="upload-text">批量导入人员</a>
				<input name="role_record" id="role_record" type="file" style="font-size: 48px" onchange="uploadInsure();">
			</div>
		</div>

		<div class="increased-table" id="add-increased-table">
			<div class="increased-thead">
				<ul class="clearfix">
					<li class="s1">
						<span>姓名</span>
					</li>
					<li class="s2">
						<span>证件类型</span>
					</li>
					<li class="s3">
						<span>证件号</span>
					</li>
					<li class="s4">
						<span>手机号</span>
					</li>
					<li class="s5">
						<span>工种</span>
					</li>
					<%--<li class="s6">
						<span>方案</span>
					</li>--%>
					<li class="s7">
						<span>性别</span>
					</li>
					<li class="s8">
						<span>出生日期</span>
					</li>
					<li class="s9">
						<span>操作</span>
					</li>
				</ul>
			</div>
			<div class="increased-tbody  ert-tbody">
				<ul>
					<c:if test="${empty preservationVo.insPreservationResultSetVoList }">
						<c:forEach begin="0" end="0" varStatus="i">
							<li class="clearfix" data-count="${i.index}">
								<div class="w1">
									<input title="姓名" data-val="required" name="insPreservationDetailVoList[${i.index}].name" id="name_${i.index}" type="text" value="" onblur="doValidator(this);">
								</div>
								<div class="w2">
									<select data-val="required" name="insPreservationDetailVoList[${i.index}].id_type" id="id_type_${i.index}">
										<option value="0">身份证</option>
										<option value="3">护照</option>
										<option value="4">台胞证</option>
										<option value="5">回乡证</option>
									</select>
								</div>
								<div class="w3">
									<input title="证件号" data-val="required" type="text" name="insPreservationDetailVoList[${i.index}].id_card" id="id_card_${i.index}" data-it-sign="id_type_${i.index}" onblur="robotizationGet(this,'sex_${i.index},birthday_${i.index}');">
								</div>
								<div class="w4">
									<input title="手机号" data-val="required" name="insPreservationDetailVoList[${i.index}].tel" id="tel_${i.index}" type="text" onblur="doValidator(this);" value="">
								</div>
								<div class="w5">
									<select data-val="required" name="insPreservationDetailVoList[${i.index}].career" id="career_${i.index}">
										<option value="1">内勤人员</option>
										<option value="2" selected>保安人员</option>
										<c:if test="${fn:contains(orderVo.product_code,'TYX')||fn:contains(orderVo.product_code,'GZZRX-ZH')||fn:contains(orderVo.product_code,'GZZRX-XZH')}">
											<option value="3">武装押运人员</option>
										</c:if>
										<c:if test="${fn:contains(orderVo.product_code,'GZZRX-QH')||fn:contains(orderVo.product_code,'GZZRX-PAC')}">
											<option value="4">保洁人员</option>
										</c:if>
									</select>
								</div>
									<%--<div class="w6">
                                        <input type="text" name="insPreservationDetailVoList[${i.index}].scheme" id="scheme_${i.index}">
                                    </div>--%>
								<div class="w7">
									<select data-val="required" name="insPreservationDetailVoList[${i.index}].sex" id="sex_${i.index}" onblur="doValidator(this);" data-it-sign="id_card_${i.index}">
										<option value="1">男</option>
										<option value="2">女</option>
									</select>
								</div>
								<div class="w8">
									<input title="出生日期" data-val="required" type="text" name="insPreservationDetailVoList[${i.index}].birthday" id="birthday_${i.index}" data-it-sign="id_card_${i.index}" onclick="laydate({elem:'#birthday_${i.index}',istime: false, format: 'YYYY-MM-DD',choose: function(dates){doValidator('#birthday_${i.index}');}})">
								</div>
								<div class="w9">
									<span onclick="deleteUpdateDetail(this)">删除</span>
								</div>
							</li>
						</c:forEach>
					</c:if>
					<c:if test="${not empty preservationVo.insPreservationResultSetVoList }">
						<c:forEach items="${preservationVo.insPreservationResultSetVoList }" var="resultSet" varStatus="i">
							<li class="clearfix" data-count="${i.index}">
								<div class="w1">
									<input title="姓名" data-val="required" name="insPreservationDetailVoList[${i.index}].name" id="name_${i.index}" type="text" value="${resultSet.name}" onblur="doValidator(this);">
								</div>
								<div class="w2">
									<select data-val="required" name="insPreservationDetailVoList[${i.index}].id_type" id="id_type_${i.index}">
										<option value="0"<c:if test="${resultSet.id_type eq '0'}"> selected</c:if>>身份证</option>
										<option value="3"<c:if test="${resultSet.id_type eq '3'}"> selected</c:if>>护照</option>
										<option value="4"<c:if test="${resultSet.id_type eq '4'}"> selected</c:if>>台胞证</option>
										<option value="5"<c:if test="${resultSet.id_type eq '5'}"> selected</c:if>>回乡证</option>
									</select>
								</div>
								<div class="w3">
									<input title="证件号" data-val="required" type="text" name="insPreservationDetailVoList[${i.index}].id_card" id="id_card_${i.index}" value="${resultSet.id_card}" data-it-sign="id_type_${i.index}" onblur="robotizationGet(this,'sex_${i.index},birthday_${i.index}');">
								</div>
								<div class="w4">
									<input title="手机号" data-val="required" name="insPreservationDetailVoList[${i.index}].tel" id="tel_${i.index}" type="text" onblur="doValidator(this);" value="${resultSet.tel}">
								</div>
								<div class="w5">
									<select data-val="required" name="insPreservationDetailVoList[${i.index}].career" id="career_${i.index}">
										<option value="1"<c:if test="${resultSet.career eq '1'}"> selected</c:if>>内勤人员</option>
										<option value="2"<c:if test="${resultSet.career eq '2'}"> selected</c:if>>保安人员</option>
										<c:if test="${fn:contains(orderVo.product_code,'TYX')||fn:contains(orderVo.product_code,'GZZRX-ZH')||fn:contains(orderVo.product_code,'GZZRX-XZH')}">
											<option value="3"<c:if test="${resultSet.career eq '3'}"> selected</c:if>>武装押运人员</option>
										</c:if>
										<c:if test="${fn:contains(orderVo.product_code,'GZZRX-TB')||fn:contains(orderVo.product_code,'GZZRX-PAC')}">
											<option value="4"<c:if test="${resultSet.career eq '4'}"> selected</c:if>>保洁人员</option>
										</c:if>
									</select>
								</div>
									<%--<div class="w6">
                                        <input type="text" name="insPreservationDetailVoList[${i.index}].scheme" id="scheme_${i.index}">
                                    </div>--%>
								<div class="w7">
									<select data-val="required" name="insPreservationDetailVoList[${i.index}].sex" id="sex_${i.index}" onblur="doValidator(this);" data-it-sign="id_card_${i.index}">
										<option value="1"<c:if test="${resultSet.sex eq '1'}"> selected</c:if>>男</option>
										<option value="2"<c:if test="${resultSet.sex eq '2'}"> selected</c:if>>女</option>
									</select>
								</div>
								<div class="w8">
									<input title="出生日期" data-val="required" type="text" name="insPreservationDetailVoList[${i.index}].birthday" id="birthday_${i.index}" value="${resultSet.birthday}" data-it-sign="id_card_${i.index}" onclick="laydate({elem:'#birthday_${i.index}',istime: false, format: 'YYYY-MM-DD',choose: function(dates){doValidator('#birthday_${i.index}');}})">
								</div>
								<div class="w9">
									<span onclick="deleteUpdateDetail(this)">删除</span>
								</div>
							</li>
						</c:forEach>
					</c:if>

				</ul>
			</div>
		</div>
	</form>
	<div class="zeng">
            <span id="zeng" P-T-VAL="${fn:contains(orderVo.product_code,'GZZRX')?'1':'2'}" P-S-VAL="${fn:contains(orderVo.product_code,'GZZRX-PAC')?'1':fn:contains(orderVo.product_code,'GZZRX-CA')?'2':'0'}"><%--P-T-VAL 产品类型，用于职业区别，雇主跟团意险不一样(1:雇主，2：其它)；P-S-VAL 是否是平安雇主--%>
                <img src="<c:url value='/resources/versions-2.0.2/images/icon-zeng.png'/>">
                <i>增加一行</i>
            </span>
	</div>
</div>
<div class="increased-foot">
	<span class="incre-cancel">取消</span>
	<span onclick="save_preservation('0');" class="incre-ts">暂存</span>
	<span onclick="save_preservation('1');" class="incre-confirm">确认增员</span>
</div>

<script type="text/javascript" src="<c:url value='/resources/versions-2.0.2/js/assure.js' />"></script>
<script type="text/javascript">
    var baseUrl = '${pageContext.request.contextPath }';

</script>
