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

📄 materialchangetable_insert.jsp

📁 JSP移动商品管理平台源代码.........
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" import="common.*,java.util.*,imis_mate.bean.*,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>
<script type="text/javascript">
		function InsertSubmit(){ 

				form1.action = "../servlet/MaterialChangeServlet?pattern=insert";
				parent.iframe_elec_tree.location.reload();  //刷新左半边的树 框架名称在menu页面内
		}
		function getvalue() {
		    document.form1.action = "/Imis/servlet/MaterialChangeServlet?pattern=getValue&&pag=insert";
		    document.form1.target = "_self";
		    document.form1.submit();
		}

		

</script>


</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="js/MaterialChangeTable.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">
	<table width="100%"  border="0" background="/Imis/imis_mate/images/bg_main2.png">
	  <tr class="tubiao">
	    <td>物品使用变更信息录入</td>
	  </tr>
	</table>

<form method="post" action="../servlet/MaterialChangeServlet?pattern=insert"  name="form1" onSubmit="return checkValue()">
  <table align="center" width="537" border="0" class="ziti" background="/Imis/imis_mate/images/bg_main.png">
    <tr class="ziti">
      <td align="right" width="19%">更变类型</td>
      <td width="29%">       
           	<select name="changeType" value="${requestScope.mate.changeType}" class="text1">
				<option value="1" <c:if test="${requestScope.mate.changeType==1}">selected</c:if> >
					入库
				</option>
				<option value="2" <c:if test="${requestScope.mate.changeType==2}">selected</c:if> >
						转部门
				</option>
				<option value="3" <c:if test="${requestScope.mate.changeType==3}">selected</c:if> >
						报废
					</option>
				<option value="4" <c:if test="${requestScope.mate.changeType==4}">selected</c:if> >
						其他
				</option>
			</select> 
            
            
            <font color="#ff0000">*</font></td>
      <td width="16%"><div align="right"></div></td>
      <td width="36%">&nbsp;      </td>
    </tr>
    <tr>
      <td align="right" width="19%">原出库ID</td>
      <td width="29%"><input name="outNoId" type="text"  class="text1" id="outNoId" size="10" maxlength="9" 
      	<c:if test="${requestScope.mateOSB!=null}">
      		value="${requestScope.mateOSB.outNoId}" 
      	</c:if>
      	<c:if test="${requestScope.mate!=null}">
      		value="${requestScope.mate.outNoId}" 
      	</c:if>
      readonly="readonly"/>
      <font color="#ff0000">*</font></td>
      <td width="16%"><div align="right"></div></td>
      <td width="36%">&nbsp;      </td>
    </tr>
    <tr>
      <td align="right" width="19%">更变数量</td>
      <td width="29%"><input name="outCount" type="text"  class="text1" id="outCount" size="10" maxlength="9" readonly="readonly" 
      	<c:if test="${requestScope.mateOSB!=null}">
      		value="${requestScope.mateOSB.outCount}"
 		</c:if>
 		<c:if test="${requestScope.mate!=null}">
      		value="${requestScope.mate.outCount}"
 		</c:if>
      />
      <font color="#ff0000">*</font></td>
<%--      <td width="16%"><div align="right">更变日期</div></td>--%>
<%--      <td width="36%">--%>
<%--      <input name="outDate" id="outDate" size="10" maxlength="10"--%>
<%--							type="text" class="text1"--%>
<%--					 readonly="readonly" 		onMouseDown="javascript:setday(form1.outDate);" /><font color="#ff0000">*</font>--%>
     
<%--      <input name="outDate" type="text"  class="text1" id="outDate" size="11" maxlength="11"/>--%>
<%--	  <Script>DateBox("outDate")</Script></td>--%>
    </tr>
    <tr>
      <td align="right" width="19%"> 更变人</td>
      <td width="29%"><input name="userCode" type="text"  class="text1" id="userCode" size="20" maxlength="30" value="${requestScope.mate.userCode}"/></td>
      <td width="16%"></td>
      <td width="36%">&nbsp;      </td>
    </tr>
	<tr>
      <td align="right" width="19%"> 原部门 </td>
      <td width="29%">
      <c:if test="${requestScope.mateOSB != null}">
     <select name="oraDep" id="oraDep"  class="text1" >
       <% 
		MaterialOutSearchBean mate = (MaterialOutSearchBean)request.getAttribute("mateOSB"); 
		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!=null&&mate.getUseDep()!=0&&mate.getUseDep()==deptId){%>
		<option value=<%=deptId%> selected><%=deptName%></option>
		<%}
		else
		{%>
    
		<%		
		}
		}
		
		%>
        </select>
      </c:if>
      

        <c:if test="${requestScope.mate !=null}">
      <select name="oraDep" id="oraDep"  class="text1" >
       <% 
		MaterialChangeBean mate2 = (MaterialChangeBean)request.getAttribute("mate");
		if(mate2!=null){   
			int  deptId2 = 0;
			String deptName2 = null;
			DepartmentsBean describe2 = new DepartmentsBean();
			ArrayList list2 = describe2.getDepts();
			Iterator itr2 = list2.iterator();
       		 while (itr2.hasNext()) {
     			Hashtable ht = (Hashtable) itr2.next();  
				deptId2      =  Integer.parseInt(ht.get("deptId").toString());
       			deptName2   =  ht.get("deptName").toString(); 
		if(mate2.getOraDep()==deptId2){%>

		<option value=<%=deptId2%> selected><%=deptName2%></option>
		
		<%}
		else
		{%>
    
		<%		
		}
		}}
		
		%>
        </select>
        </c:if>
        </td>
        
         <td align="right" width="19%">责任人</td>
      <td width="29%"><input name="managerBy" type="text"  class="text1" size="20" maxlength="30" value="${requestScope.mate.managerBy}"/></td>
      
      
    </tr>
       <tr>
       <td width="16%"><div align="right">转入部门</div></td>
      <td width="36%">
      <select name="useDep" id="useDep"  class="text1">
      	<option value="">无</option>
        <% 
		MaterialChangeBean mate4 = (MaterialChangeBean)request.getAttribute("mate");
		int deptId3 = 0;
		String deptName3 = null;
		DepartmentsBean describe3 = new DepartmentsBean();
		ArrayList list3 = describe3.getDepts();
		Iterator itr3 = list3.iterator();
        while (itr3.hasNext()) {
     	Hashtable ht = (Hashtable) itr3.next();  
		deptId3      =  Integer.parseInt(ht.get("deptId").toString());
       	deptName3   =  ht.get("deptName").toString(); 
       	
       	if(mate4!=null && mate4.getUseDep()==deptId3){%>

		<option value=<%=deptId3%> selected><%=deptName3%></option>
		
		<%}
		else
		{%>
			<option value=<%=deptId3%>><%=deptName3%></option>
		<%		
		}
		}
		
		%>
         
        </select>
      </td>
     <td width="16%"><div align="right">使用人</div></td>
      <td width="36%"><input name="useBy" type="text"  class="text1" size="20" maxlength="30" value="${requestScope.mate.useBy}"/>
      </td>
    </tr>
    <tr>
      <td align="right" width="19%">建筑物代号</td>
      <td>
<%--      <input name="buildingNu" type="text"  class="text1" id="buildingNu4" 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 list = mate3.getBuildingList();
										Iterator itr = list.iterator();
								        while (itr.hasNext()) {
									     	Hashtable ht = (Hashtable) itr.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="16%">放置位置房间</td>
      <td>          
<%--      <input name="roomNu" type="text"  class="text1" id="roomNu3" 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="19%"><div align="right">更变原因</div></td>
      <td align="left"><textarea name="changeCause" cols="20" rows="4" id="changeCause" class="textarea1">${requestScope.mate.changeCause}</textarea>
      </td>
      <td width="16%"><div align="right">摘要</div></td>
      <td align="left"><textarea name="remark" cols="20" rows="4" id="remark" class="textarea1">${requestScope.mate.reMark}</textarea>
      </td>
    </tr><tr>
						<td>&nbsp;</td>
						</tr>
    <tr>
      <td colspan="4" align="left"><div align="center">
          <input type="submit" name="Submit" value="提  交"  class="anniu" onclick="InsertSubmit()"/>
          <input type="reset" name="Submit" value="重  置"  class="anniu">
      </div></td>
    </tr>
  </table>
</form>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -