<%@ 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">
	<h2>企业人员变动，可替换保单中的被保险人(相同保障方案)。</h2>
	<form id="replace_detail_list_form">
		<input type="hidden" name="oid" value="${iprVo.oid}">
		<input type="hidden" name="ins_insurance_slip_id" value="${iprVo.ins_insurance_slip_id}">
		<input type="hidden" name="sign" id="replace_sign" value="0"><%--0暂存，1提交--%>
		<input type="hidden" name="revise_type" value="3">
		<div class="increased-time clearfix">
			<div class="time">
				<span>生效时间</span>
				<input title="生效时间" data-val="required" readonly type="text" id="replace_inception_date" value="${iprVo.inception_date}" name="inception_date" onclick="laydate({elem:'#replace_inception_date',istime: true,istoday: false,min: '${min}',max: '${max}', format: 'YYYY-MM-DD'})">
			</div>
		</div>
		<div class="increased-table replaces-table">
			<div class="increased-thead replaces-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" style="width: 13%">
						<span>操作</span>
					</li>
				</ul>
			</div>
			<div class="increased-tbody replaces-tbody">
				<ul>
					<c:choose>
						<c:when test="${empty iprVo.insPreservationDetailVoList }">
							<li>
								<p>暂无记录！！</p>
							</li>
						</c:when>
						<c:otherwise>
							<c:forEach items="${iprVo.insPreservationDetailVoList }" var="ipdVo" varStatus="i">
								<li class="clearfix">
									<input name="insPreservationDetailVoList[${i.index}].oid" type="hidden" value="${ipdVo.oid}">
									<input name="insPreservationDetailVoList[${i.index}].business_id" type="hidden" value="${ipdVo.business_id}">
									<input name="insPreservationDetailVoList[${i.index}].business_type" type="hidden" value="${ipdVo.business_type}">
									<input name="insPreservationDetailVoList[${i.index}].prev_record_id" type="hidden" value="${ipdVo.prev_record_id}">
									<input name="insPreservationDetailVoList[${i.index}].prev_card" type="hidden" value="${ipdVo.prev_card}">
									<div class="w1">
										<span>${empty ipdVo.business_vo.name ? '-' : ipdVo.business_vo.name}</span>
										<input title="姓名" data-val="required" name="insPreservationDetailVoList[${i.index}].name" id="name_${i.index}" type="text" value="${ipdVo.name}" onblur="doValidator(this);">
									</div>
									<div class="w2">
									<span>
											${fns:getDictLabel (ipdVo.id_type,"idType","")}
									</span>
										<select name="insPreservationDetailVoList[${i.index}].id_type" id="id_type_${i.index}">
											<option value="0"<c:if test="${ipdVo.id_type eq '0'}"> selected</c:if>>身份证</option>
											<option value="3"<c:if test="${ipdVo.id_type eq '3'}"> selected</c:if>>护照</option>
											<option value="4"<c:if test="${ipdVo.id_type eq '4'}"> selected</c:if>>台胞证</option>
											<option value="5"<c:if test="${ipdVo.id_type eq '5'}"> selected</c:if>>回乡证</option>
										</select>
									</div>
									<div class="w3">
										<span>${empty ipdVo.business_vo.id_card ? '-' : ipdVo.business_vo.id_card}</span>
										<input title="证件号" data-val="required" name="insPreservationDetailVoList[${i.index}].id_card" id="id_card_${i.index}" type="text" data-it-sign="id_type_${i.index}" onblur="robotizationGet(this,'sex_${i.index},birthday_${i.index}');" value="${ipdVo.id_card}">
									</div>
									<div class="w4">
										<span>${empty ipdVo.business_vo.tel ? '-' : ipdVo.business_vo.tel}</span>
										<input title="手机号" data-val="required" name="insPreservationDetailVoList[${i.index}].tel" id="tel_${i.index}" type="text" value="${ipdVo.tel}" onblur="doValidator(this);">
									</div>
									<div class="w5">
										<span>${ipdVo.business_vo.career eq '1' ? '内勤人员' : ipdVo.business_vo.career eq '2' ? '保安人员' : ipdVo.business_vo.career eq '3' ? '武装押运人员' : ipdVo.business_vo.career eq '4' ? '保洁人员' : '-'}</span>
										<select name="insPreservationDetailVoList[${i.index}].career" id="career_${i.index}">
											<c:if test="${!fn:contains(orderVo.product_code,'TYX-QH-DQ')}">
											<option value="1"<c:if test="${ipdVo.business_vo.career eq '1'}"> selected</c:if>>内勤人员</option>
											<option value="2"<c:if test="${ipdVo.business_vo.career eq '2'}"> selected</c:if>>保安人员</option>
											<c:if test="${fn:contains(orderVo.product_code,'TYX')||fn:contains(orderVo.product_code,'GZZRX-CA')||fn:contains(orderVo.product_code,'GZZRX-ZH')||fn:contains(orderVo.product_code,'GZZRX-XZH')}">
												<option value="3"<c:if test="${ipdVo.business_vo.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-QH')||fn:contains(orderVo.product_code,'GZZRX-PAC')||fn:contains(orderVo.product_code,'GZZRX-CA')||fn:contains(orderVo.product_code,'TYX-CA')}">
												<option value="4"<c:if test="${ipdVo.business_vo.career eq '4'}"> selected</c:if>>保洁人员</option>
											</c:if>
											</c:if>
											<c:if test="${fn:contains(orderVo.product_code,'TYX-QH-DQ')}">
												<option value="2"<c:if test="${resultSet.career eq '2'}"> selected</c:if>>保安人员</option>
											</c:if>
										</select>
									</div>
									<%--<div class="w6">
										<span>${empty ipdVo.business_vo.scheme ? '-' : ipdVo.business_vo.scheme}</span>
										<input name="insPreservationDetailVoList[${i.index}].scheme" id="scheme_${i.index}" type="text" value="${ipdVo.scheme}">
									</div>--%>
									<div class="w7">
										<span>${empty ipdVo.business_vo.sex ? '-' : ipdVo.business_vo.sex eq '1' ? '男' : '女'}</span>
										<select 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="${ipdVo.sex eq '1'}"> selected</c:if>>男</option>
											<option value="2"<c:if test="${ipdVo.sex eq '2'}"> selected</c:if>>女</option>
										</select>
									</div>
									<div class="w8">
										<span>${empty ipdVo.business_vo.birthday ? '-' : ipdVo.business_vo.birthday}</span>
										<input title="出生日期" data-val="required" type="text" name="insPreservationDetailVoList[${i.index}].birthday" value="${ipdVo.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" style="width: 13%">
										<span class="shan" onclick="deleteUpdateDetail('${ipdVo.oid}',this);">删除</span>
									</div>
									<div class="wed"></div>
								</li>
							</c:forEach>
						</c:otherwise>
					</c:choose>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="increased-foot">
	<span class="incre-cancel">取消</span>
	<span onclick="replace_save_preservation('0');" class="incre-ts">暂存</span>
	<span onclick="replace_save_preservation('1');" class="incre-confirm">再次提交</span>
</div>
<script>
    $('.increased-foot .incre-cancel').click(function () {
        $('.replaces-increased').addClass('fadeOutUpBig').removeClass('fadeInDownBig');
        $('.black-mask').hide();
    });
</script>