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

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 strDocumentName = m_request.GetString("DocumentName");
  45.     int iDocFlowTempletID = m_request.GetInt("DocFlowTempletID");
  46.     String strDocFlowTempletName = m_request.GetString("DocFlowTempletName");
  47.     String strBuildTimeFrom = m_request.GetString("BuildTimeFrom");
  48.     String strBuildTimeTo = m_request.GetString("BuildTimeTo");
  49.     int iBuildUserID = m_request.GetInt("BuildUserID");
  50.     String strBuildUserName = m_request.GetString("BuildUserName");
  51.     int iFillUserID = m_request.GetInt("FillUserID");
  52.     String strFillUserName = m_request.GetString("FillUserName");
  53.     boolean bIsPigeonholed = (m_request.GetString("IsPigeonholed").equalsIgnoreCase("true"));
  54.     int iCurrentFlowTacheID = m_request.GetInt("CurrentFlowTacheID");
  55.     String strCurrentFlowTacheName = m_request.GetString("CurrentFlowTacheName");
  56.     String strIsReminded = m_request.GetString("IsReminded");
  57.     String strRemindTime = m_request.GetString("RemindTime");
  58.     int iTacheStatus = 0;
  59.     String strTacheStatus = m_request.GetString("TacheStatus");
  60.     String strOrderBy=m_request.GetString("OrderBy");
  61.     String strSort=m_request.GetString("Sort");
  62.     boolean bIsDesc=false;
  63.     if(strSort.equalsIgnoreCase("desc"))
  64.       bIsDesc=true;
  65.   %>
  66. <script language="JavaScript">
  67. function changeorder(orderBy)
  68. {
  69.   with(document.DocPigeonholedManage)
  70.   {
  71.     if(OrderBy.value==orderBy)
  72.     {
  73.       if(Sort.value=="")
  74.         Sort.value="desc";
  75.       else
  76.         Sort.value="";
  77.     }
  78.     else
  79.     {
  80.       OrderBy.value=orderBy;
  81.       Sort.value="";
  82.       Page.value="1";
  83.     }
  84.   }
  85.   document.DocPigeonholedManage.submit();
  86. }
  87.    function changepage(pageNum)
  88.    {
  89.       with(document.DocPigeonholedManage)
  90.         {
  91.     Page.value=pageNum;
  92.          }
  93.       document.DocPigeonholedManage.submit();
  94.     }
  95. function checkDocPigeonholed()
  96. {
  97.   var isIDCheck = false;
  98.   var isIDCheck = false;
  99.   with(document.DocPigeonholed)
  100.   {
  101.     try
  102.     {
  103.       for(i=0;i<elements.length;i++)
  104.       {
  105.         if(elements[i].type=="checkbox"&&elements[i].name=="ID")
  106.         {
  107.           if(elements[i].checked)
  108.           {
  109.             isIDCheck = true;
  110.             break;
  111.           }
  112.         }
  113.       }
  114.     }
  115.     catch(ex)
  116.     {
  117.     }
  118.   }
  119.   if(!isIDCheck)
  120.   {
  121.     alert("请先选择公文,再进行归档操作!");
  122.     return false;
  123.   }
  124.   return window.confirm('确实要归档这些记录吗?');
  125. }
  126. function checktall()
  127. {
  128.   var allselect=true;
  129.   with(document.DocPigeonholed)
  130.   {
  131.     if(selectall.value=="全部选择")
  132.     {
  133.       allselect = true;
  134.       selectall.value="全部取消";
  135.     }
  136.     else
  137.     {
  138.       allselect = false;
  139.       selectall.value="全部选择";
  140.     }
  141.     for(i=0;i<elements.length;i++)
  142.     {
  143.       if(elements[i].type=="checkbox")
  144.               elements[i].checked = allselect;
  145.     }
  146.   }
  147. }
  148. </script>
  149.   <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  150.     <tr>
  151.     <td align="center" valign="top"><p>&nbsp;</p>
  152.       <form name="DocPigeonholedManage" action="<%=strCurrentPageURL + "?SysDirID=" + iSysDirID%>" method="post">
  153.         <input name="Page" type="hidden" value="<%=iPage%>">
  154.         <input name="SysDirID" type="hidden" value="<%=iSysDirID%>">
  155.         <input name="UserID" type="hidden" value="<%=iUserID%>">
  156.         <input name="ID" type="hidden" value="<%=strID%>">
  157.         <input name="DocumentName" type="hidden" value="<%=strDocumentName%>">
  158.         <input name="DocFlowTempletID" type="hidden" value="<%=iDocFlowTempletID%>">
  159.         <input name="DocFlowTempletName" type="hidden" value="<%=strDocFlowTempletName%>">
  160.         <input name="BuildTimeFrom" type="hidden" value="<%=strBuildTimeFrom%>">
  161.         <input name="BuildTimeTo" type="hidden" value="<%=strBuildTimeTo%>">
  162.         <input name="BuildUserID" type="hidden" value="<%=iBuildUserID%>">
  163.         <input name="BuildUserName" type="hidden" value="<%=strBuildUserName%>">
  164.         <input name="FillUserID" type="hidden" value="<%=iFillUserID%>">
  165.         <input name="FillUserName" type="hidden" value="<%=strFillUserName%>">
  166.         <input name="IsPigeonholed" type="hidden" value="<%=bIsPigeonholed%>">
  167.         <input name="CurrentFlowTacheID" type="hidden" value="<%=iCurrentFlowTacheID%>">
  168.         <input name="CurrentFlowTacheName" type="hidden" value="<%=strCurrentFlowTacheName%>">
  169.         <input name="IsReminded" type="hidden" value="<%=strIsReminded%>">
  170.         <input name="RemindTime" type="hidden" value="<%=strRemindTime%>">
  171.         <input name="TacheStatus" type="hidden" value="<%=strTacheStatus%>">
  172.         <input name="OrderBy" type="hidden" value="<%=strOrderBy%>">
  173.         <input name="Sort" type="hidden" value="<%=strSort%>">
  174.         <br><br>
  175.        </form>
  176.        <form name="DocPigeonholed" action="DocPigeonholedAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onsubmit="return checkDocPigeonholed();">
  177.            <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  178.             <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  179.             <th width="2%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  180.             <th width="4%" nowrap><font color="#000000">序号</font></th>
  181.             <th width="14%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.DocumentName');return false;">公文名称</a><%
  182.                   if(strOrderBy.equalsIgnoreCase("a.DocumentName"))
  183.                   {
  184.                     if(bIsDesc)
  185.                   out.print("↓");
  186.                     else
  187.                   out.print("↑");
  188.                   }
  189.                   %></font></th>
  190.             <th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('d.Name');return false;">填写用户</a><%
  191.               if(strOrderBy.equalsIgnoreCase("d.Name"))
  192.                {
  193.                 if(bIsDesc)
  194.                 out.print("↓");
  195.                 else
  196.                 out.print("↑");
  197.                 }
  198.                %></font></th>
  199.             <th width="7%" nowrap><font color="#000000"><a href="" onclick="changeorder('c.Name');return false;">生成用户</a><%
  200.                if(strOrderBy.equalsIgnoreCase("c.Name"))
  201.                {
  202.                 if(bIsDesc)
  203.                 out.print("↓");
  204.                 else
  205.                 out.print("↑");
  206.                }
  207.               %></font></th>
  208.             <th width="14%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.BuildTime');return false;">创建时间</a><%
  209.              if(strOrderBy.equalsIgnoreCase("a.BuildTime"))
  210.                {
  211.                 if(bIsDesc)
  212.                 out.print("↓");
  213.                 else
  214.                 out.print("↑");
  215.                }
  216.               %></font></th>
  217.             <th width="14%" nowrap><font color="#000000"><a href="" onclick="changeorder('f.TacheName');return false;">当前环节</a><%
  218.                if(strOrderBy.equalsIgnoreCase("f.TacheName"))
  219.                {
  220.                 if(bIsDesc)
  221.                 out.print("↓");
  222.                 else
  223.                 out.print("↑");
  224.                }
  225.               %></font></th>
  226.             <th width="14%" nowrap><font color="#000000">公文流转状态</a></font></th>
  227.               </tr>
  228.   <%
  229.     Vector vt = DocumentManagerPlus.getRecordBySearch(strID, strDocumentName, iDocFlowTempletID, strDocFlowTempletName, iBuildUserID,
  230.                             strBuildUserName, iFillUserID, strFillUserName, bIsPigeonholed, iCurrentFlowTacheID,
  231.                             strCurrentFlowTacheName, iTacheStatus, strTacheStatus, strIsReminded, strRemindTime,
  232.                             strBuildTimeFrom, strBuildTimeTo, strOrderBy, bIsDesc);
  233.     if(iPage<1)iPage=1;
  234.     int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  235.     if(iPage>iPageCount) iPage=1;
  236.     for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  237.     {
  238.       strID = ((Vector)vt.get(i)).get(0).toString();
  239.       if(i % 2 == 0)
  240.       {
  241.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  242.       }
  243.       else
  244.       {
  245.         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  246.       }
  247.       out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  248.       out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  249.       out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(1).toString() + "" ><input type="checkbox" name="ID" value="" + strID + ""><a href="ShowDocumentAllInfo.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "" target="_blank">" + ((Vector)vt.get(i)).get(1).toString() + "</a>&nbsp;</td>");
  250.       out.println("<td align="center" valign="middle" nowrap >" + ((Vector)vt.get(i)).get(11).toString() + "&nbsp;</td>");
  251.       out.println("<td align="center" valign="middle" nowrap >" + ((Vector)vt.get(i)).get(10).toString() + "&nbsp;</td>");
  252.       out.println("<td align="left" valign="middle" nowrap >" + StringNew.GetDateString(((Vector)vt.get(i)).get(3).toString(),"yyyy年MM月dd日 HH时mm分") + "&nbsp;</td>");
  253.       if(((Vector)vt.get(i)).get(7).toString().equalsIgnoreCase("-1"))
  254.       {
  255.               out.println("<td align="center" valign="middle" nowrap >流转结束&nbsp;</td>");
  256.               out.println("<td align="center" valign="middle" nowrap >流转结束&nbsp;</td>");
  257.       }
  258.       else
  259.       {
  260.               out.println("<td align="center" valign="middle" nowrap >" + ((Vector)vt.get(i)).get(13).toString() + "&nbsp;</td>");
  261.               out.println("<td align="center" valign="middle" nowrap ><font color="red">流转未结束!</font></td>");
  262.       }
  263.       out.println("</tr>");
  264.     }
  265.   %>
  266.             <tr>
  267.              <th align="center" valign="top" colspan="7">
  268.               <%
  269.               if(iPage<2)
  270.               out.print("首页&nbsp;&nbsp;上页");
  271.               else
  272.               out.print("<a href="" onclick="changepage(" + 1 + ");return false;">首页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + (iPage-1) + ");return false;">上页</a>");
  273.               out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  274.               if(iPage>=iPageCount)
  275.               out.print("下页&nbsp;&nbsp;末页");
  276.               else
  277.               out.print("<a href="" onclick="changepage(" + (iPage+1) + ");return false;">下页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + iPageCount + ");return false;">末页</a>");
  278.               %>
  279.              </th>
  280.               <th colspan="2">
  281.                 <input name="selectall" type="button" value="全部选择" onclick="checktall()" style="background-color: #FFFFFF; border: 1 solid #000000">
  282.                 <input name="subm" type="submit" value="归档" style="background-color: #FFFFFF; border: 1 solid #000000">
  283.               </th>
  284.             </tr>
  285.            </table>
  286.           </form>
  287.         </td>
  288.       </tr>
  289.     </table>
  290.   </body>
  291. </html>