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

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 align="center" valign="top">
  38.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  39.         <tr>
  40.           <td height="50" valign="top" background="../images/dy-back.gif">
  41.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  42.               <tr valign="middle">
  43.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  44.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">考勤查询</font></strong></td>
  45.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  46.               <%
  47.                   //<!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  48.                  // <!--单增<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59">&nbsp;-->
  49.                 //<!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  50.                 // <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  51.                 //<!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  52.                  // <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  53.                %>
  54.                   </td>
  55.               </tr>
  56.             </table>
  57.           </td>
  58.         </tr>
  59.       </table><br>
  60. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  61.   <tr>
  62.     <td height="20" colspan="7" align="right" valign="middle"> </td>
  63.   </tr>
  64.   <form name="SignApply" action="SignQueryManage.jsp" method="post" onSubmit="javascript:return checkSignApply();">
  65.     <tr>
  66.       <td width="98" height="27" align="right" valign="middle"><strong>选择部门:</strong>
  67.       </td>
  68.       <td width="124" align="left" valign="middle">
  69.         <select name="DepartmentID"  id="GoByDepartmentID">
  70.           <option value="">请选择所属部门</option>
  71.           <script language="JavaScript" src="/js/AddDepartment.jsp"></script>
  72.         </select></td>
  73.       <td width="135" align="right" valign="middle"><strong>开始时间:</strong></td>
  74.       <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);">
  75.       </td>
  76.       <td width="98" height="27" align="right" valign="middle"><strong>结束时间:</strong></td>
  77.       <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);">
  78.       </td>
  79.       <td width="154" height="27" align="left" valign="middle"> <input type="submit" value="查询">
  80.       </td>
  81.     </tr>
  82.   </form>
  83.   <tr>
  84.     <td height="20" colspan="7" align="center" valign="top"> <hr></td>
  85.   </tr>
  86.   <tr>
  87.     <td colspan="7" align="center" valign="top"> <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  88.         <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  89.           <th width="4%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  90.           <th width="4%" nowrap><font color="#000000">员工编号</font></th>
  91.           <th width="8%" nowrap><font color="#000000">姓名</font></th>
  92. <%
  93. int iPageSize = 15;
  94. int iPage = m_request.GetInt("Page");
  95. String strStartDate = "";
  96. strStartDate =m_request.GetString("StartDate");
  97. String strEndDate = "";
  98. strEndDate = m_request.GetString("EndDate");
  99. Vector vtType = SignTypeManager.getAllRecord();
  100. for (int i=0;i<vtType.size();i++)
  101. {
  102.  out.println("<th width="8%" nowrap><font color="#000000">" + ((Vector)vtType.get(i)).get(1).toString() + "</font></th>");
  103. }
  104. %>
  105.         </tr>
  106.         <%
  107. if (!(strStartDate.equalsIgnoreCase("")||strEndDate.equalsIgnoreCase("")))
  108. {
  109.  Vector vt = UserManager.getRecordAndPersonnelInfoByDepartmentID(iDepartmentID);
  110. if(iPage<1)iPage=1;
  111. int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  112. if(iPage>iPageCount) iPage=1;
  113. for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  114. {
  115.     String strID = ((Vector)vt.get(i)).get(0).toString();
  116.     if( i% 2 == 0)
  117.     out.println("<tr id="Row"+ i + "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  118.     else
  119.     out.println("<tr id="Row"+ i + "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  120.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  121.     out.println("<td align="center" valign="middle">" + ((Vector)vt.get(i)).get(8).toString() + "</td>");
  122.     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>");
  123. //*************
  124. if (vtType.size()>0)
  125. {
  126.   for(int j=0;j < vtType.size();j++)
  127.   {
  128.     String strSignSUM = SignManager.getSignSUM(Integer.parseInt(strID),Integer.parseInt(((Vector)vtType.get(j)).get(0).toString()),strStartDate,strEndDate);
  129.     out.println("<td align="center" valign="middle" nowrap>" +strSignSUM + "</td>");
  130.   }
  131. }
  132.     out.println("</tr>");
  133. }
  134. //********************************
  135. out.println("<tr><td colspan="7" align="center" valign="middle"><strong>");
  136. String strCurrentPageURL = request.getRequestURI();
  137. if(iPage<2)
  138. out.print("首页&nbsp;&nbsp;上页");
  139. else
  140. 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>");
  141. out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  142. if(iPage>=iPageCount)
  143. out.print("下页&nbsp;&nbsp;末页");
  144. else
  145. 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>");
  146. out.println("</strong></td></tr>");
  147. }
  148. %>
  149.       </table></td>
  150.   </tr>
  151. </table>
  152. </body>
  153. </html>