HandwrittenSignatureList.jsp
11.6 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<%@ page language="java" contentType="text/html; charset=GBK"%>
<%@ include file="/systeminfo/init.jsp"%>
<%@ page import="weaver.general.Util"%>
<%@ page import="weaver.docs.category.security.AclManager "%>
<%@ page import="weaver.docs.category.*"%>
<%@ page import="java.util.*"%>
<%@ page import="weaver.general.PageManagerUtil"%>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<jsp:useBean id="CheckUserRight" class="weaver.systeminfo.systemright.CheckUserRight" scope="page" />
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page" />
<jsp:useBean id="ProjectInfoComInfo" class="weaver.proj.Maint.ProjectInfoComInfo" scope="page" />
<jsp:useBean id="CustomerInfoComInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page" />
<jsp:useBean id="DepartmentComInfo" class="weaver.hrm.company.DepartmentComInfo" scope="page" />
<jsp:useBean id="HandwrittenSignatureManager" class="weaver.mobile.webservices.workflow.soa.HandwrittenSignatureManager" scope="page" />
<jsp:useBean id="UserDefaultManager" class="weaver.docs.tools.UserDefaultManager" scope="session" />
<jsp:useBean id="DocComInfo" class="weaver.docs.docs.DocComInfo" scope="page" />
<%
boolean canedit = HrmUserVarify.checkUserRight("SystemSetEdit:Edit", user); //判断当前用户的权限
if (user == null) {
response.sendRedirect("/login/Login.jsp");
return;
}
if (!HrmUserVarify.checkUserRight("HandwrittenSignatureList:List",user)) {
response.sendRedirect("/notice/noright.jsp");
return;
}
String imagefilename = "/images/hdMaintenance.gif";
String titlename = "<b>"
+ SystemEnv.getHtmlLabelName(30493, user.getLanguage())
+ "</b>";
String needfav = "1";
String needhelp = "1";
RecordSet rs = new RecordSet();
int uid = 0;
String deptid = Util.getIntValue(request.getParameter("deptid")) + "";
String username = Util.null2String(request.getParameter("username"));
/*if(!("".equals(username))){
if (!username.matches("^[\\u4E00-\\u9FA5A-Za-z]+$")) {
return;
}
request.setAttribute("username",username);
}*/
String sql = "select id from HrmResource where lastname = ?";
rs.executeQuery(sql,username);
if(rs.next()){
uid = rs.getInt("id");
}
//构建分页控件需要的where语句
String andSql = ""; //拼接查询条件
String tableName= "";
if ((!"".equals(deptid))&&("".equals(username))){
tableName = "HandwrittenSignature as hs,HrmResource as hr";
andSql = " hs.hrmresid=hr.id and hr.departmentid= "+deptid ;
}if((!"".equals(username))&&("".equals(deptid))){
tableName = "HandwrittenSignature as hs";
andSql = " hs.hrmresid = "+uid+"";
}if((!"".equals(deptid)) && (!"".equals(username))){
tableName = "HandwrittenSignature as hs,HrmResource as hr";
andSql = " hs.hrmresid=hr.id and hr.departmentid= '"+deptid+"' and hs.hrmresid = "+uid+"";
}if(("".equals(deptid)) && ("".equals(username))){
tableName = "HandwrittenSignature";
andSql+=" 1=1";
}
//out.println("andSql:" + andSql);
%>
<html>
<head>
<LINK href="/css/Weaver.css" type=text/css rel=STYLESHEET>
<link rel="stylesheet" type="text/css" href="/wui/common/css/base.css" />
<script LANGUAGE="JavaScript" SRC="/js/checkinput.js"></script>
<SCRIPT language="javascript" src="/js/weaver.js"></script>
<SCRIPT language="javascript">
function onRefrush(){
weaver.submit();
}
function onNew(){
window.location="/mobile/plugin/1/HandwrittenSignatureAdd.jsp";
}
//删除
function onDelete(){
if(_xtable_CheckedCheckboxId()==""){
alert("请选择你要删除的数据!");
}else if(confirm("确定要删除?")){
document.getElementById("markIds").value =_xtable_CheckedCheckboxId();
HandwrittenSignatureList.opera.value="deletelist";
HandwrittenSignatureList.action="UploadHandwrittenSignature.jsp";
HandwrittenSignatureList.submit();
}
}
//上一页
function onTopPage(){
_table.prePage();
}
//下一页
function onNextPage(){
_table.nextPage();
}
//首页
function onFirstPage(){
_table.firstPage();
}
//尾页
function onEndPage(){
_table.lastPage();
}
</script>
</head>
<BODY>
<%@ include file="/systeminfo/TopTitle.jsp"%>
<%@ include file="/systeminfo/RightClickMenuConent.jsp"%>
<%
RCMenu += "{" + SystemEnv.getHtmlLabelName(197, user.getLanguage())+ ",javascript:onRefrush(),_top} ";
RCMenuHeight += RCMenuHeightStep;
if(HrmUserVarify.checkUserRight("HandwrittenSignatureAdd:Add", user)) {
RCMenu += "{"+ SystemEnv.getHtmlLabelName(16387, user.getLanguage())+",javascript:onNew(),_top} ";
RCMenuHeight += RCMenuHeightStep;
}
RCMenu += "{删 除" + ",javascript:onDelete()',_top} ";
RCMenuHeight += RCMenuHeightStep;
RCMenu += "{首 页 " + ",javascript:onFirstPage()',_top} ";
RCMenuHeight += RCMenuHeightStep;
RCMenu += "{上一页 " + ",javascript:onTopPage()',_top} ";
RCMenuHeight += RCMenuHeightStep;
RCMenu += "{下一页" + ",javascript:onNextPage()',_top} ";
RCMenuHeight += RCMenuHeightStep;
RCMenu += "{尾 页 " + ",javascript:onEndPage()',_top} ";
RCMenuHeight += RCMenuHeightStep;
%>
<%@ include file="/systeminfo/RightClickMenu.jsp"%>
<table width=100% height=100% border="0" cellspacing="0"
cellpadding="0">
<colgroup>
<col width="10">
<col width="">
<col width="10">
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td></td>
<td valign="top">
<TABLE class=Shadow>
<tr>
<td valign="top">
<form id="weaver" name="weaver" method="post" action="HandwrittenSignatureList.jsp">
<table class=ViewForm>
<colgroup>
<col width="20%">
<col width="80%">
<tbody>
<TR style="height: 1px !important;">
<TD class=Line1 colSpan=2></TD>
</TR>
<tr>
<td><%=SystemEnv.getHtmlLabelName(124, user.getLanguage())%></td>
<td class=field>
<input class="wuiBrowser"
_url="/systeminfo/BrowserMain.jsp?url=/hrm/company/DepartmentBrowser.jsp"
_displayText="<%=Util.toScreen(DepartmentComInfo.getDepartmentmark(deptid+ ""), user.getLanguage())%>"
type="hidden" name="deptid" id="deptid" value="<%=deptid%>">
</td>
</tr>
<TR style="height: 1px !important;">
<TD class=Line1 colSpan=2></TD>
</TR>
<!-- 按名字 -->
<tr>
<td><%=SystemEnv.getHtmlLabelName(25034, user.getLanguage())%></td>
<td class=field>
<input id="username" name="username" type="text"
<%if((!"".equals(request.getParameter("username")))&&(null!=(request.getParameter("username"))) ) {%> value="<%=request.getParameter("username")%><%}%>">
</td>
</tr>
<TR style="height: 1px !important;">
<TD class=Line1 colSpan=2></TD>
</TR>
</tbody>
</table>
</form>
<br>
<TABLE width=100% height=100% border="0" cellspacing="0">
<colgroup>
<col width="10">
<col width="">
<col width="10">
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td></td>
<td valign="top">
<form name="HandwrittenSignatureList" method="post">
<input type="hidden" name = "opera" id= "opera" >
<input type="hidden" name="markIds" id="markIds">
<TABLE class=Shadow>
<tr>
<td valign="top">
<%
int pagenum = Util.getIntValue(request.getParameter("pagenum"), 1);
int perpage = UserDefaultManager.getNumperpage();
if (perpage < 2)
perpage = 10;
String backfields = "markId,markName,hrmresid,markDate,lastmodificationtime"; // 返回字段
String fromSql = tableName; //查询的表
String fromWhere = "where" + andSql; //查询条件 sqlwhere=\""+Util.toHtmlForSplitPage(fromWhere)+"\" 需要需在经过Util.toHtmlForSplitPage()方法进行转换,去除”<”,”>”,”’”三种符号
//查询表头的名称
String name = SystemEnv.getHtmlLabelName(413, user.getLanguage()); //姓名
String markName = SystemEnv.getHtmlLabelName(30491, user.getLanguage()); //电子签章名称
String markDate = SystemEnv.getHtmlLabelName(30494, user.getLanguage()); //电子签章创建时间
String lastModificationTime = SystemEnv.getHtmlLabelName(30495,user.getLanguage()); //电子签章最后修改时间
String operation = SystemEnv.getHtmlLabelName(30495, user.getLanguage()); //操作
String edit = SystemEnv.getHtmlLabelName(93, user.getLanguage()); //编辑
// String popedomOtherpara2 = "column:markId+column:markName+column:hrmresid+column:markDate+column:lastmodificationtime";
//backfields - 返回字段名 fromSql - 查询的表 sqlorderby - 排序条件 sqlprimarykey - 此表中所需的主键(必填字段)
//sqlsortway - 排序方式 sqlwhere - 查询条件 sqldistinct - 是否排除重复操作
//col 第一行 使用transmethod 属性 需要进行转换的类 也就是把 id数值换成 图标
//分页控件的使用
String tableString = ""
+ "<table instanceid=\"workflowRequestListTable\" pagesize=\""
+ perpage
+ "\" tabletype=\"checkbox\">"
+ "<sql backfields=\""
+ backfields
+ "\" sqlform=\""
+ fromSql
+ "\" sqlsortway=\"Desc\" sqlprimarykey=\"markId\" sqlwhere=\""
+ Util.toHtmlForSplitPage(fromWhere)
+ "\" sqldistinct=\"true\" />"
+ "<head>"
+ "<col width=\"20%\" text=\""
+ name
+ "\" column=\"hrmresid\" href=\"\" onclick=\"pointerXY(event)\" orderkey=\"hrmresid\" transmethod=\"weaver.hrm.resource.ResourceComInfo.getResourcename\"/>"
+ "<col width=\"20%\" text=\""
+ markName
+ "\" column=\"markName\" orderkey=\"markId\"/>"
+ "<col width=\"20%\" text=\""
+ markDate
+ "\" column=\"markDate\" orderkey=\"markDate\"/>"
+ "<col width=\"20%\" text=\""
+ lastModificationTime
+ "\" column=\"lastModificationTime\" orderkey=\"lastModificationTime\"/>"
+"</head>"
+ "<operates width=\"20%\">"
+ "<operate href=\"/mobile/plugin/1/HandwrittenSignatureEdit.jsp\" linkkey=\"markId\" linkvaluecolumn=\"markId\" text=\""+ edit+ "\" target=\"_fullwindow\" index=\"1\"/>"
+ "</operates>"
+"</table>";
%>
<table width="100%">
<tr>
<td valign="top">
<wea:SplitPageTag tableString="<%=tableString%>" mode="run"
isShowTopInfo="true" isShowBottomInfo="true" />
</td>
</tr>
</table>
</td>
</tr>
</TABLE>
</td>
</tr>
</form>
</TABLE>
</td>
</tr>
</TABLE>
</td>
</tr>
</table>
</body>
</html>