DocumentList.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:11k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" %>
  2. <%@ page import="com.gforce.gfoa.*, com.gforce.currency.*, java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/>
  4. <%
  5.   Session m_session = new Session(session);
  6.   int iUserID = m_session.GetInt("UserID");
  7.   String strUserID = iUserID + "";
  8. %>
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  12. <title>公文查看-- GForce OA 2.0</title>
  13. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  14. <script language="JavaScript" src="/js/changestyle.js"></script>
  15. </head>
  16. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  17.    <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  18.     <tr>
  19.     <td align="center" valign="top">
  20.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  21.         <tr>
  22.           <td height="50" valign="top" background="../images/dy-back.gif">
  23.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  24.               <tr valign="middle">
  25.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  26.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">公文列表</font></strong></td>
  27.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  28.                    <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  29.                  <!--<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59">&nbsp;-->
  30.                   <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  31.                   <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  32.                   <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  33.                   <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  34.                 </td>
  35.               </tr>
  36.             </table>
  37.           </td>
  38.         </tr>
  39.       </table>
  40.   <%
  41.     Request m_request = new Request(request);
  42.     int iPageSize = 18;
  43.     int iPage = m_request.GetInt("Page");
  44.     int iSysDirID = m_request.GetInt("SysDirID");
  45.     String strCurrentPageURL = request.getRequestURI();
  46.     String strID = m_request.GetString("ID");
  47.     String strDocumentName = m_request.GetString("DocumentName");
  48.     String strBuildTimeFrom = m_request.GetString("BuildTimeFrom");
  49.     String strBuildTimeTo = m_request.GetString("BuildTimeTo");
  50.     String strBuildUserName = m_request.GetString("BuildUserName");
  51.     String strFillUserName = m_request.GetString("FillUserName");
  52.     String strTacheName = m_request.GetString("TacheName");
  53.     String strFillUserID = iUserID +"";
  54.     String strApproveUserID = iUserID +"";
  55.     String strOrderBy = m_request.GetString("OrderBy");
  56.     String strIsDesc = m_request.GetString("IsDesc");
  57.   %>
  58. <script language="JavaScript">
  59.    function changeorder(orderBy)
  60.    {
  61.       with(document.DocumentList)
  62.       {
  63.         if(OrderBy.value==orderBy)
  64.         {
  65.          if(IsDesc.value=="")
  66.             IsDesc.value="True";
  67.          else
  68.             IsDesc.value="";
  69.         }
  70.         else
  71.         {
  72.           IsDesc.value="";
  73.           OrderBy.value=orderBy;
  74.           Page.value="1";
  75.         }
  76.       }
  77.       document.DocumentList.submit();
  78.     }
  79.    function changepage(pageNum)
  80.    {
  81.       with(document.DocumentList)
  82.         {
  83.     Page.value=pageNum;
  84.          }
  85.       document.DocumentList.submit();
  86.     }
  87. </script>
  88.   <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  89.     <tr>
  90.     <td align="center" valign="top"><p>&nbsp;</p>
  91.       <form name="DocumentList" action="<%=strCurrentPageURL + "?SysDirID=" + iSysDirID%>" method="post">
  92.         <input name="Page" type="hidden" value="<%=iPage%>">
  93.         <input name="SysDirID" type="hidden" value="<%=iSysDirID%>">
  94.         <input name="ID" type="hidden" value="<%=strID%>">
  95.         <input name="DocumentName" type="hidden" value="<%=strDocumentName%>">
  96.         <input name="BuildTimeFrom" type="hidden" value="<%=strBuildTimeFrom%>">
  97.         <input name="BuildTimeTo" type="hidden" value="<%=strBuildTimeTo%>">
  98.         <input name="BuildUserName" type="hidden" value="<%=strBuildUserName%>">
  99.         <input name="FillUserName" type="hidden" value="<%=strFillUserName%>">
  100.         <input name="TacheName" type="hidden" value="<%=strTacheName%>">
  101.         <input name="FillUserID" type="hidden" value="<%=strFillUserID%>">
  102.         <input name="ApproveUserID" type="hidden" value="<%=strApproveUserID%>">
  103.         <input name="OrderBy" type="hidden" value="<%=strOrderBy%>">
  104.         <input name="IsDesc" type="hidden" value="<%=strIsDesc%>"><font color="#000000">
  105.            <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  106.             <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  107.             <th width="2%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  108.             <th width="4%" nowrap><font color="#000000">序号</font></th>
  109.             <th width="14%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.DocumentName');return false;">公文名称</a><%
  110.                if(strOrderBy.equalsIgnoreCase("a.DocumentName"))
  111.                {
  112.                 if(strIsDesc.equalsIgnoreCase("True"))
  113.                 out.print("↓");
  114.                 else
  115.                 out.print("↑");
  116.                 }
  117.                %></font></th>
  118.             <th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.BuildTime');return false;">生成时间</a><%
  119.                if(strOrderBy.equalsIgnoreCase("a.BuildTime"))
  120.                {
  121.                 if(strIsDesc.equalsIgnoreCase("True"))
  122.                 out.print("↓");
  123.                 else
  124.                 out.print("↑");
  125.                }
  126.               %></font></th>
  127.             <th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('c.Name');return false;">生成用户</a><%
  128.               if(strOrderBy.equalsIgnoreCase("c.Name"))
  129.                {
  130.                 if(strIsDesc.equalsIgnoreCase("True"))
  131.                 out.print("↓");
  132.                 else
  133.                 out.print("↑");
  134.                }
  135.               %></font></th>
  136.             <th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('e.Name');return false;">填表用户</a><%
  137.              if(strOrderBy.equalsIgnoreCase("e.Name"))
  138.                {
  139.                 if(strIsDesc.equalsIgnoreCase("True"))
  140.                 out.print("↓");
  141.                 else
  142.                 out.print("↑");
  143.                }
  144.               %></font></th>
  145.             <th width="12%" nowrap><font color="#000000"><a href="" onclick="changeorder('f.TacheName');return false;">当前环节</a><%
  146.                if(strOrderBy.equalsIgnoreCase("f.TacheName"))
  147.                {
  148.                 if(strIsDesc.equalsIgnoreCase("True"))
  149.                 out.print("↓");
  150.                 else
  151.                 out.print("↑");
  152.                }
  153.               %></font></th>
  154.             </tr>
  155.   <%
  156.     Vector vt = DocumentManagerPlus.VisitDoc(strUserID,strDocumentName,strBuildTimeFrom,strBuildTimeTo,strBuildUserName,strFillUserName,strTacheName,strOrderBy,strIsDesc);
  157.     if(iPage<1)iPage=1;
  158.     int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  159.     if(iPage>iPageCount) iPage=1;
  160.     for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  161.     {
  162.       strID = ((Vector)vt.get(i)).get(0).toString();
  163.       if(i % 2 == 0)
  164.       {
  165.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  166.       }
  167.       else
  168.       {
  169.         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  170.       }
  171.       out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  172.       out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  173.       out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(1).toString() + "" ><a href="ShowDocument.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "&VType=1">" + ((Vector)vt.get(i)).get(1).toString() + "&nbsp;</td>");
  174.       out.println("<td align="center" valign="middle" nowrap >" + StringNew.GetDateString(((Vector)vt.get(i)).get(2).toString(),"yyyy年MM月dd日 HH时mm分") + "&nbsp;</td>");
  175.       out.println("<td align="center" valign="middle" nowrap >" + ((Vector)vt.get(i)).get(8).toString() + "&nbsp;</td>");
  176.       out.println("<td align="center" valign="middle" nowrap >" + ((Vector)vt.get(i)).get(9).toString() + "&nbsp;</td>");
  177.       if(((Vector)vt.get(i)).get(6).toString().equalsIgnoreCase("-1"))
  178.       {
  179.               out.println("<td align="center" valign="middle" nowrap >流转结束&nbsp;</td>");
  180.       }
  181.       else
  182.       {
  183.               out.println("<td align="center" valign="middle" nowrap >" + ((Vector)vt.get(i)).get(10).toString() + "&nbsp;</td>");
  184.       }
  185.       out.println("</tr>");
  186.     }
  187.   %>
  188.             <tr>
  189.              <th align="center" valign="top" colspan="8">
  190.               <%
  191.               if(iPage<2)
  192.               out.print("首页&nbsp;&nbsp;上页");
  193.               else
  194.               out.print("<a href="" onclick="changepage(" + 1 + ");return false;">首页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + (iPage-1) + ");return false;">上页</a>");
  195.               out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  196.               if(iPage>=iPageCount)
  197.               out.print("下页&nbsp;&nbsp;末页");
  198.               else
  199.               out.print("<a href="" onclick="changepage(" + (iPage+1) + ");return false;">下页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + iPageCount + ");return false;">末页</a>");
  200.               %>
  201.              </th>
  202.             </tr>
  203.            </table>
  204.           </form>
  205.         </td>
  206.       </tr>
  207.     </table>
  208.   </body>
  209. </html>