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.
292 lines
8.7 KiB
292 lines
8.7 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" />
|
|
<jsp:include page='<%=WDKCore.inst.WDK_COMMON %>'></jsp:include>
|
|
<script type="text/javascript" src="<%=WDK_ROOT%>/core/js/wdk.js"></script>
|
|
<title>人员调整</title>
|
|
<script type="text/javascript">
|
|
|
|
var _param = $.getURLParam('param');
|
|
_param = $.decode(_param);
|
|
var jparam = $.str2json(_param);
|
|
|
|
var _pdid = jparam.queryParams.pdid;
|
|
var _piid = jparam.queryParams.piid;
|
|
var _nodename = jparam.queryParams.nodename;
|
|
var _nodetype = jparam.queryParams.nodetype;
|
|
window.onload = function(){
|
|
$.wait_open();
|
|
|
|
//初始化显示
|
|
$('#nodename').html(_nodename);
|
|
$('#nodetype').html(_nodetype);
|
|
|
|
//获取当前会签进度
|
|
$.cuajax({ //todo_submit_signprocess
|
|
url:'wdk?action=wdk.wf&method=pi_modify_init&ajaxparam='+new Date().getTime()
|
|
,method:"post"
|
|
,timeout:WDK_Timeout
|
|
,data:{
|
|
pdid:_pdid
|
|
,piid:_piid
|
|
,nodename:_nodename
|
|
}
|
|
,success:function(result) {
|
|
var jres = $.str2json(result);
|
|
|
|
//1、补充办理信息
|
|
var jactors = jres.actors;
|
|
var htmlarr = [];
|
|
for(var i=0;i<jactors.length;i++){
|
|
var jactor = jactors[i];
|
|
htmlarr.push('<br><span style="margin:50px;">'+(('1'!=jactor.isget)?('1'==jactor.iscomplete?'已完成':'待领取'):(('0'==jactor.iscomplete)?'待处理':(('1'==jactor.ispass)?'已完成':'未通过')))+'</span><span style="margin:1px;">'+jactor.actorid+'</span>');
|
|
}
|
|
$('#taskinfo').html(htmlarr.join(''));
|
|
|
|
//2、如果是顺序会签,则需要加载顺序
|
|
if('sign'==_nodetype){
|
|
$('#item_signtype').css('display','block');
|
|
|
|
if('1'==jres.signtype){
|
|
document.getElementById('signtype_1').checked = true;
|
|
$('#item_nextactors2').css('display','block');
|
|
}else{
|
|
document.getElementById('signtype_0').checked = true;
|
|
$('#item_nextactors2').css('display','none');
|
|
}
|
|
//填充顺序
|
|
var listobj = document.getElementById("nextactors2");
|
|
for(var i=0;i<jactors.length;i++){
|
|
var jactor = jactors[i];
|
|
var option = new Option(jactor.actorid,jactor.actorid+','+jactor.actortype);
|
|
listobj.options.add(option);
|
|
}
|
|
}
|
|
|
|
//3、初始化构建树
|
|
actors_init(_pdid,_piid,_nodename,jactors);
|
|
}
|
|
,error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
//初始化环节参与者树
|
|
function actors_init(pdid,piid,nodename,jactors){
|
|
var _queryParams = {
|
|
pdid:pdid
|
|
,piid:piid
|
|
,nodename:nodename
|
|
};
|
|
$.tree({
|
|
id:'nextactors',
|
|
checkbox:true,
|
|
expandall:true,
|
|
url:"wdk?action=wdk.wf&method=node_actors",
|
|
queryParams:_queryParams,
|
|
onLoadSuccess:function(node,data){
|
|
var ids = [];
|
|
for(var i=0;i<jactors.length;i++){
|
|
var jactor = jactors[i];
|
|
ids.push(jactor.actorid);
|
|
}
|
|
$.tree_setChecked ({id:'nextactors',ids:ids.join(',')});
|
|
$.wait_close();
|
|
},
|
|
onCheck:function(node,checked){
|
|
actorlistUpdate(node,checked);
|
|
}
|
|
});
|
|
}
|
|
|
|
//会签顺序点击事件
|
|
function signtype_onclick(signtype){
|
|
if('0'==signtype){
|
|
//同时办理
|
|
$('#item_nextactors2').css('display','none');
|
|
}else{
|
|
$('#item_nextactors2').css('display','block');
|
|
}
|
|
}
|
|
|
|
//点击人员树节点的事件
|
|
function actorlistUpdate(node,checked){
|
|
var nodes = [];
|
|
if(-1!=node.id.indexOf('dept_')){
|
|
//如果是点击的部门,则将该部门下的所有人员依次添加
|
|
var childs = $.tree_getChildNodes({id:'nextactors',node:node});
|
|
for(var i=0;i<childs.length;i++){
|
|
var child = childs[i];
|
|
nodes.push(child);
|
|
}
|
|
}else{
|
|
nodes.push(node);
|
|
}
|
|
var listobj = document.getElementById("nextactors2");
|
|
if(checked){
|
|
//1、如果是增加
|
|
for(var i=0;i<nodes.length;i++){
|
|
var _n = nodes[i];
|
|
var actorid = _n.id;
|
|
var actortype = _n.attributes.actortype;
|
|
var hasSame = false;
|
|
//1.1、如果有相同的ID则不处理
|
|
var options = listobj.options;
|
|
for(var i=0;i<options.length;i++){
|
|
var opt = options[i];
|
|
if(opt.value == actorid+","+actortype){
|
|
hasSame = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
//1.2、如果是不同的ID则添加
|
|
if(!hasSame){
|
|
var option = new Option(actorid,actorid+','+actortype);
|
|
if(listobj){
|
|
listobj.options.add(option);
|
|
}
|
|
}
|
|
}
|
|
}else{
|
|
for(var i=0;i<nodes.length;i++){
|
|
var _n = nodes[i];
|
|
var actorid = _n.id;
|
|
var actortype = _n.attributes.actortype;
|
|
|
|
//2、如果是删除
|
|
var options = listobj.options;
|
|
for(var j=0;j<options.length;j++){
|
|
var opt = options[j];
|
|
if(opt.value == actorid+','+actortype){
|
|
listobj.remove(j);
|
|
j = j - 1;//注意这一行
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//提交
|
|
function inputpop_getValue(){
|
|
$.wait_open();
|
|
var _data = [];
|
|
var _actors = [];
|
|
|
|
//是否顺序
|
|
var _signtype = $("input[name='signtype']:checked").val();
|
|
|
|
if('sign'==_nodetype&&'1'==_signtype){
|
|
//如果是按顺序会签,则从右边顺序列表中读取
|
|
var listobj = document.getElementById("nextactors2");
|
|
var options = listobj.options;
|
|
for(var i=0;i<options.length;i++){
|
|
var opt = options[i];
|
|
_actors.push(opt.value);
|
|
}
|
|
}else{
|
|
var tree_checked = $.tree_getCheckedNode({id:'nextactors'});
|
|
if(null!=tree_checked){
|
|
for(var i=0;i<tree_checked.length;i++){
|
|
var node = tree_checked[i];
|
|
if(!node){
|
|
continue;
|
|
}
|
|
var node_id = node.id;
|
|
var node_type = node.attributes.actortype;
|
|
if(-1==node_id.indexOf('dept_')){
|
|
_actors.push(node_id+","+node_type);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(_actors.length<1){
|
|
$.wait_close();
|
|
alert('请选择办理者!');
|
|
return;
|
|
}
|
|
|
|
_data ={
|
|
nodename:_nodename
|
|
,nodetype:_nodetype
|
|
,pdid:_pdid
|
|
,piid:_piid
|
|
,signtype:_signtype
|
|
,actors:_actors.join(';')
|
|
};
|
|
return _data;
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
<body class="easyui-layout" style="padding:0px;margin:0px;background-color:#FFFFFF;">
|
|
<!-- 按钮 -->
|
|
<!-- <div id="layout_toolbar" data-options="region:'north',border:false,collapsed:false" style="height:30px;overflow:hidden;border:1px solid #ddd;text-align:left;" >-->
|
|
<!-- <a class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-ok'" href="javascript:void(0)" onclick="task_submit()">提交</a>-->
|
|
<!-- </div>-->
|
|
|
|
<!-- 表格 -->
|
|
<div id="layout_content" data-options="region:'center',border:false,collapsed:false" style="overflow:hidden;border:1px solid #ddd;" >
|
|
<div id="item_reget" class="fitem">
|
|
<span class="title">任务重新领取:</span>
|
|
<div>
|
|
<input name="reget" id="reget_0" type="radio" value="0" checked>保留当前状态
|
|
<input name="reget" id="reget_1" type="radio" value="1">任务重新领取
|
|
</div>
|
|
</div>
|
|
<div class="fitem">
|
|
<span class="title">当前办理环节:</span>
|
|
<span id="nodename"> </span>
|
|
</div>
|
|
<div class="fitem">
|
|
<span class="title">当前环节类型:</span>
|
|
<span id="nodetype"> </span>
|
|
</div>
|
|
<div class="fitem" id="item_taskinfo" style="height:70px;">
|
|
<span class="title">办理信息:</span>
|
|
<div id="taskinfo" style="height:70px;width:200px;overflow:auto;">
|
|
</div>
|
|
</div>
|
|
<div class="fitem" id="item_signtype" style="display:none;">
|
|
<span class="title">会签顺序:</span>
|
|
<div>
|
|
<input name="signtype" id="signtype_0" onclick="signtype_onclick('0')" type="radio" value="0" checked>同时办理
|
|
<input name="signtype" id="signtype_1" onclick="signtype_onclick('1')" type="radio" value="1">顺序办理
|
|
</div>
|
|
</div>
|
|
<div id="item_nextactors" class="fitem" style="height:160px;">
|
|
<div style="float:left;">
|
|
<span class="title">办理人:</span>
|
|
<div id="nextactors" style="width:200px;height:150px;overflow:auto;border:1px solid #d4a375">
|
|
</div>
|
|
</div>
|
|
<div id="item_nextactors2" style="float:left;position:absolute;right:0px;width:50%;display:none;">
|
|
<span class="title">办理人顺序:</span>
|
|
<div style="width:200px;height:150px;overflow:auto;">
|
|
<select id="nextactors2" name="nextactors2" class="txt" multiple="multiple" style="width:200px;height:150px;border:1px solid #d4a375;">
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|