printHousejfView.jsp 14 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 language="javascript" src="${ctxStatic}/lodop/LodopFuncs.js" type="text/javascript"></script>
	<script type="text/javascript" src="${ctxStatic}/jquery/jquery-1.9.1.min.js"></script>  
    <script type="text/javascript" src="${ctxStatic}/jquery/qrcode.js"></script>  
	<object id="LODOP_OB"  classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA"  width=0  height=0>
		<embed id="LODOP_EM"  type="application/x-print-lodop"  width=0  height=0></embed>
	</object>
	<script type="text/javascript">
		$(document).ready(function() {});
	</script>
	<script type="text/javascript">
	
		var LODOP; //声明为全局变量
		
		//直接打印
		function print() {		
			createPrintPage();
			LODOP.PRINT();		
		};  
		
		//选择打印机
		function printA() {		
			createPrintPage();
			LODOP.PRINTA();		
		};  	
		
		//打印预览
		function preview() {
			createPrintPage();
			LODOP.SET_SHOW_MODE("BKIMG_IN_PREVIEW",1);
			LODOP.PREVIEW();		
		};		
		
		//打印维护
		function setup() {		
			createPrintPage();
			LODOP.PRINT_SETUP();		
		};	
		
		//打印设计
		function design() {		
			createPrintPage();
			LODOP.PRINT_DESIGN();		
		};	
		
		//二维码乱码
		function utf16to8(str) {  
            var out, i, len, c;  
            out = "";  
            len = str.length;  
            for (i = 0; i < len; i++) {  
                c = str.charCodeAt(i);  
                if ((c >= 0x0001) && (c <= 0x007F)) {  
                    out += str.charAt(i);  
                } else if (c > 0x07FF) {  
                    out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));  
                    out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));  
                    out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));  
                } else {
                    out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));  
                    out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));  
                }  
            }  
            return out;  
        }  
		
		//创建打印数据
		function createPrintPage() {
			//生成二维码
			var info="${YWH}";
			var content = utf16to8(info); 
			var qr = qrcode(7, 'M');  
			qr.addData(content);  
			qr.make();  
			var sqhs = '${sqhs}';
			var gbhs = '${gyrsl}';
			LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
	        LODOP.PRINT_INIT("不动产登记缴费单");
	        LODOP.PRINT_INITA(0,-20,900,800,"套打登记受理通知单的模板");
	        LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "A4");
	        LODOP.ADD_PRINT_TEXT(20, 300, 500, 30, "不动产登记缴费单")
	        LODOP.SET_PRINT_STYLEA(1, "ItemType", 1);
	        LODOP.SET_PRINT_STYLEA(1, "FontSize", 20);
	        LODOP.ADD_PRINT_TEXT(70,160,70,20,"登记种类:");
	        LODOP.ADD_PRINT_TEXT(100,160,70,20,"业务细类:");
	        LODOP.ADD_PRINT_TEXT(130,160,70,20,"业务编号:");
	        LODOP.ADD_PRINT_TEXT(70,230,70,20,"${DJDL}");//登记大类
	        LODOP.ADD_PRINT_TEXT(100,230,170,20,"${DJXL}");//登记小类
	        LODOP.ADD_PRINT_TEXT(130,230,120,20,"${YWH}");//业务便号
	        if(gbhs == ''){
		        if(sqhs == 2){
			        
					if('${DJXL}'.indexOf('抵押') != -1){
						LODOP.ADD_PRINT_TEXT(430,70,175,20,"收款银行(章):");
			        LODOP.ADD_PRINT_TEXT(430,247,70,20,"收款人:");
			        LODOP.ADD_PRINT_TEXT(430,440,70,20,"复核人:");
			        LODOP.ADD_PRINT_TEXT(430,620,70,20,"收款日期:");
                      LODOP.ADD_PRINT_TEXT(410,70,300,60,"提示:不动产抵押登记费用由抵押权人缴纳");//提示
                      LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
             }
			 else{
				 LODOP.ADD_PRINT_TEXT(400,70,175,20,"收款银行(章):");
			        LODOP.ADD_PRINT_TEXT(400,247,70,20,"收款人:");
			        LODOP.ADD_PRINT_TEXT(400,440,70,20,"复核人:");
			        LODOP.ADD_PRINT_TEXT(400,620,70,20,"收款日期:");
			 }
		        }else{
		        	
					if('${DJXL}'.indexOf('抵押') != -1){
						LODOP.ADD_PRINT_TEXT(460+(sqhs-4)*20,70,175,20,"收款银行(章):");
			        LODOP.ADD_PRINT_TEXT(460+(sqhs-4)*20,247,70,20,"收款人:");
			        LODOP.ADD_PRINT_TEXT(460+(sqhs-4)*20,440,70,20,"复核人:");
			        LODOP.ADD_PRINT_TEXT(460+(sqhs-4)*20,620,70,20,"收款日期:");
                      LODOP.ADD_PRINT_TEXT(440+(sqhs-4)*20,70,300,60,"提示:不动产抵押登记费用由抵押权人缴纳");//提示
                      LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
             }
			 else{
				LODOP.ADD_PRINT_TEXT(430+(sqhs-4)*20,70,175,20,"收款银行(章):");
			        LODOP.ADD_PRINT_TEXT(430+(sqhs-4)*20,247,70,20,"收款人:");
			        LODOP.ADD_PRINT_TEXT(430+(sqhs-4)*20,440,70,20,"复核人:");
			        LODOP.ADD_PRINT_TEXT(430+(sqhs-4)*20,620,70,20,"收款日期:"); 
			 }
		        }
	        }else{
		        if(sqhs == 2){
			       
					if('${DJXL}'.indexOf('抵押') != -1){
						LODOP.ADD_PRINT_TEXT(450,70,175,20,"收款银行(章):");
			        LODOP.ADD_PRINT_TEXT(450,247,70,20,"收款人:");
			        LODOP.ADD_PRINT_TEXT(450,440,70,20,"复核人:");
			        LODOP.ADD_PRINT_TEXT(450,620,70,20,"收款日期:");
                      LODOP.ADD_PRINT_TEXT(430,70,300,60,"提示:不动产抵押登记费用由抵押权人缴纳");//提示
                      LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
             }
			 else{
				 LODOP.ADD_PRINT_TEXT(420,70,175,20,"收款银行(章):");
			        LODOP.ADD_PRINT_TEXT(420,247,70,20,"收款人:");
			        LODOP.ADD_PRINT_TEXT(420,440,70,20,"复核人:");
			        LODOP.ADD_PRINT_TEXT(420,620,70,20,"收款日期:"); 
			 }
		        }else{
		        	
					if('${DJXL}'.indexOf('抵押') != -1){
						LODOP.ADD_PRINT_TEXT(450+(sqhs-2)*20,70,175,20,"收款银行(章):");
			        LODOP.ADD_PRINT_TEXT(450+(sqhs-2)*20,247,70,20,"收款人:");
			        LODOP.ADD_PRINT_TEXT(450+(sqhs-2)*20,440,70,20,"复核人:");
			        LODOP.ADD_PRINT_TEXT(450+(sqhs-2)*20,620,70,20,"收款日期:");
                      LODOP.ADD_PRINT_TEXT(430+(sqhs-2)*20,70,300,60,"提示:不动产抵押登记费用由抵押权人缴纳");//提示
                      LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
             }
			 else{
				LODOP.ADD_PRINT_TEXT(420+(sqhs-2)*20,70,175,20,"收款银行(章):");
			        LODOP.ADD_PRINT_TEXT(420+(sqhs-2)*20,247,70,20,"收款人:");
			        LODOP.ADD_PRINT_TEXT(420+(sqhs-2)*20,440,70,20,"复核人:");
			        LODOP.ADD_PRINT_TEXT(420+(sqhs-2)*20,620,70,20,"收款日期:"); 
			 }
		        }
	        }
		
                  
	        LODOP.ADD_PRINT_IMAGE(41,580,110,110,qr.createImgTag());//二维码
	        LODOP.ADD_PRINT_TABLE(160, 65, 900, 800, $("#printsltzdiv").html());
		}

		function closeWin(){
			window.close();
		}
	</script>
</head>
<body>
	<div class="control-group"  align="center">
		<fieldset>
			<legend><div align="center" style="font-size:14px;font-weight: bold">${DJXL}</div></legend>
			<table width="400" border="1" cellpadding="3" cellspacing="0" style="font-family:宋体">
				<tr>
				    <td height="25"><div align="center">业务号</div></td>
				    <td height="25" colspan="3">&nbsp;${YWH}</td>
				  </tr>
				  <tr>
				    <td height="25"><div align="center">申请人</div></td>
				    <td height="25" colspan="3">&nbsp;${TZRXM}</td>
				  </tr>
				  <tr>
				    <td height="25"><div align="center">受托人</div></td>
				    <td height="25" >&nbsp;${STR}</td>
				    <td height="25"><div align="center">联系电话</div></td>
				    <td height="25">&nbsp;${TZRYDDH}</td>
				  </tr>
				  <tr>
				    <td height="28"><div align="center">受理日期</div></td>
				    <td height="28" colspan="3">&nbsp;
				    	${SLSJ}
				    </td>
				  </tr>
			</table> 
		</fieldset>
	</div>
	<div class="control-group"  style="height: 25px;padding-top: 5px" align="center">
		<input id="btnClose" class="btn btn-primary"  type="button"  onclick="closeWin();"  value="关闭"/>
		<input id="btnPreview" class="btn btn-primary"  type="button"  onclick="preview();"  value="打印预览"/>
		<input id="btnPrint" class="btn btn-primary"  type="button"  onclick="print();"  value="打印"/>
	</div>
	<div id="printsltzdiv"  style="display: none">
			<table id="tableid" style="width:700;heigth:auto" border="1" cellpadding="3" cellspacing="0" style="font-family:宋体">
			  <tr>
			    <td width="116" height="25"><div align="center">申请人</div></td>
			    <td height="25" colspan="5">${QLRMC}</td>
			  </tr>
			  <c:if test="${fn:contains(DJXL,'抵押')}">
			   <tr>
			    <td width="116" height="25"><div align="center">抵押权人</div></td>
			    <td height="25" colspan="5">${DYQRMC}</td>
			  </tr>
			  </c:if>
			  <tr>
			    <td width="116" height="25" ><div align="center">业务大类</div></td>
			    <td width="232" height="25" colspan="2"><div align="center">${DJDL}</div></td>
			    <td width="106" height="25"><div align="center">业务细类</div></td>
			    <td width="242" height="25" colspan="2"><div align="center">${DJXL}</div></td>
			  </tr>
			  <tr>
			    <td width="116" height="25"><div align="center">联系电话</div></td>
			    <td width="232" height="25" colspan="2"><div align="center">${TZRYDDH}</div></td>
			    <td width="106" height="25"><div align="center">代理人</div></td>
			    <td width="242" height="25" colspan="2"><div align="center">${STR}</div></td>
			  </tr>
			  <tr>
			    <td height="25"><div align="center">坐落</div></td>
			    <td height="25" colspan="5">&nbsp;${ZL}</td>
			  </tr>
			  <tr>
			    <td width="232" height="25" colspan="2"><div align="center">费用名称</div></td>
			    <td width="116" height="25"><div align="center">计费基数</div></td>
			    <td width="106" height="25"><div align="center">比例</div></td>
			    <td width="242" height="25" colspan="2"><div align="center">实收金额</div></td>
			  </tr>
			   <c:if test="${not empty gyrsl}">
			  <tr>
				  <td width="232" height="25" colspan="2"><div align="center">工本费</div></td>
				  <td width="116" height="25"><div align="center">${gyrsl}</div></td>
				  <td width="106" height="25"><div align="center">10</div></td>
				  <td width="242" height="25" colspan="2"><div align="center">${gbf}</div></td>
			  </tr>
			  </c:if>
			  <c:if test="${not empty zzsl and not empty jbzzsl}">
			  <tr>
				  <td width="232" height="25" colspan="2"><div align="center">登记费(住宅)|登记费(住宅类减半)</div></td>
				  <td width="116" height="25"><div align="center">${zzsl}|${jbzzsl}</div></td>
				  <td width="106" height="25"><div align="center">80|40</div></td>
				  <td width="242" height="25" colspan="2"><div align="center">${zzje}</div></td>
			  </tr>
			  </c:if>
			  <c:if test="${not empty zzsl and empty jbzzsl}">
			  <tr>
				  <td width="232" height="25" colspan="2"><div align="center">登记费(住宅)</div></td>
				  <td width="116" height="25"><div align="center">${zzsl}</div></td>
				  <td width="106" height="25"><div align="center">80</div></td>
				  <td width="242" height="25" colspan="2"><div align="center">${zzje}</div></td>
			  </tr>
			  </c:if>
			  <c:if test="${empty zzsl and not empty jbzzsl}">
			  <tr>
				  <td width="232" height="25" colspan="2"><div align="center">登记费(住宅类减半)</div></td>
				  <td width="116" height="25"><div align="center">${jbzzsl}</div></td>
				  <td width="106" height="25"><div align="center">40</div></td>
				  <td width="242" height="25" colspan="2"><div align="center">${zzje}</div></td>
			  </tr>
			  </c:if>
			  <c:if test="${not empty fzzsl and not empty jbfzzsl}">
			  <tr>
				  <td width="232" height="25" colspan="2"><div align="center">登记费(非住宅)|登记费(非住宅类减半)</div></td>
				  <td width="116" height="25"><div align="center">${fzzsl}|${jbfzzsl}</div></td>
				  <td width="106" height="25"><div align="center">550|275</div></td>
				  <td width="242" height="25" colspan="2"><div align="center">${fzzje}</div></td>
			  </tr>
			  </c:if>
			  <c:if test="${not empty fzzsl and empty jbfzzsl}">
			  <tr>
				  <td width="232" height="25" colspan="2"><div align="center">登记费(非住宅类)</div></td>
				  <td width="116" height="25"><div align="center">${fzzsl}</div></td>
				  <td width="106" height="25"><div align="center">550</div></td>
				  <td width="242" height="25" colspan="2"><div align="center">${fzzje}</div></td>
			  </tr>
			  </c:if>
			  <c:if test="${empty fzzsl and not empty jbfzzsl}">
			  <tr>
				  <td width="232" height="25" colspan="2"><div align="center">登记费(非住宅类减半)</div></td>
				  <td width="116" height="25"><div align="center">${jbfzzsl}</div></td>
				  <td width="106" height="25"><div align="center">275</div></td>
				  <td width="242" height="25" colspan="2"><div align="center">${fzzje}</div></td>
			  </tr>
			  </c:if>
			  <c:if test="${empty zzsl and empty jbzzsl}">
			  <tr>
				  <td width="232" height="25" colspan="2"><div align="center"></div></td>
				  <td width="116" height="25"><div align="center"></div></td>
				  <td width="106" height="25"><div align="center"></div></td>
				  <td width="242" height="25" colspan="2"><div align="center"></div></td>
			  </tr>
			  </c:if>
			  <c:if test="${empty fzzsl and empty jbfzzsl}">
			  <tr>
				  <td width="232" height="25" colspan="2"><div align="center"></div></td>
				  <td width="116" height="25"><div align="center"></div></td>
				  <td width="106" height="25"><div align="center"></div></td>
				  <td width="242" height="25" colspan="2"><div align="center"></div></td>
			  </tr>
			  </c:if>
			  <tr>
			    <td width="180"><div align="center">合计(小写)</div></td>
			    <td height="40" colspan="2"><div align="center">${hjje}</div></td>
			    <td height="40"><div align="center">合计(大写)</div></td>
			    <td width="255" height="40" colspan="2"><div align="center">${DXhjje}</div></td>
			  </tr>
			</table>
			不动产抵押登记费用由抵押权人缴纳
		</div>
</body>
</html>