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