HrmRpValidateTimecard.jsp
5.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file = "/systeminfo/init_wev8.jsp" %>
<%@ page import = "weaver.general.Util,weaver.file.*,java.util.*" %>
<%@ page import = "" %>
<jsp:useBean id = "RecordSet" class = "weaver.conn.RecordSet" scope = "page"/>
<jsp:useBean id = "DepartmentComInfo" class = "weaver.hrm.company.DepartmentComInfo" scope = "page"/>
<jsp:useBean id = "ResourceComInfo" class = "weaver.hrm.resource.ResourceComInfo" scope = "page"/>
<jsp:useBean id="ExcelFile" class="weaver.file.ExcelFile" scope="session"/>
<HTML><HEAD>
<LINK href = "/css/Weaver_wev8.css" type = text/css rel = STYLESHEET>
<SCRIPT language = "javascript" src = "/js/weaver_wev8.js"></script>
</head>
<%
String imagefilename = "/images/hdReport_wev8.gif" ;
String titlename = SystemEnv.getHtmlLabelName(16888,user.getLanguage());
String needfav = "1" ;
String needhelp = "" ;
String fromdate = Util.fromScreen(request.getParameter("fromdate") , user.getLanguage()) ; //排班日期从
String enddate = Util.fromScreen(request.getParameter("enddate") , user.getLanguage()) ; //排班日期到
String isself = Util.null2String(request.getParameter("isself"));
Calendar thedate = Calendar.getInstance() ; //
// 如果用户选择的开始日期或者结束日期为空,则默认为当月的时间 //上周一到下周日
if( fromdate.equals("") || enddate.equals("")) {
// while( thedate.get(Calendar.DAY_OF_WEEK) != 2 ) thedate.add(Calendar.DATE, 1) ;
thedate.set( thedate.get(Calendar.YEAR),thedate.get(Calendar.MONTH),1) ;
fromdate = Util.add0(thedate.get(Calendar.YEAR), 4) + "-" +
Util.add0(thedate.get(Calendar.MONTH) + 1 , 2) + "-" +
Util.add0(thedate.get(Calendar.DAY_OF_MONTH) , 2) ;
thedate.add(Calendar.MONTH , 1) ;
thedate.add(Calendar.DATE , -1) ;
enddate = Util.add0(thedate.get(Calendar.YEAR) , 4) + "-" +
Util.add0(thedate.get(Calendar.MONTH) + 1 , 2) + "-" +
Util.add0(thedate.get(Calendar.DAY_OF_MONTH) , 2) ;
}
String sql = " select * from HrmValidateCardInfo where carddate >= '" + fromdate + "' and carddate <= '"+ enddate + "' order by carddate desc " ;
%>
<BODY>
<%@ include file = "/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(354,user.getLanguage())+",javascript:doSearch(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(15846,user.getLanguage())+",javascript:doRecreate(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<form id = frmmain name = frmmain method = post action="HrmRpValidateTimecard.jsp">
<input type="hidden" name="operation" value=recreate>
<input type="hidden" name="isself" value="1">
<table class = viewform>
<tbody>
<TR CLASS = spacing><TD colspan = 2 class = sep2></TD></TR>
<tr>
<td width=10%><%=SystemEnv.getHtmlLabelName(16703,user.getLanguage())%></td>
<td class = field>
<BUTTON type=button class = calendar id = SelectDate onclick = getDate(fromdatespan,fromdate)></BUTTON>
<SPAN id = fromdatespan><%=fromdate%></SPAN>
<input type = "hidden" name = "fromdate" value=<%=fromdate%>>
-<BUTTON type=button class = calendar id = SelectDate onclick=getDate(enddatespan,enddate)></BUTTON>
<SPAN id=enddatespan ><%=enddate%></SPAN>
<input type="hidden" name="enddate" value=<%=enddate%>>
</td>
</tr>
</tbody>
</table>
<% if(isself.equals("1")) { %>
<TABLE class = ListStyle cellspacing=1 >
<colgroup>
<col width="25%">
<col width="20%">
<col width="15%">
<col width="15%">
<col width="15%">
<TBODY>
<TR class = Section>
<TH colspan=5><%=SystemEnv.getHtmlLabelName(16888,user.getLanguage())%></TH>
</TR>
<TR class=Line><TD colspan=5 ></TD></TR>
<TR class = Header>
<TH><%=SystemEnv.getHtmlLabelName(18948,user.getLanguage())%></TH>
<TH><%=SystemEnv.getHtmlLabelName(16703,user.getLanguage())%></TH>
<TH><%=SystemEnv.getHtmlLabelName(18949,user.getLanguage())%></TH>
<TH><%=SystemEnv.getHtmlLabelName(18950,user.getLanguage())%></TH>
<TH><%=SystemEnv.getHtmlLabelName(18951,user.getLanguage())%></TH>
</TR>
<TR class=Line><TD colspan=5 ></TD></TR>
<%
boolean isLight = false ;
RecordSet.executeSql(sql) ;
while(RecordSet.next()) {
String Cardid = Util.null2String(RecordSet.getString("Cardid")) ;
String carddate = Util.null2String(RecordSet.getString("carddate")) ;
String cardtime = Util.null2String(RecordSet.getString("cardtime")) ;
String stationid = Util.null2String(RecordSet.getString("stationid")) ;
String workshift = Util.null2String(RecordSet.getString("workshift")) ;
isLight = !isLight ;
%>
<TR class='<%=( isLight ? "datalight" : "datadark" )%>'>
<TD><%=Cardid%></TD>
<TD><%=carddate%></TD>
<TD><%=cardtime%></TD>
<TD><%=stationid%></TD>
<TD><%=workshift%></TD>
<% } %>
</TR>
</TBODY>
</TABLE>
<%}%>
</form>
<BR>
<script language = vbs>
sub onShowDepartment(spanname, inputname)
id = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/hrm/company/DepartmentBrowser.jsp?selectedids="&inputname.value)
if Not isempty(id) then
if id(0)<> 0 then
spanname.innerHtml = id(1)
inputname.value=id(0)
else
spanname.innerHtml = ""
inputname.value=""
end if
end if
end sub
</script>
<script language=javascript>
function doRecreate() {
frmmain.action= "/hrm/schedule/HrmValidateTimecardOperation.jsp";
frmmain.submit();
}
function doSearch(){
jQuery("#frmmain").submit();
}
</script>
</body>
<SCRIPT language="javascript" defer="defer" src="/js/datetime_wev8.js"></script>
<SCRIPT language="javascript" defer="defer" src="/js/JSDateTime/WdatePicker_wev8.js"></script>
</HTML>