4bd8592eaea4517c4bac473456a309e5721f6a95.svn-base 5.97 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 src="${ctxStatic}/gis/js/init.js" type="text/javascript"></script>
    <script src="${ctxStatic}/gis/lib/OpenLayers.js" type="text/javascript"></script>
    <script src="${ctxStatic}/gis/lib/zdclient.js" type="text/javascript"></script>
    <script src="${ctxStatic}/gis/lib/jquery.orbit-1.2.3.js" type="text/javascript"></script>    
    <script src="${ctxStatic}/gis/js/global.js" type="text/javascript"></script>
    <script src="${ctxStatic}/gis/js/config.js" type="text/javascript"></script>
     <link href="${ctxStatic}/gis/lib/jqueryEasyui/easyui.css" rel="stylesheet" type="text/css" />
    <link href="${ctxStatic}/gis/lib/jqueryEasyui/icon.css" rel="stylesheet" type="text/css" />
    <script src="${ctxStatic}/gis/lib/jqueryEasyui/jquery.easyui.min.js" type="text/javascript"></script>
    
	<script type="text/javascript">
	    var regBaseChxxData;
	    var TempTUceng;
		var TempID;
	    var zid,xmid,cid;
		$(document).ready(function() {
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		

		

		
		
		
		
		function deletezrz(id,bdcdyh){
			zid = id;
			TempID = id;
			var success = '0';
			if(confirm('确认后,将会删除该幢以及幢下的所有层、户以及测绘信息,确定删除吗?')){
				//先发送ajax请求看当前幢下有没有已经引用的户信息 
				$.ajax({ 
					type:"POST", 
					url:"${ctx}/reg/nf/regBusNf/isdelete", 
					cache: false,
					data:"zrzid="+zid,
				    async : false,
					success:function(modelmap){
						var yw = modelmap.yw;
						var fw = modelmap.fw;
						if(yw=='1'){
							alert("入库数据已进行登记,无法删除!");
							return;
						}
						if(fw=='1'){
							alert("请先删除楼栋信息所有信息,再进行此删除操作");
							return;
						}
						if(yw != '1' && fw !='1'){
							success = '1';
						}
					}
				});
				 if(success=='2')	{
					deleteZrzChxx(bdcdyh); 
				 }
			}
		}
      function deleteZrzChxx(bdcdyh) {
 				var queryStruct=new Zondy.Service.QueryFeatureStruct();
 				queryStruct.IncludeGeometry=true;
 				TempTUceng=actualSvrcfg.ZRZ;
 				var str="BDCDYH='"+bdcdyh +"'";
 				var queryParam=new Zondy.Service.QueryByLayerParameter(TempTUceng,{ 
 	                   // geometry: line,
 	                   resultFormat: "json",
 	                   struct:queryStruct,
 	                   where :  str
 	                   });
 				var queryService=new Zondy.Service.QueryLayerFeature(queryParam,
 						{
 					ip: actualSvrcfg.ip,        //IP地址
 					port: actualSvrcfg.port ,   //端口号
 					requestType:"POST"
 					});
 				queryService.query(queryquerydataSuccess);
 				
	    }
	    function queryquerydataSuccess(data)
		{
			
			 var chaxunvalue=data;
			 if(chaxunvalue.TotalCount>0)
			 {
				 var editDocFeature = new Zondy.Service.EditLayerFeature(TempTUceng, { ip: actualSvrcfg.ip,  port: actualSvrcfg.port });			   
				 editDocFeature.deletes(chaxunvalue.SFEleArray[0].FID, deleteonSuccess);			 
			 }
			 else
			 {
				  url = "${ctx}/reg/nf/regBusNf/fwdelete?zrzid="+TempID;
		         window.location.href=url;
			 }
			 
		}
	    function deleteonSuccess(data)
		{ 
			if (data == true) {
	         alert("已删除!");
	          url = "${ctx}/reg/nf/regBusNf/fwdelete?zrzid="+TempID;
			 window.location.href=url;
	          }
	        else {
	         alert("删除失败,请检查参数是否填写完整!");
	        }		 
		}

		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/reg/base/regBaseZrz/list?XMID=${XMID}">自然幢信息列表</a></li>
		<!--<shiro:hasPermission name="reg:base:regBaseZrz:edit"><li><a href="${ctx}/reg/base/regBaseZrz/form?XMID=${XMID}&DZ=${DZ}&XMMC=${regBaseXmmc}">自然幢信息添加</a></li></shiro:hasPermission>
	    <c:if test="${DZ ne 'DZ' }">
	    <shiro:hasPermission name="reg:base:regBaseZrz:edit"><li><a href="${ctx}/reg/base/regBaseZrz/form?XMID=${XMID}&auto=auto&XMMC=${regBaseXmmc}">自然幢信息添加(自动)</a></li></shiro:hasPermission>
	    </c:if>-->
	</ul>
	<form:form id="searchForm" modelAttribute="regBaseZrz" action="${ctx}/reg/nf/regBusNf/zrzlist" 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">
			<li>&nbsp;&nbsp;&nbsp;宗地代码:
				<form:input path="zddm" id="zddm" htmlEscape="false" maxlength="28" 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-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>宗地代码</th>
				<th>不动产单元号</th>
				<th>项目名称</th> 
				<th>建筑物名称</th>
				<th>宗地代码</th>
				<th hidden="hidden">自然幢号</th>
				<th>建筑面积</th>
				<th>占地面积</th>
				<th>总层数</th>
				
				
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="regBaseZrz">
			<tr>
				<td>
					${regBaseZrz.zddm}
				</td>
				<td>
					${regBaseZrz.bdcdyh}
				</td>
				<td>
					${regBaseZrz.xmmc}
				</td> 
				<td>
					${regBaseZrz.gzwmc}
				</td>
				<td>
					${regBaseZrz.zddm}
				</td>
				<td hidden="hidden">
					${regBaseZrz.zrzh}#
				</td>
				<td>
					${regBaseZrz.scjzmj}
				</td>
				<td>
					${regBaseZrz.zzdmj}
				</td>
				<td>
					${regBaseZrz.zcs}
				</td>
				<td>
					<a href="#" onclick="deletezrz('${regBaseZrz.id}','${regBaseZrz.bdcdyh}')">删除</a>
    				
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>