FlowTacheInfoManage.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. <%
  13.    Request m_request = new Request(request);
  14.    String strCurrentPageURL = request.getRequestURI();
  15.    int iMoveFlowID = m_request.GetInt("ID");
  16.    int iPageSize = 18;
  17.    int iPage = m_request.GetInt("Page");
  18.    String startmark = "F";
  19.    String strID = m_request.GetString("TacheID");
  20.    String strTacheName = m_request.GetString("TacheName");
  21.    String strFromTacheID = m_request.GetString("FromTacheID");
  22.    String strTacheStatus = m_request.GetString("TacheStatus");
  23.    String strTacheDescription = m_request.GetString("TacheDescription");
  24.    String strApproveUserIDs = m_request.GetString("ApproveUserIDs");
  25.    String strTacheType = m_request.GetString("TacheType");
  26.    String strFlowID = m_request.GetString("FlowID");
  27.    String strFlowName = m_request.GetString("FlowName");
  28.    String strUpdateUserID = m_request.GetString("UpdateUserID");
  29.    String strUpdateFromIP = m_request.GetString("UpdateFromIP");
  30.    String strIsRecordRead = m_request.GetString("IsRecordRead");
  31.    String strRemindInterval = m_request.GetString("RemindInterval");
  32.    String strMaxWaitTime = m_request.GetString("MaxWaitTime");
  33.    String strIsFromDefault = m_request.GetString("IsFromDefault");
  34.    String strIsFinishedByRead = m_request.GetString("IsFinishedByRead");
  35.    String strOrderBy = m_request.GetString("OrderBy");
  36.    String strIsDesc = m_request.GetString("IsDesc");
  37.    Vector vtt = MoveFlowTempletManager.getRecordByID(iMoveFlowID);
  38. %>
  39. <script language="JavaScript">
  40.    function changeorder(orderBy)
  41.    {
  42.       with(document.FlowTacheInfoManage)
  43.       {
  44.                           if(OrderBy.value==orderBy)
  45.                     {
  46.                if(IsDesc.value=="")
  47.                   IsDesc.value="True";
  48.                else
  49.                   IsDesc.value="";
  50.               }
  51.                           else
  52.                     {
  53.                       IsDesc.value="";
  54.                       OrderBy.value=orderBy;
  55.                       Page.value="1";
  56.                      }
  57.       }
  58.       document.FlowTacheInfoManage.submit();
  59.     }
  60.    function changepage(pageNum)
  61.    {
  62.       with(document.FlowTacheInfoManage)
  63.         {
  64.           Page.value=pageNum;
  65.          }
  66.       document.FlowTacheInfoManage.submit();
  67.     }
  68. </script>
  69. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  70.    <tr>
  71.      <td align="center" valign="top"><p>&nbsp;</p>
  72.    <form name="FlowTacheInfoManage" action="<%=strCurrentPageURL + "?ID=" + iMoveFlowID%>" method="post">
  73.       <input name="TacheID" type="hidden" value="<%=strID%>">
  74.       <input name="TacheName" type="hidden" value="<%=strTacheName%>">
  75.       <input name="FromTacheID" type="hidden" value="<%=strFromTacheID%>">
  76.       <input name="TacheStatus" type="hidden" value="<%=strTacheStatus%>">
  77.       <input name="TacheDescription" type="hidden" value="<%=strTacheDescription%>">
  78.       <input name="ApproveUserIDs" type="hidden" value="<%=strApproveUserIDs%>">
  79.           <input name="TacheType" type="hidden" value="<%=strTacheType%>">
  80.           <input name="FlowID" type="hidden" value="<%=strFlowID%>">
  81.           <input name="FlowName" type="hidden" value="<%=strFlowName%>">
  82.           <input name="UpdateUserID" type="hidden" value="<%=strUpdateUserID%>">
  83.           <input name="UpdateFromIP" type="hidden" value="<%=strUpdateFromIP%>">
  84.       <input name="IsRecordRead" type="hidden" value="<%=strIsRecordRead%>">
  85.           <input name="RemindInterval" type="hidden" value="<%=strRemindInterval%>">
  86.           <input name="MaxWaitTime" type="hidden" value="<%=strMaxWaitTime%>">
  87.           <input name="IsFromDefault" type="hidden" value="<%=strIsFromDefault%>">
  88.           <input name="IsFinishedByRead" type="hidden" value="<%=strIsFinishedByRead%>">
  89.           <input name="OrderBy" type="hidden" value="<%=strOrderBy%>">
  90.           <input name="IsDesc" type="hidden" value="<%=strIsDesc%>">
  91.           <input name="Page" type="hidden" value="<%=iPage%>">
  92.    <table width="90%" border="0" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a">
  93.           <tr align="center" valign="middle" >
  94.             <th width="100%" nowrap  align="center" valign="middle"><font color="#000000">《<%=((Vector)vtt.get(0)).get(1).toString()%>》环节管理</font></th>
  95.           </tr>
  96.           <tr align="right" valign="bottom">
  97.             <th width="100%" nowrap  align="right" valign="middle"><font color="#000000" >&nbsp;</font>&nbsp;</th>
  98.           </tr>
  99.    </table>
  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="12%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.TacheName');return false;">环节名称</a><%
  105.                          if(strOrderBy.equalsIgnoreCase("a.TacheName"))
  106.                          {
  107.                           if(strIsDesc.equalsIgnoreCase("True"))
  108.                             out.print("↓");
  109.                           else
  110.                                 out.print("↑");
  111.                           }
  112.                    %></font></th>
  113.                 <th width="12%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.FromTacheID');return false;">上级环节名称</a><%
  114.                     if(strOrderBy.equalsIgnoreCase("a.FromTacheID"))
  115.                          {
  116.                           if(strIsDesc.equalsIgnoreCase("True"))
  117.                             out.print("↓");
  118.                           else
  119.                                 out.print("↑");
  120.                           }
  121.                    %></font></th>
  122.                 <th width="6%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.TacheStatus');return false;">环节状态</a><%
  123.                          if(strOrderBy.equalsIgnoreCase("a.TacheStatus"))
  124.                          {
  125.                           if(strIsDesc.equalsIgnoreCase("True"))
  126.                             out.print("↓");
  127.                           else
  128.                                 out.print("↑");
  129.                          }
  130.                   %></font></th>
  131.                 <th width="8%" nowrap><font color="#000000"><a href="" onclick="changeorder('d.Name');return false;">更新用户</a><%
  132.                   if(strOrderBy.equalsIgnoreCase("d.Name"))
  133.                          {
  134.                           if(strIsDesc.equalsIgnoreCase("True"))
  135.                             out.print("↓");
  136.                           else
  137.                                 out.print("↑");
  138.                          }
  139.                   %></font></th>
  140.                 <th width="8%" nowrap><font color="#000000"><a href="" onclick="changeorder('a.UpdateTime');return false;">更新时间</a><%
  141.                  if(strOrderBy.equalsIgnoreCase("a.UpdateTime"))
  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">修改</font></th>
  150.                 <th width="7%" nowrap><font color="#000000">删除</font></th>
  151.           </tr>
  152.           <%
  153.                 strFlowID = iMoveFlowID+"";
  154.                      Vector vt = FlowTacheInfoManager.getRecordBySearch(strID,strTacheName,strFromTacheID,strTacheStatus,strTacheDescription,strApproveUserIDs,strTacheType,strFlowID,strFlowName,strUpdateUserID,strUpdateFromIP,strIsRecordRead,strRemindInterval,strMaxWaitTime,strIsFromDefault,strIsFinishedByRead,strOrderBy,strIsDesc);
  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.                                 strID = ((Vector)vt.get(i)).get(0).toString();
  161.                                 String strUName;
  162.                                 if(((Vector)vt.get(i)).get(2).toString().trim().length()>0)
  163.                                 {
  164.                                         Vector vvt = FlowTacheInfoManager.getRecordBySearch(((Vector)vt.get(i)).get(2).toString());
  165.                                         if (vvt.size() == 1)
  166.                                         {
  167.                                                 strUName= ((Vector)vvt.get(0)).get(1).toString();
  168.                                         }
  169.                                         else
  170.                                         {
  171.                                                 strUName = "<font color='red'>上级环节设置有问题</font>";
  172.                                         }
  173.                                 }
  174.                                 else
  175.                                 {
  176.                                         strUName = "无";
  177.                                 }
  178.                                 String strstatus;
  179.                                 if (((Vector)vt.get(i)).get(3).toString().equalsIgnoreCase("S")){strstatus="起始环节";startmark="T";}
  180.                                 else if (((Vector)vt.get(i)).get(3).toString().equalsIgnoreCase("E"))strstatus="结束环节";
  181.                                 else strstatus="中间环节";
  182.                                 String struptime,struptimeE;
  183.                                 if ((((Vector)vt.get(i)).get(9).toString()).length()>0){struptime=((Vector)vt.get(i)).get(9).toString();struptimeE=StringNew.GetDateString(struptime,"yyyy年MM月dd日 HH时mm分");}
  184.                                 else {struptime="YYYY年MM月DD日 HH时mm分";struptimeE = struptime;}
  185.                                 if(i % 2 == 0)
  186.                                         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  187.                                 else
  188.                                         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  189.                                 out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  190.                                 out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  191.                                 out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(4).toString() + "" >" + ((Vector)vt.get(i)).get(1).toString() + "&nbsp;</td>");
  192.                                 out.println("<td align="left" valign="middle" nowrap >" + strUName + "&nbsp;</td>");
  193.                                 out.println("<td align="left" valign="middle" nowrap >" + strstatus + "&nbsp;</td>");
  194.                                 out.println("<td align="center" valign="middle" nowrap >" + ((Vector)vt.get(i)).get(17).toString() + "&nbsp;</td>");
  195.                                 out.println("<td align="center" valign="middle" nowrap>" + struptimeE + "&nbsp;</td>");
  196.                                 out.println("<td align="center" valign="middle" nowrap><a href="EditFlowTacheInfo.jsp?MoveFlowID=" + iMoveFlowID  + "&ID=" + strID + "&mark=" + startmark +"">修改</a></td>");
  197.                                 out.println("<td align="center" valign="middle" nowrap><a href="DelFlowTacheInfo.jsp?MoveFlowID=" + iMoveFlowID + "&ID=" + strID + "" onclick="return confirm('您确实要删除该环节吗?');">删除</a></td>");
  198.                                 out.println("</tr>");
  199.                         }
  200.           %>
  201.           <tr>
  202.              <th align="center" valign="top" colspan="7">
  203.                         <%
  204.                         if(iPage<2)
  205.                         out.print("首页&nbsp;&nbsp;上页");
  206.                         else
  207.                         out.print("<a href="" onclick="changepage(" + 1 + ");return false;">首页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + (iPage-1) + ");return false;">上页</a>");
  208.                         out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  209.                         if(iPage>=iPageCount)
  210.                         out.print("下页&nbsp;&nbsp;末页");
  211.                         else
  212.                         out.print("<a href="" onclick="changepage(" + (iPage+1) + ");return false;">下页</a>&nbsp;&nbsp;<a href="" onclick="changepage(" + iPageCount + ");return false;">末页</a>");
  213.                         %>
  214.                  </th>
  215.                  <th colspan="3">
  216.                          <a href="AddFlowTacheInfo.jsp?MoveFlowID=<%=iMoveFlowID%>&mark=<%=startmark%>">新增环节</a>
  217.                  </th>
  218.           </tr>
  219.    </table>
  220.                         <table width="90%" border="0">
  221.                           <tr>
  222.                             <td>&nbsp;
  223.                             </td>
  224.                           </tr>
  225.                           <tr>
  226.                             <td width="90%">
  227.                             </td>
  228.                             <td  nowrap="nowrap" align="right" valign="middle" style=""><a href="MoveFlowTempletManage.jsp"><font color="<%=m_session.GetString("TitleColor")%>"><strong>返回流转模版管理&nbsp;</strong></font></a>
  229.                             </td>
  230.                           </tr>
  231.                         </table>
  232.    </form>
  233.    </td>
  234. </tr>
  235. </table>
  236. </body>
  237. </html>