openPrintViewBdcqd.jsp
7.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<%@ 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>
<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">
var selItems = new Array();
$(document).ready(function() {
});
var fwts = parseInt(${fwts});
var ys = parseInt(${ys});
var ybdcqzhFlag = "${ybdcqzhFlag}";
window.onload = function() {
showView();
};
var LODOP; //声明为全局变量
//显示第一页
function showView(){
$("#myTabContent").hide();
var listmap = ${fns:toJson(listmap)};
var $v=$(document.getElementById("contentTable")); //转化为jQuery对象
if(ybdcqzhFlag == 'no'){
var innerInfo = "<thead>"+"<tr>"
+"<th width='18%'>项目名称</th>"
+"<th width='10%'>栋号</th>"
+"<th width='8%'>房号</th>"
+"<th width='22%'>不动产单元号</th>"
+"<th width='12%'>业务编号</th>"
+"<th width='12%'>面积(㎡)</th>"
+"<th width='18%'>用途</th>"
+"</tr>"+"</thead>";
for(var j = 0; j < listmap.length; j++){
var innerInfo1 = "<tbody>"
+"<td width='18%'>"+listmap[j].xmmc+"</td>"
+"<td width='10%'>"+listmap[j].zrzh+"</td>"
+"<td width='8%'>"+listmap[j].shbw+"</td>"
+"<td width='22%'>"+listmap[j].bdcdyh+"</td>"
+"<td width='12%'>"+listmap[j].ywh+"</td>"
+"<td width='12%'>"+listmap[j].mj+"</td>"
+"<td width='18%'>"+listmap[j].yt+"</td>"
+"</tbody>";
$v.append(innerInfo1);
}
}else{
var innerInfo = "<thead>"+"<tr>"
+"<th width='18%'>项目名称</th>"
+"<th width='8%'>栋号</th>"
+"<th width='8%'>房号</th>"
+"<th width='22%'>不动产单元号</th>"
+"<th width='12%'>业务编号</th>"
+"<th width='12%'>面积(㎡)</th>"
+"<th width='20%'>不动产权证书号</th>"
+"</tr>"+"</thead>";
for(var j = 0; j < listmap.length; j++){
var innerInfo1 = "<tbody>"
+"<td width='18%'>"+listmap[j].xmmc+"</td>"
+"<td width='8%'>"+listmap[j].zrzh+"</td>"
+"<td width='8%'>"+listmap[j].shbw+"</td>"
+"<td width='22%'>"+listmap[j].bdcdyh+"</td>"
+"<td width='12%'>"+listmap[j].ywh+"</td>"
+"<td width='12%'>"+listmap[j].mj+"</td>"
+"<td width='20%'>"+listmap[j].ybdcqzh+"</td>"
+"</tbody>";
$v.append(innerInfo1);
}
}
$v.append(innerInfo);
for(var i = 0 ;i < ys;i++){
if(ybdcqzhFlag == 'no'){
var innerInfo = "<div id='myTabContent"+i+"' class='tab-content'>"
+"<div><table width='750'>"
+"<tr><td style='font-size:18px; font-weight: bold'><div align='center'> 不动产登记清单</div></td></tr>"
+"</table></div>"
+"<div><table width='750'><tr>"
+"<td style='font-size:14px; font-weight: bold' width='15%'><div align='left'>业务编号:</div></td>"
+"<td width='15%'>${ywh}</td><td width='40%'></td>"
+"<td style='font-size:14px; font-weight: bold' width='10%'>共 "+ys+" 页 / </td>"
+"<td style='font-size:14px; font-weight: bold' width='10%'>第 "+(i+1)+" 页</td></tr>"
+"</table></div>"
+"<div><table width='750'>"
+"<tr><td style='font-size:14px; font-weight: bold' width='15%'><div align='left'> 项目名称:</div></td>"
+"<td width='15%'>${xmmc}</td><td width='30%'></td><td width='30%'></td></tr>"
+"</table></div>"
+"<div><table width='750'>"
+"<tr><td style='font-size:14px; font-weight: bold' width='15%'><div align='left'>合计:</div></td>"
+"<td width='15%'>共 ${fwts} 套</td><td width='40%'></td><td width='20%'>共 ${sumMj} ㎡</td></tr>"
+"</table></div>"
+"<table border='1' id='contentTable"+i+"'>"
+"<thead>"+"<tr>"
+"<th width='10%'>栋号</th>"
+"<th width='10%'>房号</th>"
+"<th width='20%'>不动产单元号</th>"
+"<th width='8%'>面积(㎡)</th>"
+"<th width='24%'>用途</th>"
+"</tr>"+"</thead>"+"<tbody>";
}else{
var innerInfo = "<div id='myTabContent"+i+"' class='tab-content'>"
+"<div><table width='750'>"
+"<tr><td style='font-size:18px; font-weight: bold'><div align='center'> 不动产登记清单</div></td></tr>"
+"</table></div>"
+"<div><table width='750'><tr>"
+"<td style='font-size:14px; font-weight: bold' width='15%'><div align='left'>业务编号:</div></td>"
+"<td width='15%'>${ywh}</td><td width='40%'></td>"
+"<td style='font-size:14px; font-weight: bold' width='10%'>共 "+ys+" 页 / </td>"
+"<td style='font-size:14px; font-weight: bold' width='10%'>第 "+(i+1)+" 页</td></tr>"
+"</table></div>"
+"<div><table width='750'>"
+"<tr><td style='font-size:14px; font-weight: bold' width='15%'><div align='left'> 项目名称:</div></td>"
+"<td width='15%'>${xmmc}</td><td width='30%'></td><td width='30%'></td></tr>"
+"</table></div>"
+"<div><table width='750'>"
+"<tr><td style='font-size:14px; font-weight: bold' width='15%'><div align='left'>合计:</div></td>"
+"<td width='15%'>共 ${fwts} 套</td><td width='40%'></td><td width='20%'>共 ${sumMj} ㎡</td></tr>"
+"</table></div>"
+"<table border='1' id='contentTable"+i+"'>"
+"<thead>"+"<tr>"
+"<th width='8%'>栋号</th>"
+"<th width='11%'>房号</th>"
+"<th width='20%'>不动产单元号</th>"
+"<th width='7%'>面积(㎡)</th>"
+"<th width='26%'>不动产权证书号</th>"
+"</tr>"+"</thead>"+"<tbody>";
}
var $v=$("#contentTable"+i); //转化为jQuery对象
var innerInfo0 = "";
var b = listmap.length-(i+1)*35;//总条数-起始页至当前页的数据条数
if(b < 0){
b = listmap.length;
}else{
b = (i+1)*35;
}
for(var j = i*35; j < b; j++){
if(ybdcqzhFlag == 'no'){
var innerInfo1 = "<tr>"
+"<td style='font-size:15px;' width='10%'>"+listmap[j].zrzh+"</td>"
+"<td style='font-size:15px;' width='10%'>"+listmap[j].shbw+"</td>"
+"<td style='font-size:15px;' width='20%'>"+listmap[j].bdcdyh+"</td>"
+"<td style='font-size:15px;' width='8%'>"+listmap[j].mj+"</td>"
+"<td style='font-size:15px;' width='24%'>"+listmap[j].yt+"</td>"
+"</tr>";
}else{
var innerInfo1 = "<tr>"
+"<td width='8%'>"+listmap[j].zrzh+"</td>"
+"<td width='11%'>"+listmap[j].shbw+"</td>"
+"<td width='20%'>"+listmap[j].bdcdyh+"</td>"
+"<td width='7%'>"+listmap[j].mj+"</td>"
+"<td width='26%'>"+listmap[j].ybdcqzh+"</td>"
+"</tr>";
}
innerInfo0 += innerInfo1;
}
var innerInfoend = "</tbody>"+"</table>"+"</div>";
$("#myTabContent").append(innerInfo+innerInfo0+innerInfoend);
}
}
//打印预览
function preview() {
LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
for(var i = 0;i < ys;i++){
LODOP.ADD_PRINT_HTM(20, 20, 750, 2000,$("#myTabContent"+i).html());
LODOP.NewPage();
}
LODOP.PREVIEW();
};
</script>
</head>
<body>
<div id="myTabContent" class="tab-content">
</div>
<table id="contentTable" class="table table-striped table-bordered table-condensed"></table>
<div align="center" style="font-size: 2px; font-weight: bold" style="font-family:宋体">
<h5>共 ${fwts} 套</h5>
</div><br/>
<div class="control-group" style="height: 25px;padding-top: 5px;" align="center">
<input id="btnPreview" class="btn btn-primary" type="button" onclick="preview();" value="打印预览"/>
</div>
</body>
</html>