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.
646 lines
17 KiB
646 lines
17 KiB
<%@ 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.todogrid";
|
|
var _gridid = $.getUUID();
|
|
var _actorid = $.getURLParam('actorid');
|
|
var _actortype = $.getURLParam('actortype');
|
|
|
|
window.onload = function(){
|
|
$('#q_actorid').val(_actorid);
|
|
|
|
//初始化流程实例列表
|
|
var _queryParams = {
|
|
actorid:_actorid
|
|
,actortype:_actortype
|
|
,includedone:'0'
|
|
};
|
|
//初始化流程实例表格
|
|
_gridid = $.grid({
|
|
id:_gridid
|
|
,containerid:'layout_grid'
|
|
,gridcode:_gridcode
|
|
,url:'wdk?action=wdk.wf&method=todo_list&ajaxparam='+new Date().getTime()
|
|
,idField:'taskid'
|
|
,queryParams:_queryParams
|
|
,pagination:true //分页控件
|
|
});
|
|
|
|
//2、初始化委托人选择控件
|
|
$.inputpop({
|
|
id:'_cc_actor'
|
|
,title:'抄送人选择'
|
|
,width:320
|
|
,height:480
|
|
,url:'<%=WDK_ROOT%>/module/wf/usertree.jsp'
|
|
,required:false
|
|
,editable:false
|
|
,checkbox:true
|
|
,asyn:false
|
|
,dataurl:$.encode('wdk?action=wdk.wf&method=pub_actorlist&ajaxparam='+new Date().getTime())
|
|
});
|
|
};
|
|
|
|
|
|
//刷新列表
|
|
function _todo_query(){
|
|
var hasdepute = '0';
|
|
if($("input[name='q_hasdepute'][type='checkbox']").is(':checked') ){
|
|
hasdepute = '1';
|
|
}
|
|
var hasassign = '0';
|
|
if($("input[name='q_hasassign'][type='checkbox']").is(':checked') ){
|
|
hasassign = '1';
|
|
}
|
|
var hasdone = '0';
|
|
if($("input[name='q_hasdone'][type='checkbox']").is(':checked') ){
|
|
hasdone = '1';
|
|
}
|
|
var hasread = '0';
|
|
if($("input[name='q_hasread'][type='checkbox']").is(':checked') ){
|
|
hasread = '1';
|
|
}
|
|
|
|
var _queryParams = {
|
|
actorid:$('#q_actorid').val()
|
|
,actortype:_actortype
|
|
,hasdepute:hasdepute
|
|
,hasassign:hasassign
|
|
,hasdone:hasdone
|
|
,hasread:hasread
|
|
};
|
|
$.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
|
|
//,url:'<%=WDK_ROOT%>/module/frame/workflow/todo.jsp?actorid='+actorid+'&actortype='+actortype+'&actorname='+actorname+'&deptid='+deptid+'&deptname='+deptname
|
|
//,url:'<%=WDK_ROOT%>/module/frame/workflow/todo.jsp?actorid='+actorid
|
|
});
|
|
}
|
|
}
|
|
|
|
//grid表格里的点击
|
|
function _handler_click(jtask){
|
|
var method = jtask.method;
|
|
var pdid = jtask.pdid;
|
|
var piid = jtask.piid;
|
|
var taskid = jtask.taskid;
|
|
var subtaskid = jtask.subtaskid;
|
|
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 'get': //领取任务
|
|
_task_get(jtask);
|
|
break;
|
|
case 'return': //领退任务
|
|
_task_return(jtask);
|
|
break;
|
|
case 'gonext': //前进
|
|
_task_gonext(jtask);
|
|
break;
|
|
case 'goback': //后退
|
|
_task_goback(jtask);
|
|
break;
|
|
case 'gofree': //特送
|
|
_task_gofree(jtask);
|
|
break;
|
|
case 'assign': //交办
|
|
_task_assign(jtask);
|
|
break;
|
|
case 'recover': //追回
|
|
_task_recover(jtask);
|
|
break;
|
|
case 'cc': //抄送
|
|
_task_cc(jtask);
|
|
break;
|
|
case 'read': //阅办
|
|
_task_read(jtask);
|
|
break;
|
|
case 'pihistory':
|
|
_task_history(pdid,piid,taskid);
|
|
break;
|
|
case 'remove':
|
|
if(confirm('该操作将删除当前待办,是否继续?')){
|
|
_task_oper('remove',pdid,piid);
|
|
}
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
|
|
//任务领取
|
|
function _task_get(jtask){
|
|
$.wait_open_top();
|
|
var _data = {
|
|
task:jtask.task
|
|
};
|
|
|
|
/* {
|
|
pdid:jparam.pdid
|
|
,piid:jparam.piid
|
|
,taskid:jparam.taskid
|
|
,subtaskid:jparam.subtaskid
|
|
,nodename:jparam.nodename
|
|
,actorid:jparam.actorid
|
|
,actortype:jparam.actortype
|
|
,originactorid:jparam.originactorid
|
|
,originactortype:jparam.originactortype
|
|
};
|
|
*/
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.wf&method=task_get&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
var jparam = $.str2json(result);
|
|
$.wait_close_top();
|
|
alert(jparam.desc);
|
|
$.grid_reload({
|
|
id:_gridid
|
|
});
|
|
},
|
|
error:function(result){
|
|
$.wait_close_top();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
//任务领退
|
|
function _task_return(jtask){
|
|
$.wait_open_top();
|
|
/*
|
|
var _data = {
|
|
pdid:jparam.pdid
|
|
,piid:jparam.piid
|
|
,taskid:jparam.taskid
|
|
,subtaskid:jparam.subtaskid
|
|
,actorid:jparam.actorid
|
|
,actortype:jparam.actortype
|
|
,originactorid:jparam.originactorid
|
|
,originactortype:jparam.originactortype
|
|
};
|
|
*/
|
|
var _data = {
|
|
task:jtask.task
|
|
};
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.wf&method=task_return&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
var jparam = $.str2json(result);
|
|
$.wait_close_top();
|
|
alert(jparam.desc);
|
|
$.grid_reload({
|
|
id:_gridid
|
|
});
|
|
},
|
|
error:function(result){
|
|
$.wait_close_top();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//前进,根据当前节点的不同属性,分别跳转到不同的页面
|
|
function _task_gonext(jtask){
|
|
var taskid = jtask.taskid;
|
|
var actorid = jtask.actorid;
|
|
var nodename = jtask.nodename;
|
|
var nodetype = jtask.nodetype;
|
|
$.tab_addTop({
|
|
menucode: 'task_'+taskid
|
|
,title:'【推进】:'+nodename+'('+actorid+')'
|
|
,closable:true
|
|
,url:'<%=WDK_ROOT%>/module/wf/todo_gonext.jsp?param='+$.encode($.json2str(jtask))
|
|
});
|
|
}
|
|
|
|
//后退
|
|
function _task_goback(jtask){
|
|
var taskid = jtask.taskid;
|
|
var actorid = jtask.actorid;
|
|
var nodename = jtask.nodename;
|
|
var nodetype = jtask.nodetype;
|
|
if('1'!=jtask.canreturn){
|
|
alert('当前节点不允许退回!');
|
|
return;
|
|
}
|
|
$.tab_addTop({
|
|
menucode: 'task_'+taskid
|
|
,title:'【回退】:'+nodename+'('+actorid+')'
|
|
,closable:true
|
|
,url:'<%=WDK_ROOT%>/module/wf/todo_goback.jsp?param='+$.encode($.json2str(jtask))
|
|
});
|
|
}
|
|
|
|
|
|
//自由流
|
|
function _task_gofree(jtask){
|
|
var taskid = jtask.taskid;
|
|
var actorid = jtask.actorid;
|
|
var nodename = jtask.nodename;
|
|
var nodetype = jtask.nodetype;
|
|
if('1'!=jtask.canfree){
|
|
alert('当前节点不允许特送!');
|
|
return;
|
|
}
|
|
$.tab_addTop({
|
|
menucode: 'task_'+taskid
|
|
,title:'【特送】:'+nodename+'('+actorid+')'
|
|
,closable:true
|
|
,url:'<%=WDK_ROOT%>/module/wf/todo_gofree.jsp?param='+$.encode($.json2str(jtask))
|
|
});
|
|
}
|
|
|
|
|
|
//交办
|
|
function _task_assign(jtask){
|
|
$.wait_open();
|
|
|
|
//1、查询当前任务的交办情况
|
|
var _data = {
|
|
task:jtask.task
|
|
};
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.wf&method=task_assign_query&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
var jres = $.str2json(result);
|
|
var actors = jres.actors;
|
|
_task_assign_open(jtask,actors);
|
|
},
|
|
error:function(result){
|
|
$.wait_close_top();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
//弹出交办人员选择列表
|
|
function _task_assign_open(jtask,actors){
|
|
var _wid = $.getUUID();
|
|
$.openDialog({
|
|
id:_wid,
|
|
title:'交办人员选择',
|
|
height:400,
|
|
width:300,
|
|
modal:true,
|
|
queryParams:{
|
|
actors:actors
|
|
},
|
|
url:'<%=WDK_ROOT%>/module/wf/todo_usertree.jsp',
|
|
maximizable:false,
|
|
draggable:false,
|
|
resizable:false,
|
|
onSubmit:function(result){ //点击确定按钮
|
|
$.wait_open();
|
|
if('null'==result){
|
|
result = '';
|
|
}
|
|
//交办人员选择完毕之后提交
|
|
var _data ={
|
|
task:jtask.task
|
|
,assignactors:result
|
|
};
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.wf&method=task_assign&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
$.wait_close();
|
|
var jres = $.str2json(result);
|
|
$.grid_reload({id:_gridid});
|
|
alert(jres.desc);
|
|
return;
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
},
|
|
onCancel:function(){ //点击cancel按钮
|
|
//alert('退出');
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//任务追回
|
|
function _task_recover(jtask){
|
|
if(!confirm('是否追回任务?')){
|
|
return;
|
|
}
|
|
$.wait_open();
|
|
/*
|
|
var _data ={
|
|
pdid:jparam.pdid
|
|
,piid:jparam.piid
|
|
,taskid:jparam.taskid
|
|
,subtaskid:jparam.subtaskid
|
|
,actorid:jparam.actorid
|
|
,actortype:jparam.actortype
|
|
,originactorid:jparam.originactorid
|
|
,originactortype:jparam.originactortype
|
|
,agenttype:jparam.agenttype
|
|
};
|
|
*/
|
|
var _data = {
|
|
task:jtask.task
|
|
};
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.wf&method=task_recover&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
$.wait_close();
|
|
var jres = $.str2json(result);
|
|
$.grid_reload({id:_gridid});
|
|
alert(jres.desc);
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
//抄送,弹出人员选择列表
|
|
var _jtask = null;
|
|
function _task_cc(jtask){
|
|
_jtask = jtask;
|
|
$('#dlg_cc').dialog('open').dialog('setTitle','新增抄送');
|
|
|
|
//初始化各类控件的值
|
|
$.inputpop_clear({id:'_cc_actor'});
|
|
$('#_cc_comment').val('');
|
|
}
|
|
|
|
|
|
//抄送,弹出人员选择列表
|
|
function _task_cc_save(){
|
|
$.wait_open();
|
|
var _cc_actor = $.inputpop_getValue({id:'_cc_actor'});
|
|
var _cc_comment = $('#_cc_comment').val();
|
|
/*
|
|
var _data ={
|
|
pdid:_jparam.pdid
|
|
,piid:_jparam.piid
|
|
,nodename:_jparam.nodename
|
|
,tasktype:_jparam.tasktype
|
|
,taskid:_jparam.taskid
|
|
,subtaskid:_jparam.subtaskid
|
|
,actorid:_jparam.actorid
|
|
,actortype:_jparam.actortype
|
|
,originactorid:_jparam.originactorid
|
|
,originactortype:_jparam.originactortype
|
|
,agenttype:_jparam.agenttype
|
|
,ccactors:_cc_actor
|
|
,cccomment:_cc_comment
|
|
};
|
|
*/
|
|
var _data = {
|
|
task:_jtask.task
|
|
,ccactors:_cc_actor
|
|
,cccomment:_cc_comment
|
|
};
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.wf&method=task_cc&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
$('#dlg_cc').dialog('close');
|
|
$.wait_close();
|
|
var jres = $.str2json(result);
|
|
$.grid_reload({id:_gridid});
|
|
alert(jres.desc);
|
|
return;
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function _task_read(jtask){
|
|
_jtask = jtask;
|
|
$('#dlg_read').dialog('open').dialog('setTitle','新增抄送');
|
|
|
|
//初始化各类控件的值
|
|
$('#_read_cccomment').val(jtask.cccomment);
|
|
$('#_read_readcomment').val('');
|
|
}
|
|
|
|
|
|
//抄送,弹出人员选择列表
|
|
function _task_read_save(){
|
|
$.wait_open();
|
|
var _read_readcomment = $('#_read_readcomment').val();
|
|
/*
|
|
var _data ={
|
|
pdid:_jparam.pdid
|
|
,piid:_jparam.piid
|
|
,nodename:_jparam.nodename
|
|
,tasktype:_jparam.tasktype
|
|
,taskid:_jparam.taskid
|
|
,subtaskid:_jparam.subtaskid
|
|
,actorid:_jparam.actorid
|
|
,actortype:_jparam.actortype
|
|
,originactorid:_jparam.originactorid
|
|
,originactortype:_jparam.originactortype
|
|
,agenttype:_jparam.agenttype
|
|
,ccid:_jparam.ccid
|
|
,ccrecordid:_jparam.ccrecordid
|
|
,readcomment:_read_readcomment
|
|
};
|
|
*/
|
|
var _data = {
|
|
task:_jtask.task
|
|
,readcomment:_read_readcomment
|
|
};
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.wf&method=task_read&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
$('#dlg_read').dialog('close');
|
|
$.wait_close();
|
|
var jres = $.str2json(result);
|
|
$.grid_reload({id:_gridid});
|
|
alert(jres.desc);
|
|
return;
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查看流程办理记录
|
|
function _task_history(pdid,piid,taskid){
|
|
$.tab_addTop({
|
|
menucode: 'pihistory'
|
|
,title:'流程办理记录'
|
|
,closable:true
|
|
,url:'<%=WDK_ROOT%>/module/wf/pi_history.jsp?pdid='+pdid+'&piid='+piid
|
|
});
|
|
}
|
|
|
|
|
|
|
|
function _task_oper(optype,pdid,piid){
|
|
var _data ={
|
|
optype:optype
|
|
,pdid:pdid
|
|
,piid:piid
|
|
};
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.wf&method=wf_pi_oper&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
var jparam = $.str2json(result);
|
|
$.grid_reload({id:_gridid});
|
|
alert(jparam.desc);
|
|
return;
|
|
if("1"==jparam.code){
|
|
$.grid_reload({id:_gridid});
|
|
}else{
|
|
$.messager.alert('Warning',jparam.desc);
|
|
}
|
|
},
|
|
error:function(result){
|
|
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="q_actorid" name="q_actorid" class="txt" style="width:120px;margin-left: 5px;"></input>
|
|
<input type="checkbox" id="q_hasdepute" name="q_hasdepute" style="width:15px;margin-left: 15px;vertical-align:middle;"></input>
|
|
<label style="margin-left: 1px;text-align:left;">委托</label>
|
|
<input type="checkbox" id="q_hasassign" name="q_hasassign" style="width:15px;margin-left: 15px;vertical-align:middle;"></input>
|
|
<label style="margin-left: 1px;text-align:left;">交办</label>
|
|
<input type="checkbox" id="q_hasdone" name="q_hasdone" style="width:15px;margin-left: 15px;vertical-align:middle;"></input>
|
|
<label style="margin-left: 1px;text-align:left;">经办</label>
|
|
<input type="checkbox" id="q_hasread" name="q_hasread" style="width:15px;margin-left: 15px;vertical-align:middle;"></input>
|
|
<label style="margin-left: 1px;text-align:left;">阅办</label>
|
|
<a id="_btnaddledger" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'" href="javascript:void(0)" onclick="_todo_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_cc" class="easyui-dialog" style="width:380px;height:450px;padding:20px 40px;margin:0;" closed="true" modal="true" buttons="#dlg_cc_buttons">
|
|
<div class="fitem" style="margin:10px;">
|
|
<div style="width:100px;margin-top:5px;float:left;">抄送人:</div>
|
|
<input id="_cc_actor" name="_cc_actor" class="txt" style="width:150px">
|
|
</div>
|
|
<div class="fitem" style="margin:10px;">
|
|
<div style="width:100px;margin-top:5px;float:left;">抄送说明:</div>
|
|
<input id="_cc_comment" name="_cc_comment" class="txt" style="width:150px">
|
|
</div>
|
|
</div>
|
|
<div id="dlg_cc_buttons">
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="_task_cc_save()">保存</a>
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg_cc').dialog('close')">退出</a>
|
|
</div>
|
|
|
|
<!-- 新增阅办窗口 -->
|
|
<div id="dlg_read" class="easyui-dialog" style="width:380px;height:450px;padding:20px 40px;margin:0;" closed="true" modal="true" buttons="#dlg_read_buttons">
|
|
<div class="fitem" style="margin:10px;">
|
|
<div style="width:100px;margin-top:5px;float:left;">抄送说明:</div>
|
|
<input id="_read_cccomment" name="_read_cccomment" class="txt" style="width:150px">
|
|
</div>
|
|
<div class="fitem" style="margin:10px;">
|
|
<div style="width:100px;margin-top:5px;float:left;">阅办意见:</div>
|
|
<input id="_read_readcomment" name="_read_readcomment" class="txt" style="width:150px">
|
|
</div>
|
|
</div>
|
|
<div id="dlg_read_buttons">
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="_task_read_save()">保存</a>
|
|
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg_read').dialog('close')">退出</a>
|
|
</div>
|
|
</body>
|
|
</html>
|