?? modifybuildinput.jsp
字號:
Nvoid(inputForm);
if (inputForm.buildingnumb.value==""){
alert("請輸入樓宇編號!");
inputForm.buildingnumb.focus();
return false;
}
if(inputForm.buildingnumb.value!="")
{
if(inputForm.buildingnumb.value.length>3){
alert("樓宇編號長度不能超過三位!");
inputForm.buildingnumb.focus();
return false;
}
if(ChkUnvialble(inputForm.buildingnumb.value)==false){
alert("樓宇編號不能是非法字符,只能是數字或者英文字母!");
inputForm.buildingnumb.focus();
return false;
}
}
if (inputForm.doorcount.value==""){
alert("請輸入梯口個數!");
inputForm.doorcount.focus();
return false;
}
if (inputForm.doorcount.value!=""&&ChkDigit1(inputForm.doorcount.value)==false){
alert("梯口個數必須為數字!");
inputForm.doorcount.focus();
return false;
}
if (inputForm.doorcount.value!=""&&inputForm.doorcount.value.length>1){
alert("梯口個數只能是一位數字!");
inputForm.doorcount.focus();
return false;
}
if (inputForm.height.value!=""&&ChkDigit2(inputForm.height.value)==false){
alert("樓高不正確,請重新輸入!");
inputForm.height.focus();
return false;
}
if (inputForm.floorcount.value!=""&&ChkDigit1(inputForm.floorcount.value)==false){
alert("樓層數必須為數字!");
inputForm.floorcount.focus();
return false;
}
if (inputForm.takearea.value!=""&&ChkDigit2(inputForm.takearea.value)==false){
alert("占地面積不正確,請重新輸入!");
inputForm.takearea.focus();
return false;
}
if (inputForm.architecturearea.value!=""&&ChkDigit2(inputForm.architecturearea.value)==false){
alert("建筑面積不正確,請重新輸入!");
inputForm.architecturearea.focus();
return false;
}
if (inputForm.usingarea.value!=""&&ChkDigit2(inputForm.usingarea.value)==false){
alert("使用面積不正確,請重新輸入!");
inputForm.usingarea.focus();
return false;
}
if (inputForm.virescencearea.value!=""&&ChkDigit2(inputForm.virescencearea.value)==false){
alert("綠化面積不正確,請重新輸入!");
inputForm.virescencearea.focus();
return false;
}
if (inputForm.cellcount.value!=""&&ChkDigit1(inputForm.cellcount.value)==false){
alert("單元數必須為數字!");
inputForm.cellcount.focus();
return false;
}
if (inputForm.salerate.value!="") {
var len=0;
for (i=0;i<inputForm.salerate.value.length;i++) {
if (inputForm.salerate.value.charAt(i)=='.')
len++;
}
if (len==1) {
if (inputForm.salerate.value.length<2) {
alert("輸入的出售率不正確");
inputForm.salerate.select();
return false;
}
var ss = inputForm.salerate.value;
var subLen = ss.substring(ss.indexOf(".")+1);//得到小數點后面的位數
if (subLen.length>2) {
alert("輸入的出售率不正確,小數點后最多只有兩位!");
inputForm.salerate.select();
return false;
}
}
if (len>1) {
alert("輸入的出售率不正確");
inputForm.salerate.select();
return false;
}
if (Chkhirerate(inputForm.salerate.value)==false) {
alert("輸入的出售率不正確");
inputForm.salerate.select();
return false;
}
if (inputForm.salerate.value>100) {
alert("出售率必須小于100%!");
inputForm.salerate.select();
return false;
}
}
if (inputForm.hirerate.value!="") {
var len=0;
for (i=0;i<inputForm.hirerate.value.length;i++) {
if (inputForm.hirerate.value.charAt(i)=='.')
len++;
}
if (len==1) {
if (inputForm.hirerate.value.length<2) {
alert("輸入的出租率不正確");
inputForm.hirerate.select();
return false;
}
var ss = inputForm.hirerate.value;
var subLen = ss.substring(ss.indexOf(".")+1);//得到小數點后面的位數
if (subLen.length>2) {
alert("輸入的出租率不正確,小數點后最多只有兩位!");
inputForm.hirerate.select();
return false;
}
}
if (len>1) {
alert("輸入的出租率不正確");
inputForm.hirerate.select();
return false;
}
if (Chkhirerate(inputForm.hirerate.value)==false) {
alert("輸入的出租率不正確");
inputForm.hirerate.select();
return false;
}
if (inputForm.hirerate.value>100) {
alert("出租率必須小于100%!");
inputForm.hirerate.select();
return false;
}
}
if (inputForm.remark.value.length>100){
alert("備注不能超過100個字!");
inputForm.remark.focus();
return false;
}
inputForm.startdate.value=inputForm.startyear.value+'-'+inputForm.startmonth.value+'-'+inputForm.startday.value;
inputForm.enddate.value=inputForm.endyear.value+'-'+inputForm.endmonth.value+'-'+inputForm.endday.value;
inputForm.handoverdate.value=inputForm.handoveryear.value+'-'+inputForm.handovermonth.value+'-'+inputForm.handoverday.value;
handleForm(form1);
}
var filenum2 = 0;
var linenumber=0;
var fileheadnum = 0;
function handleForm(inputForm)
{
var str="";
var del2="☆";
var del ="※";
for (i=0; i<inputForm.elements.length; i++)
{
if ((inputForm.elements[i].name!="txId")&&(inputForm.elements[i].name!="inputString")&&(inputForm.elements[i].type!="button"))
{
if ((inputForm.elements[i].name.toUpperCase() != "提交") &&
(inputForm.elements[i].name.toUpperCase() != "復位"))
{
if ((inputForm.elements[i].type == "radio") ||
(inputForm.elements[i].type == "checkbox"))
{
if (inputForm.elements[i].checked)
{
str = str+inputForm.elements[i].name+del2+inputForm.elements[i].value+del;
}
}
else if (inputForm.elements[i].type == "select-one")
{
str = str+inputForm.elements[i].name
+del2+inputForm.elements[i].options[inputForm.elements[i].selectedIndex].value+del;
}
else
{
str = str+inputForm.elements[i].name+del2+inputForm.elements[i].value+del;
}
}
}
}
str=str.substr(0,str.length-del.length);
inputStr=str;
inputForm.inputString.value=str;
inputForm.submit();
}
function InsertLine()
{
var outstring = '';
if (filenum2==0) {
outstring = '<table align="center" width="100%" cellpadding="0" cellspacing="0"><tr><td align="center"><table width="100%" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#ffffff" border="1" id="filehead' + fileheadnum + '"><tr><td width="10%"> </td><td width="50%" align="center">圖片文件路徑</td><td width="40%" align="center">圖片文件說明</td></tr></table></td></tr></table>';
eval('document.all.tb0.insertAdjacentHTML("AfterEnd",outstring)');
fileheadnum++;
}
outstring='<table align="center" width="100%" cellpadding="0" cellspacing="0"><tr><td align="center"><table width="100%" cellspacing="0" cellpadding="0" bordercolorlight="#000000" bordercolordark="#ffffff" border="1" id="tb' + (linenumber + 1) + '"><tr>' +
'<td width="10%" align="center"><INPUT value="刪除" class="button" type="button" onclick="SetToDel(' + (linenumber + 1) + ')"><input value="10" id="hide' + (linenumber + 1) + '" name="hide' + (linenumber + 1) + '" type="hidden"></td>'+
'</td><td width="50%"><input type="file" id="filepath'+(linenumber + 1)+'" name="filepath'+(linenumber + 1)+'" size="32"></td><td width="40%"><input id="describe' + (linenumber + 1) + '" name="describe' + (linenumber + 1) + '" type="text" size="34"></td></tr></table></td></tr></table>';
if (filenum2==0){
eval('document.all.filehead' + (fileheadnum -1)+ '.insertAdjacentHTML("AfterEnd", outstring)');
} else {
eval('document.all.tb' + linenumber + '.insertAdjacentHTML("AfterEnd", outstring)');
}
linenumber++;
filenum2=filenum2+1;
}
function SetToDel(number)
{
if (filenum2==1){
eval('document.all.filehead' + (fileheadnum-1) + '.style.display="none"');
}
eval('document.all.tb' + number + '.style.display="none"');
eval('document.all.hide' + number + '.value="00"');
eval('document.all.describe' + number + '.value=""');
eval('document.all.filepath' + number + '.disabled=true');
filenum2=(filenum2-1);
}
function DelCurren(picnum)
{
eval('document.all.pic' + picnum + '.style.display="none"');
eval('document.all.curhide' + picnum + '.value="01"');
}
</script>
</head>
<body bgColor="#d4d0c8" leftMargin="0" topMargin="0" vLink="#003399" marginwidth="0" marginheight="0" onLoad="this.focus();MM_preloadImages('/pmsApp/images/button_query_over.gif','/pmsApp/images/button_save_over.gif','/pmsApp/images/button_cancel_over.gif')" >
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="/pmsApp/servlet/common.PMS">
<input type="hidden" name="txId" id="txId" value="2013">
<input type="hidden" name="inputString" id="inputString">
<input type="hidden" name="number1" value="<%=number1%>">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td height="28" background="/pmsApp/images/toolbar2.gif" valign="top"><img src="/pmsApp/images/blank.gif" width="10" height="1"><img src="/pmsApp/images/button_new_gray.gif" width="55" height="20"><img name="Image10" border="0" src="/pmsApp/images/button_modify_gray.gif" width="55" height="20"><img name="Image11" border="0" src="/pmsApp/images/button_del_gray.gif" width="55" height="20"><img src="/pmsApp/images/button_split.gif" width="8" height="20"><a href="/pmsApp/baseinfo/RetrieveByCInput.jsp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image13','','/pmsApp/images/button_query_over.gif',1)"><img name="Image13" border="0" src="/pmsApp/images/button_query.gif" width="55" height="20" alt="條件檢索"></a><img src="/pmsApp/images/button_split.gif" width="8" height="20"><a href="#"></a></td>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="/pmsApp/images/tab_left.gif" width="3" height="25"></td>
<td width="100%" background="/pmsApp/images/tab_mid.gif" height="25">
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td width="100" background="/pmsApp/images/tab_up.gif" height="25">樓宇基本資料</td>
<td width="100" background="/pmsApp/images/tab_down_right.gif"><a href="javascript:RetApp()">水、電、煤氣表</a></td>
<td width="100" background="/pmsApp/images/tab_down.gif"><a href="javascript:Add()">添加單元資料</a></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="308" border="1" align="center" bgcolor="#FFFFFF" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0" height="22">
<tr>
<td align="center" bgcolor="#eeffee">修改樓宇資料</td>
</tr>
</table>
<br>
<table border="1" align="center" bgcolor="#d4d0c8" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0" width="99%">
<input type="hidden" name="orisubareanumb" value="<%=subareanumb%>">
<input type="hidden" name="oribuildingnumb" value="<%=buildingnumb%>">
<tr bgcolor="#d4d0c8">
<td width="13%" height="25" align="center">分區編號</td>
<td colspan="3" height="25"><%=subareanumb%>
<input type="hidden" name="subareanumb" value="<%=subareanumb%>">
</td>
</tr>
<tr bgcolor="#d4d0c8">
<td width="13%" height="25" align="center">樓宇編號</td>
<td height="25" width="37%">
<input type="text" name="buildingnumb" value="<%=buildingnumb%>">
<font color="#FF3300">*</font>
</td>
<td height="25" align="center" width="13%">樓宇名稱</td>
<td height="25" width="37%">
<input type="text" name="buildingname" value="<%=buildingname%>" maxlength="5"></td>
</tr>
<tr bgcolor="#d4d0c8">
<td width="13%" height="25" align="center">樓宇類型</td>
<td height="25" width="37%">
<input type="text" name="btype" value="<%=btype%>" maxlength="5"></td>
<td height="25" align="center" width="13%">樓宇用途</td>
<td height="25" width="37%">
<input type="text" name="buse" value="<%=buse%>" maxlength="5"></td>
</tr>
<tr bgcolor="#d4d0c8">
<td width="13%" height="25" align="center">樓宇結構</td>
<td height="25" width="37%">
<input type="text" name="structure" value="<%=structure%>" maxlength="10"></td>
<td height="25" align="center" width="13%">樓梯個數</td>
<td height="25" width="37%">
<input type="text" name="doorcount" value="<%=doorcount%>"></td>
</tr>
<tr bgcolor="#d4d0c8">
<td width="13%" height="25" align="center">樓    高</td>
<td height="25" width="37%">
<input type="text" name="height" value="<%=height%>" maxlength="10"> 米</td>
<td height="25" align="center" width="13%">樓 層 數</td>
<td height="25" width="37%">
<input type="text" name="floorcount" value="<%=floorcount%>" maxlength="2"></td>
</tr>
<tr bgcolor="#d4d0c8">
<td width="13%" height="24" align="center">開工日期</td>
<td height="24" width="37%">
<select name="startyear">
<option value="1990">1990</option>
<option value="1991">1991</option>
<option value="1992">1992</option>
<option value="1993">1993</option>
<option value="1994">1994</option>
<option value="1995">1995</option>
<option value="1996">1996</option>
<option value="1997">1997</option>
<option value="1998">1998</option>
<option value="1999">1999</option>
<option value="2000">2000</option>
<option value="2001">2001</option>
<option value="2002">2002</option>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -