📄 attendancequeryresult.jsp
字号:
<%@ page language="java" import="java.util.*,java.text.*" pageEncoding="gbk"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>联信OA-部门办公</title>
<style type="text/css">
<!--
body,td,th {
font-size: 13px;
}
.STYLE1 {color: #FF0000}
body {
margin-left: 10px;
margin-top: 10px;
margin-right: 0px;
margin-bottom: 0px;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
.style2 {font-size: 12px}
-->
</style>
<script type="text/javascript">
function checkfrm(){
var year=form.year.value;
var month=form.month.value;
if(year=="0"||month=="0"){
alert("请选择日期!");
return false;
}
return true;
}
function tongji(j,a){
document.getElementById(j).innerHTML = a;
}
function huoqu(){
// alert(document.getElementById("aa").innerHTML);
var content = document.getElementById("aa").innerHTML;
document.getElementsByName("k")[0].value=content;
frm.action = "<%=request.getContextPath()%>/saveattendance.do";
frm.submit();
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>
<%SimpleDateFormat format5 = new SimpleDateFormat("yyyy-MM");
java.util.Date r=new java.util.Date();
String adate = format5.format(r);%>
<% String queryyear = "";
String querymonth = "";
String type = (String)request.getAttribute("type");
queryyear = (String)request.getAttribute("year");
if(queryyear==null||queryyear.equals("")||queryyear.equals("null")){
queryyear = request.getParameter("year");
}
querymonth = (String)request.getAttribute("month");
if(querymonth==null||querymonth.equals("")||querymonth.equals("null")){
querymonth = request.getParameter("month");
}
String bodyhtml = (String)request.getAttribute("bodyhtml");
String updatedate = queryyear + "-" + querymonth;
%>
<form action="" method="post" name="frm" style="display:none">
<input type="hidden" name="k" id="k"/>
<input type="hidden" name="adate" value="<%=updatedate %>"/>
</form>
<%
out.print("<script>ac();</script>");
out.flush();
%>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<%if(type!=null&&!type.equals("")&&!type.equals("null")&&type.equals("query")){ %>
<tr>
<td width="800" height="30" bgcolor="#A4B5E3" style="BORDER-LEFT: #B5B5FF 1px solid;cellSpacing:"> 以下查询的是<span class="STYLE1"> <%=queryyear + "-" + querymonth %> </span>的考勤记录</td>
</tr>
<%}else{ %>
<tr>
<td width="441" height="30" bgcolor="#A4B5E3" style="BORDER-LEFT: #B5B5FF 1px solid;cellSpacing:"> 以下查询的是<span class="STYLE1"> <%=queryyear + "-" + querymonth %> </span>的考勤记录</td>
<td width="359" bgcolor="#A4B5E3" style="BORDER-RIGHT: #B5B5FF 1px solid;cellSpacing:"> <input type="button" name="Submit2" value="保存本月考勤记录" onClick="huoqu()"/></td>
</tr>
<%} %>
</table>
<table width="740" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<% Calendar thisMonth=Calendar.getInstance();
thisMonth.set(Integer.parseInt(queryyear), Integer.parseInt(querymonth), 0);
int maxIndex=thisMonth.get(Calendar.DAY_OF_MONTH);
//System.out.println(maxIndex);
%>
<tr>
<td bgcolor="#EAF2FE" style="padding-bottom:3px; BORDER-LEFT: #B5B5FF 1px solid; BORDER-RIGHT: #B5B5FF 1px solid; BORDER-BOTTOM: #B5B5FF 1px solid;cellSpacing:">
<div id="aa" >
<%=bodyhtml%>
</div>
</td>
</tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="800" height="24" bgcolor="#EAF2FE"> 说明:出勤记“√”, 请假记“○”, 迟到记“△”,早退记“▲”,节假日记“★”,其它如出差、轮休请特别注明。</td>
</tr>
</table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%--<form action="<%=request.getContextPath() %>/queryjilu.do" method="post" name="form" onSubmit="return checkfrm()">
<td width="360" height="24" bgcolor="#EAF2FE"> 查看考勤记录
<select name="year">
<%
SimpleDateFormat fy=new SimpleDateFormat("yyyy");
SimpleDateFormat fm=new SimpleDateFormat("MM");
SimpleDateFormat fd=new SimpleDateFormat("dd");
%>
<option value="0" selected="selected">选择</option>
<%
for(int i=2007;i<2011;i++){
%>
<option value="<%=i %>"><%=i %></option>
<% } %>
</select>
年
<select name="month">
<option value="0" selected="selected">选择</option>
<%
for(int i=1;i<13;i++){
String stri=Integer.toString(i);
if(stri.length()==1){
stri="0"+stri;
}
%>
<option value="<%=stri %>" ><%=stri %></option>
<% } %>
</select>月 <input type="submit" name="Submit2" value="查 看" /> </td></form>
--%><td height="35" bgcolor="#A4B5E3">
<div align="center">
<%if(type!=null&&!type.equals("")&&!type.equals("null")&&type.equals("query")){ %>
<input type="button" name="Submit" value="打 印" onClick="javascript:window.print();"/>
<input type="button" name="Submit" value="返 回" onClick="javascript:history.go(-1);"/>
<%}else{ %>
<input type="button" name="Submit" value="打 印" onClick="javascript:window.print();"/>
<%} %>
</div>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -