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

📄 rent_info_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_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>&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 + -