提交 | 用户 | age
|
a6a76f
|
1 |
<%@ page contentType="text/html;charset=utf-8"%> |
F |
2 |
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
|
3 |
<% |
|
4 |
//@author hq |
|
5 |
%> |
|
6 |
<% |
|
7 |
//得到URL |
|
8 |
String URL = (request.getRequestURL() + "").replace(request |
|
9 |
.getRequestURI(), "") |
|
10 |
+ request.getContextPath(); |
|
11 |
%> |
4a551f
|
12 |
<!DOCTYPE HTML > |
a6a76f
|
13 |
<%@page import="com.google.gson.Gson"%> |
F |
14 |
<%@page import="com.google.gson.reflect.TypeToken"%><html> |
|
15 |
<head> |
|
16 |
<base href="<%=URL%>"> |
|
17 |
<title> 考勤</title> |
|
18 |
<meta http-equiv="pragma" content="no-cache"> |
|
19 |
<meta http-equiv="cache-control" content="no-cache"> |
|
20 |
<meta http-equiv="expires" content="0"> |
|
21 |
<style type="text/css"> |
|
22 |
table.gridtable { |
|
23 |
font-family: verdana,arial,sans-serif; |
|
24 |
font-size:11px; |
|
25 |
color:#333333; |
|
26 |
border-width: 1px; |
|
27 |
border-color: #666666; |
|
28 |
border-collapse: collapse; |
|
29 |
width:500px |
|
30 |
} |
|
31 |
table.gridtable th { |
|
32 |
border-width: 1px; |
|
33 |
padding: 8px; |
|
34 |
border-style: solid; |
|
35 |
border-color: #666666; |
|
36 |
background-color: #dedede; |
|
37 |
} |
|
38 |
table.gridtable td { |
|
39 |
border-width: 1px; |
|
40 |
padding: 8px; |
|
41 |
border-style: solid; |
|
42 |
border-color: #666666; |
|
43 |
background-color: #ffffff; |
|
44 |
} |
|
45 |
</style> |
|
46 |
</style> |
|
47 |
<script type="text/javascript" src="/js/jquery-1.4.4.min.js?v=<%=com.yc.utils.FileUtil.getVerstion(request,"/js/jquery-1.4.4.min.js")%>"></script> |
|
48 |
</head> |
|
49 |
<%@ page contentType="text/html;charset=utf-8"%> |
|
50 |
<%@page import="com.yc.service.BaseService"%> |
|
51 |
<%@page import="com.yc.factory.FactoryBean"%> |
|
52 |
<%@page import="java.util.*"%> |
|
53 |
<script> |
|
54 |
var u=0;//表示有没打过卡 |
|
55 |
<c:if test="${not empty list.usercode}"> |
|
56 |
u=1; |
|
57 |
</c:if> |
|
58 |
function post(s,t){ |
|
59 |
s.disabled=true; |
|
60 |
$.ajax({ |
|
61 |
type: "POST", |
|
62 |
url: "/attend.do?m=save", |
|
63 |
data:{"t":t,"u":u}, |
|
64 |
dataType:'text', |
|
65 |
success:function(data){ |
|
66 |
if(data.indexOf("error;")>=0) |
|
67 |
alert(data); |
|
68 |
else{ |
|
69 |
alert("打卡成功"); |
|
70 |
u=1; |
|
71 |
if(t==1) |
|
72 |
$("#tdstart").html(data); |
|
73 |
else |
|
74 |
$("#tdend").html(data); |
|
75 |
} |
|
76 |
} |
|
77 |
}); |
|
78 |
} |
|
79 |
function openw(){ |
|
80 |
top.addTab('查询考勤',211001,18); |
|
81 |
top.$("#deskTopWindowUP").window("close"); |
|
82 |
} |
|
83 |
</script> |
|
84 |
<body> |
|
85 |
<c:choose> |
|
86 |
<c:when test="${not empty error}"> |
|
87 |
<div>${error}</div> |
|
88 |
</c:when> |
|
89 |
<c:otherwise> |
|
90 |
<table class="gridtable"> |
|
91 |
<tr> |
|
92 |
<td colspan=2 ALIGN="center">当前时间:<%=com.yc.utils.DateUtil.toDay()%><input type="button" style="float:right" value="查询考勤" onclick="openw();"/></td> |
|
93 |
</tr> |
|
94 |
<tr> |
|
95 |
<td >上班时间</td> |
|
96 |
<c:if test="${not empty list.startdate}"> |
|
97 |
<td>${list.startdate}</td> |
|
98 |
</c:if> |
|
99 |
<c:if test="${empty list.startdate}"> |
|
100 |
<td id="tdstart"><input type="button" value="上班打卡" onclick="post(this,'1')"/></td> |
|
101 |
</c:if> |
|
102 |
</tr> |
|
103 |
<tr> |
|
104 |
<td>下班时间</td> |
|
105 |
<c:if test="${not empty list.enddate}"> |
|
106 |
<td >${list.enddate}</td> |
|
107 |
</c:if> |
|
108 |
<c:if test="${empty list.enddate}"> |
|
109 |
<td id="tdend"><input type="button" value="下班打卡" onclick="post(this,'2')"/></td> |
|
110 |
</c:if> |
|
111 |
</tr> |
|
112 |
</table> |
|
113 |
</c:otherwise> |
|
114 |
</c:choose> |
|
115 |
</body> |
|
116 |
|
|
117 |
</html> |