fa53c2c500a2ef6f7a016e75a20a19e176e03e3d.svn-base 6.96 KB
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>人员信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("tbody > tr").bind("click",function(){
				$("tbody > tr").each(function(i){    
		             $(this).removeClass("trBgcolor");
		        });
				$(this).find('input:radio').prop('checked', true);
				$(this).addClass("trBgcolor");
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		function winBack() 
		{
			var checkedCount = $("input[type='radio']:checked").length;
			if(checkedCount == 0){
				alert("必须选择一条信息!");
				return;
			}
			var idValue = $("input[name='radio_person']:checked").attr("id");
			var rymcValue = $("input[name='radio_person']:checked").parent().next().next().text();
			var zjzlValue = $("input[name='radio_person']:checked").parent().next().next().next().text();
			var zjhValue = $("input[name='radio_person']:checked").parent().next().next().next().next().next().text();
			if(window.opener) { 
				var h = '${H}';
				window.close();
				if(h == "1"){
					rymcValueText = window.opener.document.getElementById("ywr");
					zjzlValueText = window.opener.document.getElementById("ywrzjzl");
					zjhValueText = window.opener.document.getElementById("ywrzjh");
				}else{
					rymcValueText = window.opener.document.getElementById("zwr");
					zjzlValueText = window.opener.document.getElementById("zwrzjzl");
					zjhValueText = window.opener.document.getElementById("zwrzjh");
				}
				rymcValueText.value = rymcValue.trim();
				zjzlValueText.value = zjzlValue.trim();
				zjhValueText.value = zjhValue.trim();
			}
	    }
		
		function auditPerson(id, wo, chxxxz){
			if(confirm('审核后数据将正式生效,并且不能删除和修改。确认要审核该信息吗?')){
				url = "${ctx}/reg/base/regBasePerson/audit?ls=1&id="+id+"&WO="+wo+"&CHXXXZ="+chxxxz;
				window.location.href=url;
			}
		}
		function unauditPerson(id, wo, chxxxz){
			if(confirm('反审核后数据恢复可删除和修改。确认要反审核该信息吗?')){
				url = "${ctx}/reg/base/regBasePerson/unaudit?ls=1&id="+id+"&WO="+wo+"&CHXXXZ="+chxxxz;
				window.location.href=url;
			}
		}

		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/reg/base/regBasePerson/lslist?WO=${WO}">人员信息列表</a></li>
		<shiro:hasPermission name="reg:base:regBasePerson:edit"><li><a href="${ctx}/reg/base/regBasePerson/lsform?WO=${WO}&CHXXXZ=1">人员信息添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="regBasePerson" action="${ctx}/reg/base/regBasePerson/lslist?WO=${WO}&CHXXXZ=1" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<c:if test="${not empty WO}">
				<li><span class="tipinfo">请点击人员信息选择按钮,只能选择一个</span>
					<input id="btnChose" class="btn btn-primary" type="button" onclick="javascript:winBack();" value="人员信息选择"/>
				</li>
			</c:if>
			<li><label>人员名称:</label>
				<form:input path="rymc" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li><label>证件号:</label>
				<form:input path="zjh" htmlEscape="false" maxlength="50" class="input-medium"/>
			</li>
			<li><label>人员编码:</label>
				<form:input path="pcode" htmlEscape="false" maxlength="10" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-bordered table-condensed">
		<thead>
			<tr>
				<c:if test="${not empty WO}">
					<th>选择</th>
				</c:if>
				<th>人员编码</th>
				<th>人员名称</th>
				<th>证件种类</th>
				<th style="display:none;">证件类型代码</th>
				<th>证件号</th>
				<th>所属行业</th>
				<th>户籍所在省市</th>
				<th>电话</th>
				<th>地址</th>
				<th>电子邮件</th>
				<th>更新时间</th> 
				<shiro:hasPermission name="reg:base:regBasePerson:edit"><c:if test="${empty VIEW}"><th>操作</th></c:if></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="regBasePerson">
			<tr>
				<c:if test="${not empty WO}">
					<td>
						<input type="radio" name="radio_person" id="${regBasePerson.id}" value="${regBasePerson.id}"/>
					</td>
				</c:if>
				<td>
					${regBasePerson.pcode}
				</td>
				<td>
					<a class="rymc" href="${ctx}/reg/base/regBasePerson/form?id=${regBasePerson.id}&VIEWS=1">
						${regBasePerson.rymc}
					</a>
				</td>
				<td>
					${fns:getDictLabel(regBasePerson.zjzl, 'reg_bus_zjlx', '')}
				</td>
				<td style="display:none;">
					${regBasePerson.zjzl}
				</td>
				<td>
					${regBasePerson.zjh}
				</td>
				<td>
					${fns:getDictLabel(regBasePerson.sshy, 'reg_bus_sshy', '')}
				</td>
				<td>
					${regBasePerson.hjszss}
				</td>
				<td>
					${regBasePerson.dh}
				</td>
				<td>
					${regBasePerson.dz}
				</td>
				<td>
					${regBasePerson.dzyj}
				</td>
				<td>
					<fmt:formatDate value="${regBasePerson.updateDate}" pattern="yyyy-MM-dd"/>
				</td> 
				<c:if test="${empty VIEW}">
				
				<shiro:hasPermission name="reg:base:regBasePerson:edit">
				<td>
				<c:if test="${regBasePerson.isaudit ne '2'}">
    				<c:if test="${regBasePerson.isaudit eq '0'}">
    					<a href="#" onclick="auditPerson('${regBasePerson.id}', '${WO}', '1');">审核</a>
    					<a href="${ctx}/reg/base/regBasePerson/lsform?id=${regBasePerson.id}&WO=${WO}&CHXXXZ=1&ls=1">修改</a>
						<a href="${ctx}/reg/base/regBasePerson/delete?id=${regBasePerson.id}&WO=${WO}&CHXXXZ=1&ls=1"
							 onclick="return confirmx('确认要删除该人员信息吗?', this.href)">删除</a>
    				</c:if>
    				<c:if test="${regBasePerson.isaudit eq '1'}">
    					<a href="#" onclick="unauditPerson('${regBasePerson.id}', '${WO}', '1');">反审核</a>
    				</c:if>
    				<c:if test="${regBasePerson.isaudit ne '0' and regBasePerson.isaudit ne '1'}">
    					<a href="#" onclick="auditPerson('${regBasePerson.id}', '${WO}', '1');">审核</a>
    					<a href="${ctx}/reg/base/regBasePerson/lsform?id=${regBasePerson.id}&WO=${WO}&CHXXXZ=1&ls=1">修改</a>
						<a href="${ctx}/reg/base/regBasePerson/delete?id=${regBasePerson.id}&WO=${WO}&CHXXXZ=1&ls=1"
							 onclick="return confirmx('确认要删除该人员信息吗?', this.href)">删除</a>
    				</c:if>
				</c:if>
				<c:if test="${regBasePerson.isaudit eq '2'}">
					<a href="#">已引用</a>
				</c:if>
				</td>
				</shiro:hasPermission>
				</c:if>				 
				
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>