?? materialmaintaintable_insert.jsp
字號(hào):
<%@ page language="java" import="java.util.*,imis_mate.DAO.*,imis_mate.bean.*" pageEncoding="gb2312" import="common.*" errorPage="error.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>物品維修信息錄入</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script language="JavaScript" src="/Imis/imis_mate/js/checkdata.js"></script>
<script language="JavaScript" src="/Imis/imis_mate/js/MaterialMaintainTable.js"></script>
<script type="text/javascript">
function getvalue() {
document.form1.action = "/Imis/imis_mate/MaterialMaintainTableServlet?pattern=getValue&&pag=insert";
document.form1.target = "_self";
document.form1.submit();
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body background="/Imis/imis_mate/images/bg_main.png">
<table width="100%" border="0" background="/Imis/imis_mate/images/bg_main2.png">
<tr class="tubiao">
<td>物品維修信息錄入</td>
</tr>
</table>
<form method="post" action="../imis_mate/MaterialMaintainTableServlet?pattern=insert" name="form1" onSubmit="return checkValue()">
<table align="center" width="582" class="ziti" background="images/bg_main.png" border="0" cellspacing="0">
<%request.getSession().setAttribute("new","new"); %>
<tr>
<td height="23" align="right">物品名稱</td>
<td height="23"><input name="materialName" type="text" class="text1" id="materialName" size="20" maxlength="50" value="${requestScope.mmb.materialName}" />
<font color="#ff0000">*</font></td>
<td height="23"> <div align="right">物品類型</div></td>
<td height="23">
<%-- <input name="materialTypeNo" type="text" id="materialTypeNo" class="text1"/>--%>
<%-- <select name="materialTypeNo" id="buyDep" class="text1">--%>
<%-- <% --%>
<%-- int materialTypeNo = 0;--%>
<%-- String materialTypeName = null;--%>
<%-- MaterialDAO mate = new MaterialDAO();--%>
<%-- ArrayList list = mate.getMaterial();--%>
<%-- Iterator itr = list.iterator();--%>
<%-- while (itr.hasNext()) {--%>
<%-- Hashtable ht = (Hashtable) itr.next(); --%>
<%-- materialTypeNo = Integer.parseInt(ht.get("MaterialTypeNo").toString());--%>
<%-- materialTypeName = ht.get("MaterialTypeName").toString(); --%>
<%-- --%>
<%-- %>--%>
<%-- <option value=<%=materialTypeNo%>><%=materialTypeName%></option>--%>
<%-- <%--%>
<%-- }--%>
<%-- %>--%>
<%-- </select>--%>
<select name="materialTypeNo" id="materialTypeNo" class="text1">
<%
MaterialMaintainBean mmb1 = (MaterialMaintainBean)request.getAttribute("mmb");
String materialTypeNo = "";
String materialTypeName = "";
MaterialDAO mate = new MaterialDAO();
ArrayList list2 = mate.getMaterial();
Iterator itr2 = list2.iterator();
while (itr2.hasNext()) {
Hashtable ht = (Hashtable) itr2.next();
materialTypeNo = ht.get("MaterialTypeNo").toString();
materialTypeName = ht.get("MaterialTypeName").toString();
if(mmb1!=null&&mmb1.getMaterialTypeNo().equals(materialTypeNo)){%>
<option value=<%=materialTypeNo%> selected><%=materialTypeName%></option>
<%}
else {%>
<option value=<%=materialTypeNo%>><%=materialTypeName%></option>
<%}
}
%>
</select>
<font color="#ff0000">*</font> </td>
</tr>
<tr>
<td height="23" align="right">型號(hào)</td>
<td height="23"><input name="maModel" type="text" class="text1" id="maModel" size="20" maxlength="50" value="${requestScope.mmb.maModel}"/></td>
<td height="23"><div align="right">品牌</div></td>
<td height="23"><input name="maBrand" type="text" class="text1" id="maBrand" size="20" maxlength="50" value="${requestScope.mmb.maBrand}"/> </td>
</tr>
<tr>
<td height="23" align="right">產(chǎn)地</td>
<td height="23"><input name="maMadeIn" type="text" class="text1" id="maMadeIn" size="20" maxlength="50" value="${requestScope.mmb.maMadeIn}"/></td>
<td height="23" align="right">維修數(shù)量</td>
<td height="23"><input name="maintainCount" type="text" class="text1" id="maintainCount" size="10" maxlength="9" value="${requestScope.mmb.maintainCount}"/>
<font color="#ff0000">*</font></td>
</td>
</tr>
<tr>
<td height="23" align="right">維修人</td>
<td height="23"><input name="userCode" type="text" class="text1" id="userCode" size="20" maxlength="30" value="${requestScope.mmb.userCode}"/></td>
<td height="23"><div align="right">維修部門</div></td>
<td height="23">
<select name="maintainDep" id="maintainDep" class="text1" >
<%
MaterialMaintainBean mmb = (MaterialMaintainBean)request.getAttribute("mmb");
int deptId = 0;
String deptName = null;
DepartmentsBean describe = new DepartmentsBean();
ArrayList list = describe.getDepts();
Iterator itr = list.iterator();
while (itr.hasNext()) {
Hashtable ht = (Hashtable) itr.next();
deptId = Integer.parseInt(ht.get("deptId").toString());
deptName = ht.get("deptName").toString();
if(mmb!=null&&mmb.getMaintainDep()==deptId){%>
<option value=<%=deptId%> selected><%=deptName%></option>
<%}
else
{%>
<option value=<%=deptId%>><%=deptName%></option>
<%
}
}
%>
</select> </td>
</tr>
<tr>
<td height="23" align="right">責(zé)任人</td>
<td height="23"><input name="managerBy" type="text" class="text1" id="managerBy" size="20" maxlength="30" value="${requestScope.mmb.managerBy}"/></td>
<td height="23"><div align="right">使用人</div></td>
<td height="23">
<input name="useBy" type="text" class="text1" id="useBy" size="20" maxlength="30" value="${requestScope.mmb.useBy}"/> </td>
</tr>
<tr>
<td height="23" align="right">建筑物代號(hào)</td>
<td height="23">
<select name="buildingNu" id="buildingNu" class="text1" onchange="getvalue()">
<option value="">無</option>
<%
MaterialMaintainBean mmb3 = (MaterialMaintainBean)request.getAttribute("mmb");
String buildingNu = null;
String buildingName = null;
HousBuildingAndRoom mate3 = new HousBuildingAndRoom();
ArrayList list3 = mate3.getBuildingList();
Iterator itr3 = list3.iterator();
while (itr3.hasNext()) {
Hashtable ht = (Hashtable) itr3.next();
buildingNu = ht.get("BuildingNu").toString();
buildingName = ht.get("BuildingName").toString();
if(mmb3!=null && mmb3.getBuildingNu()!=null && mmb3.getBuildingNu().equals(buildingNu)){%>
<option value=<%=buildingNu%> selected><%=buildingName%></option>
<%}
else
{%>
<option value=<%=buildingNu%>><%=buildingName%></option>
<%
}
}
%>
</select>
<div align="right"></div> </td>
<td height="23" align="right">放置位置房間</td>
<td height="23">
<select name="roomNu" id="roomNu" class="text1">
<option value="">無</option>
<%
ArrayList roomList = (ArrayList)request.getAttribute("roomList");
String RoomNu = null;
if(roomList!=null && roomList.size() != 0) {
Iterator itr4 = roomList.iterator();
while (itr4.hasNext()) {
RoomNu = ht.get("RoomNu").toString();
if(mmb3!=null && mmb3.getRoomNu()!=null && mmb3.getRoomNu().equals(RoomNu)){%>
<option value=<%=RoomNu%> selected><%=RoomNu%></option>
<%}
else
{%>
<option value=<%=RoomNu%>><%=RoomNu%></option>
<%
}
}}
%>
</select>
</td>
</tr>
<tr>
<td height="23" align="right">維修費(fèi)用</td>
<td height="23"><input name="maintainFee" type="text" class="text1" id="maintainFee" size="10" maxlength="9" value="${requestScope.mmb.maintainFee}"/></td>
<td height="23"><div align="right">維修日期</div></td>
<td height="23">
<input name="maintainDate" id="maintainDate" size="10" maxlength="10"
type="text" class="text1" value="${requestScope.mmb.maintainDate}"
readonly="readonly" onMouseDown="javascript:setday(form1.maintainDate);" />
<%-- <Script class="text1">DateBox("maintainDate")</Script>--%>
<font color="#ff0000">*</font> </td>
<tr>
<td height="23"><div align="right">維修原因</div></td>
<td height="23" align="left"><textarea name="maintainCause" cols="20" rows="4" id="maintainCause" class="textarea1">${requestScope.mmb.maintainCause}</textarea> </td>
<td width="16%" height="23"><div align="right">摘要</div></td>
<td height="23"><textarea name="remark" cols="20" rows="4" id="remark" class="textarea1">${requestScope.mmb.reMark}</textarea> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr> <td height="23" colspan="4" align="left">
<div align="center">
<input type="submit" name="Submit" value="提 交" class="anniu"/>
<input type="reset" name="Submit" 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 + -