5f4347253756e822cdb66dc60c0d6fcf3077674e.svn-base 4 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() {
		$("#inputForm").validate({
			submitHandler: function(form){
				loading('正在提交,请稍等...');
				form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误,请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		var tableHtml ="",tableHtmlh ="";
		var objZdt = eval('${jsonZdt}');
		var objH =eval('${jsonH}');
		tableHtml+='<table border="1" id="zchtableid">';
		if(objZdt != undefined || objZdt != null || objZdt !=""){
			for(var i in objZdt){
				tableHtml+='<tr id="tr'+i+'zdt">';	   
				//tableHtml+='<td><input type="checkbox" name="zdt" id='+objZdt[i].id+'>'+objZdt[i].name+'<a href="${ctx}/reg/bus/regBusFz/openPic?path='+objZdt[i].path+'></td>';   
				var pathZY=objZdt[i].path;
				pathZY=pathZY.replace(/\//g, '\\/');
				tableHtml+='<td><input type="checkbox" name="zdt" id='+objZdt[i].id+' value="'+pathZY+'"><a href="${ctx}/reg/bus/regBusFz/openPic?path='+pathZY+'" target="_blank" >'+objZdt[i].name+'</td><td>'+objZdt[i].zddm+'</td>';   
			}
		}
		tableHtml=tableHtml+"</tr>";
	    tableHtml+= '</table>';
	    $("#tablezdt").append(tableHtml);
	    
	    tableHtmlh+='<table border="1" id="zchtableid">';
		if(objH != undefined || objH != null || objH !=""){
			for(var i in objH){
				tableHtmlh+='<tr id="tr'+i+'h">';	
				var pathZY=objH[i].path;
				pathZY=pathZY.replace(/\//g, '\\/');				
				tableHtmlh+='<td><input type="checkbox" name="h" id='+objH[i].id+' value="'+pathZY+'"><a href="${ctx}/reg/bus/regBusFz/openPic?path='+pathZY+'" target="_blank" >'+objH[i].name+'</td><td>'+objH[i].bdcdyh+'</td>';   		  
			}
		}      
	    tableHtmlh=tableHtmlh+"</tr>";
	    tableHtmlh+= '</table>';
	    $("#tableh").append(tableHtmlh);
	});
	function printPictures(){
		var $checkboxs= $('input[type=checkbox]:checked');
		var tempmyMap=new Array(),myMapcount=0;
		 if($checkboxs.length>0){
			for(var i=0;i<$checkboxs.length;i++){
				if($checkboxs[i].name=="zdt"){
					$checkboxs[i].parentNode.innerText;//name
					$checkboxs[i].defaultValue;//路径
					var myMap ={};
					 myMap.name=$checkboxs[i].parentElement.textContent;
					 myMap.path=$checkboxs[i].value;
					 myMap.leixing="zdt";
					 tempmyMap[myMapcount]=myMap;
					 myMapcount=myMapcount+1;
					
				}
				if($checkboxs[i].name=="h"){
					$checkboxs[i].parentNode.innerText;//name
					$checkboxs[i].defaultValue;//路径
					var myMap ={};
					myMap.name=$checkboxs[i].parentElement.textContent;
			        myMap.path=$checkboxs[i].value;
			        myMap.leixing="h";
					tempmyMap[myMapcount]=myMap;
					
					myMapcount=myMapcount+1;					
				}
			}
			picList= JSON.stringify(tempmyMap);
			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/regBusFz/getZDTFHT?picList="+ picList,"newwindow",
					"height="+ iHeight +",width="+ iWidth +",top="+ iTop +",left="+ iLeft +",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");
		   
		}
	}
	</script>
</head>
<body>
   <legend>宗地图列表</legend>
	<div  id="tablezdt">
        
    </div>
    <legend></legend>
    <legend>分户图列表</legend>
    <div  id="tableh">
        
    </div>
     <div  id="okButton">
        <input id="btnOK"  type="button" class="btn btn-primary" onclick="javascript:printPictures();" value="点击按钮确定要打印的图片"/>
    </div>
</body>

</html>