SignQuery.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:7k
源码类别:
OA系统
开发平台:
Java
- <%@ 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);
- Request m_request = new Request(request);
- int iUserID = m_session.GetInt("UserID");
- Vector vt = UserManager.getUserInfoByID(iUserID);
- int iDepartmentID = Integer.parseInt(((Vector)vt.get(0)).get(5).toString());
- String strSDate = m_request.GetString("StartDate");
- %>
- <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="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
- <script language="JavaScript" src="/js/changestyle.js"></SCRIPT>
- <script language="JavaScript" type="text/javascript">
- function checkSignApply()
- {
- if(!isDate(document.SignApply.StartDate.value))
- {
- alert("日期格式错误,请按照“2002-02-18”重新输入!");
- document.SignApply.StartDate.focus();
- return false;
- }
- if(!isDate(document.SignApply.EndDate.value))
- {
- alert("日期格式错误,请按照“2002-02-18”重新输入!");
- document.SignApply.EndDate.focus();
- return false;
- }
- if(document.SignApply.EndDate.value<document.SignApply.StartDate.value)
- {
- alert("开始时间不能大于结束时间,请重新输入!");
- document.SignApply.StartDate.focus();
- return false;
- }
- }
- </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 height="20" colspan="7" align="right" valign="middle"> </td>
- </tr>
- <form name="SignApply" action="SignQuery.jsp" method="post" onSubmit="javascript:return checkSignApply();">
- <tr>
- <td width="135" align="right" valign="middle"><strong>开始时间:</strong></td>
- <td width="85" height="27" align="left" valign="middle">
- <%
- java.util.Date t_Date = new java.util.Date();
- %>
- <input name="StartDate" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="12" size="12" value="<%=(strSDate.trim().length()<4)?StringNew.GetDateString(t_Date,"yyyy-MM-dd"):strSDate%>" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
- </td>
- <td width="98" height="27" align="right" valign="middle"><strong>结束时间:</strong></td>
- <td width="94" height="27" align="left" valign="middle">
- <input name="EndDate" type="text" onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="12" size="12" value="<%=StringNew.GetDateString(t_Date,"yyyy-MM-dd")%>" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
- </td>
- <td width="154" height="27" align="left" valign="middle"><input type="submit" value="查 询" style="background-color: #FFFFFF; border: 1 solid #000000">
- </td>
- </tr>
- </form>
- <tr>
- <td height="20" colspan="7" align="center" valign="top"> <hr></td>
- </tr>
- <tr>
- <td colspan="7" align="center" valign="top"> <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="2%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
- <th width="4%" nowrap><font color="#000000">员工编号</font></th>
- <th width="8%" nowrap><font color="#000000">姓名</font></th>
- <%
- int iPageSize = 15;
- int iPage = m_request.GetInt("Page");
- String strStartDate = "";
- strStartDate =m_request.GetString("StartDate");
- String strEndDate = "";
- strEndDate = m_request.GetString("EndDate");
- Vector vtType = SignTypeManager.getAllRecord();
- for (int i=0;i<vtType.size();i++)
- {
- out.println("<th width="8%" nowrap><font color="#000000">" + ((Vector)vtType.get(i)).get(1).toString() + "</font></th>");
- }
- %>
- </tr>
- <%
- if (!(strStartDate.equalsIgnoreCase("")||strEndDate.equalsIgnoreCase("")))
- {
- vt = UserManager.getRecordAndPersonnelInfoByDepartmentID(iDepartmentID);
- if(iPage<1)iPage=1;
- int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
- if(iPage>iPageCount) iPage=1;
- for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;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="center" valign="middle">" + ((Vector)vt.get(i)).get(8).toString() + "</td>");
- out.println("<td align="center" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(9).toString() + "" onclick="window.open('SignLink.jsp?UserID="+ strID +"&StartDate=" + strStartDate + "&EndDate="+ strEndDate +"','_blank')"><a href="" onclick="return false;">" + ((Vector)vt.get(i)).get(9).toString() + "</a></td>");
- //*************
- if (vtType.size()>0)
- {
- for(int j=0;j < vtType.size();j++)
- {
- String strSignSUM = SignManager.getSignSUM(Integer.parseInt(strID),Integer.parseInt(((Vector)vtType.get(j)).get(0).toString()),strStartDate,strEndDate);
- out.println("<td align="center" valign="middle" nowrap>" +strSignSUM + "</td>");
- }
- }
- out.println("</tr>");
- }
- //********************************
- out.println("<tr><td colspan="7" align="center" valign="middle"><strong>");
- String strCurrentPageURL = request.getRequestURI();
- if(iPage<2)
- out.print("首页 上页");
- else
- out.print("<a href=""+ strCurrentPageURL+"?Page=" + 1 + "&StartDate=" + strStartDate + "&EndDate="+ strEndDate + "">首页</a> <a href=""+ strCurrentPageURL+"?Page=" + (iPage-1) + "&StartDate=" + strStartDate + "&EndDate="+ strEndDate + "">上页</a>");
- out.print(" 当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页 ");
- if(iPage>=iPageCount)
- out.print("下页 末页");
- else
- out.print("<a href=""+ strCurrentPageURL+"?Page=" + (iPage+1) + "&StartDate=" + strStartDate + "&EndDate="+ strEndDate + "">下页</a> <a href=""+ strCurrentPageURL+"?Page=" + iPageCount + "&StartDate=" + strStartDate + "&EndDate="+ strEndDate + "">末页</a>");
- out.println("</strong></td></tr>");
- }
- %>
- </table>
- </td>
- </tr>
- </table>
- </body>
- </html>