?? materialchangetable_update.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" import="common.*,java.util.*,imis_mate.bean.MaterialChangeBean,imis_mate.DAO.*" errorPage="error.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!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>
</head>
<body background="/Imis/imis_mate/images/bg_main.png">
<script language="JavaScript" src="/Imis/imis_mate/js/checkdata.js"></script>
<script language="JavaScript" src="/Imis/imis_mate/js/MaterialChangeTable.js"></script>
<link rel="stylesheet" type="text/css" href="/Imis/imis_mate/css/style.css">
<script type="text/javascript" >
function NewPageSubmit() {
form1.action = "../servlet/MaterialChangeServlet?pattern=newPage";
form1.onsubmit = "";
}
function UpdateSubmit(){
<%-- r = CheckSubmit();--%>
ask = confirm("你確定修改該記錄嗎?");
if(ask){
if(checkValue()){
form1.action = "../servlet/MaterialChangeServlet?pattern=update";
return true;
}
else{
return false;
}
}
}
function DeleteSubmit(){
ask = confirm("你確定刪除該記錄嗎?");
if(ask){
form1.action = "../servlet/MaterialChangeServlet?pattern=delete";
parent.iframe_elec_tree.location.reload(); //刷新左半邊的樹 框架名稱在menu頁面內
form1.onsubmit = "";
}
}
function getvalue() {
document.form1.action = "/Imis/servlet/MaterialChangeServlet?pattern=getValue&&pag=update";
document.form1.target = "_self";
document.form1.submit();
}
function windowClose() {
//采購入庫
form1.onsubmit = "";
form1.action = "/Imis/servlet/MaterialChangeServlet?pattern=windowClose"
}
</script >
<table width="100%" border="0" background="/Imis/imis_mate/images/bg_main2.png">
<tr>
<td><span class="tubiao">物品變更信息</span></td>
</tr>
</table>
<c:if test="${requestScope.mate!=null}">
<form method="post" action="" name="form1" onSubmit="return checkValue()">
<table align="center" width="538" border="0" class="ziti">
<tr class="ziti">
<td align="right" width="18%">變更編號</td>
<td width="35%"><input name="changeID" type="text" class="text1" id="changeID" value="${requestScope.mate.changeID}" size="10" maxlength="9" readonly="readonly"/>
<font color="#ff0000">*</font></td>
<td width="14%"><div align="right">更變類型</div></td>
<td width="33%"><select name="changeType" id="changeType" class="text1" value="${requestScope.mate.changeType}">
<c:if test="${requestScope.mate.changeType==1}">
<option value="1" selected>入庫</option>
</c:if>
<c:if test="${requestScope.mate.changeType==2}">
<option value="2" selected>轉部門</option>
</c:if>
<c:if test="${requestScope.mate.changeType==3}">
<option value="3" selected>報廢</option>
</c:if>
<c:if test="${requestScope.mate.changeType==4}">
<option value="4" selected>其他</option>
</c:if>
</select><font color="#ff0000">*</font></td>
</tr>
<tr>
<td align="right" width="18%">原出庫ID</td>
<td width="35%"><input name="outNoId" type="text" class="text1" id="outNoId" value="${requestScope.mate.outNoId}" size="10" maxlength="9" readonly="readonly"/>
<font color="#ff0000">*</font></td>
<td width="14%"><div align="right"></div></td>
<td width="33%"> </td>
</tr>
<tr>
<td align="right" width="18%">更變數量</td>
<td width="35%"><input name="outCount" type="text" class="text1" id="outCount" value="${requestScope.mate.outCount}" size="10" maxlength="9" readonly="readonly"/>
<font color="#ff0000">*</font></td>
<td width="14%"><div align="right">更變日期</div></td>
<td width="33%">
<input name="outDate" id="outDate" size="10" maxlength="10"
type="text" class="text1"
readonly="readonly" value="${requestScope.mate.outDate}"/><font color="#ff0000">*</font>
<%-- <Script>DateBox("outDate")</Script><font color="#ff0000">*</font></td>--%>
</tr>
<tr>
<td align="right" width="18%"> 更變人</td>
<td width="35%"><input name="userCode" type="text" class="text1" id="userCode" value="${requestScope.mate.userCode}" size="20" maxlength="30" readonly="readonly"/></td>
<td width="14%"><div align="right"></div></td>
<td width="33%"> </td>
</tr>
<tr>
<td align="right" width="18%"> 原部門 </td>
<td width="35%">
<select name="oraDep" id="oraDep" class="text1" >
<%
MaterialChangeBean mate = (MaterialChangeBean)request.getAttribute("mate");
if(mate!=null)
{ int deptId = 0;
String deptName = null;
DepartmentsBean describe1 = new DepartmentsBean();
ArrayList list1 = describe1.getDepts();
Iterator itr1 = list1.iterator();
while (itr1.hasNext()) {
Hashtable ht = (Hashtable) itr1.next();
deptId = Integer.parseInt(ht.get("deptId").toString());
deptName = ht.get("deptName").toString();
if(mate.getOraDep()==deptId){%>
<option value=<%=deptId%> selected><%=deptName%></option>
<%}
else
{%>
<%-- <option value=<%=deptId%>><%=deptName%></option>--%>
<%
}
}}
%>
</select>
</td>
<td align="right" width="18%">責任人</td>
<td width="35%"><input name="managerBy" type="text" class="text1" id="managerBy" value="${requestScope.mate.managerBy}" size="20" maxlength="30"/></td>
</tr>
<tr>
<td width="14%"><div align="right">轉入部門</div></td>
<td width="33%">
<select name="useDep" id="useDep" class="text1" >
<option value="">無</option>
<%
MaterialChangeBean mate1 = (MaterialChangeBean)request.getAttribute("mate");
if(mate1!=null)
{ int deptId = 0;
String deptName = null;
DepartmentsBean describe1 = new DepartmentsBean();
ArrayList list1 = describe1.getDepts();
Iterator itr1 = list1.iterator();
while (itr1.hasNext()) {
Hashtable ht = (Hashtable) itr1.next();
deptId = Integer.parseInt(ht.get("deptId").toString());
deptName = ht.get("deptName").toString();
if(mate.getUseDep()==deptId){%>
<option value=<%=deptId%> selected><%=deptName%></option>
<%}
else
{%>
<%-- <option value=<%=deptId%>><%=deptName%></option>--%>
<%
}
}
}
%>
</select>
</td>
<td width="14%"><div align="right">使用人</div></td>
<td width="33%"><input name="useBy" type="text" class="text1" id="useBy" value="${requestScope.mate.useBy}" size="20" maxlength="30" readonly="readonly"/>
</td>
</tr>
<tr>
<td align="right" width="18%">建筑物代號</td>
<td>
<%-- <input name="buildingNu" type="text" class="text1" id="buildingNu2" value="${requestScope.mate.buildingNu}" size="20" maxlength="30"/>--%>
<select name="buildingNu" id="buildingNu" class="text1" onchange="getvalue()">
<option value="">無</option>
<%
MaterialChangeBean mbb = new MaterialChangeBean();
mbb = (MaterialChangeBean)request.getAttribute("mate");
String buildingNu = null;
String buildingName = null;
HousBuildingAndRoom mate3 = new HousBuildingAndRoom();
ArrayList buildList = mate3.getBuildingList();
Iterator buildItr = buildList.iterator();
while (buildItr.hasNext()) {
Hashtable ht = (Hashtable) buildItr.next();
buildingNu = ht.get("BuildingNu").toString();
buildingName = ht.get("BuildingName").toString();
if(mbb!=null && mbb.getBuildingNu()!=null && mbb.getBuildingNu().equals(buildingNu)){%>
<option value=<%=buildingNu%> selected><%=buildingName%></option>
<%}
else
{%>
<%-- <option value=<%=buildingNu%>><%=buildingName%></option>--%>
<%
}
}
%>
</select>
</td>
<td align="right" width="14%">放置位置房間</td>
<td>
<%-- <input name="roomNu" type="text" class="text1" id="roomNu" value="${requestScope.mate.roomNu}" size="20" maxlength="30"/> --%>
<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 itr2 = roomList.iterator();
while (itr2.hasNext()) {
Hashtable ht = (Hashtable) itr2.next();
RoomNu = ht.get("RoomNu").toString();
if(mbb!=null && mbb.getRoomNu()!=null && mbb.getRoomNu().equals(RoomNu)){%>
<option value=<%=RoomNu%> selected><%=RoomNu%></option>
<%}
else
{%>
<%-- <option value=<%=RoomNu%>><%=RoomNu%></option>--%>
<%
}
}}
%>
</select>
</td></tr>
<tr>
<td width="18%"><div align="right">更變原因</div></td>
<td align="left"><textarea name="changeCause" cols="20" rows="4" id="changeCause" class="textarea1" readonly="readonly"> ${requestScope.mate.changeCause}</textarea>
</td>
<td width="14%"><div align="right">摘要</div></td>
<td align="left"><textarea name="remark" cols="20" rows="4" id="remark" class="textarea1" readonly="readonly">${requestScope.mate.reMark}</textarea>
</td>
</tr><tr>
<td> </td>
</tr>
<c:if test="${requestScope.notSubmit==null}">
<tr>
<td colspan="4" align="left"><div align="center">
<%-- <input type="submit" name="Submit" value="添 加" onclick="NewPageSubmit()" class="anniu"/>--%>
<%-- <input type="submit" name="Submit" value="修 改" onclick="return UpdateSubmit()" class="anniu"/>--%>
<input type="submit" name="Submit" value="刪 除" onclick="DeleteSubmit()" class="anniu"/>
</div></td>
</tr>
</c:if>
<c:if test="${requestScope.notSubmit!=null}">
<tr>
<td colspan="4" align="left"><div align="center">
<input type="submit" name="Submit" value="關 閉" onclick="windowClose()" class="anniu"/>
</div></td>
</tr>
</c:if>
</table>
</form>
</c:if>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -