0369b5b6024ec48c9285dc5d52f2fc7f20a3e898.svn-base
18.8 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
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
<%@ 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;
}
//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(';');
if(djlx == "905"){
$.ajax({
type:"POST",
url:"${ctx}/reg/bus/regBusCfdj/cfinfoquery",
cache: false,
data:"YWH=${ywh}&djlx=${DJLX}&selectedIDs="+selectedIDs,
async : false,
success:function(modelmap){
var bdcdyh = modelmap.bdcdyh;
if(modelmap.success == 0){
//这里进行登记类型的判断,返回到不同的权属Form页面
url = "${ctx}/reg/bus/regBusCfdj/Fwcfform?YWH=${ywh}&zh=${ZH}&ZID=${ZID}&WO=1&YSDM=2001010000&djlx=${DJLX}&selectedIDs="+selectedIDs+"&bj=1";
window.location = url;
}
if(modelmap.success == 1){
alert("不动产单元号为:"+bdcdyh+"的房屋不存在有所有权不能查封或分业务进行查封,请确认!!!");
chk_value =[];
window.location.reload();
return;
}
if(modelmap.success ==2){
alert("所选房屋不动产单元号为:"+bdcdyh+"的权利人不一致不能查封或分业务查封,请确认!!!");
chk_value =[];
window.location.reload();
return;
}
if(modelmap.success == 3){
alert("不动产单元号为:"+bdcdyh+"的房屋不存在有所有权不能查封,如果是期房请进行房屋预查封,请确认!!!");
chk_value =[];
window.location.reload();
return;
}
}
});
}
if(djlx == "907"){
$.ajax({
type:"POST",
url:"${ctx}/reg/bus/regBusCfdj/ycfinfoquery",
cache: false,
data:"YWH=${ywh}&djlx=${DJLX}&selectedIDs="+selectedIDs,
async : false,
success:function(modelmap){
var bdcdyh = modelmap.bdcdyh;
if(modelmap.success == 0){
//这里进行登记类型的判断,返回到不同的权属Form页面
url = "${ctx}/reg/bus/regBusCfdj/Fwycfform?YWH=${ywh}&zh=${ZH}&ZID=${ZID}&WO=1&YSDM=2001010000&djlx=${DJLX}&selectedIDs="+selectedIDs+"&bj=1";
window.location = url;
}
if(modelmap.success == 1){
alert("不动产单元号为:"+bdcdyh+"的房屋不存在预告登记不能预查封或分业务进行查封,请确认!!!");
chk_value =[];
window.location.reload();
return;
}
if(modelmap.success == 2){
alert("所选房屋不动产单元号为:"+bdcdyh+"权利人不一致不能预查封或分业务查封,请确认!!!");
chk_value =[];
window.location.reload();
return;
}
if(modelmap.success == 3){
alert("本次业务为预查封,所选房屋存在所有权,请申请房屋查封登记业务进行办理!!!");
chk_value =[];
window.location.reload();
return;
}
}
});
}
}
//每次只能选择一条数据,多余的会被移除
function changStauts(id){
for(var i = 0; i< chk_value.length; i++){
if($("#"+id).attr("checked") == "checked"){ //undefined
chk_value.splice(i, 1);
alert(id+" is removed");
}
}
}
function checkUnfined(value){
if(typeof(value)=='undefined'){
return "";
}
return value;
}
//动态添加附加户的详细信息
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> ";
var innerunCheckBox = "<div class='checkboxc'><input id='"+hobject.id+"' disabled='disabled' name='fwxx' "+
"value='"+hobject.id+"' class=''"+
"type='checkbox'></div> ";
if(hobject.rights == "0"){
$v.find(".isinfo").append(innerunCheckBox);
}else{
$v.find(".isinfo").append(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 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+"</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();"/>
<input id="btnunSelectAll" class="btn btn-primary" type="button" value="全不选" onclick="javascript:unselectAll();"/>
<input id="btnunSelecnexttAll" class="btn btn-primary" type="button" value="下一步" onclick="javascript:choiceFwxx();"/>
<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} <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} ㎡
</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>
<input id="btnCancel" class="btn" type="button" value="返回幢列表" onclick="history.go(-1)"/>
</div>
</body>
</html>