35f678791ddde321221ff641a618675a7fe5c0b9.svn-base 6.09 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() {

	});

	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}

	function winBack() {
		var checkedCount = $("input[type='checkbox']:checked").length;
		if (checkedCount >= 2) {
			alert("只能选择一个权利人姓名!");
			return;
		}
		//选中一行后,获取宗地代码值 
		var qlrValue = $("input[name='checkbox_qlr']:checked").attr("id");
		if (window.opener) {
			fWindowText1 = window.opener.document.getElementById("qlrtext");
			fWindowText1.value = qlrValue;
			window.close();
		}
	}
	
	function btnSelectedQlr(){
		var checkedCount = $("input[type='checkbox']:checked").length;
		if (checkedCount <=0) {
			alert("请选择至少一个权利人姓名!");
			return;
		}
		//jquery获取复选框值    //定义一个数组    
        var chk_value =[];
      	//遍历每一个名字为interest的复选框,其中选中的执行函数    
        $('input[name="checkbox_qlr"]:checked').each(function(){
        	//将选中的值添加到数组chk_value中    
        	chk_value.push($(this).attr("id"));
        });
       var qlrids =  chk_value.join(";")
       
       $.ajax({
			type:"POST", //请求方式 
			url:"${ctx}/reg/bus/regBusQlr/getByIds", //请求路径 
			cache: false,   //(默认: true,dataType为script和jsonp时默认为false) jQuery 1.2 新功能,设置为 false 将不缓存此页面。 
			//data:"zddm="+ zddmValue.trim() +"&id="+idValue.trim(),  //传参 
			data:"ids="+qlrids.trim(),  //传参 
			async: false,
			success:function(data){
				if (window.opener) {
					var fWindowText1 = window.opener.document.getElementById("qlrmc");
					fWindowText1.value = data.qlrmcs;
					
					fWindowText1 = window.opener.document.getElementById("zjlx");
					fWindowText1.value = data.zjzls;
					
					fWindowText1 = window.opener.document.getElementById("sfzh");
					fWindowText1.value = data.zjhs;
					
					fWindowText1 = window.opener.document.getElementById("txdz");
					fWindowText1.value = data.dzs;
					
					fWindowText1 = window.opener.document.getElementById("yzbm");
					fWindowText1.value = data.ybs;
					
					fWindowText1 = window.opener.document.getElementById("dwxz");
					fWindowText1.value = data.gzdws;

					window.close();
				}
			}
		});
	}

	function winOpenQlr(id) {
		//弹出窗口的宽度; 
		var iWidth = 1100;
		//弹出窗口的高度;
		var iHeight = 600;
		//获得窗口的垂直位置 
		var iTop = (window.screen.height - 30 - iHeight) / 2;
		//获得窗口的水平位置 
		var iLeft = (window.screen.width - 10 - iWidth) / 2;
		window .open("${ctx}/reg/bus/regBusQlr/form?id=" + id + "&VIEWS=1&DJLX=${DJLX}", "newwindow", "height=" + iHeight + ",width=" + iWidth + ",top=" + iTop + ",left=" + iLeft + ",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");
	}

	function winOpenUpdateQlr(id) {
		//弹出窗口的宽度; 
		var iWidth = 1100;
		//弹出窗口的高度;
		var iHeight = 600;
		//获得窗口的垂直位置 
		var iTop = (window.screen.height - 30 - iHeight) / 2;
		//获得窗口的水平位置 
		var iLeft = (window.screen.width - 10 - iWidth) / 2;
		window.open("${ctx}/reg/bus/regBusQlr/form?id=" + id + "&YWH=${YWH}&SXBGLX=${SXBGLX}&DJLX=${DJLX}", "newwindow", "height=" + iHeight + ",width=" + iWidth + ",top=" + iTop + ",left=" + iLeft + ",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");
	}

	function reloadqlr() {
		var optype = "${optype}";
		if (window.opener) {
			//新增 
			if (optype == undefined || optype == null || optype == "") {
				window.opener.document.qlrframe.location.reload();
			} else { //更新 
				window.opener.document.qlrframe.location.reload();
			}
			window.close();
		}
	}
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="javascript:void(0);">权利人信息列表</a></li>
		<shiro:hasPermission name="reg:bus:regBusQlr:edit">
			<c:if test="${not empty QLRXXXZ}">
			<li><a href="${ctx}/reg/bus/regBusQlr/form?QLRXXXZ=${QLRXXXZ}&YWH=${YWH}&YSDM=${YSDM}&WO=1&QLR=${QLR}&ZL=${ZL}&QLRDH=${QLRDH}&QLRYJ=${QLRYJ}"">权利人信息添加</a></li>
			</c:if>
		</shiro:hasPermission>
	</ul>
	<c:if test="${not empty WO}">
		<br>
		<input id="reLoadQlr" class="btn btn-primary" type="button" onclick="reloadqlr();" value="退出列表" />
		<br>
		<br>
	</c:if>
	<c:if test="${not empty QLRXXXZ}">
		<br>
		<input id="btnSelected" class="btn btn-primary" type="button" onclick="btnSelectedQlr();" value="选择权利人" />
		<br>
		<br>
	</c:if>
	<sys:message content="${message}" />
	<table id="contentTable"
		class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<c:if test="${not empty QLRXXXZ}">
					<th>选择</th>
				</c:if>
				<th>顺序号</th>
				<c:if test="${empty WO}">
				<th>权利人名称</th>
				</c:if>
				<th>电话</th>
				<th>地址</th>
				<th>证件号</th>
				<th>权利人类型</th>
				<th>共有情况</th>
				<th>发证机关</th>
				<th>所属行业</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="regBusQlr">
				<tr>
					<c:if test="${not empty QLRXXXZ}">
						<td><input type="checkbox" name="checkbox_qlr"  id="${regBusQlr.id}"   value=""  /></td>
					</c:if>
					<td>${regBusQlr.sxh}</td>
					<c:if test="${empty WO}">
					<td>
						<shiro:hasPermission name="reg:bus:regBusQlr:view">
								<a href="javascript:void(0);" onclick="winOpenQlr('${regBusQlr.id}');"> ${regBusQlr.qlrmc}</a>
						</shiro:hasPermission>	
					</td>
					</c:if>
					<td>${regBusQlr.dh}</td>
					<td>${regBusQlr.dz}</td>
					<td>${regBusQlr.zjh}</td>
					<td>${fns:getDictLabel(regBusQlr.qlrlx, 'reg_bus_qlrlx', '')}</td>
					<td>${regBusQlr.gyqk}</td>
					<td>${regBusQlr.fzjg}</td>
					<td>${fns:getDictLabel(regBusQlr.sshy, 'reg_bus_sshy', '')}</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<!-- 
	<div class="pagination">${page}</div>
	 -->
</body>
</html>