0ea1e8fb7ceeafb8a1ca86e4ef487018866bef24.svn-base
7.69 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
<%@ 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() {
//$("#name").focus();
$("#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);
}
}
});
views();
var sjctext = $("#sjctext").val();
if(sjctext == "0"){
$("#sjctext").val(1);
}
});
function views(){
var viewid = "${VIEWS}";
if(viewid == undefined || viewid == null || viewid ==""){
return;
}
$("input:not(:button,:submit,:hidden),select,textarea").attr("disabled","disabled");
}
function gobackclist(){
var url = "${ctx}/reg/base/regBaseC/list?ZID=${ZID}&XMMC=${XMMC}&XMID=${XMID}&DZ=${DZ}";
window.location = url;
}
function submitGenTable(){
var genCount = $("#genCount").attr("value");//本次添加的层数
var isnegativelayer = $("#isnegativelayertext").val();
var zxzdcs = "${ZZDCS}";//地上总层数
var zdxzcs = "${ZDXCS}";//底下总层数
var currentCCount = "${currentCCount}";//当前已添加的层数
var currentCDXCount = "${ZCDXCS}";//当前已添加的fu层数
//alert(currentCCount+"|"+zxzdcs+"|"+genCount+"|"+zdxzcs+"|"+currentCDXCount);
if(isnegativelayer == "0"){
if(parseInt(currentCCount)+parseInt(genCount)>parseInt(zxzdcs)){
alert("正向生成情况下,不能超过幢信息里的最大正层数!请重新填写参数!");
return;
}
if(parseInt(currentCCount)>0){
if((parseInt(currentCCount)+parseInt(genCount))>zxzdcs){
alert("正向生成情况下,当前最大的层数不能超过幢信息里的最大正层数!请重新填写参数!");
return;
}
}else{
//正层的情况下,最大的层数不能超过幢信息里的最大正层数
if(parseInt(genCount) > parseInt(zxzdcs)){
alert("正向生成情况下,当前最大的层数不能超过幢信息里的最大正层数!请重新填写参数!");
return;
}
}
}else{
//负层情况
if(parseInt(currentCDXCount)+parseInt(genCount)>parseInt(zdxzcs)){
alert("负向生成情况下,不能超过幢信息里的最大负层数!请重新填写参数!");
return;
}
}
if(document.getElementById("btnSubmit")){
document.getElementById("btnSubmit").disabled="disabled";
}
if(document.getElementById("btnGenTable")){
document.getElementById("btnGenTable").disabled="disabled";
}
if(genCount == 1){
document.inputForms.action = "${ctx}/reg/base/regBaseC/save?DZ=${DZ}";
}else{
document.inputForms.action = "${ctx}/reg/base/regBaseC/savebat?genCount="+ genCount+"&DZ=${DZ}";
}
document.inputForms.submit();
}
function clicksjcch(obj){
var sjc = $("#sjctext").val();
$("input[name='ch']").val(hxStr(sjc));
}
function hxStr(a){
var sx = "";
if(parseInt(a) < 10){
sx = "000"+a;
}else if(parseInt(a) < 100){
sx = "00"+a;
}else if(parseInt(a) < 1000){
sx = "0"+a;
}else{
sx = a;
}
return sx;
}
</script>
</head>
<body>
<ul class="nav nav-tabs">
<li><a href="${ctx}/reg/base/regBaseC/list?ZID=${ZID}&DZ=${DZ}">层信息列表</a></li>
<li class="active"><a href="#">层信息<shiro:hasPermission name="reg:base:regBaseC:edit">${not empty regBaseC.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="reg:base:regBaseC:edit">查看</shiro:lacksPermission></a></li>
</ul><br/>
<form:form id="inputForm" name="inputForms" modelAttribute="regBaseC" action="${ctx}/reg/base/regBaseC/save?DZ=${DZ}" method="post" class="form-horizontal">
<form:hidden path="id"/>
<input id="zid" name="zid" type="hidden" value="${ZID}" />
<sys:message content="${message}"/>
<table class="otable-form" >
<tr>
<td class="tit">层号:</td>
<td>
<form:input path="ch" htmlEscape="false" readonly="true" maxlength="20" class="input-small"/>
</td>
<td class="tit">自然幢号:</td>
<td><form:input path="zrzh" value="${ZH }" htmlEscape="false" readonly="true" maxlength="24" class="input-small required"/>
<span class="help-inline"><font color="red">*</font> </span>
</td>
<td class="tit">要素代码:</td>
<td><form:input path="ysdm" value="2001030130" htmlEscape="false" readonly="true" maxlength="10" class="input-small "/></td>
<td class="tit">实际层:</td>
<td><form:input path="sjc" id="sjctext" htmlEscape="false" maxlength="3" onblur="clicksjcch(this)" class="input-small digits"/></td>
</tr>
<tr>
<!--
<td class="tit">名义层:</td>
<td><form:input path="myc" htmlEscape="false" maxlength="50" class="input-small "/></td>
-->
<td class="tit">层建筑面积:</td>
<td>
<form:input path="cjzmj" htmlEscape="false" class="input-small number"/>
<font size="4">㎡ </font>
</td>
<td class="tit">层套内建筑面积:</td>
<td><form:input path="ctnjzmj" htmlEscape="false" class="input-small number"/><font size="4">㎡ </font></td>
<td class="tit">层阳台面积:</td>
<td><form:input path="cytmj" htmlEscape="false" class="input-small number"/><font size="4">㎡ </font></td>
<td class="tit">水平投影面积:</td>
<td><form:input path="sptymj" htmlEscape="false" class="input-small number"/><font size="4">㎡ </font></td>
</tr>
<tr>
<td class="tit">层共有建筑面积:</td>
<td><form:input path="cgyjzmj" htmlEscape="false" class="input-small number"/><font size="4">㎡ </font></td>
<td class="tit">层分摊建筑面积:</td>
<td><form:input path="cftjzmj" htmlEscape="false" class="input-small number"/><font size="4">㎡ </font></td>
<td class="tit">层半墙面积:</td>
<td><form:input path="cbqmj" htmlEscape="false" class="input-small number"/><font size="4">㎡ </font></td>
<td class="tit">层高:</td>
<td><form:input path="cg" htmlEscape="false" class="input-small number"/><font size="3">m </font></td>
</tr>
<tr>
<td class="tit">是否负层:</td>
<td colspan="5">
<form:select path="isnegativelayer" id="isnegativelayertext" class="input-small ">
<form:option value="0" label="否"/>
<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
</td>
</tr>
</table>
<div class="form-actions">
<c:if test="${empty VIEWS}">
<c:if test="${not empty regBaseC.id}">
<shiro:hasPermission name="reg:base:regBaseC:edit">
<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>
</shiro:hasPermission>
</c:if>
<c:if test="${empty regBaseC.id}">
<shiro:hasPermission name="reg:base:regBaseZrz:edit">
<input id="btnGenTable" class="btn btn-primary" type="button" value="批量保存" onclick="submitGenTable()"/>
</shiro:hasPermission>
<input id="genCount" name="genCount" type="text" value="1" class="input-mini digits required"/>层
</c:if>
<span class="help-inline"><font color="red">*</font> </span>
<span style="font-weight:700;">单户时,按照实际填写生成 </span>
</c:if>
<input id="btnCancel" class="btn" type="button" value="返 回" onclick="gobackclist()"/>
</div>
</form:form>
</body>
</html>