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

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);%>
  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.     String strCurrentPageURL = request.getRequestURI();
  40.     int iSysDirID = m_request.GetInt("SysDirID");
  41.     int iUserID = m_session.GetInt("UserID");
  42.     String strSysDirID = iSysDirID + "";
  43.     String strID = m_request.GetString("ID");
  44.     String strName = m_request.GetString("Name");
  45.     String strDocTempletID = m_request.GetString("DocTempletID");
  46.     String strDocTempletName = m_request.GetString("DocTempletName");
  47.     String strDocTempletTableName = "DocumentTemplet";
  48.     String strMoveFlowID = m_request.GetString("MoveFlowID");
  49.     String strMoveFlowName = m_request.GetString("MoveFlowName");
  50.     String strUpdateUserID = m_request.GetString("UpdateUserID");
  51.     String strUpdateTimeFrom = m_request.GetString("UpdateTimeFrom");
  52.     String strUpdateTimeTo = m_request.GetString("UpdateTimeTo");
  53.     String strUpdateFromIP = m_request.GetString("UpdateFromIP");
  54.     String strApproveUserID = m_request.GetString("ApproveUserID");
  55.     String strIsUseful = "True";
  56.     String strWritableUserIDs = iUserID+"";
  57.     String strWritableDepartIDs = m_request.GetString("WritableDepartIDs");
  58.     String strReadOnlyUserIDs = m_request.GetString("ReadOnlyUserIDs");
  59.     String strReadOnlyDepartIDs = m_request.GetString("ReadOnlyDepartIDs");
  60.     String strOrderBy = m_request.GetString("OrderBy");
  61.     String strIsDesc = m_request.GetString("IsDesc");
  62.     String strIsAutoBuild = "True";
  63.   %>
  64. <script language="JavaScript">
  65.    function changeorder(orderBy)
  66.    {
  67.       with(document.DocTempletMoveFlowManage)
  68.       {
  69.         if(OrderBy.value==orderBy)
  70.         {
  71.          if(IsDesc.value=="")
  72.             IsDesc.value="True";
  73.          else
  74.             IsDesc.value="";
  75.         }
  76.         else
  77.         {
  78.           IsDesc.value="";
  79.           OrderBy.value=orderBy;
  80.           Page.value="1";
  81.         }
  82.       }
  83.       document.DocTempletMoveFlowManage.submit();
  84.     }
  85.    function changepage(pageNum)
  86.    {
  87.       with(document.DocTempletMoveFlowManage)
  88.         {
  89.     Page.value=pageNum;
  90.          }
  91.       document.DocTempletMoveFlowManage.submit();
  92.     }
  93. </script>
  94.   <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  95.     <tr>
  96.     <td align="center" valign="top"><p>&nbsp;</p>
  97.       <form name="DocTempletMoveFlowManage" action="<%=strCurrentPageURL + "?SysDirID=" + iSysDirID%>" method="post">
  98.         <input name="Page" type="hidden" value="<%=iPage%>">
  99.         <input name="SysDirID" type="hidden" value="<%=iSysDirID%>">
  100.         <input name="ID" type="hidden" value="<%=strID%>">
  101.         <input name="Name" type="hidden" value="<%=strName%>">
  102.         <input name="DocTempletID" type="hidden" value="<%=strDocTempletID%>">
  103.         <input name="DocTempletName" type="hidden" value="<%=strDocTempletName%>">
  104.         <input name="DocTempletTableName" type="hidden" value="<%=strDocTempletTableName%>">
  105.         <input name="MoveFlowID" type="hidden" value="<%=strMoveFlowID%>">
  106.         <input name="MoveFlowName" type="hidden" value="<%=strMoveFlowName%>">
  107.         <input name="UpdateUserID" type="hidden" value="<%=strUpdateUserID%>">
  108.         <input name="UpdateTimeFrom" type="hidden" value="<%=strUpdateTimeFrom%>">
  109.         <input name="UpdateTimeTo" type="hidden" value="<%=strUpdateTimeTo%>">
  110.         <input name="UpdateFromIP" type="hidden" value="<%=strUpdateFromIP%>">
  111.         <input name="ApproveUserID" type="hidden" value="<%=strApproveUserID%>">
  112.         <input name="IsUseful" type="hidden" value="<%=strIsUseful%>">
  113.         <input name="WritableUserIDs" type="hidden" value="<%=strWritableUserIDs%>">
  114.         <input name="WritableDepartIDs" type="hidden" value="<%=strWritableDepartIDs%>">
  115.         <input name="ReadOnlyUserIDs" type="hidden" value="<%=strReadOnlyUserIDs%>">
  116.         <input name="ReadOnlyDepartIDs" type="hidden" value="<%=strReadOnlyDepartIDs%>">
  117.         <input name="OrderBy" type="hidden" value="<%=strOrderBy%>">
  118.         <input name="IsDesc" type="hidden" value="<%=strIsDesc%>">
  119.         <input name="IsAutoBuild" type="hidden" value="<%=strIsAutoBuild%>">
  120.            <table width="90%" border="1" cellpadding="3" cellspacing="0"  bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  121.             <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  122.             <th width="2%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  123.             <th width="4%" nowrap><font color="#000000">序号</font></th>
  124.             <th width="14%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.Name');return false;">公文流转模板名称</a><%
  125.                if(strOrderBy.equalsIgnoreCase("a.Name"))
  126.                {
  127.                 if(strIsDesc.equalsIgnoreCase("True"))
  128.                 out.print("↓");
  129.                 else
  130.                 out.print("↑");
  131.                 }
  132.                %></font></th>
  133.             <th width="14%" nowrap><font color="#000000"><a href="" onclick="changeorder('b.TempletName');return false;">来自公文模板</a><%
  134.               if(strOrderBy.equalsIgnoreCase("b.TempletName"))
  135.                {
  136.                 if(strIsDesc.equalsIgnoreCase("True"))
  137.                 out.print("↓");
  138.                 else
  139.                 out.print("↑");
  140.                 }
  141.                %></font></th>
  142.             <th width="14%" nowrap><font color="#000000"><a href="" onclick="changeorder('c.FlowName');return false;">来自流转模板</a><%
  143.                if(strOrderBy.equalsIgnoreCase("c.FlowName"))
  144.                {
  145.                 if(strIsDesc.equalsIgnoreCase("True"))
  146.                 out.print("↓");
  147.                 else
  148.                 out.print("↑");
  149.                }
  150.               %></font></th>
  151.             <th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('e.Name');return false;">最后更新用户</a><%
  152.               if(strOrderBy.equalsIgnoreCase("e.Name"))
  153.                {
  154.                 if(strIsDesc.equalsIgnoreCase("True"))
  155.                 out.print("↓");
  156.                 else
  157.                 out.print("↑");
  158.                }
  159.               %></font></th>
  160.             <th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.UpdateTime');return false;">最后更新时间</a><%
  161.              if(strOrderBy.equalsIgnoreCase("a.UpdateTime"))
  162.                {
  163.                 if(strIsDesc.equalsIgnoreCase("True"))
  164.                 out.print("↓");
  165.                 else
  166.                 out.print("↑");
  167.                }
  168.               %></font></th>
  169.             <th width="7%" nowrap><font color="#000000">&nbsp;</font></th>
  170.             </tr>
  171.   <%
  172.     Vector vt = DocTempletMoveFlowManager.getRecordBySearch(strID,strName,strDocTempletID,strDocTempletName,strSysDirID,
  173.                                                             strDocTempletTableName,strMoveFlowID,strMoveFlowName,strUpdateUserID,
  174.                                                             strUpdateTimeFrom,strUpdateTimeTo,strUpdateFromIP,strApproveUserID,
  175.                                                             strIsUseful,strWritableUserIDs,strWritableDepartIDs,strReadOnlyUserIDs,
  176.                                                             strReadOnlyDepartIDs,strOrderBy,strIsDesc,strIsAutoBuild,"");
  177.     if(iPage<1)iPage=1;
  178.     int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  179.     if(iPage>iPageCount) iPage=1;
  180.     for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  181.     {
  182.       strID = ((Vector)vt.get(i)).get(0).toString();
  183.       if(i % 2 == 0)
  184.       {
  185.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  186.       }
  187.       else
  188.       {
  189.         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  190.       }
  191.       out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  192.       out.println("<td align="left" valign="middle">" + (i+1) + "</td>");
  193.       out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(1).toString() + "" >" + ((Vector)vt.get(i)).get(1).toString() + "&nbsp;</td>");
  194.       out.println("<td align="center" valign="middle">" + ((Vector)vt.get(i)).get(17).toString() + "&nbsp;</td>");
  195.       out.println("<td align="center" valign="middle">" + ((Vector)vt.get(i)).get(19).toString() + "&nbsp;</td>");
  196.       out.println("<td align="center" valign="middle" nowrap >" + ((Vector)vt.get(i)).get(20).toString() + "&nbsp;</td>");
  197.       out.println("<td align="left" valign="middle" nowrap >" + StringNew.GetDateString(((Vector)vt.get(i)).get(6).toString(),"yyyy年MM月dd日 HH时mm分") + "&nbsp;</td>");
  198.       out.println("<td align="center" valign="middle" nowrap><a href="CreateDocAction.jsp?SysDirID=" + iSysDirID  +"&DocTempletTableName=" + strDocTempletTableName + "&ID=" + strID +""><strong>起 草</strong></a></td>");
  199.       out.println("</tr>");
  200.     }
  201.   %>
  202.             <tr>
  203.              <th align="center" valign="top" colspan="8">
  204.               <%
  205.               if(iPage<2)
  206.               out.print("首页&nbsp;&nbsp;上页");
  207.               else
  208.               out.print("<a href="" onclick="changepage(" + 1 + ");return false;">首页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + (iPage-1) + ");return false;">上页</a>");
  209.               out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  210.               if(iPage>=iPageCount)
  211.               out.print("下页&nbsp;&nbsp;末页");
  212.               else
  213.               out.print("<a href="" onclick="changepage(" + (iPage+1) + ");return false;">下页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + iPageCount + ");return false;">末页</a>");
  214.               %>
  215.              </th>
  216.             </tr>
  217.            </table>
  218.           </form>
  219.         </td>
  220.       </tr>
  221.     </table>
  222.   </body>
  223. </html>