employee_attendance.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:
电子政务应用
开发平台:
Java
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0" TopMargin=20>
- <STYLE>
- #ssm2 A {
- FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana; TEXT-DECORATION: none
- }
- #ssm2 A:hover {
- COLOR: red
- }
- </STYLE>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script language=JavaScript>
- function do_submit()
- {
- if(document.form1.checkIn.checked == false && document.form1.checkOff.checked == false )
- {
- alert("您今天已经登记过下班.");
- return false;
- }
- if( document.form1.Notes.value.length > 120 )
- {
- alert ("备注长度不能超过120个字符.");
- document.form1.Notes.focus();
- return false;
- }
- if( document.form1.checkIn.checked == true )
- {
- form1.action= "/mainctrl/attendance/attendance/attendanceCheckInResult";
- form1.submit();
- }
- if( document.form1.checkOff.checked == true )
- {
- form1.action= "/mainctrl/attendance/attendance/attendanceCheckOffResult";
- form1.submit();
- }
- }
- function offCheckOffRadio()
- {
- document.form1.checkOff.checked = false;
- }
- function offCheckInRadio()
- {
- document.form1.checkIn.checked = false;
- }
- </script>
- <%@ page language="java" %>
- <%@ page import = "com.vnex.intranet.attendance.attendance.proxy.AttendanceProxyBean,com.vnex.intranet.pub.BusinessSession" %>
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <%
- AttendanceProxyBean attProxy = new AttendanceProxyBean();
- int empId = -1;
- if ( BusinessName.getEmpId() != 0)
- empId = BusinessName.getEmpId();
- %>
- <DIV align=center>
- <form name="form1" method="post" action="">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center" class="iframestyle" valign="top"> <br>
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr valign="top" bgcolor="#fafafa">
- <td >
- <table width="600" border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td colspan="6" bgcolor="#666666"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>>><font color="#FFFFFF">登记考勤</font>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td colspan="6"></td>
- </tr>
- </table>
- <table width="100%" border="0" cellspacing="0" cellpadding="2">
- <tr bgcolor="#fafafa">
- <td colspan="6"></td>
- </tr>
- </table>
- <table width="100%" cellpadding="2" cellspacing="1" border="0" class=title>
- <tr bgcolor="#fafafa">
- <td width="10%"><font class=strong> 姓名:</font></td>
- <td width="90%"> <%=BusinessName.getEmpName()%> </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="10%"><font class=strong> 时间:</font></td>
- <%
- //输出系统时间
- Calendar nowTime=Calendar.getInstance();
- int nowYear = nowTime.get( Calendar.YEAR);
- int nowMonth = nowTime.get(Calendar.MONTH)+1;
- int nowDay = nowTime.get(Calendar.DAY_OF_MONTH);
- int nowHour = nowTime.get( Calendar.HOUR_OF_DAY );
- int nowMinute = nowTime.get( Calendar.MINUTE );
- String amPm = "";
- if (nowHour < 12 )
- {
- amPm = "AM";
- }
- if( nowHour >= 12)
- {
- amPm = "PM";
- }
- %>
- <td width="90%"> <%=nowYear%> 年 <%=nowMonth%> 月 <%=nowDay%> 日 <%=nowHour%>:<%=nowMinute%> <%=amPm%> </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="10%"> </td>
- <td bgcolor="#fafafa" width="90%">
- <%
- //根据具体情况决定默认选中上班还是下班单选框
- String checkIn = "";
- String checkOff = "";
- String whetherCheckIn = "";
- String whetherCheckOff = "";
- whetherCheckIn = attProxy.judgeWhetherAlreadyCheckIn( empId );
- whetherCheckOff = attProxy.judgeWhetherAlreadyCheckOff( empId );
- if (whetherCheckIn.equals( "No" ) && whetherCheckOff.equals( "No") )
- {
- checkIn = "checked";
- }
- if(whetherCheckIn .equals("Yes") && whetherCheckOff .equals("No"))
- {
- checkOff = "checked";
- }
- %>
- <input type = "radio" name = "checkIn" value= 1 onClick = "offCheckOffRadio()" <%=checkIn%>>
- 上班
- <input type = "radio" name = "checkOff" onClick="offCheckInRadio()" <%=checkOff%>>
- 下班 </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="10%"><font class=strong> 备注:</font></td>
- <td width="90%">
- <textarea name="Notes" rows="4" cols="59"></textarea>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td align="center" colspan="2" height="30">
- <input onClick = "do_submit()" type="button" value="提交" name="Submit" class="text">
-
- <input type="reset" value="重置" name="reset2" class="text">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>