approverecordmanage.jsp

来自「一个完整的」· JSP 代码 · 共 96 行

JSP
96
字号
<%@ page contentType="text/html; charset=gb2312"%>
<%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
<jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
<title>审批管理-- GForce OA 2.0</title>
<link href="/css/txt.jsp" rel="stylesheet" type="text/css">
<script language="JavaScript" src="/js/changestyle.js"></script>
</head>
<body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
<table width="100%" height="100%" border="0" align="center" cellspacing="0">
    <tr>
        <td align="center" valign="top"><p>&nbsp;</p>
<%
int iUserID = m_session.GetInt("UserID");
Vector vt = ApproveRecordManager.getRecordByUserID(iUserID);
%>
            <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
                <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
                    <th width="6%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
                    <th width="8%" nowrap><font color="#000000">序号</font></th>
                    <th width="30%" nowrap><font color="#000000">申请类型</font></th>
                    <th width="11%" nowrap><font color="#000000">审批状态</font></th>
                    <th width="11%" nowrap><font color="#000000">审批</font></th>
                </tr>
<%
for(int i=0;i<vt.size();i++)
{
    String strID = ((Vector)vt.get(i)).get(0).toString();
    if(i % 2 == 0)
        out.println("<tr id=\"Row"+ i+ "\" class=\"DataRowsSingle\" onmouseover=\"mouseon(this,'image" + i + "');\" onmouseout=\"mouseout(this,'image" + i + "','DataRowsSingle');\">");
    else
    out.println("<tr id=\"Row"+ i+ "\" class=\"DataRowsDouble\" onmouseover=\"mouseon(this,'image" + i + "');\" onmouseout=\"mouseout(this,'image" + i + "','DataRowsDouble');\">");
    out.println("<td align=\"right\" valign=\"middle\"><img id=\"image" + i + "\" src=\"../images/lastpost1.gif\" style=\"display:none;\"> </td>");
    out.println("<td align=\"right\" valign=\"middle\">" + (i+1) + "</td>");
    out.println("<td align=\"center\" valign=\"middle\" nowrap>" +  ((Vector)vt.get(i)).get(2).toString() + "</td>");
//****************************审批状态
    Vector vtApproveRecord = ApproveRecordManager.getRecordByRecordID(Integer.parseInt(((Vector)vt.get(i)).get(1).toString()),((Vector)vt.get(i)).get(2).toString());
    out.println("<td align=\"center\" valign=\"middle\" nowrap>");
    if (vtApproveRecord.size() > 0 )
    for (int j = 0; j < vtApproveRecord.size() ;j++)
    {
      if (((Vector)vtApproveRecord.get(j)).get(4).toString().equalsIgnoreCase(""))
      {
      out.println("未审批");
      }else
      if (((Vector)vtApproveRecord.get(j)).get(4).toString().equalsIgnoreCase("true"))
      {
      out.println("同意");
      }else
      if (((Vector)vtApproveRecord.get(j)).get(4).toString().equalsIgnoreCase("false"))
      {
      out.println("不同意");
      }
      out.println("["+UserManager.getPersonnelNameByUserID(Integer.parseInt(((Vector)vtApproveRecord.get(j)).get(3).toString())) + "]<br>");
    }
    else
    out.println("&nbsp;");
    out.println("</td>");
//******************************审批状态完
    //判断申请类型,生成相应的表的链接
    String strType = "";
    String strParameter = "";
    if (((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("请假申请"))
    {
      strType = "LeaveApply";
    }else
    if (((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("出差申请"))
    {
      strType = "ErrandApply";
    }else
    if (((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("采购申请"))
    {
      strType = "/Asset/AssetApply";
      //strParameter = "OperationType=BuyApply&";
    }else
    if (((Vector)vt.get(i)).get(2).toString().equalsIgnoreCase("领用申请"))
    {
      strType = "/Asset/AssetApply";
    //  strParameter = "OperationType=UseApply&";
    }else
    {
      strType = "无法识别的申请类型!";
    }
    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>");
    out.println("</tr>");
}
%>
    </table>
    </td>
    </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?