employee_attendance.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:

电子政务应用

开发平台:

Java

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  4. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0" TopMargin=20>
  5. <STYLE>
  6. #ssm2 A {
  7. FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana; TEXT-DECORATION: none
  8. }
  9. #ssm2 A:hover {
  10. COLOR: red
  11. }
  12. </STYLE>
  13. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  14. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  15. <script language=JavaScript>
  16.     function do_submit()
  17.     {
  18.        if(document.form1.checkIn.checked == false && document.form1.checkOff.checked == false )
  19.        {
  20.         alert("您今天已经登记过下班.");
  21.         return false;
  22.        }
  23.        
  24.        if( document.form1.Notes.value.length > 120 ) 
  25.        {
  26.            alert ("备注长度不能超过120个字符.");
  27.            document.form1.Notes.focus();
  28.            return false;
  29.        }   
  30.               
  31.        if( document.form1.checkIn.checked == true )
  32.        {
  33.           form1.action= "/mainctrl/attendance/attendance/attendanceCheckInResult";
  34.           form1.submit();
  35.        }
  36.        if( document.form1.checkOff.checked == true )
  37.        {
  38.            form1.action= "/mainctrl/attendance/attendance/attendanceCheckOffResult";
  39.            form1.submit();
  40.        }
  41.     }
  42.     function offCheckOffRadio()
  43.     {
  44.         document.form1.checkOff.checked = false;
  45.     } 
  46.     function offCheckInRadio()
  47.     {
  48.         document.form1.checkIn.checked = false;
  49.     }         
  50. </script>
  51. <%@ page language="java" %>
  52. <%@ page import = "com.vnex.intranet.attendance.attendance.proxy.AttendanceProxyBean,com.vnex.intranet.pub.BusinessSession" %>
  53. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  54. <%
  55. AttendanceProxyBean attProxy = new AttendanceProxyBean();
  56. int empId = -1;
  57. if ( BusinessName.getEmpId() != 0)
  58.        empId = BusinessName.getEmpId();
  59.     
  60. %>
  61. <DIV align=center>
  62. <form name="form1" method="post" action="">
  63.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  64.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  65.     <TR> 
  66.         <TD colSpan=3 align="center" class="iframestyle" valign="top"> <br>
  67.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  68.             <tr valign="top" bgcolor="#fafafa"> 
  69.               <td > 
  70.                 <table width="600" border="0" cellspacing="0" cellpadding="2">
  71.                   <tr> 
  72.                       
  73.                     <td colspan="6" bgcolor="#666666"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>&gt;&gt;<font color="#FFFFFF">登记考勤</font> 
  74.                     </td>
  75.                     </tr>
  76.                     <tr bgcolor="#fafafa"> 
  77.                       <td colspan="6"></td>
  78.                     </tr>
  79.                   </table> 
  80.                 <table width="100%" border="0" cellspacing="0" cellpadding="2">
  81.                  
  82.                     <tr bgcolor="#fafafa"> 
  83.                       <td colspan="6"></td>
  84.                     </tr>
  85.                   </table>  
  86.                   
  87.                 <table width="100%" cellpadding="2" cellspacing="1" border="0" class=title>
  88.                   <tr bgcolor="#fafafa"> 
  89.                     <td width="10%"><font class=strong>&nbsp;姓名:</font></td>
  90.                     <td width="90%"> <%=BusinessName.getEmpName()%> </td>
  91.                   </tr>
  92.                   <tr bgcolor="#e0e0e0"> 
  93.                     <td width="10%"><font class=strong>&nbsp;时间:</font></td>
  94.                      <%
  95.                               //输出系统时间
  96.                               Calendar nowTime=Calendar.getInstance();
  97.                               int nowYear = nowTime.get( Calendar.YEAR);
  98.                               int nowMonth = nowTime.get(Calendar.MONTH)+1;
  99.                               int nowDay = nowTime.get(Calendar.DAY_OF_MONTH); 
  100.                               int nowHour = nowTime.get( Calendar.HOUR_OF_DAY );
  101.                               int nowMinute = nowTime.get( Calendar.MINUTE ); 
  102.                               String amPm = "";
  103.                               if (nowHour < 12 )
  104.                               {
  105.                                   amPm = "AM";
  106.                               }
  107.                               if( nowHour >= 12)
  108.                               { 
  109.                                   amPm = "PM";
  110.                               }
  111.                           %>   
  112.                     <td width="90%"> <%=nowYear%> 年 <%=nowMonth%> 月 <%=nowDay%> 日 <%=nowHour%>:<%=nowMinute%> <%=amPm%>   </td>
  113.                   </tr>
  114.                   <tr bgcolor="#fafafa"> 
  115.                     <td width="10%">&nbsp;</td>
  116.                     <td bgcolor="#fafafa" width="90%"> 
  117.                       <%
  118.                               //根据具体情况决定默认选中上班还是下班单选框
  119.                               String checkIn = "";
  120.                               String checkOff = ""; 
  121.                               String whetherCheckIn = "";
  122.                               String whetherCheckOff = "";
  123.                               whetherCheckIn = attProxy.judgeWhetherAlreadyCheckIn( empId );
  124.                               whetherCheckOff = attProxy.judgeWhetherAlreadyCheckOff( empId );
  125.                               if (whetherCheckIn.equals( "No" ) && whetherCheckOff.equals( "No") )
  126.                               {
  127.                                   checkIn = "checked";  
  128.                               }
  129.                               if(whetherCheckIn .equals("Yes") && whetherCheckOff .equals("No"))
  130.                               {
  131.                                  checkOff = "checked";
  132.                               }       
  133.                           %>
  134.                       <input type = "radio"    name = "checkIn" value= 1 onClick = "offCheckOffRadio()" <%=checkIn%>>
  135.                       上班&nbsp; 
  136.                       <input type = "radio"   name = "checkOff" onClick="offCheckInRadio()"  <%=checkOff%>>
  137.                       下班 </td>
  138.                   </tr>
  139.                   <tr bgcolor="#e0e0e0"> 
  140.                     <td width="10%"><font class=strong>&nbsp;备注:</font></td>
  141.                     <td width="90%"> 
  142.                       <textarea name="Notes" rows="4" cols="59"></textarea>
  143.                     </td>
  144.                   </tr>
  145.                   <tr bgcolor="#fafafa"> 
  146.                     <td align="center" colspan="2" height="30"> 
  147.                       <input onClick = "do_submit()" type="button" value="提交" name="Submit" class="text">
  148.   &nbsp;&nbsp;
  149.   <input type="reset" value="重置" name="reset2" class="text">
  150.                     </td>
  151.                   </tr>
  152.                 </table>
  153.                 </td>
  154.             </tr>
  155.           </table>
  156.         <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  157. </TD>
  158.     </TR>
  159.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  160.     </TABLE>
  161.   <BR>
  162.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  163. </form></DIV>
  164. </BODY></HTML>