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

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"><p>&nbsp;</p>
  15. <%
  16. int iUserID = m_session.GetInt("UserID");
  17. Vector vt = ApproveRecordManager.getRecordByUserID(iUserID);
  18. %>
  19.             <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  20.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  21.                     <th width="6%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  22.                     <th width="8%" nowrap><font color="#000000">序号</font></th>
  23.                     <th width="30%" nowrap><font color="#000000">申请类型</font></th>
  24.                     <th width="11%" nowrap><font color="#000000">审批状态</font></th>
  25.                     <th width="11%" nowrap><font color="#000000">审批</font></th>
  26.                 </tr>
  27. <%
  28. for(int i=0;i<vt.size();i++)
  29. {
  30.     String strID = ((Vector)vt.get(i)).get(0).toString();
  31.     if(i % 2 == 0)
  32.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  33.     else
  34.     out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  35.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  36.     out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  37.     out.println("<td align="center" valign="middle" nowrap>" +  ((Vector)vt.get(i)).get(2).toString() + "</td>");
  38. //****************************审批状态
  39.     Vector vtApproveRecord = ApproveRecordManager.getRecordByRecordID(Integer.parseInt(((Vector)vt.get(i)).get(1).toString()),((Vector)vt.get(i)).get(2).toString());
  40.     out.println("<td align="center" valign="middle" nowrap>");
  41.     if (vtApproveRecord.size() > 0 )
  42.     for (int j = 0; j < vtApproveRecord.size() ;j++)
  43.     {
  44.       if (((Vector)vtApproveRecord.get(j)).get(4).toString().equalsIgnoreCase(""))
  45.       {
  46.       out.println("未审批");
  47.       }else
  48.       if (((Vector)vtApproveRecord.get(j)).get(4).toString().equalsIgnoreCase("true"))
  49.       {
  50.       out.println("同意");
  51.       }else
  52.       if (((Vector)vtApproveRecord.get(j)).get(4).toString().equalsIgnoreCase("false"))
  53.       {
  54.       out.println("不同意");
  55.       }
  56.       out.println("["+UserManager.getPersonnelNameByUserID(Integer.parseInt(((Vector)vtApproveRecord.get(j)).get(3).toString())) + "]<br>");
  57.     }
  58.     else
  59.     out.println("&nbsp;");
  60.     out.println("</td>");
  61. //******************************审批状态完
  62.     //判断申请类型,生成相应的表的链接
  63.     String strType = "";
  64.     String strParameter = "";
  65.     if (((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("请假申请"))
  66.     {
  67.       strType = "LeaveApply";
  68.     }else
  69.     if (((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("出差申请"))
  70.     {
  71.       strType = "ErrandApply";
  72.     }else
  73.     if (((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("采购申请"))
  74.     {
  75.       strType = "/Asset/AssetApply";
  76.       //strParameter = "OperationType=BuyApply&";
  77.     }else
  78.     if (((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("领用申请"))
  79.     {
  80.       strType = "/Asset/AssetApply";
  81.     //  strParameter = "OperationType=UseApply&";
  82.     }else
  83.     {
  84.       strType = "无法识别的申请类型!";
  85.     }
  86.     out.println("<td align="center" valign="middle" nowrap title=审批 onclick="window.open('"+ strType +"Check.jsp?"+ strParameter +"ID=" + ((Vector)vt.get(i)).get(1).toString() + "&ApproveType=" + ((Vector)vt.get(i)).get(2).toString() + "','_blank')"><a href="#" target="_blank" onclick="return false;">审批</a></td>");
  87.     out.println("</tr>");
  88. }
  89. %>
  90.     </table>
  91.     </td>
  92.     </tr>
  93. </table>
  94. </body>
  95. </html>