e4bd3025e6b45be8d9f0ebff25246c4ae0a37427.svn-base 9.26 KB
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>人员信息管理</title>
<script type="text/javascript"
	src="${ctxStatic}/readcard/jBox/jquery.jBox-2.3.min.js"></script>
<script type="text/javascript"
	src="${ctxStatic}/readcard/js/baseISSObject.js"></script>
<script type="text/javascript"
	src="${ctxStatic}/readcard/js/baseISSOnline.js"></script>
<script type="text/javascript" src="${ctxStatic}/readcard/js/common.js"></script>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document).ready(function() {
		var trs = $("#contentTable").find("tr").length;
		if ("1" == trs) {
			if (confirm("未查找到该人员信息,是否转到添加页面?")) {
				url = "${ctx}/reg/base/regBasePerson/form";
				window.location.href = url;
			};
		}

		$("tbody > tr").bind("click", function() {
			$("tbody > tr").each(function(i) {
				$(this).removeClass("trBgcolor");
			});
			$(this).find('input:radio').prop('checked', true);
			$(this).addClass("trBgcolor");
		});
		var xz = '${xz}';
		var djlx = '${djlx}';
		if (djlx == '416' || djlx == '809' || djlx == '422') {
			if (xz == null || xz != 1 || xz == "") {
				document.getElementById('allperson').checked = false;
			} else {
				document.getElementById('allperson').checked = true;
				document.getElementById("allperson").disabled = true;
			}
		}
	});
	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 isaudit = $("input[type='radio']:checked").val();
		if (isaudit == 0) {
			alert("请先审核该条人员信息!");
			return;
		}
		var idValue = $("input[name='radio_person']:checked").attr("id");
		var djlx = "${djlx}";
		/*if (djlx != "421") {*/
			window.opener.getUrl(idValue);
		/*}*/
		//获取需要返回的值 TODO 
		var checkedCount = $("input[type='radio']:checked").length;
		if (checkedCount == 0) {
			alert("必须选择一条信息!");
			return;
		}
		/* var rymcValue = $("input[name='radio_person']:checked").parent().next()
				.next().text();
		var zjlxValue = $("input[name='radio_person']:checked").parent().next()
				.next().next().next().next().text();
		var zjhValue = $("input[name='radio_person']:checked").parent().next()
				.next().next().next().text(); */
		
		if (window.opener) {
			window.close();
			/* rymcValueText = window.opener.document.getElementById("qlrmctext");
			zjzlValueText = window.opener.document.getElementById("zjzltext");
			zjhValueText = window.opener.document.getElementById("zjhtext");
			if (rymcValueText) {
				rymcValueText.value = rymcValue.trim();
			}
			if (zjzlValueText) {
				//证件类型 
				window.opener.select2_zjlx(zjlxValue.trim());
			}
			if (zjhValueText) {
				zjhValueText.value = zjhValue.trim();
			} */
		}
	}

	function auditPerson(id) {
		if (confirm('审核后数据将正式生效,并且不能删除和修改。确认要审核该信息吗?')) {
			url = "${ctx}/reg/base/regBasePerson/audit?id=" + id + "&WO=${WO}";
			window.location.href = url;
		}
	}
	function unauditPerson(id) {
		if (confirm('反审核后数据恢复可删除和修改。确认要反审核该信息吗?')) {
			url = "${ctx}/reg/base/regBasePerson/unaudit?id=" + id
					+ "&WO=${WO}";
			window.location.href = url;
		}
	}
	function allpersonquery() {
		var xz = $("input[type='checkbox']").is(':checked');
		url = "${ctx}/reg/base/regBasePerson/list?djlx=${djlx}&xz=" + xz;
		window.location.href = url;
	}

	function setCertificateData(result) {
		$("#zjhtext").val(result.Certificate.IDNumber);
		$("#rymctext").val(result.Certificate.Name);
		$("#btnSubmit").click();
	}
</script>
</head>
<body>
	<p id="cert_message" style="display: none;"></p>
	<p id="cert_message_type" style="display: none;"></p>
	<ul class="nav nav-tabs">
		<li class="active"><a href="#">人员信息列表</a></li>
		<c:if
			test="${djlx ne '416' and djlx ne '809' and djlx ne '819' and djlx ne '422' and djlx ne '421' and djlx ne '434'}">
			<shiro:hasPermission name="reg:base:regBasePerson:edit">
				<li><a id="persomform"
					href="${ctx}/reg/base/regBasePerson/form?addPerson=${addPerson}">人员信息添加</a></li>
			</shiro:hasPermission>
		</c:if>
	</ul>
	<form:form id="searchForm" modelAttribute="regBasePerson"
		action="${ctx}/reg/base/regBasePerson/?WO=${WO}&djlx=${djlx}&xz=${xz}&addPerson=${addPerson}"
		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}" />
		<table>
			<tr>
				<c:if test="${'add' ne addPerson}">
					<td><input id="btnChose" class="btn btn-primary" type="button"
						onclick="javascript:winBack();" value="人员信息选择" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</c:if>
				<c:if test="${xz eq '1' or empty xz}">
					<td>人员名称</td>
					<td><form:input id="rymctext" path="rymc" htmlEscape="false"
							maxlength="100" class="input-medium" /></td>
					<td>证件号</td>
					<td><form:input id="zjhtext" path="zjh" htmlEscape="false"
							maxlength="50" class="input-medium" /></td>
					<td>人员编码</td>
					<td><form:input path="pcode" htmlEscape="false" maxlength="10"
							class="input-medium" /></td>
					<td class="btns"><input id="btnSubmit" class="btn btn-primary"
						type="submit" value="查询" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <c:if
							test="${'610702' eq xzqhz or '610722' eq xzqhz}">
							<input id="button_readID" class="btn btn-primary" type="button"
								value="读卡查询" />
						</c:if></td>

					<td class="clearfix"></td>
				</c:if>
				<c:if test="${djlx eq '416' or djlx eq '809'}">
					<td><input type="checkbox" name="checkbox_person"
						id="allperson" onchange="allpersonquery()" /> <span
						class="help-inline"><font color="red">显示全部人员信息</font> </span></td>
				</c:if>
			</tr>
		</table>
	</form:form>

	<sys:message content="${message}" />
	<table id="contentTable" class="table table-bordered table-condensed">
		<thead>
			<tr>
				<c:if test="${'add' ne addPerson}">
					<th>选择</th>
				</c:if>
				<th>人员编码</th>
				<th>人员名称</th>
				<th>证件种类</th>
				<th>证件号</th>
				<th style="display: none;">证件类型代码</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="${'add' ne addPerson}">
						<td><input type="radio" name="radio_person"
							id="${regBasePerson.id}" value="${regBasePerson.isaudit}" /></td>
					</c:if>
					<td>${regBasePerson.pcode}</td>
					<td><c:if test="${not empty WO}">
							<a class="rymc" href="#"> ${regBasePerson.rymc} </a>
						</c:if> <c:if test="${empty WO}">
							<a class="rymc"
								href="${ctx}/reg/base/regBasePerson/form?id=${regBasePerson.id}&VIEWS=1">
								${regBasePerson.rymc} </a>
						</c:if></td>
					<td>${fns:getDictLabel(regBasePerson.zjzl, 'reg_bus_zjlx', '')}
					</td>
					<td>${regBasePerson.zjh}</td>
					<td style="display: none;">${regBasePerson.zjzl}</td>
					<td>${fns:getDictLabel(regBasePerson.sshy, 'reg_bus_sshy', '')}
					</td>
					<td>${regBasePerson.hjszss}</td>
					<td>${regBasePerson.dh}</td>
					<td>${regBasePerson.dz}</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}');">审核</a>
										<a
											href="${ctx}/reg/base/regBasePerson/form?id=${regBasePerson.id}&WO=1">修改</a>
										<a
											href="${ctx}/reg/base/regBasePerson/delete?id=${regBasePerson.id}&WO=${WO}"
											onclick="return confirmx('确认要删除该人员信息吗?', this.href)">删除</a>
									</c:if>
									<c:if test="${regBasePerson.isaudit eq '1'}">
										<a href="#" onclick="unauditPerson('${regBasePerson.id}');">反审核</a>
									</c:if>
									<c:if
										test="${regBasePerson.isaudit ne '0' and regBasePerson.isaudit ne '1'}">
										<a href="#" onclick="auditPerson('${regBasePerson.id}');">审核</a>
										<a
											href="${ctx}/reg/base/regBasePerson/form?id=${regBasePerson.id}&WO=1">修改</a>
										<a
											href="${ctx}/reg/base/regBasePerson/delete?id=${regBasePerson.id}&WO=${WO}"
											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>