74e85040cf64f16baf3e125e4d1e07a5932a0312.svn-base 8.17 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 auditXm(id){
			if(confirm('审核后数据将正式生效,并且不能删除和修改。确认要审核该信息吗?')){
				url = "${ctx}/reg/base/regBaseXm/audit?id="+id+"&paraxmbh="+$("#xmbh").val()+"&paraxmmc="+$("#xmmc").val()+"&parajsdwmc="+$("#jsdwmc").val()+"&parasm="+$("#sm").val();
				window.location.href=url;
			}
		}
		function unauditXm(id){
			$.ajax({ 
				type:"POST", 
				url:"${ctx}/reg/base/regBaseZrz/isnounaudit", 
				cache: false,
				data:"id="+id+"&bj=4",
			    async : false,
				success:function(modelmap){
					if(modelmap.success == 0){
						if(confirm('反审核后数据恢复可删除和修改。确认要反审核该信息吗?')){
							url = "${ctx}/reg/base/regBaseXm/unaudit?id="+id+"&paraxmbh="+$("#xmbh").val()+"&paraxmmc="+$("#xmmc").val()+"&parajsdwmc="+$("#jsdwmc").val()+"&parasm="+$("#sm").val();
							window.location.href=url;
						}
					}else{
						alert(modelmap.msg);
						return;
					}
				}
			});
		}
		
		function deletexmlink(id){
			if(confirm('确认后,将会删除该项目以及项目下的所有幢、层、户信息,确定删除吗?')){
				//先发送ajax请求看当前项目下有没有已经引用的户信息 
				$.ajax({ 
					type:"POST", 
					url:"${ctx}/reg/base/regBaseXm/isdelete", 
					cache: false,
					data:"id="+id,
				    async : false,
					success:function(modelmap){
						var isdelete = modelmap.data;
						var ischxx  = modelmap.chxx;
						var istitle = modelmap.title;
						if(istitle == '1'){
							alert("当前项目不可以删除,其下有楼栋信息,请在权籍系统办理删除!");
							return;
						}else if(isdelete == "1"){ //不可以删除,其中有已被引用的户信息 
							alert("当前项目不可以删除,其下属有已被引用的户信息!");
							return;
						}else if(ischxx == "1"){//有楼栋坐标,先删除楼栋,再删除项目
							alert("当前项目下楼栋已导入坐标,请先删除楼栋!");
							return;
						}else{
							//url = "${ctx}/reg/base/regBaseXm/delete?id="+id;
							url = "${ctx}/reg/base/regBaseXm/deleteTitle?id="+id;
							window.location.href=url;
						}
					}
				});
			}
		}
		
		function Xmdaoru()
		{
			$.jBox($("#importXmForm").html(), {title:"导入数据", buttons:{"关闭":true}, 
				bottomText:"导入文件不能超过5M,仅允许导入“xls”或“xlsx”格式文件!"});
		}
		 //打开导入界面
		function importOpen(){
// 			var iWidth=1100;
// 	       	var iHeight=600;
// 	       	var iTop = (window.screen.height - 30 - iHeight) / 2;
// 	       	var iLeft = (window.screen.width - 10 - iWidth) / 2;
// 			window.open("/ODM/a/reg/base/regBaseXm/upload","项目导入",
// 					"height="+ iHeight +",width="+ iWidth +",top="+ iTop +",left="+ iLeft +",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");		
			var url = "${ctx}/reg/base/regBaseXm/upload";
			window.location = url;
		 }

	</script>
</head>
<body>
	<div id="importBox" class="hide">
		<form id="importXmForm" action="${ctx}/reg/base/regBaseXm/importFile" method="post" enctype="multipart/form-data"
			class="form-search" style="padding-left:20px;text-align:center;" onsubmit="loading('正在导入,请稍等...');"><br/>
			<input id="uploadFile" name="file" type="file" style="width:330px"/><br/><br/>  
			<input id="btnImportSubmit" class="btn btn-primary" type="submit" value="   导    入   " />
			<a href="#">下载模板</a>
		</form>
	</div>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/reg/base/regBaseXm/">项目(小区)信息列表</a></li>
		<c:if test="${zchinfo ne '1'}">
			<!--<shiro:hasPermission name="reg:base:regBaseXm:edit"><li><a href="${ctx}/reg/base/regBaseXm/form">项目(小区)信息添加</a></li></shiro:hasPermission>-->
		</c:if>
	</ul>
	<form:form id="searchForm" modelAttribute="regBaseXm" action="${ctx}/reg/base/regBaseXm/" 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}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		<table>
		<tr>
			<td>项目编码&nbsp;</td>
			<td>
				<form:input path="xmbh" id="xmbh" htmlEscape="false" maxlength="30" class="input-medium"/>
			</td>
			<td>&nbsp;&nbsp;&nbsp;项目名称&nbsp;</td>
			<td>
				<form:input path="xmmc" id="xmmc" htmlEscape="false" maxlength="80" class="input-medium"/>
			</td>
			<td>&nbsp;&nbsp;&nbsp;建设单位&nbsp;</td>
			<td>
				<form:input path="jsdwmc" id="jsdwmc" htmlEscape="false" maxlength="100" class="input-medium"/>
			</td>
			<td>&nbsp;&nbsp;&nbsp;说明&nbsp;</td>
			<td>
				<form:input path="sm"  id="sm" htmlEscape="false" maxlength="300" class="input-medium"/>&nbsp;&nbsp;
			</td>
			<td class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></td>
			<td class="btns"><input id="btnXmdaoru" class="btn btn-primary" type="button" value="项目小区导入" onclick="importOpen()"/></td>
			<td class="clearfix"></td>
		</tr>
	</table>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>项目编码</th>
				<th class="sort-column xmmc">项目名称</th>
				<th>建设单位名称</th>
				<th>证件种类</th>
				<th>证件号</th>
				<th>说明</th>
				<th>创建时间</th>
				<th>创建人</th>
				<th>最后修改时间</th>
				<th>最后修改人</th>
				<shiro:hasPermission name="reg:base:regBaseXm:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="regBaseXm">
			<tr>
				<shiro:hasPermission name="reg:base:regBaseXm:view">
					<td><a href="${ctx}/reg/base/regBaseXm/form?id=${regBaseXm.id}&view=1">
						${regBaseXm.xmbh}
					</a></td>
				</shiro:hasPermission>
				<td>
					${regBaseXm.xmmc}
				</td>
				<td>
					${regBaseXm.jsdwmc}
				</td>
				<td>
					${fns:getDictLabel(regBaseXm.zjzl, 'reg_bus_zjlx', '')}
				</td>
				<td>
					${regBaseXm.zjh}
				</td>
				<td>
					${regBaseXm.sm}
				</td>
				<td>
					<fmt:formatDate value="${regBaseXm.sqsj}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					${regBaseXm.creater}
				</td>
				<td>
					<fmt:formatDate value="${regBaseXm.updateDate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					${regBaseXm.updater}
				</td>
				<shiro:hasPermission name="reg:base:regBaseXm:edit"><td>
					<c:if test="${regBaseXm.isaudit ne '2'}">
	    				<c:if test="${regBaseXm.isaudit eq '0'}">
	    					<!--<a href="#" onclick="auditXm('${regBaseXm.id}');">审核</a>
	    					<a href="${ctx}/reg/base/regBaseXm/form?id=${regBaseXm.id}">修改</a>
							<a href="#" onclick="deletexmlink('${regBaseXm.id}')">删除</a>-->
	    				</c:if>
	    				<c:if test="${regBaseXm.isaudit eq '1'}">
							
								<a href="${ctx}/reg/base/regBaseZrz/list?XMID=${regBaseXm.id}&ywh=${ywh}">幢[栋]信息</a>
							
	    					<!--<a href="#" onclick="unauditXm('${regBaseXm.id}');">反审核</a>-->
	    				</c:if>
	    				<c:if test="${regBaseXm.isaudit ne '0' and regBaseXm.isaudit ne '1'}">
	    					<!--<a href="#" onclick="auditXm('${regBaseXm.id}');">审核</a>
	    					<a href="${ctx}/reg/base/regBaseXm/form?id=${regBaseXm.id}">修改</a>
							<a href="#" onclick="deletexmlink('${regBaseXm.id}')">删除</a>-->
	    				</c:if>
					</c:if>
					<c:if test="${regBaseXm.isaudit eq '2'}">
						
							<a href="${ctx}/reg/base/regBaseZrz/list?XMID=${regBaseXm.id}&ywh=${ywh}">幢[栋]信息</a>
						
						<a href="#">已引用</a>
					</c:if>
					<a href="#" onclick="deletexmlink('${regBaseXm.id}')">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>