equipment_batch_search_result.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:
电子政务应用
开发平台:
Java
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <%@ page import="java.util.*"%>
- <%@ page import="java.sql.*"%>
- <%@ page import="com.vnex.intranet.util.*"%>
- <%@ page import="com.vnex.intranet.equipment.value.*"%>
- <%@ page import="com.vnex.intranet.equipment.process.*"%>
- <%
- HttpSession sess;
- String navBar;
- int start = 1;
- int rows = 10;
- EquipmentListValueBean equipmentlist;
- Collection eList;
- String action;
- String categoryId = "";
- String categoryName = "";
- String keyword = "";
- %>
- <jsp:useBean id="KeywordSearchProxy" class="com.vnex.intranet.equipment.proxy.EquipmentProxyBean" scope="Application" />
- <%
- sess = request.getSession( false );
- if (request.getParameter("categoryId") != null )
- {
- categoryId = request.getParameter("categoryId");
- keyword = request.getParameter("categoryId");
- sess.setAttribute("categoryId2",keyword);
- }
- if (request.getParameter("categoryName") != null)
- {
- categoryName = (request.getParameter("categoryName"));
- sess.setAttribute("categoryName2",categoryName);
- }
- if ("true".equals(request.getParameter("cache")))
- {
- equipmentlist = (EquipmentListValueBean)sess.getAttribute("slist");
- start = Integer.parseInt(request.getParameter("start"));
- categoryName = (String)sess.getAttribute("categoryName2");
- categoryId = (String)sess.getAttribute("categoryId2");
- if (categoryId == null)
- categoryId = "";
- if (categoryName == null)
- categoryName = "";
- equipmentlist = KeywordSearchProxy.batchSearchEquipmentByKeyword(categoryId);
- sess.setAttribute("slist",equipmentlist);
- }
- else
- {
- if (request.getParameter("keyword") != null)
- keyword = request.getParameter("keyword");
- equipmentlist = KeywordSearchProxy.batchSearchEquipmentByKeyword(keyword);
- sess.setAttribute("slist",equipmentlist);
- }
- eList = equipmentlist.getEquipmentList();
- %>
- <script language=JavaScript>
- function toCategory()
- {
- myForm.action="/mainctrl/categoryList?pageName=equipmentBatchSearchResult";
- myForm.submit();
- }
- </script>
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <form name="myForm" method="post" action="" >
- <DIV align=center>
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center"><br>
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr bgcolor="#fafafa" align ="center" >
- <td>
- <table width="600" border="0" cellspacing="0" cellpadding="2">
- <tr bgcolor="#666666" >
- <td colspan="2" ><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>>><a href="/mainctrl/equipmentSearchResult"><font color="#FFFFFF">固定资产管理</font></a>>>固定资产按批查询</font></td>
- </tr>
- <tr>
- <td colspan="2" height="30"><font class="strong" > 类别:</font>
- <input type="hidden" name="keyword" class="file" value="<%=categoryId%>">
- <input type="test" name="categoryName" class="file" readonly value="<%=categoryName%>">
- <input type="button" name="Submit2" value="选择" class="file" onClick="toCategory()")>
- </td>
- </tr>
- </table>
- <table class=title cellspacing=1 cellpadding=2 width="100%" border=0 >
- <tr align=middle>
- <td width="12%"><font class="strong">批号</font></td>
- <td width="22%"><font class="strong">名称</font></td>
- <td width="16%"><font class="strong">类别</font></td>
- <td width="22%"><font class="strong">型号</font></td>
- <td width="12%"><font class="strong">剩余数量</font></td>
- <td width="16%"><font class="strong">购入时间 </font></td>
- </tr>
- <%
- int i = 0;
- int r;
- if (start > eList.size() - (eList.size() % rows))
- r = eList.size() % rows;
- else
- r = 10;
- Iterator it = eList.iterator();
- while(i < start - 1)
- {
- it.next();
- i ++;
- }
- i = 0;
- while(i < r)
- {
- EquipmentValueBean eInfo= (EquipmentValueBean)it.next();
- if (i % 2 == 0)
- {
- %>
- <tr align=middle bgColor="#e0e0e0">
- <%
- }
- else
- {
- %>
- <tr align=middle bgColor="#fafafa">
- <%
- }
- %>
- <td width="12%" ><a href="/mainctrl/equipmentCodeUseAdd?batchId=<%=eInfo.getBatchId()%>&start=<%=start%>"><%=eInfo.getBatchId()%></a></td>
- <td width="22%" ><%=FieldUtil.filterScriptTag(eInfo.getEquipmentName())%><br></td>
- <td width="16%" ><%=FieldUtil.filterScriptTag(eInfo.getCategoryName())%></td>
- <td width="22%" ><%=FieldUtil.filterScriptTag(eInfo.getModel())%></td>
- <td width="12%" ><%=eInfo.getQuantity()%></td>
- <td width="16%" ><%
- if (eInfo.getBuyDate() != null) out.print(eInfo.getBuyDate().toString().substring(0,10));
- %>
- </td>
- </tr>
- <%
- i ++;
- }
- %>
- <%
- action = "/mainctrl/equipmentBatchSearchResult?cache=true&categoryId="+categoryId+"&categoryName="+categoryName;
- navBar = NavBar.makeNavbar(start,eList.size(),rows,action);
- %>
- <tr align=middle>
- <td colspan="7" bgcolor="#e0e0e0">
- <div align="left"> <%=navBar%>
- </div>
- </td>
- </tr>
- <tr bgColor="#fafafa">
- <td colspan="6" align="center">
- <input type="button" name="toback" class="file" onClick="location='/mainctrl/equipmentSearchResult'" height=30 value="返回">
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form>
- </DIV>
- </BODY>
- </HTML>