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

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"/>
  4. <%
  5. Session m_session = new Session(session);
  6. Request m_request = new Request(request);
  7. int iDepartmentID =m_request.GetInt("DepartmentID");
  8. %>
  9. <html>
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  12. <title>考勤查询管理-- GForce OA 2.0</title>
  13. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  14. <SCRIPT language="JavaScript" src="/Calendar/PopUpCalendarDlg.js"></SCRIPT>
  15. <script language="JavaScript" src="/js/changestyle.js"></SCRIPT>
  16. <script language="JavaScript" type="text/javascript">
  17. function checkSignApply()
  18. {
  19.         if(!isDate(document.SignApply.StartDate.value))
  20.         {
  21.             alert("日期格式错误,请按照“2002-02-18”重新输入!");
  22.             document.SignApply.StartDate.focus();
  23.             return false;
  24.         }
  25.         if(!isDate(document.SignApply.EndDate.value))
  26.         {
  27.             alert("日期格式错误,请按照“2002-02-18”重新输入!");
  28.             document.SignApply.EndDate.focus();
  29.             return false;
  30.         }
  31. }
  32. </SCRIPT>
  33. </head>
  34. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0" onload="javascript:for(var i=0;i<document.all.GoByDepartmentID.length;i++)if(document.all.GoByDepartmentID.options[i].value=='<%=iDepartmentID%>')document.all.GoByDepartmentID.selectedIndex=i;">
  35. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  36.   <tr>
  37.     <td height="20" colspan="7" align="right" valign="middle"> </td>
  38.   </tr>
  39.   <form name="SignApply" action="SignQueryManage.jsp" method="post" onSubmit="javascript:return checkSignApply();">
  40.     <tr>
  41.       <td width="98" height="27" align="right" valign="middle"><strong>选择部门:</strong>
  42.       </td>
  43.       <td width="124" align="left" valign="middle">
  44.         <select name="DepartmentID"  id="GoByDepartmentID">
  45.           <option value="">请选择所属部门</option>
  46.           <script language="JavaScript" src="/js/AddDepartment.jsp"></script>
  47.         </select></td>
  48.       <td width="135" align="right" valign="middle"><strong>开始时间:</strong></td>
  49.       <td width="85" height="27" align="left" valign="middle"> <input name="StartDate" type="text"  onFocus="JavaScript:this.value=fPopUpCalendarDlg(this.value);" maxlength="12" size="12" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  50.       </td>
  51.       <td width="98" height="27" align="right" valign="middle"><strong>结束时间:</strong></td>
  52.       <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" onDblClick="JavaScript:this.value=fPopUpCalendarDlg(this.value);">
  53.       </td>
  54.       <td width="154" height="27" align="left" valign="middle"> <input type="submit" value="查询">
  55.       </td>
  56.     </tr>
  57.   </form>
  58.   <tr>
  59.     <td height="20" colspan="7" align="center" valign="top"> <hr></td>
  60.   </tr>
  61.   <tr>
  62.     <td colspan="7" align="center" valign="top"> <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  63.         <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  64.           <th width="4%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  65.           <th width="4%" nowrap><font color="#000000">员工编号</font></th>
  66.           <th width="8%" nowrap><font color="#000000">姓名</font></th>
  67. <%
  68. int iPageSize = 15;
  69. int iPage = m_request.GetInt("Page");
  70. String strStartDate = "";
  71. strStartDate =m_request.GetString("StartDate");
  72. String strEndDate = "";
  73. strEndDate = m_request.GetString("EndDate");
  74. Vector vtType = SignTypeManager.getAllRecord();
  75. for (int i=0;i<vtType.size();i++)
  76. {
  77.  out.println("<th width="8%" nowrap><font color="#000000">" + ((Vector)vtType.get(i)).get(1).toString() + "</font></th>");
  78. }
  79. %>
  80.         </tr>
  81.         <%
  82. if (!(strStartDate.equalsIgnoreCase("")||strEndDate.equalsIgnoreCase("")))
  83. {
  84.  Vector vt = UserManager.getRecordAndPersonnelInfoByDepartmentID(iDepartmentID);
  85. if(iPage<1)iPage=1;
  86. int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  87. if(iPage>iPageCount) iPage=1;
  88. for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  89. {
  90.     String strID = ((Vector)vt.get(i)).get(0).toString();
  91.     if( i% 2 == 0)
  92.     out.println("<tr id="Row"+ i + "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  93.     else
  94.     out.println("<tr id="Row"+ i + "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  95.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  96.     out.println("<td align="center" valign="middle">" + ((Vector)vt.get(i)).get(8).toString() + "</td>");
  97.     out.println("<td align="center" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(9).toString() + "" onclick="window.open('SignLinkManage.jsp?UserID="+ strID +"&StartDate=" + strStartDate + "&EndDate="+ strEndDate +"','_blank')"><a href="" onclick="return false;">" + ((Vector)vt.get(i)).get(9).toString() + "</a></td>");
  98. //*************
  99. if (vtType.size()>0)
  100. {
  101.   for(int j=0;j < vtType.size();j++)
  102.   {
  103.     String strSignSUM = SignManager.getSignSUM(Integer.parseInt(strID),Integer.parseInt(((Vector)vtType.get(j)).get(0).toString()),strStartDate,strEndDate);
  104.     out.println("<td align="center" valign="middle" nowrap>" +strSignSUM + "</td>");
  105.   }
  106. }
  107.     out.println("</tr>");
  108. }
  109. //********************************
  110. out.println("<tr><td colspan="7" align="center" valign="middle"><strong>");
  111. String strCurrentPageURL = request.getRequestURI();
  112. if(iPage<2)
  113. out.print("首页&nbsp;&nbsp;上页");
  114. else
  115. out.print("<a href=""+ strCurrentPageURL+"?Page=" + 1 + "&StartDate=" + strStartDate + "&EndDate="+ strEndDate + "&DepartmentID=" + iDepartmentID + "">首页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?Page=" + (iPage-1) + "&StartDate=" + strStartDate + "&EndDate="+ strEndDate + "&DepartmentID="+ iDepartmentID +"">上页</a>");
  116. out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  117. if(iPage>=iPageCount)
  118. out.print("下页&nbsp;&nbsp;末页");
  119. else
  120. out.print("<a href=""+ strCurrentPageURL+"?Page=" + (iPage+1) + "&StartDate=" + strStartDate + "&EndDate="+ strEndDate + "&DepartmentID="+ iDepartmentID +"">下页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?Page=" + iPageCount + "&StartDate=" + strStartDate + "&EndDate="+ strEndDate + "&DepartmentID=" + iDepartmentID + "">末页</a>");
  121. out.println("</strong></td></tr>");
  122. }
  123. %>
  124.       </table></td>
  125.   </tr>
  126. </table>
  127. </body>
  128. </html>