?? roomapplyassign_eh.jsp
字號(hào):
<%@ 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_AppBy=null;
String J_AppDate=null;
String J_AppDes=null;
String J_AssiType="1";
J_AssiType = request.getParameter("J_AssiType");
J_AppBy = request.getParameter("J_AppBy");//申請(qǐng)人
J_AppDate = request.getParameter("J_AppDate");//申請(qǐng)日期
J_AppDes = request.getParameter("J_AppDes");//申請(qǐng)內(nèi)容
if(J_AppBy==null)
{
J_AppBy = "";
}
if(J_AppDate==null)
{
J_AppDate = "";
}
if(J_AppDes==null)
{
J_AppDes = "";
}
if(J_AssiType==null)
{
J_AssiType = "1";
}
if (isSubmit != null && isSubmit.equals("1")) {
J_BuildingNu = request.getParameter("J_BuildingNu");
}
HashMap hashDept2 = new GetRoomName().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 = "RoomApplyAssign_eh.jsp";
document.form1.target = "_self";
document.form1.submit();
}
function checkValue() {
var J_AppBy = document.form1.J_AppBy.value;
if (J_AppBy.lenght > 15){
window.alert("輸入申請(qǐng)人長(zhǎng)度超出,限定為7個(gè)中文字符或者15個(gè)英文字符。");
document.form1.J_AppBy.focus();
return false;
}
var J_AppDes = document.form1.J_AppDes.value;
if (J_AppDes.lenght > 100){
window.alert("輸入申請(qǐng)內(nèi)容長(zhǎng)度超出,限定為50個(gè)中文字符或者100個(gè)英文字符。");
document.form1.J_AppDes.focus();
return false;
}
var J_RoomNu = document.form1.J_RoomNu.value;
if (J_RoomNu=="") {
window.alert("請(qǐng)輸入分配房間編號(hào)");
document.form1.J_RoomNu.focus();
return false;
}
if (J_RoomNu.lenght > 30){
window.alert("輸入分配房間編號(hào)長(zhǎng)度超出,限定為15個(gè)中文字符或者30個(gè)英文字符。");
document.form1.J_RoomNu.focus();
return false;
}
var J_BuildingNu = document.form1.J_BuildingNu.value;
if (J_BuildingNu.lenght > 30){
window.alert("輸入建筑物代號(hào)長(zhǎng)度超出,限定為15個(gè)中文字符或者30個(gè)英文字符。");
document.form1.J_BuildingNu.focus();
return false;
}
var J_AppDate = document.form1.J_AppDate.value;
if (J_AppDate=="") {
window.alert("請(qǐng)輸入申請(qǐng)日期");
document.form1.J_AppDate.focus();
return false;
}
var J_RoomAssignDate = document.form1.J_RoomAssignDate.value;
if (J_RoomAssignDate=="") {
window.alert("請(qǐng)輸入用房分配日期");
document.form1.J_RoomAssignDate.focus();
return false;
}
var J_UseDate = document.form1.J_UseDate.value;
if (J_UseDate=="") {
window.alert("請(qǐng)輸入用房結(jié)束日期");
document.form1.J_UseDate.focus();
return false;
}
var J_RoomAssignExcuter = document.form1.J_RoomAssignExcuter.value;
if (J_RoomAssignExcuter.lenght > 15){
window.alert("輸入經(jīng)手人長(zhǎng)度超出,限定為7個(gè)中文字符或者15個(gè)英文字符。");
document.form1.J_RoomAssignExcuter.focus();
return false;
}
var J_RoomUser = document.form1.J_RoomUser.value;
if (J_RoomUser.lenght > 100){
window.alert("輸入用房使用人長(zhǎng)度超出,限定為50個(gè)中文字符或者100個(gè)英文字符。");
document.form1.J_RoomUser.focus();
return false;
}
var J_AssiBy = document.form1.J_AssiBy.value;
if (J_AssiBy.lenght > 15){
window.alert("輸入批準(zhǔn)人長(zhǎng)度超出,限定為7個(gè)中文字符或者15個(gè)英文字符。");
document.form1.J_AssiBy.focus();
return false;
}
var J_AssiDesc = document.form1.J_AssiDesc.value;
if (J_AssiDesc.lenght > 100){
window.alert("輸入批準(zhǔn)意見長(zhǎng)度超出,限定為50個(gè)中文字符或者100個(gè)英文字符。");
document.form1.J_AssiDesc.focus();
return false;
}
var J_Memo = document.form1.J_Memo.value;
if (J_Memo.lenght > 100){
window.alert("請(qǐng)輸入建筑物備注長(zhǎng)度超出,限定為50個(gè)中文字符或者100個(gè)英文字符。");
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/RoomApply_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="380" ><div align="right">申請(qǐng)人:</div></td>
<td width="375"><input name="J_AppBy" type="text" class="text1" size="15" maxlength="15" value="<%=J_AppBy%>"></td>
</tr>
<tr>
<td><div align="right">申請(qǐng)內(nèi)容:</div></td>
<td><input name="J_AppDes" type="text" class="text1" size="20" value="<%=J_AppDes %>" maxlength="100"></td>
</tr>
<tr>
<td><div align="right">分配類型:</div></td>
<td><select name="J_AssiType" class="text1">
<%if(J_AssiType.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="0">選擇建筑物</option>
<%
HashMap hashDept1 = new GetRoomName().getDepartmentNU();
int length1 = hashDept1.size();
String []deptName1 = new String[length1];//部門數(shù)組
String []deptId1= new String[length1];//部門用房面積數(shù)組
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++ ){
if(!deptId1[j].equals(J_BuildingNu)){
%>
<option value=<%=deptId1[j]%>><%= deptName1[j]%></option>
<%}
if(deptId1[j].equals(J_BuildingNu)){
%>
<option value=<%=deptId1[j]%> selected><%=deptName1[j] %></option>
<%}
} %>
</select>
</td>
</tr>
<tr>
<td><div align="right">分配房間編號(hào):</div></td>
<td>
<select name="J_RoomNu" class="text1">
<option value="s">全部房間</option>
<%
int length2 = hashDept2.size();
String []deptName2 = new String[length2];//部門數(shù)組
String []deptId2= new String[length2];//部門用房面積數(shù)組
Iterator itDeptId2 = hashDept2.keySet().iterator();//鍵迭代
Iterator itDeptName2 = hashDept2.values().iterator();//值迭代
int i2=0;
while(itDeptId2.hasNext()){
deptId2[i2] = itDeptId2.next().toString();
i2++;
}
i2=0;
while(itDeptName2.hasNext()){
deptName2[i2] = itDeptName2.next().toString();
i2++;
}
for(int j=0;j<length2;j++ ){
%>
<option value=<%=deptId2[j]%> selected><%= deptName2[j] %></option>
<% }%>
</select>
</td>
</tr>
<tr>
<td><div align="right">分配性質(zhì):</div></td>
<td><select name="J_AssiIs" class="text1">
<option value="1" selected>私用</option>
<option value="2">公有</option>
<option value="3">其他</option>
</select>
</td>
</tr>
<tr>
<td><div align="right">使用部門:</div></td>
<td>
<select name="J_UseDept" class="text1">
<%
HashMap hashDept = new GetDepartment().getDepartment("OrganId","OrganName","organ");
int length = hashDept.size();
String []deptName = new String[length];//部門數(shù)組
int []deptId= new int[length];//部門用房面積數(shù)組
Iterator itDeptId = hashDept.keySet().iterator();//鍵迭代
Iterator itDeptName = hashDept.values().iterator();//值迭代
int i=0;
while(itDeptId.hasNext()){
deptId[i] = Integer.parseInt(itDeptId.next().toString());
i++;
}
i=0;
while(itDeptName.hasNext()){
deptName[i] = itDeptName.next().toString();
i++;
}
for(int j=0;j<length;j++ ){
%>
<option value=<%=deptId[j] %>><%= deptName[j] %></option>
<% }%>
</select>
</td>
</tr>
<tr>
<td><div align="right">申請(qǐng)日期:</div></td>
<td>
<input name="J_AppDate" id="J_AppDate" size="10" maxlength="10" readonly="readonly" value="<%=J_AppDate%>" 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_RoomAssignDate" id="J_RoomAssignDate" size="10" maxlength="10" readonly="readonly" type="text" class="text1" onMouseDown="javascript:setday(form1.J_RoomAssignDate);"/>
<font color=red>*</font></td>
</tr>
<tr>
<td><div align="right">用房使用結(jié)束日期:</div></td>
<td>
<input name="J_UseDate" id="J_UseDate" size="10" maxlength="10" readonly="readonly" type="text" class="text1" onMouseDown="javascript:setday(form1.J_UseDate);"/>
<font color=red>*</font>
</td>
</tr>
<tr>
<td><div align="right">用房分配經(jīng)手人:</div></td>
<td><input name="J_RoomAssignExcuter" type="text" class="text1" size="15" maxlength="15"></td>
</tr>
<tr>
<td><div align="right">用房使用人:</div></td>
<td><input name="J_RoomUser" type="text" class="text1" size="20" maxlength="100"></td>
</tr>
<tr>
<td><div align="right">批準(zhǔn)人:</div></td>
<td><input name="J_AssiBy" type="text" class="text1" size="15" maxlength="15"></td>
</tr>
<tr>
<td><div align="right">批準(zhǔn)意見:</div></td>
<td><input name="J_AssiDesc" type="text" class="text1" size="20" maxlength="100"></td>
</tr>
<tr>
<td><div align="right">備注:</div></td>
<td><textarea name="J_Memo" rows="5" class="text1"></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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -