?? rent_info_eh.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,imis_hous.com.impl.*,java.util.*" errorPage="" %>
<%
String isSubmit = request.getParameter("isSubmit");
String J_BuildingNu = "0";
String J_RentFor = null;
String J_RentType = null;
J_RentFor=request.getParameter("J_RentFor");
J_RentType=request.getParameter("J_RentType");
if(J_RentFor==null)
{
J_RentFor = "1";
}
if(J_RentType==null)
{
J_RentType= "1";
}
HashMap hashDept = new GetRoomnu().getDepartmentNU();
if (isSubmit != null && isSubmit.equals("1")) {
J_BuildingNu = request.getParameter("J_BuildingNu");
} else
{
}
HashMap hashDept1 = new GetRoomnu().getDepartment(J_BuildingNu);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="/Imis/imis_hous/css/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="/Imis/imis_hous/jf/checkdata.js">
</script>
<script language="JavaScript">
function getvalue()
{
document.form1.isSubmit.value = 1;
document.form1.action = "Rent_info_eh.jsp";
document.form1.target = "_self";
document.form1.submit();
}
function checkValue() {
var J_AppDate = document.form1.J_AppDate.value;
if (J_AppDate=="") {
window.alert("請輸入申請日期");
document.form1.J_AppDate.focus();
return false;
}
var J_RentBeginDate = document.form1.J_RentBeginDate.value;
if (J_RentBeginDate=="") {
window.alert("請輸入出租日期");
document.form1.J_RentBeginDate.focus();
return false;
}
var J_RentEndDate = document.form1.J_RentEndDate.value;
if (J_RentEndDate=="") {
window.alert("請輸入出租截止日期");
document.form1.J_RentEndDate.focus();
return false;
}
var J_CheckDate = document.form1.J_CheckDate.value;
if (J_CheckDate=="") {
window.alert("請輸入審核日期");
document.form1.J_CheckDate.focus();
return false;
}
var J_RoomNu = document.form1.J_RoomNu.value;
if (J_RoomNu.lenght > 30){
window.alert("輸入房間編號長度超出,限定為15個中文字符或者30個英文字符。");
document.form1.J_RoomNu.focus();
return false;
}
var J_BuildingNu = document.form1.J_BuildingNu.value;
if (J_BuildingNu.lenght > 30){
window.alert("輸入建筑物代號長度超出,限定為15個中文字符或者30個英文字符。");
document.form1.J_BuildingNu.focus();
return false;
}
var J_AppBy = document.form1.J_AppBy.value;
if (J_AppBy.lenght > 15){
window.alert("輸入申請人長度超出,限定為7個中文字符或者15個英文字符。");
document.form1.J_AppBy.focus();
return false;
}
var J_AppDes = document.form1.J_AppDes.value;
if (J_AppDes.lenght > 30){
window.alert("輸入申請說明長度超出,限定為15個中文字符或者30個英文字符。");
document.form1.J_AppDes.focus();
return false;
}
var J_RentFee = document.form1.J_RentFee.value;
if (J_RentFee!=""){
var regp = /^\d{1,10}\.*\d{0,2}$/;
if (J_RentFee.match(regp) == null)
{
document.form1.J_RentFee.focus();
alert("輸入租金格式錯誤!使用“0.00”格式");
return false;
}
}
var J_CheckBy = document.form1.J_CheckBy.value;
if (J_CheckBy.lenght > 15){
window.alert("輸入審核人長度超出,限定為7個中文字符或者15個英文字符。");
document.form1.J_CheckBy.focus();
return false;
}
var J_CheckDes = document.form1.J_CheckDes.value;
if (J_CheckDes.lenght > 100){
window.alert("輸入審核意見長度超出,限定為50個中文字符或者100個英文字符。");
document.form1.J_CheckDes.focus();
return false;
}
var J_Memo = document.form1.J_Memo.value;
if (J_Memo.lenght > 100){
window.alert("輸入建筑物備注長度超出,限定為50個中文字符或者100個英文字符。");
document.form1.J_Memo.focus();
return false;
}
return true;
}
</script>
</head>
<body background="/Imis/imis_hous/css/images/bg_main.png">
<table width="100%" border="0" class="ziti" background="/Imis/imis_hous/css/images/bg_main.png" align="center">
<tr>
<td colspan="2" height="20" background="/Imis/imis_hous/css/images/bg_main2.png"><font color="#000000">出租房屋信息錄入</font></td>
</tr>
</table>
<form name="form1" method="post" action="/Imis/servlet/RoomRent_sl?id=add" onsubmit="return checkValue()">
<input type="hidden" name="isSubmit" value="0">
<table width="100%" border="0" class="ziti" background="/Imis/imis_hous/css/images/bg_main.png" align="center">
<tr>
<td width="50%"><div align="right">申請類型:</div></td>
<td width="50%"><select name="J_RentFor" style="{border:1px solid #127ace; FONT-SIZE: 9pt; COLOR: #078bdf; FONT-FAMILY: Verdana; float:left;}">
<%if(J_RentFor.equals("1")){ %>
<option selected value="1">出租</option>
<option value="2">續租</option>
<option value="3">退租</option>
<%}else if(J_RentFor.equals("2")){ %>
<option value="1">出租</option>
<option selected value="2">續租</option>
<option value="3">退租</option>
<%}else if(J_RentFor.equals("3")){ %>
<option value="1">出租</option>
<option value="2">續租</option>
<option selected value="3">退租</option>
<% }%>
</select></td>
</tr>
<tr>
<td><div align="right">出租房屋類型:</div></td>
<td><select name="J_RentType" class="text1">
<%if(J_RentType.equals("1")){ %>
<option selected value="1">樓</option>
<option value="2">房間</option>
<%}else{ %>
<option value="1">樓</option>
<option selected value="2">房間</option>
<%} %>
</select></td>
</tr>
<tr>
<td><div align="right">建筑物名稱:</div></td><td>
<select name="J_BuildingNu" class="text1" onchange="getvalue()">
<option value="s">選擇建筑物</option>
<%
int length = hashDept.size();
String []deptName = new String[length];//部門數組
String []deptId= new String[length];//部門用房面積數組
Iterator itDeptId = hashDept.keySet().iterator();//鍵迭代
Iterator itDeptName = hashDept.values().iterator();//值迭代
int i=0;
while(itDeptId.hasNext()){
deptId[i] = itDeptId.next().toString();
i++;
}
i=0;
while(itDeptName.hasNext()){
deptName[i] = itDeptName.next().toString();
i++;
}
for(int j=0;j<length;j++ ){
if(!deptId[j].equals(J_BuildingNu)){
%>
<option value=<%=deptId[j]%>><%= deptName[j]%></option>
<%}
if(deptId[j].equals(J_BuildingNu)){
%>
<option value=<%=deptId[j]%> selected><%=deptName[j] %></option>
<%}
} %>
</select></td>
</tr>
<tr>
<td><div align="right">房間編號:</div></td>
<td>
<select name="J_RoomNu" class="text1">
<option value="s">全部房間</option>
<%
int length1 = hashDept1.size();
String []deptName1 = new String[length1];//部門數組
String []deptId1= new String[length1];//部門用房面積數組
Iterator itDeptId1 = hashDept1.keySet().iterator();//鍵迭代
Iterator itDeptName1 = hashDept1.values().iterator();//值迭代
int i1=0;
while(itDeptId1.hasNext()){
deptId1[i1] = itDeptId1.next().toString();
i1++;
}
i1=0;
while(itDeptName1.hasNext()){
deptName1[i1] = itDeptName1.next().toString();
i1++;
}
for(int j=0;j<length1;j++ ){
%>
<option value=<%=deptId1[j] %>><%= deptName1[j] %></option>
<% }%>
</select>
</td>
</tr>
<tr>
<td><div align="right">申請人:</div></td>
<td><input name="J_AppBy" type="text" size="15" class="text1"></td>
</tr>
<tr>
<td height="22"><div align="right">申請日期:</div></td>
<td>
<input name="J_AppDate" id="J_AppDate" size="10" maxlength="10" readonly="readonly" type="text" class="text1" onMouseDown="javascript:setday(form1.J_AppDate);"/>
<font color=red>*</font>
</td>
</tr>
<tr>
<td><div align="right">申請說明:</div></td>
<td><input name="J_AppDes" type="text" class="text1" size="20" maxlength="100"></td>
</tr>
<tr>
<td><div align="right">出租日期:</div></td>
<td>
<input name="J_RentBeginDate" id="J_RentBeginDate" size="10" maxlength="10" readonly="readonly" type="text" class="text1" onMouseDown="javascript:setday(form1.J_RentBeginDate);"/>
<font color=red>*</font></td>
</tr>
<tr>
<td><div align="right">出租截止日期:</div></td>
<td>
<input name="J_RentEndDate" id="J_RentEndDate" size="10" maxlength="10" readonly="readonly" type="text" class="text1" onMouseDown="javascript:setday(form1.J_RentEndDate);"/>
<font color=red>*</font>
</td>
</tr>
<tr>
<td height="26"><div align="right">租金:</div></td>
<td><input name="J_RentFee" type="text" value="0.00" size="10" class="text1"></td>
</tr>
<tr>
<td><div align="right">審核人:</div></td>
<td><input name="J_CheckBy" type="text" class="text1" size="15" maxlength="15"></td>
</tr>
<tr>
<td><div align="right">審核意見:</div></td>
<td><input name="J_CheckDes" type="text" class="text1" size="20" maxlength="100"></td>
</tr>
<tr>
<td><div align="right">審核日期:</div></td>
<td>
<input name="J_CheckDate" id="J_CheckDate" size="10" maxlength="10" readonly="readonly" type="text" class="text1" onMouseDown="javascript:setday(form1.J_CheckDate);"/>
<font color=red>*</font>
</td>
</tr>
<tr>
<td><div align="right">備注:</div></td>
<td><textarea name="J_Memo" rows="5"></textarea></td>
</tr>
<tr><td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="提 交" class="anniu">
<input type="reset" name="Submit2" value="重 置" class="anniu">
</div></td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -