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

电子政务应用

开发平台:

Java

  1. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  2. <%@ taglib uri="/vnex_archive.tld" prefix="archive" %>
  3. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  4. <%@ page import="com.vnex.intranet.util.TimeStamp" %>
  5. <%@ page import="java.lang.*" %>
  6. <%@ page import="java.sql.*" %>
  7. <%@ page import="java.util.*" %>
  8. <jsp:useBean id="archiveCondition" class="com.vnex.intranet.archives.value.ArchiveValueBean" scope="session" /> 
  9. <jsp:useBean id="archiveProxy" class="com.vnex.intranet.archives.proxy.ArchiveProxyBean" scope="session" /> 
  10. <jsp:setProperty name="archiveCondition" property="*" />
  11. <%!
  12. Calendar cal;
  13. String str;
  14. Timestamp ts;
  15. String saveDate;
  16. String saveEndDate;
  17. String createDate;
  18. String createEndDate;
  19. String pageTo;
  20. String toDelete;
  21. %>
  22. <%
  23. archiveCondition.setArchiveDisplayId(request.getParameter("archiveDisplayId"));
  24. if (! (archiveCondition.getSaveTime().equals("")))
  25. {
  26. str = archiveCondition.getSaveTime() + " 00:00:00";
  27. System.out.println("1" + str);
  28. ts = TimeStamp.toTimestamp(str);
  29. archiveCondition.setSaveArchiveDate(TimeStamp.convertTimestampToCalendar(ts));
  30. }
  31. if (! (archiveCondition.getSaveEndTime().equals("")))
  32. {
  33. str = archiveCondition.getSaveEndTime() + " 00:00:00";
  34. System.out.println("2" + str);
  35. ts = TimeStamp.toTimestamp(str);
  36. archiveCondition.setSaveArchiveDateEnd(TimeStamp.convertTimestampToCalendar(ts));
  37. }
  38. if (! (archiveCondition.getCreateTime().equals("")))
  39. {
  40. str = archiveCondition.getCreateTime() + " 00:00:00";
  41. System.out.println("3" + str);
  42. ts = TimeStamp.toTimestamp(str);
  43. archiveCondition.setCreateDate(TimeStamp.convertTimestampToCalendar(ts));
  44. }
  45. if (! (archiveCondition.getCreateEndTime().equals("")))
  46. {
  47. str = archiveCondition.getCreateEndTime() + " 00:00:00";
  48. System.out.println("4" + str);
  49. ts = TimeStamp.toTimestamp(str);
  50. archiveCondition.setCreateDateEnd(TimeStamp.convertTimestampToCalendar(ts));
  51. }
  52. //str = request.getParameter("safetyLevel");
  53. Collection col= archiveProxy.selectArchives(archiveCondition);
  54. saveDate = request.getParameter("saveDate");
  55. saveEndDate = request.getParameter("saveEndDate");
  56. createDate = request.getParameter("createDate");
  57. createEndDate = request.getParameter("createEndDate");
  58. pageTo = "/mainctrl/archive/archivesSearchResult?a";
  59. toDelete = "/mainctrl/archive/deleteSearchArchives";
  60. %> 
  61. <script language=javascript>
  62. function checkAll(checkbox_select,checkbox_names)
  63. {
  64.       var items=checkbox_names.length;      
  65.       if(items>1)
  66.         {
  67.          for(i=0;i<items;i++) checkbox_names[i].checked=checkbox_select.checked;      
  68.         }
  69.       else
  70.        {
  71.           checkbox_names.checked=checkbox_select.checked;
  72.        }
  73. }
  74. function toDelete(form)
  75. {
  76. var items=form.check1.length; 
  77. var j = -1;
  78. var sign = 1;
  79. if (items>1)
  80. {
  81. for (i=0;i < items;i++)
  82. if (form.check1[i].checked)
  83. j = i;
  84. }
  85. if (j == -1)
  86. {
  87. alert ("没有可供删除的选项!" );
  88. sign = 0;
  89. }
  90. }
  91. else
  92. {
  93. if (form.check1.checked)
  94. sign = 1;
  95. else
  96. {
  97. alert ("没有可供删除的选项!" );
  98. sign = 0
  99. }
  100. }
  101. if (sign == 1)
  102. {
  103. form.action="<%= toDelete%>" ;
  104. form.submit();
  105. }
  106. function toSearch(form)
  107. {
  108. form.action = "/mainctrl/archive/searchArchives";
  109. form.submit();
  110. }
  111. </script>
  112.     <table width="100%" border="0">
  113.       <tr>        
  114.         <td colspan="6" bgcolor="#666666"><div align="center"><font class="strongw">查询结果</font></div></td>
  115.       </tr>
  116.       <tr bgcolor="#e0e0e0"> 
  117.        <td><font class="strong">选择</font></td>      
  118.         <td> 
  119.           <div align="right"></div>
  120.           <div align="left"><font class="strong">档案编号</font></div>
  121.         </td>
  122.         <td><font class="strong">存档日期</font></td>
  123.         <td><font class="strong">标题</font></td>
  124.         <td><font class="strong">发文日期</font></td> 
  125.         <td><font class="strong">文件来源</font></td>       
  126.       </tr>
  127. <archive:ArchiveList archiveCondition="<%= archiveCondition %>" >  
  128. <vnex:items paging="true">    
  129.       <tr bgcolor="<vnex:itemsColor />"> 
  130.         <td> 
  131.              <input type="checkbox" name="check1" value=<archive:ArchiveAttribute attribute = "archive_id"/>><br>                
  132.         </td>        
  133.         <td><archive:ArchiveAttribute attribute = "archive_display_id"/></td>
  134.         <td><archive:ArchiveAttribute attribute = "save_archive_date"/></td>
  135.         <td><a href=/mainctrl/archive/archiveDetail?archiveId=<archive:ArchiveAttribute attribute = "archive_id"/>&isToday=0><archive:ArchiveAttribute attribute = "archive_title"/></a></td>
  136.         <td><archive:ArchiveAttribute attribute = "create_date"/></td>        
  137.         <td><archive:ArchiveAttribute attribute = "file_source"/></td>
  138.       </tr>
  139. </vnex:items> 
  140. <tr>
  141.       <td colspan = "5">
  142.    <div align="left">
  143.          <input type="checkbox" name="selectAll" value="checkbox" onClick= checkAll(selectAll,check1)>
  144.                   全选</div>
  145.       </td>
  146.   </tr>
  147. <tr bgcolor="#cccccc">
  148.          <td colspan="5"> <vnex:pagingTag pageName="<%=pageTo%>"/></td>
  149.     </tr>   
  150. </archive:ArchiveList>       
  151.     </table>
  152.