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

📄 roomrepairapply_eh.jsp

📁 JSP移动商品管理平台源代码.........
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,imis_hous.com.impl.*,common.DepartmentsBean,java.util.*" errorPage="" %>


<%
  String isSubmit = request.getParameter("isSubmit");
  String J_BuildingNu = "0";
  String J_RoomRepairApplyUser=null;
  String J_RoomRepairReq=null;
  String J_RoomRepaireApplyDate=null;
  String J_RoomRepairLeader=null;
  String J_RoomRepairAgreenDate=null;
    String J_HouseIs="1";
   
   
     J_RoomRepairApplyUser = request.getParameter("J_RoomRepairApplyUser");
     
     J_RoomRepairReq = request.getParameter("J_RoomRepairReq");//申请人
     
     J_RoomRepaireApplyDate = request.getParameter("J_RoomRepaireApplyDate");//申请日期
     
     J_RoomRepairLeader = request.getParameter("J_RoomRepairLeader");//申请内容
     
     J_RoomRepairAgreenDate = request.getParameter("J_RoomRepairAgreenDate");
     
     J_HouseIs = request.getParameter("J_HouseIs");
     
     
   if(J_RoomRepairApplyUser==null)
   {
     J_RoomRepairApplyUser = "";
   }
   
    if(J_RoomRepairAgreenDate==null)
   {
     J_RoomRepairAgreenDate = "";
   }
   
   if(J_RoomRepairReq==null)
   {
     J_RoomRepairReq = "";
   }
   
   if(J_RoomRepaireApplyDate==null)
   {
     J_RoomRepaireApplyDate = "";
   }
   
    if(J_RoomRepairLeader==null)
   {
   J_RoomRepairLeader = "";
   }
   
   if(J_HouseIs==null)
   {
  	 J_HouseIs = "1";
   }
  
  if (isSubmit != null && isSubmit.equals("1")) {
   J_BuildingNu = request.getParameter("J_BuildingNu");
  } 
  HashMap hashDept2 = new GetBuildNU().getDepartmentRoom(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 = "RoomRepairApply_eh.jsp";
    document.form1.target = "_self";
    document.form1.submit();
}

function checkValue() {


 var J_RoomRepaireApplyDate = document.form1.J_RoomRepaireApplyDate.value;
			
			 if (J_RoomRepaireApplyDate=="") {
                	window.alert("请输入用房维修申请日期");
                 	document.form1.J_RoomRepaireApplyDate.focus();
                 	return false;
                	}
 var J_RoomRepairAgreenDate = document.form1.J_RoomRepairAgreenDate.value;
			
			 if (J_RoomRepairAgreenDate=="") {
                	window.alert("请输入用房维修批准日期");
                 	document.form1.J_RoomRepairAgreenDate.focus();
                 	return false;
                	}
   var J_RoomRepairOkDate = document.form1.J_RoomRepairOkDate.value;
			
			 if (J_RoomRepairOkDate=="") {
                	window.alert("请输入用房维修完成日期");
                 	document.form1.J_RoomRepairOkDate.focus();
                 	return false;
                	}      	
                	
var J_RoomRepairApplyUser = document.form1.J_RoomRepairApplyUser.value;
if (J_RoomRepairApplyUser.length > 15){
		window.alert("输入用房维修申请人长度超出,限定为7个中文字符或者15个英文字符。");
             		document.form1.J_RoomRepairApplyUser.focus();
             		return false;
		}
var J_RoomRepairReq = document.form1.J_RoomRepairReq.value;
if (J_RoomRepairReq.length > 200){
		window.alert("输入用房维修要求长度超出,限定为100个中文字符或者200个英文字符。");
             		document.form1.J_RoomRepairReq.focus();
             		return false;
		}
var J_RoomRepairLeader = document.form1.J_RoomRepairLeader.value;
if (J_RoomRepairLeader.length > 15){
		window.alert("输入用房维修审批人长度超出,限定为7个中文字符或者15个英文字符。");
             		document.form1.J_RoomRepairLeader.focus();
             		return false;
		}

if (J_RoomNo.length > 30){
		window.alert("输入房屋编号长度超出,限定为15个中文字符或者30个英文字符。");
             		document.form1.J_RoomNo.focus();
             		return false;
		}
var J_RoomRepairWorker = document.form1.J_RoomRepairWorker.value;
if (J_RoomRepairWorker.length > 30){
		window.alert("输入用房维修人长度超出,限定为15个中文字符或者30个英文字符。");
             		document.form1.J_RoomRepairWorker.focus();
             		return false;
		}
var J_RoomRepairResult = document.form1.J_RoomRepairResult.value;
if (J_RoomRepairResult.length > 200){
		window.alert("输入用房维修人长度超出,限定为100个中文字符或者200个英文字符。");
             		document.form1.J_RoomRepairResult.focus();
             		return false;
		}
var StartDate = document.form1.J_RoomRepaireApplyDate.value;
 var EndDate = document.form1.J_RoomRepairOkDate.value;
							 	if( StartDate > EndDate ) { 
                                alert("申请日期不能大于完成日期!"); 
                                return false; 
                               } 
var J_MainFee = document.form1.J_MainFee.value;
			if (J_MainFee!=""){
			var regp = /(^[\d]{1,5}|^[\d]{1,5})($|[\.][\d]{0,3}$)/;
					if (J_MainFee.match(regp) == null) 
				{
				  document.form1.J_MainFee.focus();
				  alert("输入维修费用格式错误!使用“0.000”格式");
					return false;
				}
				}
return true;
}
</script>
</head>

<body background="/Imis/imis_hous/css/images/bg_main.png">
<table width="100%" border="0" class="ziti" 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/RoomRepair_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><div align="right">维修房屋类型:</div></td>
      <td><select name="J_HouseIs" class="text1">
       <%if(J_HouseIs.equals("1")){ %>
	  <option selected value="1">楼</option>
	  <option value="2">层</option>
	  <option value="3">房间</option>
	  <%}else if(J_HouseIs.equals("2")){ %>
	   <option  value="1">楼</option>
	  <option selected value="2">层</option>
	  <option value="3">房间</option>
	  <%}else if(J_HouseIs.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_BuildingNu" class="text1" onchange="getvalue()"> 
<option value="s">选择建筑物</option>
        <%
        HashMap hashDept = new GetBuildNU().getDepartmentNU();
        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_RoomNo" 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 width="386"><div align="right">用房维修申请人:</div></td>
      <td width="385"><input name="J_RoomRepairApplyUser" value="<%=J_RoomRepairApplyUser %>" type="text" class="text1" size="15" maxlength="15" ></td>
    </tr>
    <tr>
      <td><div align="right">用房维修要求:</div></td>
      <td><input name="J_RoomRepairReq" value="<%=J_RoomRepairReq%>" type="text" class="text1" size="20" maxlength="200" ></td></tr>
    <tr>
      <td><div align="right">用房维修申请日期:</div></td>
      <td>
 <input name="J_RoomRepaireApplyDate" id="J_RoomRepaireApplyDate" value="<%=J_RoomRepaireApplyDate%>" size="10" maxlength="10" readonly="readonly" type="text" class="text1" onMouseDown="javascript:setday(form1.J_RoomRepaireApplyDate);"/>
<font color=red>*</font>
</td>
    </tr>
    <tr>
      <td><div align="right">用房维修审批人:</div></td>
      <td><input name="J_RoomRepairLeader" value="<%=J_RoomRepairLeader%>" type="text" class="text1" size="15" maxlength="15"></td>
    </tr>
    <tr>
      <td><div align="right">用房维修批准日期:</div></td>
      <td>
      <input name="J_RoomRepairAgreenDate" id="J_RoomRepairAgreenDate" value="<%=J_RoomRepairAgreenDate%>" size="10" maxlength="10" readonly="readonly" type="text" class="text1" onMouseDown="javascript:setday(form1.J_RoomRepairAgreenDate);"/>
<font color=red>*</font>

    <tr>
      <td><div align="right">用房维修人:</div></td>
      <td><input name="J_RoomRepairWorker" type="text" class="text1" size="20" maxlength="30"></td>
    </tr>
    <tr>
      <td><div align="right">用房维修结果:</div></td>
      <td><input name="J_RoomRepairResult" type="text" class="text1" size="20" maxlength="200"></td>
    </tr>
    <tr>
      <td><div align="right">维修费用:</div></td>
      <td><input name="J_MainFee" type="text" class="text1" value="0.00" size="15"></td>
    </tr>
    <tr>
      <td><div align="right">用房维修完成日期:</div></td>
      <td>
 <input name="J_RoomRepairOkDate" id="J_RoomRepairOkDate" size="10" maxlength="10" readonly="readonly" type="text" class="text1" onMouseDown="javascript:setday(form1.J_RoomRepairOkDate);"/>
<font color=red>*</font>
</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 + -