DocumentTempletManage.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. Session m_session = new Session(session);
  5. String strCurrentPageURL = request.getRequestURI();
  6. Request m_request = new Request(request);
  7. int iSysDirID = m_request.GetInt("SysDirID");
  8. int iPageSize = 18;
  9. int iPage = m_request.GetInt("Page");
  10. String strBuildUserName=m_request.GetString("BuildUserName");
  11. String strSysDirID=m_request.GetString("SysDirID");
  12. String strIsAutoBuild=m_request.GetString("IsAutoBuild");
  13. String strTempletName=m_request.GetString("TempletName");
  14. String strTempletNumber=m_request.GetString("TempletNumber");
  15. String strEnglishAb=m_request.GetString("EnglishAb");
  16. String strWritableUserIDs=m_request.GetString("WritableUserIDs");
  17. String strWritableDepartIDs=m_request.GetString("WritableDepartIDs");
  18. String strReadOnlyUserIDs=m_request.GetString("ReadOnlyUserIDs");
  19. String strReadOnlyDeprtIDs=m_request.GetString("ReadOnlyDeprtIDs");
  20. String strFormEvent=m_request.GetString("FormEvent");
  21. String strBuildTimeFrom=m_request.GetString("BuildTimeFrom");
  22. String strBuildTimeTo=m_request.GetString("BuildTimeTo");
  23. String strPrintHTMLCode=m_request.GetString("PrintHTMLCode");
  24. String strTypesetHTMLCode=m_request.GetString("TypesetHTMLCode");
  25. String strJavaScriptCode=m_request.GetString("JavaScriptCode");
  26. String strOrderBy=m_request.GetString("OrderBy");
  27. String strSort=m_request.GetString("Sort");
  28. boolean bIsDesc=false;
  29. if(strSort.equalsIgnoreCase("desc"))
  30.   bIsDesc=true;
  31. %>
  32. <html>
  33. <head>
  34. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  35. <title>公文管理 -- GForce OA 2.0</title>
  36. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  37. <script language="JavaScript" src="/js/changestyle.js"></script>
  38. <script language="JavaScript">
  39. function changeorder(orderBy)
  40. {
  41.   with(document.documenttempletmanage)
  42.   {
  43.     if(OrderBy.value==orderBy)
  44.     {
  45.       if(Sort.value=="")
  46.         Sort.value="desc";
  47.       else
  48.         Sort.value="";
  49.     }
  50.     else
  51.     {
  52.       OrderBy.value=orderBy;
  53.       Sort.value="";
  54.       Page.value="1";
  55.     }
  56.   }
  57.   document.documenttempletmanage.submit();
  58. }
  59. function changepage(pageNum)
  60. {
  61.   with(document.documenttempletmanage)
  62.   {
  63.     Page.value=pageNum;
  64.   }
  65.   document.documenttempletmanage.submit();
  66. }
  67. </script>
  68. </head>
  69. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  70.   <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  71.     <tr>
  72.     <td align="center" valign="top">
  73.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  74.         <tr>
  75.           <td height="50" valign="top" background="../images/dy-back.gif">
  76.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  77.               <tr valign="middle">
  78.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  79.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">公文模板列表</font></strong></td>
  80.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  81.                    <!-- 群增<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;-->
  82.                  <a href="AddDocumentTemplet.jsp?SysDirID=<%=iSysDirID%>"><img src="/images/Single.gif" onMouseOver="this.src='/images/Single_a.gif';" onMouseOut="this.src='/images/Single.gif';" border="0" height="22" width="59"></a>&nbsp;
  83.                   <!-- 修改<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;-->
  84.                   <!-- 删除<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;-->
  85.                   <!-- 查看<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;-->
  86.                   <!-- 组合查询<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;-->
  87.                 </td>
  88.               </tr>
  89.             </table>
  90.           </td>
  91.         </tr>
  92.       </table>
  93. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  94.     <tr>
  95.         <td align="center" valign="top"><p>&nbsp;</p>
  96.         <form name="documenttempletmanage" action="<%=strCurrentPageURL + "?SysDirID=" + iSysDirID%>" method="post">
  97.         <input name="BuildUserName" type="hidden" value="<%=strBuildUserName%>">
  98.         <input name="SysDirID" type="hidden" value="<%=strSysDirID%>">
  99.         <input name="IsAutoBuild" type="hidden" value="<%=strIsAutoBuild%>">
  100.         <input name="TempletName" type="hidden" value="<%=strTempletName%>">
  101.         <input name="TempletNumber" type="hidden" value="<%=strTempletNumber%>">
  102.         <input name="EnglishAb" type="hidden" value="<%=strEnglishAb%>">
  103.         <input name="WritableUserIDs" type="hidden" value="<%=strWritableUserIDs%>">
  104.         <input name="WritableDepartIDs" type="hidden" value="<%=strWritableDepartIDs%>">
  105.         <input name="ReadOnlyUserIDs" type="hidden" value="<%=strReadOnlyUserIDs%>">
  106.         <input name="ReadOnlyDeprtIDs" type="hidden" value="<%=strReadOnlyDeprtIDs%>">
  107.         <input name="FormEvent" type="hidden" value="<%=strFormEvent%>">
  108.         <input name="BuildTimeFrom" type="hidden" value="<%=strBuildTimeFrom%>">
  109.         <input name="BuildTimeTo" type="hidden" value="<%=strBuildTimeTo%>">
  110.         <input name="PrintHTMLCode" type="hidden" value="<%=strPrintHTMLCode%>">
  111.         <input name="TypesetHTMLCode" type="hidden" value="<%=strTypesetHTMLCode%>">
  112.         <input name="JavaScriptCode" type="hidden" value="<%=strJavaScriptCode%>">
  113.         <input name="OrderBy" type="hidden" value="<%=strOrderBy%>">
  114.         <input name="Sort" type="hidden" value="<%=strSort%>">
  115.         <input name="Page" type="hidden" value="<%=iPage%>">
  116.           <input name="IsAutoBuild" type="hidden" value="<%=strIsAutoBuild%>">
  117.         <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  118.         <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  119.           <th width="3%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  120.           <th width="6%" nowrap><font color="#000000">序号</font></th>
  121.           <th width="40%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.TempletName');return false;">名称</a><%
  122.           if(strOrderBy.equalsIgnoreCase("a.TempletName"))
  123.           {
  124.             if(bIsDesc)
  125.               out.print("↓");
  126.             else
  127.               out.print("↑");
  128.           }
  129.           %></font></th>
  130.           <th width="20%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.BuildTime');return false;">建立时间</a><%
  131.           if(strOrderBy.equalsIgnoreCase("a.BuildTime"))
  132.           {
  133.             if(bIsDesc)
  134.               out.print("↓");
  135.             else
  136.               out.print("↑");
  137.           }
  138.           %></font></th>
  139.           <th width="10%" nowrap><font color="#000000"><a href="" onclick="changeorder('c.Name');return false;">建立用户</a><%
  140.           if(strOrderBy.equalsIgnoreCase("c.Name"))
  141.           {
  142.             if(bIsDesc)
  143.               out.print("↓");
  144.             else
  145.               out.print("↑");
  146.           }
  147.           %></font></th>
  148.           <th width="7%" nowrap><font color="#000000">模板字段</font></th>
  149.           <th width="7%" nowrap><font color="#000000">字段权限</font></th>
  150.           <th width="7%" nowrap><font color="#000000">修改</font></th>
  151.           <th width="7%" nowrap><font color="#000000">删除</font></th>
  152.         </tr>
  153. <%
  154. Vector vt = DocumentTempletManager.getRecordBySearch(strBuildUserName, iSysDirID, strIsAutoBuild, strTempletName, strTempletNumber, strEnglishAb, strWritableUserIDs, strWritableDepartIDs, strReadOnlyUserIDs, strReadOnlyDeprtIDs, strFormEvent, strPrintHTMLCode, strTypesetHTMLCode, strJavaScriptCode, strBuildTimeFrom, strBuildTimeTo, strOrderBy, bIsDesc,true);
  155. if(iPage<1) iPage=1;
  156. int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  157. if(iPage>iPageCount) iPage=1;
  158. for(int i=(iPage-1) * iPageSize; i<vt.size()&&i<iPage * iPageSize;i++)
  159. {
  160.     String strID = ((Vector)vt.get(i)).get(0).toString();
  161.     if(i % 2 == 0)
  162.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  163.     else
  164.         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  165.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  166.     out.println("<td align="Center" valign="middle">" + (i+1) + "</td>");
  167.     out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(3).toString() + ""><a href="ShowDocumentTemplet.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "" target="_blank">" + ((Vector)vt.get(i)).get(3).toString() + "</a>&nbsp;</td>");
  168.     out.println("<td align="center" valign="middle" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(11).toString(),"yyyy年MM月dd日 HH时mm分") + "&nbsp;</td>");
  169.     out.println("<td align="center" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(15).toString() + "&nbsp;</td>");
  170.     out.println("<td align="center" valign="middle" nowrap><a href="DocTempletFieldsManage.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "">管理</a></td>");
  171.     out.println("<td align="center" valign="middle" nowrap><a href="DocTempletFieldsPurviewManage.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "">管理</a></td>");
  172.     out.println("<td align="center" valign="middle" nowrap><a href="EditDocumentTemplet.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "">修改</a></td>");
  173.     out.println("<td align="center" valign="middle" nowrap><a href="DelDocumentTemplet.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "" onclick="return confirm('您确实要删除该公文模板吗?');">删除</a></td>");
  174.     out.println("</tr>");
  175. }
  176. %>
  177.         <tr>
  178.           <th align="center" valign="top" colspan="9">
  179. <%
  180. if(iPage<2)
  181. out.print("首页&nbsp;&nbsp;上页");
  182. else
  183. out.print("<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + 1 + "">首页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + (iPage-1) + "">上页</a>");
  184. out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  185. if(iPage>=iPageCount)
  186. out.print("下页&nbsp;&nbsp;末页");
  187. else
  188. out.print("<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + (iPage+1) + "">下页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + iPageCount + "">末页</a>");
  189. %>
  190. </th>
  191.         </tr>
  192.       </table>
  193.       </form>
  194.      </td>
  195.     </tr>
  196. </table>
  197. </body>
  198. </html>