非常完整的Java开发的网络办公系统
源代码在线查看: employee_attendance.jsp
#ssm2 A {
FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
#ssm2 A:hover {
COLOR: red
}
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;
}
AttendanceProxyBean attProxy = new AttendanceProxyBean();
int empId = -1;
if ( BusinessName.getEmpId() != 0)
empId = BusinessName.getEmpId();
%>
首页>>个人办公>>登记考勤
姓名:
时间:
//输出系统时间
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";
}
%>
年 月 日 :
//根据具体情况决定默认选中上班还是下班单选框
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";
}
%>
上班
下班
备注: