⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 roomapplyassign_eh.jsp

📁 JSP移动商品管理平台源代码.........
💻 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_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");//申请人
    J_AppDate = request.getParameter("J_AppDate");//申请日期
    J_AppDes = request.getParameter("J_AppDes");//申请内容
   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("输入申请人长度超出,限定为7个中文字符或者15个英文字符。");
             		document.form1.J_AppBy.focus();
             		return false;
		}
var J_AppDes = document.form1.J_AppDes.value;
if (J_AppDes.lenght  > 100){
		window.alert("输入申请内容长度超出,限定为50个中文字符或者100个英文字符。");
             		document.form1.J_AppDes.focus();
             		return false;
		}	
var J_RoomNu = document.form1.J_RoomNu.value;

			 if (J_RoomNu=="") {
                	window.alert("请输入分配房间编号");
                 	document.form1.J_RoomNu.focus();
                 	return false;
                	}

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_AppDate = document.form1.J_AppDate.value;
			
			 if (J_AppDate=="") {
                	window.alert("请输入申请日期");
                 	document.form1.J_AppDate.focus();
                 	return false;
                	}
var J_RoomAssignDate = document.form1.J_RoomAssignDate.value;
			
			 if (J_RoomAssignDate=="") {
                	window.alert("请输入用房分配日期");
                 	document.form1.J_RoomAssignDate.focus();
                 	return false;
                	}
 var J_UseDate = document.form1.J_UseDate.value;
			
			 if (J_UseDate=="") {
                	window.alert("请输入用房结束日期");
                 	document.form1.J_UseDate.focus();
                 	return false;
                	}
       

var J_RoomAssignExcuter = document.form1.J_RoomAssignExcuter.value;
if (J_RoomAssignExcuter.lenght  > 15){
		window.alert("输入经手人长度超出,限定为7个中文字符或者15个英文字符。");
             		document.form1.J_RoomAssignExcuter.focus();
             		return false;
		}
var J_RoomUser = document.form1.J_RoomUser.value;
if (J_RoomUser.lenght  > 100){
		window.alert("输入用房使用人长度超出,限定为50个中文字符或者100个英文字符。");
             		document.form1.J_RoomUser.focus();
             		return false;
		}
var J_AssiBy = document.form1.J_AssiBy.value;
if (J_AssiBy.lenght  > 15){
		window.alert("输入批准人长度超出,限定为7个中文字符或者15个英文字符。");
             		document.form1.J_AssiBy.focus();
             		return false;
		}
var J_AssiDesc = document.form1.J_AssiDesc.value;
if (J_AssiDesc.lenght  > 100){
		window.alert("输入批准意见长度超出,限定为50个中文字符或者100个英文字符。");
             		document.form1.J_AssiDesc.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/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">申请人:</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">申请内容:</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];//部门数组
		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++ ){   
		       
         	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">分配房间编号:</div></td>
      <td>
      <select name="J_RoomNu" class="text1"> 
      <option value="s">全部房间</option>     
        <%
        
        int length2 = hashDept2.size();
		String []deptName2 = new String[length2];//部门数组
		String []deptId2= new String[length2];//部门用房面积数组
		
		
		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">分配性质:</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];//部门数组
		int []deptId= new int[length];//部门用房面积数组
		
		
		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">申请日期:</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">用房使用结束日期:</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">用房分配经手人:</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">批准人:</div></td>
      <td><input name="J_AssiBy" type="text" class="text1" size="15" maxlength="15"></td>
    </tr>
    <tr>
      <td><div align="right">批准意见:</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>&nbsp;&nbsp;</td>
        <td>&nbsp;&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2"><div align="center">
        <input type="submit" name="Submit" value="提  交" class="anniu">
		&nbsp;&nbsp;
        <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 + -