equipment_batch_search_result.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:

电子政务应用

开发平台:

Java

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  4. <%@ page import="java.util.*"%>
  5. <%@ page import="java.sql.*"%>
  6. <%@ page import="com.vnex.intranet.util.*"%>
  7. <%@ page import="com.vnex.intranet.equipment.value.*"%>
  8. <%@ page import="com.vnex.intranet.equipment.process.*"%>
  9. <%
  10. HttpSession sess;
  11. String navBar;
  12. int start = 1;
  13. int rows = 10;
  14. EquipmentListValueBean equipmentlist;
  15. Collection eList;
  16. String action; 
  17. String categoryId = "";
  18. String categoryName = "";
  19. String keyword = "";
  20. %>
  21. <jsp:useBean id="KeywordSearchProxy" class="com.vnex.intranet.equipment.proxy.EquipmentProxyBean" scope="Application" />
  22. <%
  23. sess = request.getSession( false );
  24. if (request.getParameter("categoryId") != null )
  25. {
  26. categoryId = request.getParameter("categoryId");
  27. keyword = request.getParameter("categoryId");
  28. sess.setAttribute("categoryId2",keyword);
  29. }
  30. if (request.getParameter("categoryName") != null)
  31. {
  32. categoryName = (request.getParameter("categoryName"));
  33. sess.setAttribute("categoryName2",categoryName);
  34. }
  35. if ("true".equals(request.getParameter("cache")))
  36. {
  37. equipmentlist = (EquipmentListValueBean)sess.getAttribute("slist");
  38.     start = Integer.parseInt(request.getParameter("start"));
  39.     categoryName = (String)sess.getAttribute("categoryName2");
  40.     categoryId = (String)sess.getAttribute("categoryId2");
  41.     if (categoryId == null)
  42.      categoryId = "";
  43.     if (categoryName == null)
  44.      categoryName = "";
  45.     equipmentlist = KeywordSearchProxy.batchSearchEquipmentByKeyword(categoryId);
  46. sess.setAttribute("slist",equipmentlist);
  47. }
  48. else
  49. {
  50. if (request.getParameter("keyword") != null)
  51.   keyword = request.getParameter("keyword");
  52. equipmentlist = KeywordSearchProxy.batchSearchEquipmentByKeyword(keyword);
  53. sess.setAttribute("slist",equipmentlist);
  54. }
  55. eList = equipmentlist.getEquipmentList();
  56. %>
  57. <script language=JavaScript>
  58. function toCategory()
  59. {
  60. myForm.action="/mainctrl/categoryList?pageName=equipmentBatchSearchResult";
  61. myForm.submit();
  62. }
  63. </script>
  64. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  65. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
  66. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  67. <form name="myForm" method="post" action="" >
  68. <DIV align=center>  
  69.     <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  70.     <TBODY> 
  71.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  72.     <TR> 
  73.         <TD colSpan=3 align="center"><br>
  74.          <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  75.             <tr bgcolor="#fafafa" align ="center" > 
  76.               <td> 
  77.             
  78.                 <table width="600" border="0" cellspacing="0" cellpadding="2">
  79.                    <tr bgcolor="#666666" > 
  80.                       <td colspan="2" ><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>&gt;&gt;<a href="/mainctrl/equipmentSearchResult"><font color="#FFFFFF">固定资产管理</font></a>&gt;&gt;固定资产按批查询</font></td>
  81.                    </tr>  
  82.                    <tr> 
  83.                       <td colspan="2" height="30"><font class="strong" >&nbsp;类别:</font>&nbsp; 
  84.                       <input type="hidden" name="keyword" class="file" value="<%=categoryId%>">&nbsp;
  85.                       <input type="test" name="categoryName" class="file" readonly value="<%=categoryName%>">&nbsp;
  86.                       <input type="button" name="Submit2" value="选择" class="file" onClick="toCategory()")>&nbsp;&nbsp;                       
  87.                     </td>
  88.                   </tr>
  89.                 </table>
  90.             
  91.             <table class=title cellspacing=1 cellpadding=2 width="100%" border=0 >            
  92.             
  93.             <tr align=middle>              
  94.               <td width="12%"><font  class="strong">批号</font></td>
  95.               <td width="22%"><font  class="strong">名称</font></td>              
  96.               <td width="16%"><font  class="strong">类别</font></td>              
  97.               <td width="22%"><font  class="strong">型号</font></td>
  98.               <td width="12%"><font  class="strong">剩余数量</font></td>
  99.               <td width="16%"><font  class="strong">购入时间 </font></td>
  100.               
  101.             </tr>
  102.             <%
  103.             
  104.              int i = 0;
  105.              int r;
  106.       if (start > eList.size() - (eList.size() % rows))
  107.       r = eList.size() % rows;
  108.       else
  109.         r = 10;
  110.    Iterator it = eList.iterator();
  111. while(i < start - 1) 
  112. {
  113. it.next();
  114. i ++;
  115. }
  116. i = 0;
  117.          while(i < r)
  118.             {
  119.             EquipmentValueBean eInfo= (EquipmentValueBean)it.next();
  120.             if (i % 2 == 0)
  121.             {
  122.             %>
  123.             <tr align=middle bgColor="#e0e0e0">               
  124.             <%
  125.             }
  126.             else
  127.             {
  128.             %>
  129.             <tr align=middle bgColor="#fafafa">               
  130.             <%
  131.             }
  132.             %>
  133.               <td width="12%" ><a href="/mainctrl/equipmentCodeUseAdd?batchId=<%=eInfo.getBatchId()%>&start=<%=start%>"><%=eInfo.getBatchId()%></a></td>
  134.               <td width="22%" ><%=FieldUtil.filterScriptTag(eInfo.getEquipmentName())%><br></td>
  135.               <td width="16%" ><%=FieldUtil.filterScriptTag(eInfo.getCategoryName())%></td>
  136.               <td width="22%" ><%=FieldUtil.filterScriptTag(eInfo.getModel())%></td>
  137.               <td width="12%" ><%=eInfo.getQuantity()%></td>
  138.               <td width="16%" ><%
  139.               if (eInfo.getBuyDate() != null) out.print(eInfo.getBuyDate().toString().substring(0,10));
  140.               %>
  141.               </td>
  142.             </tr>        
  143.             <%
  144.             i ++;
  145.             }
  146.             %>
  147.             <%
  148.                 action = "/mainctrl/equipmentBatchSearchResult?cache=true&categoryId="+categoryId+"&categoryName="+categoryName;
  149. navBar = NavBar.makeNavbar(start,eList.size(),rows,action);  
  150.             %>
  151.             <tr align=middle> 
  152.               <td colspan="7" bgcolor="#e0e0e0"> 
  153.                 <div align="left">&nbsp;<%=navBar%>  
  154.                 </div>
  155.               </td>
  156.             </tr>
  157.            
  158.             <tr bgColor="#fafafa">
  159.              <td colspan="6" align="center">
  160.              <input type="button" name="toback" class="file" onClick="location='/mainctrl/equipmentSearchResult'" height=30 value="返回">
  161.              </td>
  162.             </tr>
  163.             </tbody> 
  164.           </table>
  165.       
  166. </td>
  167.           </tr>
  168.           </table>
  169.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  170.        </TD>
  171.      </TR>
  172.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  173.     </TBODY> 
  174.   </TABLE>
  175.     <BR>
  176.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  177.   </form>
  178. </DIV>
  179. </BODY>
  180. </HTML>