regBaseZCHGuideView.jsp
13.4 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
<%@ 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;
}
function choiceFwxx(bdcdyh){
//弹出窗口的宽度;
var iWidth=1100;
//弹出窗口的高度;
var iHeight=600;
//获得窗口的垂直位置
var iTop = (window.screen.height - 30 - iHeight) / 2;
//获得窗口的水平位置
var iLeft = (window.screen.width - 10 - iWidth) / 2;
var url = "${ctx}/reg/bus/regBusBdcqzsdjxx/openHouseInfoView?cxfs=${cxfs}&DJLX=${DJLX}&bdcdyh="+bdcdyh;
window.open(url, "窗口", "width=" + iWidth + ", height=" + iHeight + ",top=" + iTop + ",left=" + iLeft + ",toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no,alwaysRaised=yes,depended=yes");
}
//动态添加附加户的详细信息
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 color = "class='btn btn-primary btn-mini'";
var innerCheckBox = "<div class='btnc'><input id="+hobject.id+" name='fwxx' "+
"value="+hobject.shbw+" class='btn btn-primary btn-mini' onclick=\"choiceFwxx('"+hobject.bdcdyh+"')\" type='button'/></div>";
if(hobject.status == "bj"){
innerCheckBox = "<div class='btnc'><input id="+hobject.id+" name='fwxx' "+
"value="+hobject.shbw+" class='btn btn-primary btn-mini btn-info' onclick=\"choiceFwxx('"+hobject.bdcdyh+"')\" type='button'/></div>";
}
$v.find(".isinfo").before(innerCheckBox);
}
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 \01100
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();
$(".shbwtext").text("");
};
//带有跨行的户信息填值 - 除过行表头和列表头
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='shbwtext'>"+htm+"</div></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='shbwtext'>"+htm+"</div></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='shbwtext'>"+htm+"</div></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].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>";
}
var hxt = "<div class='hhao-no-border'></div>";
if(hobject.fhtImage){
hxt = "<a target='view_window' href='/ODM/userfiles/"+hobject.fhtImage+"' >"
+ "<div class='hhao-border' title='分户图'></div>"
+ "</a>";
}
if(hobject.rights == "1"){
td.innerHTML = "<div class='hhao_qf hhao'>"+hxt+"<div class='isinfo'>"+iscf+isyy+isdy+iszy+"</div></div>";
}else if(hobject.rights == "2"){
td.innerHTML = "<div class='hhao_xf hhao'>"+hxt+"<div class='isinfo'>"+iscf+isyy+isdy+iszy+"</div></div>";
}else {
td.innerHTML = "<div class='hhao'><div class='isinfo'>"+iscf+isyy+isdy+iszy+"</div></div>";
}
}
</script>
<style type="text/css">
.hhao-border{
top:0px;
left:130px;
position: relative;
width: 0;
height: 0;
margin:0;
border-top: 10px solid red;
border-left: 10px solid transparent;
}
.hhao-no-border{
top:0px;
left:0px;
position: relative;
width: 10px;
height: 10px;
margin:0;
}
.btnc{
width:50px;
height:23px;
margin-left:33px;
margin-top:-4px;
border:0px solid red;
float:left;
}
</style>
</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>
<br>
<table class="zchtable-form" id="zchtableid">
<tr>
<td><div class="chao">层号</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}
</div>
</td>
<td>
<div class="cgaik">
<fmt:formatNumber value="${regBaseC.chjzmj}"
pattern="#0.##"
var="formattedNumber"/>
${formattedNumber} ㎡
</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"> 未抵押、查封、异议、转移和未登记</div>
<div class='isdy' title='已抵押'></div>
<div class="isdytitle"> 已抵押</div>
<div class='isyy' title='已异议'></div>
<div class="isyytitle"> 已异议</div>
<div class='iscf' title='已查封'></div>
<div class="iscftitle"> 已查封</div>
<div class='iszy' title='已转移'></div>
<div class="iszytitle"> 已转移</div>
<div class='isqifang' title='期房'></div>
<div class="isqifnagtitle"> 期房</div>
<div class='isxianfang' title='现房'></div>
<div class="isxianfangtitle"> 现房</div>
</div>
<br><br>
<c:if test="${empty cxfs}">
<input id="btnCancel" class="btn btn-primary" type="button" value="返回" onclick="history.go(-1)"/>
</c:if>
<c:if test="${not empty cxfs}">
<input id="btnCancel" class="btn btn-primary" type="button" value="关闭" onclick="window.close()"/>
</c:if>
</div>
</body>
</html>