9d29b2362a956a9e4ab7033e5ac1f0c84d994df8.svn-base 16.3 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 checkUnfined(value){
			if(typeof(value)=='undefined'){
		 		return ""; 
		 	}
		 	return value;
		}
		//CheckBox 全选 |注意:当checkbox disabled时不能进行操作
		function selectAll(){
			var a = document.getElementsByTagName("input");
			for(var i = 0;i<a.length;i++){
				if(a[i].type == "checkbox" && a[i].disabled != true){ 
					a[i].checked = true;
				}
			}
		}
		//全不选择  |注意:当checkbox disabled时不能进行操作
		function unselectAll(){
			var a = document.getElementsByTagName("input");
			for(var i = 0;i<a.length;i++){
				if(a[i].type == "checkbox" && a[i].disabled != true){
					a[i].checked = false;
				}
			}
		}
		//选中一层数据  |注意:当checkbox disabled时不能进行操作
		function selectC(ch){
			$("#"+ch).find("input[type=checkbox]").each(function() {
				//当checkbox disabled时不进行操作,直接跳出 
				if($(this).prop("disabled")){
					return true; //跳出当前循环,进入下一个循环;相当于 javascript 中的 continue 效果
				}
				if($(this).is(":checked")) {
	            	$(this).attr("checked", false);
				}else{
					$(this).attr("checked", true);
				}
	        });
		}
		
		var chk_value =[];
		//选择房屋信息并提交选择的房屋ID到后台进行处理 
		function choiceFwxx(){
			$('input[name="fwxx"]:checked').each(function(){
				chk_value.push($(this).val());
			});
			var url;
			var djlx = "${DJLX}";
			if(chk_value.length == 0){
				alert('你还没有选择任何内容!');
				chk_value =[];
				return;
			}
			document.getElementById("btnunSelecnexttAll").disabled="disabled";
			var selectedIDs = chk_value.join(';');
			//返回到不同的权属Form页面
			//url= "${ctx}/reg/bus/regBusFdcq2/LpcfnextHouseForm?YWH=${ywh}&zh=${ZH}&ZID=${ZID}&WO=1&YSDM=2001010000&djlx=${DJLX}&selectedIDs="+selectedIDs+"&bj=1"
			url =  "${ctx}/reg/bus/regBusCfdj/lpycfzxform?YWH=${ywh}&zh=${ZH}&ZID=${ZID}&WO=1&YSDM=2001010000&djlx=907&selectedIDs="+selectedIDs+"&bj=1";
			window.location = url;
		}
		
		//动态添加附加户的详细信息 
		function innerDetailInfo(tbtdObj, hobject){
			var $v=$(tbtdObj); //转化为jQuery对象 
			var innerInfo = "<div id='hdetailinfo' class='hdetailinfo'>"+
						"<ul>"+
							"<li class='hdetailhuhao'>【不动产单元号】:"+hobject.bdcdyh+"</li>"+
							"<li class='hdetailhuhao'>【室号部位】:"+hobject.shbw+"</li>"+
						"</ul>"+
						"<ul>"+
							"<li>【房屋编码】:"+hobject.fwbm+"</li>"+
							"<li>【自然幢号】:"+hobject.zrzh+"</li>"+
							"<li>【建筑物名称】:"+hobject.jgzwmc+"</li>"+
							"<li>【层号】:"+hobject.ch+"</li>"+
						"</ul>"+
						"<ul>"+
							"<li>【坐落】:"+hobject.zl+"</li>"+
							"<li class='mjdw'>【面积单位】:"+hobject.mjdw+"</li>"+
						"</ul>"+
						"<ul>"+
							"<li>【总层数】:"+hobject.sjcs+"</li>"+
							"<li>【户号】:"+hobject.hh+"</li>"+
							"<li class='hx'>【户型】:"+hobject.hx+"</li>"+
							"<li class='hxjg'>【户型结构】:"+hobject.hxjg+"</li>"+
						"</ul>"+
						"<ul>"+
							"<li class='fwyt1'>【房屋用途】:"+hobject.fwyt1+"</li>"+
							"<li>【建筑面积 】:"+checkUnfined(hobject.scjzmj)+"</li>"+
							"<li>【套内建筑面积】:"+checkUnfined(hobject.sctnjzmj)+"</li>"+
							"<li>【分摊建筑面积】:"+checkUnfined(hobject.scftjzmj)+"</li>"+
						"</ul>"+
						"<ul>"+
							"<li>【地下部分建筑面积】:"+checkUnfined(hobject.scdxbfjzmj)+"</li>"+
							"<li>【其它建筑面积】:"+checkUnfined(hobject.scqtjzmj)+"</li>"+
							"<li>【分摊系数】:"+checkUnfined(hobject.scftxs)+"</li>"+
							"<li>【共有土地面积】:"+checkUnfined(hobject.gytdmj)+"</li>"+
						"</ul>"+
						"<ul>"+
							"<li>【分摊土地面积】:"+checkUnfined(hobject.fttdmj)+"</li>"+
							"<li>【独用土地面积】:"+checkUnfined(hobject.dytdmj)+"</li>"+
							"<li class='fwlx'>【房屋类型】:"+hobject.fwlx+"</li>"+
							"<li class='fwxz'>【房屋性质】:"+hobject.fwxz+"</li>"+
						"</ul>"+
						"<ul>"+
						"<li class='rights'>【权属状态】:"+hobject.rights+"</li>"+
							"<li class='isdiya'>【抵押状态】:"+hobject.isdiya+"</li>"+
							"<li class='ischafeng'>【查封状态】:"+hobject.ischafeng+"</li>"+
							"<li class='isyiyi'>【异议状态】:"+hobject.isyiyi+"</li>"+
						"</ul>"+
						"<ul>"+
							"<li class='objid' style='display:none'>"+hobject.id+"</li>"+
						"</ul>"+
					"</div>";
			$v.find(".hhao").append(innerInfo);
		}
		
		//动态添加checkbox 
		function innerCheckBox(tbtdObj, hobject){
			var $v=$(tbtdObj); //转化为jQuery对象 
			var djxl = "${DJLX}";
			var innerCheckBox = "<div class='checkboxc'><input id='"+hobject.id+"' name='fwxx' "+
									"value='"+hobject.id+"' class=''"+
									"type='checkbox'></div>&nbsp;&nbsp;";
			var innerunCheckBox = "<div class='checkboxc'><input id='"+hobject.id+"' disabled='disabled' name='fwxx' "+
									"value='"+hobject.id+"' class=''"+
									"type='checkbox'></div>&nbsp;&nbsp;";
			if(hobject.rights == "0"  && hobject.ischafeng != "0" && hobject.isyiyi == "0" && hobject.isaudit == "1"){
				$v.find(".isinfo").append(innerCheckBox);
			}else{
				$v.find(".isinfo").append(innerunCheckBox);
			}
		}
		
		window.onload = function(){
			//给楼盘表中填值 
			//开始根据后台返回的所有户信息,进行遍历填值  
			var h_json = ${fns:toJson(regBaseAllHList)};
			for(var i = 0; i < h_json.length; i++){
			    var positionxy_c = h_json[i].xyposition; ////户坐标位置 [获取到层房序号,也就是一层上的户型号,获取到3、4位]
				var begin_c = h_json[i].beginc; ////户其实层 
				var end_c = h_json[i].endc; ////户终止层 
				var shbw_c = h_json[i].shbw; //室号部位取值 
				var step_c = end_c - begin_c + 1; //户所跨的层数 
				var hhao = h_json[i].hh;//户 号 
				if(begin_c<0 && end_c>0){ //跨层有负层时 
					step_c = step_c - 1; 
				}
				var colvalue = "01";//这里的colvalue值需要考虑到100层【10001】以上,1000层以上就不考虑了
				if(positionxy_c.indexOf("-") != -1){
					positionxy_c = positionxy_c.replace("-", "");
				}
				if(positionxy_c.length>=6){//100100 
					colvalue = parseInt(positionxy_c.substring(3,6));
				}else if(positionxy_c.length>=4){//10001 1100 
					if(end_c >= 100){
						colvalue = parseInt(positionxy_c.substring(3,5));
					}else{
						//竖向层小于100 时;横向大于等于100 时 
						if(hhao >= 100){// 10100 - 99100 
							if(end_c >= 10){
								colvalue = parseInt(positionxy_c.substring(2,5));
							}else{
								colvalue = parseInt(positionxy_c.substring(1,4));
							}
						}else{
							colvalue = parseInt(positionxy_c.substring(2,4));
						}
					}
				}else if(positionxy_c.length>=3){
					if(end_c >= 100){
						colvalue = parseInt(positionxy_c.substring(1,4));
					}else{
						colvalue = parseInt(positionxy_c.substring(1,3));
					}
				} 
				if(begin_c == end_c){ //不跨层填值处理 
					fillTdWithoutStep(end_c, colvalue, shbw_c, h_json[i]);
				}else{
					fillTdWithStep(end_c, begin_c, colvalue, step_c, shbw_c, h_json[i]);
				}
			}
			
			//循环填值完后,再把当前表格循环一次,如果发现户坐标位置一样的话 就纵向合并 
			vert_merger();
			
			$('.hdetailinfo_icon').hover(function(){
				//开始发送ajax请求 
				var objid = $(this).next().next().next().children().children("li[class='objid']").html();
				var $domul = $(this).next().next().next().children();
				$.ajax({
					type:"POST", 
					url:"${ctx}/reg/base/regBaseH/getHKVInfo", 
					cache: false,
					data:"id="+objid,
				    async : false,
					success:function(modelmap){
						//开始赋值 
						$domul.children("li[class='mjdw']").html("【面积单位】:"+modelmap.mjdw);
						$domul.children("li[class='hx']").html("【户型】:"+modelmap.hx);
						$domul.children("li[class='hxjg']").html("【户型结构】:"+modelmap.hxjg);
						$domul.children("li[class='fwyt1']").html("【房屋用途】:"+modelmap.fwyt1);
						$domul.children("li[class='fwlx']").html("【房屋类型】:"+modelmap.fwlx);
						$domul.children("li[class='fwxz']").html("【房屋性质】:"+modelmap.fwxz);
						$domul.children("li[class='isdiya']").html("【抵押状态】:"+modelmap.isdiya);
						$domul.children("li[class='ischafeng']").html("【查封状态】:"+modelmap.ischafeng);
						$domul.children("li[class='isyiyi']").html("【异议状态】:"+modelmap.isyiyi);
						$domul.children("li[class='iszy']").html("【现房状态】:"+modelmap.isdiya);
						$domul.children("li[class='rights']").html("【权属状态】:"+modelmap.rights);
					}
				});
				$(this).css("cursor","hand");
				$(this).next().next().next().addClass('hDetailInfoOver');
			},function(){
			     //鼠标离开时移除divOver样式 
			    $(this).next().next().next().removeClass('hDetailInfoOver'); 
			});
		};
		
		//带有跨行的户信息填值 - 除过行表头和列表头 
		function fillTdWithStep(rc,rm,col,sl,htm,hobject){
			var tb = document.getElementById("zchtableid");
			var x1;
			for (var ii=1;ii<tb.rows.length;ii++){
				px = parseInt(tb.rows[ii].cells[0].innerText);//每行的第一列层值 
				if (px==rc) {
					x1=ii;
				}
				if (px<rc & px>=rm) {
					fillTdWithoutDifferenceColorAndHtml(tb.rows[ii].cells[col+1], hobject, htm);
					//tb.rows[ii].cells[col+1].innerHTML = "<div class='hhao'><div class='hdetailinfo_icon icon-th-list'></div>"+htm+"</div>";
					//tb.rows[ii].cells[col+1].setAttribute("style","background-color:#D6EEF3");
					//加详细信息 
					innerDetailInfo(tb.rows[ii].cells[col+1], hobject);
					//加选择信息 
					innerCheckBox(tb.rows[ii].cells[col+1], hobject);
				}
			}
			fillTdWithoutDifferenceColorAndHtml(tb.rows[x1].cells[col+1], hobject, htm);
			//tb.rows[x1].cells[col+1].innerHTML = "<div class='hhao'><div class='hdetailinfo_icon icon-th-list'></div>"+htm+"</div>";
			//tb.rows[x1].cells[col+1].setAttribute("style","background-color:#D6EEF3");
			innerDetailInfo(tb.rows[x1].cells[col+1], hobject);
			innerCheckBox(tb.rows[x1].cells[col+1], hobject);
		}
		
		//只有一层的情况填值  - 除过行表头和列表头 
		//终止层、层房序号、房名称 
		function fillTdWithoutStep(row,col,htm,hobject){
			var tb = document.getElementById("zchtableid");
			for (var ii=1;ii<tb.rows.length;ii++) {
				px=parseInt(tb.rows[ii].cells[0].innerText);
				if (px==row) {
					fillTdWithoutDifferenceColorAndHtml(tb.rows[ii].cells[col+1], hobject, htm);
					//tb.rows[ii].cells[col+1].innerHTML = "<div class='hhao'><div class='hdetailinfo_icon icon-th-list'></div>"+htm+"</div>";
					//tb.rows[ii].cells[col+1].setAttribute("style","background-color:#D6EEF3");
					innerDetailInfo(tb.rows[ii].cells[col+1], hobject);
					innerCheckBox(tb.rows[ii].cells[col+1], hobject);
				}
			}
		}
		
		function vert_merger(){
			var tb = document.getElementById("zchtableid");
			var xx,yy,s1;
			var collh=tb.rows[0].cells.length-1;//列数 
			var rowlh=tb.rows.length-1;//行数 
			for(var jj=collh;jj>=2;jj--){//从最大列数递减开始遍历 
				s1=1;
				for(var ii=rowlh;ii>1;ii--){//从最大行数递减开始遍历 
// 					xx = tb.rows[ii].cells[jj].innerText;  //获取要合并的上层单元格的值 
// 					yy = tb.rows[ii-1].cells[jj].innerText;//获取要合并的下层单元格的值 
					xx = tb.rows[ii].cells[jj].innerHTML;  //获取要合并的上层单元格的值 
					yy = tb.rows[ii-1].cells[jj].innerHTML;//获取要合并的下层单元格的值 
					if(xx == yy&&xx!==""){
						tb.rows[ii].deleteCell(jj);//删除上层的单元格 
						s1++;//计算需要合并的行数 
						tb.rows[ii-1].cells[jj].rowSpan = s1;//把需要合并的行数赋值给 rowspan,完成层的上下合并 
					}else{
						s1=1;
					}
				}
			}
		}
		
		function fillTdWithoutDifferenceColorAndHtml(td, hobject, htm){
			if(hobject == undefined || hobject == null || td == undefined || td == null){
				return;
			}
			var iscf = "<div class='isnotcf' title='未查封'></div>";
			var isyy = "<div class='isnotcf' title='未异议'></div>";
			var isdy = "<div class='isnotcf' title='未抵押'></div>";
			var iszy = "<div class='isnotcf' title='未转移'></div>";
			if(hobject.ischafeng != "0" && hobject.ischafeng != "" && hobject.ischafeng != null){
				iscf = "<div class='iscf' title='已查封'></div>";
			}
			if(hobject.isyiyi == "1"){
				isyy = "<div class='isyy' title='已异议'></div>";
			}
			if(hobject.isdiya == "1"){
				isdy = "<div class='isdy' title='已抵押'></div>";
			}
			if(hobject.iszy == "1"){
				iszy = "<div class='iszy' title='已转移'></div>";
			}
			if(hobject.rights == "1"){
				td.innerHTML = "<div class='hhao hhao_qf'><div class='hdetailinfo_icon icon-book'></div><div class='shbwinfo'><span>"+htm+"</span></div><div class='isinfo'>"+iscf+isyy+isdy+iszy+"</div></div>";
			}else if(hobject.rights == "2"){
				td.innerHTML = "<div class='hhao hhao_xf'><div class='hdetailinfo_icon icon-book'></div><div class='shbwinfo'><span>"+htm+"</span></div><div class='isinfo'>"+iscf+isyy+isdy+iszy+"</div></div>";
			}else {
				td.innerHTML = "<div class='hhao'><div class='hdetailinfo_icon icon-book'></div><div class='shbwinfo'><span>"+htm+"</span></div><div class='isinfo'>"+iscf+isyy+isdy+iszy+s"</div></div>";
			}
		}
		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="#">楼盘信息表</a></li>
	</ul>
	<sys:message content="${message}"/>
	<div class="form-horizontal">
	<div class="current_fwinfo">当前楼盘信息:项目【${XMMC}】,建筑物【${JZWMC}】,实测建筑面积【${ZSCJZMJ}】㎡;一共【${cCount}】层,【${hCount}】户</div>
	<input id="btnSelectAll" class="btn btn-primary" type="button"  value="全   选" onclick="javascript:selectAll();"/>&nbsp;&nbsp;
	<input id="btnunSelectAll" class="btn btn-primary" type="button"  value="全不选" onclick="javascript:unselectAll();"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<input id="btnunSelecnexttAll" class="btn btn-primary" type="button"  value="下一步" onclick="javascript:choiceFwxx();"/>&nbsp;&nbsp;&nbsp;
					
	<table class="zchtable-form" id="zchtableid">
		<tr>
			<td><div class="chao">层5号</div></td>
			<td><div class="cgaik">层概况</div></td>
			<c:forEach items="${requestScope.intS}" var="intS" varStatus="statusmch">
				<td><div class="cinfo">${intS}</div></td>
			</c:forEach>
		</tr>
		<c:forEach items="${requestScope.regBaseCList}" var="regBaseC" varStatus="status">
			<tr id="${regBaseC.ch}">
				<td><div class="chao">${regBaseC.sjc} &nbsp;&nbsp;<input id="btnSelectC" class="btn btn-primary btn-xs" type="button"
						value="(反)选" onclick="javascript:selectC('${regBaseC.ch}');"/>
				    </div>
				</td>
				<td>
					<div class="cgaik">
						<fmt:formatNumber value="${regBaseC.chjzmj}" 
			                pattern="#0.##" 
			                var="formattedNumber"/>
						${formattedNumber}&nbsp;
					</div>
				</td>
				<c:set value="${'option'}${status.index}" var="option" />
				<c:forEach items="${requestScope.intS}" var="intS" varStatus="statush">
					<td>
					</td>
				</c:forEach>
			</tr>
		</c:forEach>
	</table>
	<br>
	<div class="loupantuli">
		<div class='isnotcf' title='未抵押、查封、异议和转移'></div>
		<div class="isnotregdyyycftitle">&nbsp;未抵押、查封、异议、转移和未登记</div>
		<div class='isdy' title='已抵押'></div>
		<div class="isdytitle">&nbsp;已抵押</div>
		<div class='isyy' title='已异议'></div>
		<div class="isyytitle">&nbsp;已异议</div>
		<div class='iscf' title='已查封'></div>
		<div class="iscftitle">&nbsp;已查封</div>
		<div class='iszy' title='已转移'></div>
		<div class="iszytitle">&nbsp;已转移</div>
		<div class='isqifang' title='期房'></div>
		<div class="isqifnagtitle">&nbsp;期房</div>
		<div class='isxianfang' title='现房'></div>
		<div class="isxianfangtitle">&nbsp;现房</div>
	</div>
	<br><br>
	<input id="btnCancel" class="btn" type="button" value="返回幢列表" onclick="history.go(-1)"/>
	</div> 
</body>
</html>