You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
414 lines
12 KiB
414 lines
12 KiB
1 month ago
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
<%
|
||
|
String path = request.getContextPath();
|
||
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||
|
BaseSessionUser su = (BaseSessionUser)session.getAttribute(WDKConstant.SESSION_USER);
|
||
|
String WDK_ROOT = WDKCore.inst.WDK_ROOT;
|
||
|
%>
|
||
|
<!DOCTYPE html>
|
||
|
<%@page import="org.wdk.WDKConstant"%>
|
||
|
<%@page import="org.wdk.WDKCore"%>
|
||
|
<%@page import="org.wdk.core.base.BaseSessionUser"%>
|
||
|
<html>
|
||
|
|
||
|
<head>
|
||
|
<base href="<%=basePath%>" target="_self">
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<title>流程实例管理</title>
|
||
|
<jsp:include page='<%=WDKCore.inst.WDK_COMMON %>'></jsp:include>
|
||
|
<script type="text/javascript" src="<%=WDK_ROOT%>/core/js/wdk.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
<% if(null==su){%>
|
||
|
$.timeout();
|
||
|
<%}%>
|
||
|
|
||
|
var _gridcode = "wdk.module.wf.processinstancegrid";
|
||
|
var _gridid = $.getUUID();
|
||
|
var _pdid = $.getURLParam('pdid');
|
||
|
var _ppiid = $.getURLParam('ppiid');
|
||
|
|
||
|
window.onload = function(){
|
||
|
|
||
|
//初始化流程模板选择列表
|
||
|
var pi_wfname = $.combobox({
|
||
|
id:'pdname'
|
||
|
,url:'wdk?action=wdk.wf&method=combobox_pd_name&ajaxparam='+new Date().getTime()
|
||
|
,defaultOption:'所有模板'
|
||
|
,editable:false
|
||
|
,onChange:function(newValue,oldValue){
|
||
|
$.combobox({
|
||
|
id:'pdversion'
|
||
|
,url:'wdk?action=wdk.wf&method=combobox_pd_version&pdname='+newValue+'&ajaxparam='+new Date().getTime()
|
||
|
,defaultOption:'所有版本'
|
||
|
,onChange:function(newValue,oldValue){
|
||
|
$.combobox({
|
||
|
id:'status'
|
||
|
,url:'wdk?action=wdk.wf&method=combobox_pd_status&pdname=null&ajaxparam='+new Date().getTime()
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
$.combobox({
|
||
|
id:'status'
|
||
|
,url:'wdk?action=wdk.wf&method=combobox_pd_status&pdname=null&ajaxparam='+new Date().getTime()
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
//初始化流程版本选择列表
|
||
|
$.combobox({
|
||
|
id:'pdversion'
|
||
|
,url:'wdk?action=wdk.wf&method=combobox_pd_version&pdname=null&ajaxparam='+new Date().getTime()
|
||
|
,defaultOption:'所有版本'
|
||
|
,onChange:function(newValue,oldValue){
|
||
|
$.combobox({
|
||
|
id:'status'
|
||
|
,url:'wdk?action=wdk.wf&method=combobox_pd_status&pdname=null&ajaxparam='+new Date().getTime()
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
//初始化流程状态选择列表
|
||
|
$.combobox({
|
||
|
id:'status'
|
||
|
,url:'wdk?action=wdk.wf&method=combobox_pd_status&pdname=null&ajaxparam='+new Date().getTime()
|
||
|
});
|
||
|
|
||
|
//初始化流程实例列表
|
||
|
var _queryParams = {
|
||
|
pdname:$.combobox_getValue({id:'pdname'})
|
||
|
,pdversion:$.combobox_getValue({id:'pdversion'})
|
||
|
,status:$.combobox_getValue({id:'status'})
|
||
|
,ppiid:_ppiid
|
||
|
};
|
||
|
//初始化流程实例表格
|
||
|
_gridid = $.grid({
|
||
|
id:_gridid,
|
||
|
containerid:'layout_grid',
|
||
|
gridcode:_gridcode,
|
||
|
url:'wdk?action=wdk.wf&method=pi_list&ajaxparam='+new Date().getTime(),
|
||
|
idField:'piid',
|
||
|
mergeField:'cnname,pdversion,creater,createdt',
|
||
|
queryParams:_queryParams
|
||
|
,pagination:true //分页控件
|
||
|
});
|
||
|
|
||
|
|
||
|
//初始化迁移模板选择框
|
||
|
$.combobox({
|
||
|
id:'_move_pdid'
|
||
|
,url:'wdk?action=wdk.wf&method=combobox_pd_name&ajaxparam='+new Date().getTime()
|
||
|
,defaultOption:'请选择目标流程模板'
|
||
|
,editable:false
|
||
|
});
|
||
|
};
|
||
|
|
||
|
//刷新列表
|
||
|
function _pi_query(){
|
||
|
var _queryParams = {
|
||
|
pdname:$.combobox_getValue({id:'pdname'})
|
||
|
,pdversion:$.combobox_getValue({id:'pdversion'})
|
||
|
,status:$.combobox_getValue({id:'status'})
|
||
|
};
|
||
|
$.grid_reload({
|
||
|
id:_gridid
|
||
|
,queryParams:_queryParams
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
//人名点击
|
||
|
function _actor_click(actorid,actortype){
|
||
|
//if('0'==actortype){
|
||
|
$.tab_addTop({
|
||
|
menucode: 'todo'
|
||
|
,title:'待办('+actorid+')'
|
||
|
,closable:true
|
||
|
,url:'<%=WDK_ROOT%>/module/wf/todo.jsp?actorid='+actorid+'&actortype='+actortype
|
||
|
});
|
||
|
//}
|
||
|
}
|
||
|
|
||
|
//grid表格里的点击
|
||
|
function _handler_click(method,jparam){
|
||
|
var pdid = jparam.pdid;
|
||
|
var piid = jparam.piid;
|
||
|
switch(method){
|
||
|
case 'monitor':
|
||
|
var _wid = $.getUUID();
|
||
|
$.openWin({
|
||
|
id:_wid,
|
||
|
title:'流程监控',
|
||
|
height:300,
|
||
|
width:600,
|
||
|
modal:true,
|
||
|
url:'<%=WDK_ROOT%>/module/wf/pi_monitor.jsp?piid='+piid+'&ajaxparam='+new Date().getTime(),
|
||
|
maximizable:true,
|
||
|
maximized:true,
|
||
|
draggable:false,
|
||
|
resizable:false
|
||
|
});
|
||
|
|
||
|
break;
|
||
|
case 'taskrecord':
|
||
|
var _wid = $.getUUID();
|
||
|
$.openWin({
|
||
|
id:_wid,
|
||
|
title:'流程办理记录',
|
||
|
height:300,
|
||
|
width:600,
|
||
|
modal:true,
|
||
|
url:'<%=WDK_ROOT%>/module/wf/pi_taskrecord.jsp?pdid='+pdid+'&piid='+piid+'&ajaxparam='+new Date().getTime(),
|
||
|
maximizable:true,
|
||
|
maximized:true,
|
||
|
draggable:false,
|
||
|
resizable:false
|
||
|
});
|
||
|
break;
|
||
|
case 'modify': //人员调整
|
||
|
//alert('任务候选人调整、会签任务加签、减签');
|
||
|
var _wid = $.getUUID();
|
||
|
$.openDialog({
|
||
|
id:_wid
|
||
|
,title:'人员调整'
|
||
|
,height:300
|
||
|
,width:600
|
||
|
,modal:true
|
||
|
,url:'<%=WDK_ROOT%>/module/wf/pi_modify.jsp'
|
||
|
,queryParams:{
|
||
|
pdid:jparam.pdid
|
||
|
,piid:jparam.piid
|
||
|
,nodename:jparam.nodename
|
||
|
,nodetype:jparam.nodetype
|
||
|
}
|
||
|
,maximizable:true
|
||
|
,maximized:true
|
||
|
,draggable:false
|
||
|
,resizable:false
|
||
|
,onSubmit:function(jdata){ //点击确定按钮
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=wdk.wf&method=pi_modify&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:jdata,
|
||
|
success:function(result) {
|
||
|
$.wait_close();
|
||
|
var jparam = $.str2json(result);
|
||
|
alert(jparam.desc);
|
||
|
$.grid_reload({id:_gridid});
|
||
|
},
|
||
|
error:function(result){
|
||
|
$.wait_close();
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
break;
|
||
|
case 'suspend': //挂起流程
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=wdk.wf&method=pi_suspend&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:{
|
||
|
pdid:jparam.pdid
|
||
|
,piid:jparam.piid
|
||
|
},
|
||
|
success:function(result) {
|
||
|
var jparam = $.str2json(result);
|
||
|
$.grid_reload({id:_gridid});
|
||
|
alert(jparam.desc);
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
break;
|
||
|
case 'resume': //恢复流程
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=wdk.wf&method=pi_resume&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:{
|
||
|
pdid:jparam.pdid
|
||
|
,piid:jparam.piid
|
||
|
},
|
||
|
success:function(result) {
|
||
|
var jparam = $.str2json(result);
|
||
|
$.grid_reload({id:_gridid});
|
||
|
alert(jparam.desc);
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
break;
|
||
|
case 'remove':
|
||
|
if(confirm('该操作将删除当前流程实例,是否继续?')){
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=wdk.wf&method=pi_remove&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:{
|
||
|
pdid:jparam.pdid
|
||
|
,piid:jparam.piid
|
||
|
},
|
||
|
success:function(result) {
|
||
|
var jparam = $.str2json(result);
|
||
|
$.grid_reload({id:_gridid});
|
||
|
alert(jparam.desc);
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
break;
|
||
|
case 'move': //流程迁移
|
||
|
_pi_move(jparam);
|
||
|
break;
|
||
|
case 'push': //环节推进
|
||
|
var _wid = $.getUUID();
|
||
|
$.openDialog({
|
||
|
id:_wid
|
||
|
,title:'环节推进'
|
||
|
,height:300
|
||
|
,width:600
|
||
|
,modal:true
|
||
|
,url:'<%=WDK_ROOT%>/module/wf/pi_push.jsp'
|
||
|
,queryParams:{
|
||
|
pdid:jparam.pdid
|
||
|
,piid:jparam.piid
|
||
|
,nodename:jparam.nodename
|
||
|
,nodetype:jparam.nodetype
|
||
|
,islastactor:jparam.islastactor
|
||
|
,issub:jparam.issub
|
||
|
,islastsub:jparam.islastsub
|
||
|
,ppdid:jparam.ppdid
|
||
|
,ppiid:jparam.ppiid
|
||
|
,pnodename:jparam.pnodename
|
||
|
}
|
||
|
,maximizable:true
|
||
|
,maximized:true
|
||
|
,draggable:false
|
||
|
,resizable:false
|
||
|
,onSubmit:function(jdata){ //点击确定按钮
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=wdk.wf&method=pi_push&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:jdata,
|
||
|
success:function(result) {
|
||
|
$.wait_close();
|
||
|
var jparam = $.str2json(result);
|
||
|
alert(jparam.desc);
|
||
|
$.grid_reload({id:_gridid});
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
break;
|
||
|
case 'invalid': //作废
|
||
|
alert('流程作废');
|
||
|
break;
|
||
|
case 'subprocess':
|
||
|
alert('暂未实现');
|
||
|
return;
|
||
|
$.tab_addTop({
|
||
|
menucode: 'subprocess'+pdid
|
||
|
,title:nodename+'-子流程'
|
||
|
,closable:true
|
||
|
,url:'<%=WDK_ROOT%>/module/wf/pi.jsp?pdid='+pdid+'&pdname='+pdname+'&ppiid='+piid
|
||
|
});
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
var _jparam = null;
|
||
|
function _pi_move(jparam){
|
||
|
_jparam = jparam;
|
||
|
$('#dlg_move').dialog('open').dialog('setTitle','新增迁移');
|
||
|
|
||
|
//初始化各类控件的值
|
||
|
$.combobox_clear({id:'_move_pdid'});
|
||
|
$("input[type=_move_cascade][value=0]").attr("checked",'checked');
|
||
|
}
|
||
|
|
||
|
//迁移提交
|
||
|
function _pi_move_save(){
|
||
|
var _pdid = $.combobox_getValue({id:'_move_pdid'});
|
||
|
var _cascade = $("input[name='_move_cascade']:checked").val();
|
||
|
|
||
|
if(null==_pdid||""==_pdid){
|
||
|
alert('迁移目标模板不能为空!');
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
$.wait_open_top();
|
||
|
var _data = {
|
||
|
pdid:_jparam.pdid
|
||
|
,piid:_jparam.piid
|
||
|
,newpdid:_pdid
|
||
|
,cascade:_cascade
|
||
|
};
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=wdk.wf&method=pi_move&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:_data,
|
||
|
success:function(result) {
|
||
|
var jparam = $.str2json(result);
|
||
|
alert(jparam.desc);
|
||
|
$.grid_reload({id:_gridid});
|
||
|
$.wait_close_top();
|
||
|
$('#dlg_move').dialog('close');
|
||
|
},
|
||
|
error:function(result){
|
||
|
$.wait_close();
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body class="easyui-layout" style="padding:0px;margin:0px;background-color:#FFFFFF;">
|
||
|
<!-- 按钮 -->
|
||
|
<div data-options="region:'north',border:false,collapsed:false" style="height:30px;overflow:hidden;border-bottom:1px solid #d4a375;text-align:left;" >
|
||
|
<label style="width:50px;margin-left: 10px;">流程名称:</label>
|
||
|
<input type="text" id="pdname" name="pdname" class="txt" style="width:120px;margin-left: 5px;"></input>
|
||
|
<label style="width:50px;margin-left: 10px;">流程版本:</label>
|
||
|
<input type="text" id="pdversion" name="pdversion" class="txt" style="width:120px;margin-left: 5px;"></input>
|
||
|
<label style="width:50px;margin-left: 10px;">状态:</label>
|
||
|
<input type="text" id="status" name="status" class="txt" style="width:120px;margin-left: 5px;"></input>
|
||
|
<a id="_btnaddledger" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'" href="javascript:void(0)" onclick="_pi_query()">查询</a>
|
||
|
</div>
|
||
|
|
||
|
<!-- 表格 -->
|
||
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="overflow:hidden;border:0px solid #d4a375;" ></div>
|
||
|
|
||
|
|
||
|
<!-- 新增迁移窗口 -->
|
||
|
<div id="dlg_move" class="easyui-dialog" style="width:380px;height:450px;padding:20px 40px;margin:0;" closed="true" modal="true" buttons="#dlg_move_buttons">
|
||
|
<div class="fitem" style="margin:10px;">
|
||
|
<div style="width:100px;margin-top:5px;float:left;">目标模板:</div>
|
||
|
<input id="_move_pdid" name="_move_pdid" class="txt" style="width:150px">
|
||
|
</div>
|
||
|
<div class="fitem" style="margin:10px;">
|
||
|
<div style="width:100px;margin-top:5px;float:left;">迁移方式:</div>
|
||
|
<input name="_move_cascade" type="radio" value="0" checked>复制迁移
|
||
|
<input name="_move_cascade" type="radio" value="1">级联迁移
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="dlg_move_buttons">
|
||
|
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="_pi_move_save()">保存</a>
|
||
|
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg_move').dialog('close')">退出</a>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|