systemMonitorDetail.jsp
18 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
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.general.TimeUtil"%>
<%@ page import="weaver.general.GCONST" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page"/>
<jsp:useBean id="CheckSubCompanyRight" class="weaver.systeminfo.systemright.CheckSubCompanyRight" scope="page" />
<jsp:useBean id="manageDetachComInfo" class="weaver.hrm.moduledetach.ManageDetachComInfo" scope="page" />
<jsp:useBean id="Monitor" class="weaver.workflow.monitor.Monitor" scope="page" />
<jsp:useBean id="SubCompanyComInfo" class="weaver.hrm.company.SubCompanyComInfo" scope="page" />
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<link href="/js/checkbox/jquery.tzCheckbox_wev8.css" type=text/css rel=STYLESHEET>
<script language=javascript src="/js/checkbox/jquery.tzCheckbox_wev8.js"></script>
<SCRIPT language="javascript" src="/js/datetime_wev8.js"></script>
<script language="javascript" src="/js/selectDateTime_wev8.js"></script>
<SCRIPT language="javascript" src="/js/JSDateTime/WdatePicker_wev8.js"></script>
</head>
<%
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(18759,user.getLanguage());
String needfav ="1";
String needhelp ="";
String isOpenWorkflowStopOrCancel=GCONST.getWorkflowStopOrCancel();//是否开启流程暂停或取消配置
String infoid = Util.null2String(request.getParameter("infoid"));
int typeid = Util.getIntValue(request.getParameter("typeid"),0);
int subcompanyid = Util.getIntValue(request.getParameter("subcompanyid"),0);
int operatelevel=0;
String inputt11 = Util.null2String(request.getParameter("inputt11"));
String operatedate = Util.null2String(request.getParameter("operatedate"));
String operatedateend = Util.null2String(request.getParameter("operatedateend"));
boolean isUseWfManageDetach = manageDetachComInfo.isUseWfManageDetach();
int detachable = isUseWfManageDetach?1:0;
//按钮权限
if (isUseWfManageDetach){
operatelevel = CheckSubCompanyRight.ChkComRightByUserRightCompanyId(user.getUID(), "WorkflowMonitor:All", subcompanyid);
if(operatelevel < 0){
response.sendRedirect("/notice/noright.jsp") ;
return ;
}
}else{
if (HrmUserVarify.checkUserRight("WorkflowMonitor:All", user)){
operatelevel = 2;
}
}
%>
<BODY>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
if(operatelevel > 0){
RCMenu += "{"+SystemEnv.getHtmlLabelName(611,user.getLanguage())+",javascript:addwfs(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(91,user.getLanguage())+",javascript:batchDel(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(86,user.getLanguage())+",javascript:doSave(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
}%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<div class="zDialog_div_content">
<jsp:include page="/systeminfo/commonTabHead.jsp">
<jsp:param name="mouldID" value="workflow"/>
<jsp:param name="navName" value='<%=Monitor.getWorkflowMonitor3(infoid,user.getLanguage()+"") %>'/>
</jsp:include>
<iframe id="frame" name="frame" style="display: none"></iframe>
<form id="searchFrom" name="searchFrom" target="_self" method="post" action="systemMonitorDetail.jsp">
<input type="hidden" name="pageId" _showCol="false" id="pageId" value="monitordetail"/>
<INPUT type="hidden" name="infoid" id ="infoid" value=<%=infoid%>>
<INPUT type="hidden" name="typeid" id ="typeid" value=<%=typeid%>>
<INPUT type="hidden" name="subcompanyid" id ="subcompanyid" value=<%=subcompanyid%>>
<INPUT type="hidden" name="actionKey" id ="actionKey" value="updateDetail">
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td class="rightSearchSpan" style="text-align:right; width:500px!important">
<%if(operatelevel > 0){ %>
<input type="button" value="<%=SystemEnv.getHtmlLabelName(611,user.getLanguage())%>" class="e8_btn_top" onclick="addwfs()"/>
<input type="button" value="<%=SystemEnv.getHtmlLabelName(91,user.getLanguage())%>" class="e8_btn_top" onclick="batchDel()"/>
<input type="button" value="<%=SystemEnv.getHtmlLabelName(86,user.getLanguage()) %>" class="e8_btn_top" onclick="doSave()">
<%} %>
<input type="text" class="searchInput" name="flowTitle" value="<%=inputt11 %>" onchange="reSetInputt1()" />
<span id="advancedSearch" class="advancedSearch"><%=SystemEnv.getHtmlLabelName(21995,user.getLanguage())%></span>
<span title="<%=SystemEnv.getHtmlLabelName(81804,user.getLanguage()) %>" class="cornerMenu"></span>
</td>
</tr>
</table>
<div class="advancedSearchDiv" id="advancedSearchDiv" style="display:none;" >
<wea:layout type="fourCol">
<wea:group context='<%=SystemEnv.getHtmlLabelName(15774,user.getLanguage())%>'>
<wea:item><%=SystemEnv.getHtmlLabelName(81651,user.getLanguage())%></wea:item>
<wea:item>
<input type="text" name="inputt11" class=inputstyle value="<%=inputt11%>"/>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(1339,user.getLanguage())%></wea:item>
<wea:item>
<span class="wuiDateSpan" selectId="operatedatespan" selectValue="">
<input class=wuiDateSel type="hidden" name="operatedate" value="<%=operatedate%>">
<input class=wuiDateSel type="hidden" name="operatedateend" value="<%=operatedateend%>">
</span>
</wea:item>
</wea:group>
<wea:group context="" attributes="{'groupDisplay':'none'}">
<wea:item type="toolbar">
<input type="submit" value="<%=SystemEnv.getHtmlLabelName(197,user.getLanguage())%>" class="e8_btn_submit" onclick="doSubmit(2);"/>
<span class="e8_sep_line">|</span>
<input type="button" value="<%=SystemEnv.getHtmlLabelName(2022,user.getLanguage())%>" class="e8_btn_cancel" onclick="resetCondtion();"/>
<span class="e8_sep_line">|</span>
<input type="button" value="<%=SystemEnv.getHtmlLabelName(31129,user.getLanguage())%>" class="e8_btn_cancel" id="cancel"/>
</wea:item>
</wea:group>
</wea:layout>
</div>
</form>
<%
int perpage=20;
String tableString = "";
if(perpage <2) perpage=10;
String backfields = " a.workflowid, "+
"b.workflowname, "+
"b.subcompanyid,"+
"max(a.operatordate) as operatordate, "+
"max(a.operatortime) as operatortime, "+
"sum(convert(INT,isnull(a.isview,0))) as isview, "+
"sum(convert(INT,isnull(a.isintervenor,0))) as isintervenor, "+
"sum(convert(INT,isnull(a.isdelete,0))) as isdelete, "+
"sum(convert(INT,isnull(a.isForceDrawBack,0))) as isForceDrawBack, "+
"sum(convert(INT,isnull(a.isForceOver,0))) as isForceOver, "+
"sum(convert(INT,isnull(a.issooperator,0))) as issooperator ";
if(RecordSet.getDBType().equals("oracle"))
{
backfields = " a.workflowid, "+
"b.workflowname, "+
"b.subcompanyid,"+
"max(a.operatordate) as operatordate, "+
"max(a.operatortime) as operatortime, "+
"sum(to_number(nvl(a.isview,0))) as isview, "+
"sum(to_number(nvl(a.isintervenor,0))) as isintervenor, "+
"sum(to_number(nvl(a.isdelete,0))) as isdelete, "+
"sum(to_number(nvl(a.isForceDrawBack,0))) as isForceDrawBack, "+
"sum(to_number(nvl(a.isForceOver,0))) as isForceOver, "+
"sum(to_number(nvl(a.issooperator,0))) as issooperator ";
}else if(RecordSet.getDBType().equals("mysql")){
backfields = " a.workflowid, "+
"b.workflowname, "+
"b.subcompanyid,"+
"max(a.operatordate) as operatordate, "+
"max(a.operatortime) as operatortime, "+
"sum(convert(ifnull(a.isview,0) , SIGNED)) as isview, "+
"sum(convert(ifnull(a.isintervenor,0),SIGNED)) as isintervenor, "+
"sum(convert(ifnull(a.isdelete,0),SIGNED)) as isdelete, "+
"sum(convert(ifnull(a.isForceDrawBack,0),SIGNED)) as isForceDrawBack, "+
"sum(convert(ifnull(a.isForceOver,0),SIGNED)) as isForceOver, "+
"sum(convert(ifnull(a.issooperator,0),SIGNED)) as issooperator ";
}
String fromSql = " workflow_monitor_detail a,workflow_base b,workflow_monitor_info c ";
String sqlWhere = "where a.workflowid = b.id and a.infoid = c.id and c.id = " + infoid ;
if(detachable==1)
{
if(subcompanyid<1)
{
operatelevel = 2;
}
}
if(!"".equals(inputt11)){
sqlWhere += " and b.workflowname like '%"+inputt11+"%' ";
}
if(!"".equals(operatedate)){
sqlWhere += " and a.operatordate >= '"+operatedate+"' ";
}
if(!"".equals(operatedateend)){
sqlWhere += " and a.operatordate <= '"+operatedateend+"' ";
}
//if(detachable == 1 && user.getUID() != 1){
// sqlWhere += " and b.subcompanyid = "+subcompanyid;
//}
String editSubs=SubCompanyComInfo.getRightSubCompany(user.getUID(),"WorkflowManage:All",0);
String para2=infoid+"+column:workflowid+"+detachable+"+column:subcompanyid+"+user.getUID()+"+"+operatelevel+"+"+editSubs;
String para3=infoid+"+column:workflowid+"+user.getLanguage()+"+"+user.getUID()+"+"+operatelevel+"+"+detachable+"+"+subcompanyid;
String orderby=" b.subcompanyid,b.workflowname";
String sqlgroupby = " a.workflowid,b.workflowname,b.subcompanyid ";
boolean wfintervenor= GCONST.getWorkflowIntervenorByMonitor();
tableString = " <table instanceid=\"workflowMoniterListTable\" tabletype=\"checkbox\" pagesize=\""+PageIdConst.getPageSize("monitordetail",user.getUID())+"\" >"+
" <checkboxpopedom id=\"checkbox\" popedompara=\"column:subcompanyid+"+ user.getUID()+"+"+detachable+"+"+operatelevel+"\" showmethod=\"weaver.workflow.monitor.Monitor.getDetailCheckBox\" />"+
" <sql backfields=\""+backfields+"\" sqlform=\""+fromSql+"\" sqlwhere=\""+Util.toHtmlForSplitPage(sqlWhere)+"\" sqlorderby=\""+orderby+"\" sqlgroupby=\""+sqlgroupby+"\" sqlprimarykey=\"workflowid\" sqlsortway=\"Desc\" sqlisdistinct=\"false\" />"+
" <head>"+
" <col width=\"18%\" text=\""+SystemEnv.getHtmlLabelName(81651,user.getLanguage())+"\" column=\"workflowname\" orderkey=\"workflowname\" />"+
" <col width=\"16%\" text=\""+SystemEnv.getHtmlLabelName(1339,user.getLanguage())+"\" column=\"operatordate\" orderkey=\"operatordate,operatortime\" transmethod=\"weaver.general.WorkFlowTransMethod.getWFSearchResultCreateTime\" otherpara=\"column:operatortime\" />"+
" <col width=\"12%\" text=\"<input type=checkbox notfirstcolumn id=isview_all notbeauty=true onclick=checkall('isview') >"+SystemEnv.getHtmlLabelName(82770,user.getLanguage())+"\" column=\"isview\" otherpara=\"1+"+para2+"\" transmethod=\"weaver.workflow.monitor.Monitor.getMonitorWFCompetence\" />"+
" <col width=\"8%\" text=\"<input type='checkbox' notfirstcolumn id='isdelete_all' notbeauty='true' onclick=checkall('isdelete') >"+SystemEnv.getHtmlLabelName(20307,user.getLanguage())+"\" column=\"isdelete\" otherpara=\"2+"+para2+"\" transmethod=\"weaver.workflow.monitor.Monitor.getMonitorWFCompetence\" />"+
" <col width=\"12%\" text=\"<input type='checkbox' notfirstcolumn id='isintervenor_all' notbeauty='true' onclick=checkall('isintervenor') >"+SystemEnv.getHtmlLabelName(82771,user.getLanguage())+"\" column=\"isintervenor\" otherpara=\"3+"+para2+"\" transmethod=\"weaver.workflow.monitor.Monitor.getMonitorWFCompetence\" />"+
" <col width=\"10%\" text=\"<input type='checkbox' notfirstcolumn id='isForceDrawBack_all' notbeauty='true' onclick=checkall('isForceDrawBack') >"+SystemEnv.getHtmlLabelName(82772,user.getLanguage())+"\" column=\"isForceDrawBack\" otherpara=\"4+"+para2+"\" transmethod=\"weaver.workflow.monitor.Monitor.getMonitorWFCompetence\" />"+
" <col width=\"10%\" text=\"<input type='checkbox' notfirstcolumn id='isForceOver_all' notbeauty='true' onclick=checkall('isForceOver') >"+SystemEnv.getHtmlLabelName(82773,user.getLanguage())+"\" column=\"isForceOver\" otherpara=\"5+"+para2+"\" transmethod=\"weaver.workflow.monitor.Monitor.getMonitorWFCompetence\" />";
if(isOpenWorkflowStopOrCancel.equals("1")){
//是否开启流程暂停或取消配置
tableString+=" <col width=\"14%\" text=\"<input type='checkbox' notfirstcolumn id='issooperator_all' notbeauty='true' onclick=checkall('issooperator') >"+SystemEnv.getHtmlLabelName(82774,user.getLanguage())+"\" column=\"issooperator\" otherpara=\"6+"+para2+"\" transmethod=\"weaver.workflow.monitor.Monitor.getMonitorWFCompetence\" />";
}
tableString+= " </head></table>";
%>
<form id="submitform" name="submitform" target="frame" method="post" action="/system/systemmonitor/workflow/systemMonitorOperation.jsp">
<INPUT type="hidden" name="infoid" id ="infoid" value=<%=infoid%>>
<INPUT type="hidden" name="typeid" id ="typeid" value=<%=typeid%>>
<INPUT type="hidden" name="subcompanyid" id ="subcompanyid" value=<%=subcompanyid%>>
<INPUT type="hidden" name="actionKey" id ="actionKey" value="updateDetail">
<TABLE width="100%">
<tr>
<td valign="top">
<wea:SplitPageTag tableString='<%=tableString%>' mode="run" />
</td>
</tr>
</TABLE>
</form>
</div>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
<wea:layout needImportDefaultJsAndCss="false">
<wea:group context="" attributes="{\"groupDisplay\":\"none\"}">
<wea:item type="toolbar">
<input type="button" value="<%=SystemEnv.getHtmlLabelName(309,user.getLanguage())%>" id="zd_btn_cancle" class="zd_btn_cancle" onclick="dialog.closeByHand()">
</wea:item>
</wea:group>
</wea:layout>
</div>
<script language="JavaScript">
var diag_vote;
jQuery(document).ready(function () {
$("#topTitle").topMenuTitle({searchFn:onBtnSearchClick});
$(".topMenuTitle td:eq(0)").html($("#tabDiv").html());
$("#tabDiv").remove();
jQuery('input[type=checkbox]').each(function(){
jQuery(this).trigger('disabled',false);
});
});
var dialog = parent.getDialog(window);
var parentWin = parent.getParentWindow(window);
function doSave(){
document.getElementById('submitform').submit();
Dialog.alert('<%=SystemEnv.getHtmlLabelName(83551,user.getLanguage())%>',function(){
parentWin.reload();
dialog.close();
});
}
function addwfs(){
var title = "<%=SystemEnv.getHtmlLabelName(18214,user.getLanguage())%>";
var url="/workflow/monitor/MutiwfBrowser4Monitor.jsp?isfrom_systemMonitorDetail=1&infoid=<%=infoid%>";
dlg = new window.top.Dialog();
dlg.currentWindow = window;
dlg.Width = 550;
dlg.Height = 650;
dlg.Modal = true;
dlg.Title = title;
dlg.URL =url;
dlg.show();
}
function batchDel(){
var ids = "";
$("input[name='chkInTableTag']").each(function(){
if($(this).attr("checked")) {
ids += ',' + $(this).attr("checkboxId");
}
});
if(ids==""){
top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(20149,user.getLanguage())%>");
return false;
}else
ids = ids.substring(1);
top.Dialog.confirm("<%=SystemEnv.getHtmlLabelName(15097,user.getLanguage())%>", function (){
var parentWin = null;
try{
jQuery.ajax({
url: "systemMonitorOperation.jsp?actionKey=deldetail&infoid=<%=infoid%>&ids="+ids,
dataType: "text",
type:"post",
async:true,
contentType : "charset=gbk",
error:function(ajaxrequest){},
success:function(data){
_table.reLoad();
parentWin = parent.getParentWindow(window);
parentWin.reload();
}
});
}catch(e){}
}, function () {}, 320, 90,true);
}
var showTableDiv = document.getElementById('divshowreceivied');
var oIframe = document.createElement('iframe');
function showreceiviedPopup(content){
showTableDiv.style.display='';
var message_Div = document.createElement("<div>");
message_Div.id="message_Div";
message_Div.className="xTable_message";
showTableDiv.appendChild(message_Div);
var message_Div1 = document.getElementById("message_Div");
message_Div1.style.display="inline";
message_Div1.innerHTML=content;
var pTop= document.body.offsetHeight/2+document.body.scrollTop-50;
var pLeft= document.body.offsetWidth/2-50;
message_Div1.style.position="absolute"
message_Div1.style.posTop=pTop;
message_Div1.style.posLeft=pLeft;
message_Div1.style.zIndex=1002;
oIframe.id = 'HelpFrame';
showTableDiv.appendChild(oIframe);
oIframe.frameborder = 0;
oIframe.style.position = 'absolute';
oIframe.style.top = pTop;
oIframe.style.left = pLeft;
oIframe.style.zIndex = message_Div1.style.zIndex - 1;
oIframe.style.width = parseInt(message_Div1.offsetWidth);
oIframe.style.height = parseInt(message_Div1.offsetHeight);
oIframe.style.display = 'block';
}
function hiddenreceiviedPopup(){
showTableDiv.style.display='none';
oIframe.style.display='none';
}
function changecolor(obj,color){
obj.style.color=color;
}
function afterDoWhenLoaded(){
jQuery("input[type=checkbox]").each(function(){
if(jQuery(this).attr("tzCheckbox")=="true"){
jQuery(this).tzCheckbox({labels:['','']});
//如果禁用,则修改开关CSS
if(jQuery(this).attr('disabled')){
jQuery(this).next().attr("class",jQuery(this).next().attr('class').replace('tzCheckBox','tzCheckBox_disabled'));
jQuery(this).next().find('.tzCBPart').attr('class','tzCBPart_disabled');
}
}
});
}
function checkall(type){
var ischecked = jQuery('#'+type+'_all').is(':checked');
jQuery("input[name^='"+type+"_']").each(function(){
jQuery(this).attr("checked", ischecked);
});
}
function reSetInputt1(){
var typename=$("input[name='flowTitle']").val();
$("input[name='inputt11']").val(typename);
}
function refresh(){
_table.reLoad();
parentWin.reload();
}
function onBtnSearchClick(){
document.getElementById('searchFrom').submit();
}
jQuery(function(){
//hiddenRCMenuItem(<%=showColMenuIndex%>);
})
</script>
</BODY>
</HTML>