MassMaint.jsp
12.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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
<!DOCTYPE html>
<%@ page import="weaver.general.Util"%>
<%@page import="weaver.hrm.resource.ResourceComInfo"%>
<%@page import="weaver.hrm.company.DepartmentComInfo"%>
<%@page import="weaver.hrm.roles.RolesComInfo"%>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<jsp:useBean id="DocNewsComInfo" class="weaver.docs.news.DocNewsComInfo" scope="page" />
<jsp:useBean id="DepartmentComInfo" class="weaver.hrm.company.DepartmentComInfo" scope="page" />
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/browser" prefix="brow"%>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%
//数据批量维护权限
boolean canmaint = HrmUserVarify.checkUserRight("Matrix:MassMaint",user);
if (!canmaint) {
response.sendRedirect("/notice/noright.jsp");
return;
}
%>
<HTML>
<HEAD>
<style type="text/css">
.btstyle01{
display:block;
width:111px;
height:39px;
text-align:center;
line-height:39px;
cursor:pointer;
background:#70a9ff;
color:#FFFFFF;
}
.btstyle02{
display:block;
width:111px;
height:39px;
text-align:center;
line-height:39px;
cursor:pointer;
background:#4891ff;
color:#FFFFFF;
}
.operateimages0{
width:32px;
height:32px;
background:url('/images/ecology8/workflow/permissionc_wev8.png');
margin:0 auto;
}
.operateimages1{
width:32px;
height:32px;
background:url('/images/ecology8/workflow/permissionr_wev8.png');
margin:0 auto;
}
.operateimages2{
width:32px;
height:32px;
background:url('/images/ecology8/workflow/permissiond_wev8.png');
margin:0 auto;
}
</style>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script type="text/javascript">
var timerID = null;
var timerID2 = null;
var uptcount = 0;
$(function () {
$("#objtype").change(function () {
if($("#objid").val()){
queryrecord($("#objid").val(),1);
}
});
$("#optflag").change(function () {
var showval = $(this).val() + "";
//alert(showval);
if (showval == "0") {
$("#newobjid").parents(".e8_os").show();
jQuery("#operateimages").removeClass();
jQuery("#operateimages").addClass("operateimages0");
}else if (showval == "1") {
$("#newobjid").parents(".e8_os").hide();
jQuery("#operateimages").removeClass();
jQuery("#operateimages").addClass("operateimages2");
}
$("#newobjid").val("");
$("#newobjidspan").html("");
});
$("#startSearch").click(function () {
var objid = $("#objid").val();
if (!!!objid) {
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(83065, user.getLanguage()) %>");
return;
}
//$("#frmmain")[0].submit();
$("#contentframe").attr("src", url);
});
$("#startExecute").bind("click", function () {
startExec();
});
});
//开始执行
function startExec(){
if (!!!$("#objid").val()) {
if($("#optflag").val() === '1'){
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(83066, user.getLanguage()) %>");
}else
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(83067, user.getLanguage()) %>");
return;
}
if ($("#count").html() == 0) {
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(83068, user.getLanguage()) %>");
return;
}
if ($("#optflag").val() != "1" && !!!$("#newobjid").val()) {
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(83069, user.getLanguage()) %>");
return;
}
window.top.Dialog.confirm('<%=SystemEnv.getHtmlLabelName(83070, user.getLanguage()) %>',function(){
execute();
});
}
function execute() {
loading(0);
$.ajax({
data: null,
type: "POST",
url: "/matrixmanage/pages/MassMaintOperation.jsp?matrixid=" + $("#objtype").val() + "&olduserid=" + $("#objid").val()+"&newuserid="+$("#newobjid").val()+"&method=replacerecord",
timeout: 20000,
success: function (rs) {
loading(1);
if (rs.trim() ==1) {//成功
$("#updatecount").html($("#count").html());
queryrecord($("#newobjid").val(),0);
} else {
window.top.Dialog.alert(rs);
}
}, fail: function () {
window.top.Dialog.alert('<%=SystemEnv.getHtmlLabelName(83071, user.getLanguage()) %>');
}
});
}
function initCount(tempCount) {
uptcount = tempCount;
// $("#count").html("");
clearInterval(timerID2)
clearInterval(timerID)
//初始化总数
$("#count").animate({backgroundColor: "#6586B8"}, 1000)
timerID = setInterval(function () {
if (Number($("#count").html()) == uptcount) {
clearInterval(timerID)
} else if (Number($("#count").html()) > uptcount){
$("#count").html(Number($.trim($("#count").html())) - 1);
} else if (Number($("#count").html()) < uptcount){
$("#count").html(Number($.trim($("#count").html())) + 1);
}
}, 1);
}
function initUpdateCount(count) {
$("#updatecount").html(count);
}
</script>
</head>
<%
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(70, user.getLanguage())+ ":" + SystemEnv.getHtmlLabelName(68, user.getLanguage());
String needfav = "1";
String needhelp = "";
String rulename = Util.null2String(request.getParameter("rulename"));
//String depid = Util.null2String(request.getParameter("depid"));
%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(530,user.getLanguage())+SystemEnv.getHtmlLabelName(1338,user.getLanguage())+",javascript:startExec(),_self} " ;
RCMenuHeight += RCMenuHeightStep;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<form action="/workflow/transfer/permissionSearchResult.jsp" name="frmmain" id="frmmain">
<div id="top" style="position: absolute!important;width:99.5%;height:118px;border:1px solid #d6dde8;background:#f7f7fa;">
<div style="display:block;float:left;width:288px;height:101px;border:1px solid #d6dde8;background:#ffffff;margin-top:8px;margin-left:7px;">
<div id="count" title="<%=SystemEnv.getHtmlLabelName(83935,user.getLanguage())%>" style="float:left;width:77px;height:77px;background:url('/images/ecology8/workflow/permission1_wev8.png');text-align: center;line-height:77px;color:#fff;font-size:22px;margin:0 auto;margin-top:12px;margin-left:20px;">
0
</div>
<div style="float:left;width:129px;height:62px;margin-top:21px;margin-left:39px;">
<div style="margin:0 auto;">
<select id="objtype" name="objtype" title="<%=SystemEnv.getHtmlLabelName(83936 ,user.getLanguage())%>" style="height:28px;width:101px;">
<%
RecordSet.executeSql("select * from MatrixInfo ");
while(RecordSet.next()) {
int matrixid = RecordSet.getInt("id");
%>
<option value="<%=matrixid%>" ><%=RecordSet.getString("name")%></option>
<%}%>
</select>
</div>
<div style="margin:0 auto;margin-top:16px;">
<brow:browser viewType="0" name="objid" browserValue=""
browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp"
hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' _callback="afterCallBack"
completeUrl="/data.jsp" linkUrl="" width="100%"
browserSpanValue=""></brow:browser>
</div>
</div>
</div>
<div style="float:left;width:119px;height:101px;margin-top:8px;">
<div style="width:104px; height:25px;background:url('/images/ecology8/workflow/permissionto_wev8.png');margin:0 auto;margin-top:24px;"></div>
<div id="operateimages" name="operateimages" class="operateimages0"></div>
</div>
<div style="float:left;width:288px;height:101px;border:1px solid #d6dde8;background:#ffffff;margin-top:8px;">
<div id="updatecount" style="float:left;width:77px;height:77px;background:url('/images/ecology8/workflow/permission2_wev8.png');text-align: center;line-height:70px;color:#fff;font-size:22px;margin:0 auto;margin-top:12px;margin-left:20px;">
0
</div>
<div style="float:left;width:129px;height:62px;margin-top:21px;margin-left:39px;">
<div style="margin:0 auto;">
<select id="optflag" name="optflag" style="height:28px;width:101px;">
<option value="0"><%=SystemEnv.getHtmlLabelName(83020, user.getLanguage()) %></option>
<option value="1"><%=SystemEnv.getHtmlLabelName(91, user.getLanguage()) %></option>
</select>
</div>
<div style="margin:0 auto;margin-top:16px;">
<brow:browser viewType="0" name="newobjid" browserValue=""
browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp"
hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1'
completeUrl="/data.jsp" linkUrl="" width="100%"
browserSpanValue=""></brow:browser>
</div>
</div>
</div>
<div style="float:left;width:111px;height:39px;margin-top:68px;margin-left:39px;">
<a id="startExecute" onmouseover="showBt(this)" onmouseout="hiddenBt(this)" href="#" style="vertical-align:middle;"><span class="btstyle01"><%=SystemEnv.getHtmlLabelName(83073, user.getLanguage()) %></span></a>
</div>
</div>
<div id="main" style="position: absolute!important;top:120px!important;height:auto!important;position: relative;height:100%;bottom:4px;width:100%;overflow: auto;">
<iframe src="" id="contentframe" name="" contentframe" class="flowFrame" frameborder="0" height="100%" width="100%"></iframe>
</div>
</form>
</BODY>
<script type="text/javascript">
$(document).ready(function(){
$("#objtype").selectbox();
$("#optflag").selectbox();
var url = "/matrixmanage/pages/MassMaintIframe.jsp?matrixid=" + $("#objtype").val() +"&method=queryrecord&countinit=1&objid=-1";
$("#contentframe").attr("src", url);
});
function disModalDialog(url, spanobj, inputobj, need, curl) {
var id = window.showModalDialog(url, "",
"dialogWidth:550px;dialogHeight:550px;" + "dialogTop:" + (window.screen.availHeight - 30 - parseInt(550))/2 + "px" + ";dialogLeft:" + (window.screen.availWidth - 10 - parseInt(550))/2 + "px" + ";");
if (id != null) {
var rid = wuiUtil.getJsonValueByIndex(id, 0);
var rname = wuiUtil.getJsonValueByIndex(id, 1);
if (rid != "") {
if (rid.indexOf(",") == 0) {
rid = rid.substr(1);
rname = rname.substr(1);
}
curl = "#";
if (curl != undefined && curl != null && curl != "") {
spanobj.innerHTML = "<A href='" + curl
+ rid + "'>"
+ rname + "</a>";
} else {
spanobj.innerHTML = rname;
}
inputobj.value = rid;
} else {
spanobj.innerHTML = need ? "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>" : "";
inputobj.value = "";
}
}
}
function showBt(obj){
$(obj).find(".btstyle01").addClass("btstyle02");
}
function hiddenBt(obj){
$(obj).find(".btstyle01").removeClass("btstyle02");
}
function afterCallBack(e,data,name){
queryrecord($("#objid").val(),1);
}
function queryrecord(objid, countinit){
var url = "/matrixmanage/pages/MassMaintIframe.jsp?matrixid=" + $("#objtype").val() + "&objid=" + objid+"&method=queryrecord&countinit="+countinit;
$("#contentframe").attr("src", url);
}
</script>
<script type="text/javascript">
function onshowBrowser() {
var type = Number($("#objtype").val());
var objid = "objid";
var objspan = "objidspan";
var url = "";
if (type == 1) {
url = onShowResource(objspan, objid);
}
search(document.getElementById("objid").value);
return url;
}
var dialog = null;
function loading(method){
if(method==0){//展示
if(dialog==null){
dialog = new window.top.Dialog();
}
dialog.currentWindow = window;
dialog.Title = "<%=SystemEnv.getHtmlLabelName(19611, user.getLanguage()) %>...";
dialog.InnerHtml="<div style='text-align:center;color:red;font-size:14px;line-height:102px'><img src='/voting/surveydesign/images/loading_wev8.gif'></div>";
dialog.Width = 140;
dialog.Height = 90;
dialog.Drag = true;
dialog.hideDraghandle = true;
dialog.textAlign = "center";
dialog.show();
}else{//关闭
dialog.close();
}
}
</script>
</HTML>