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

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