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.

194 lines
6.6 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.transfergrid";
var _gridid = $.getUUID();
window.onload = function(){
//1、初始化显示表格
_gridid = $.grid({
id:_gridid,
containerid:'layout_grid',
gridcode:_gridcode,
url:'wdk?action=wdk.wf&method=transfer_list&ajaxparam='+new Date().getTime(),
idField:'id',
singleSelect:true, //是否单选
pagination:true, //分页控件
rownumbers:true //行号
});
//2、初始化委托人选择控件
$.inputpop({
id:'_transfer_actor'
,title:'移交人选择'
,width:320
,height:480
,url:'<%=WDK_ROOT%>/module/wf/usertree.jsp'
,required:false
,editable:false
,checkbox:false
,asyn:false
,dataurl:$.encode('wdk?action=wdk.wf&method=pub_actorlist&ajaxparam='+new Date().getTime())
});
//3、初始化被委托人选择控件
$.inputpop({
id:'_transfer_transferactor'
,title:'被移交人选择'
,width:320
,height:480
,url:'<%=WDK_ROOT%>/module/wf/usertree.jsp'
,required:false
,editable:false
,checkbox:false
,asyn:false
,dataurl:$.encode('wdk?action=wdk.wf&method=pub_actorlist&ajaxparam='+new Date().getTime())
});
//3、初始化流程清单
var pdids = $.inputpop({
id:'_transfer_pdids'
,type:'grid'
,title:'请选择流程清单'
,width:600
,height:400
,editable:true
,required:false
,singleSelect:false
,gridcode:'wdk.module.wf.processdefinitiongrid'
,idField:'pdid'
,textField:'pdid'
,valueField:'pdid'
,dataurl:$.encode('wdk?action=wdk.wf&method=pd_list')
});
};
//打开新增移交界面
function _add(){
$('#dlg_add').dialog('open').dialog('setTitle','新增移交');
//初始化各类控件的值
$.inputpop_clear({id:'_transfer_actor'});
$.inputpop_clear({id:'_transfer_transferactor'});
$.inputpop_clear({id:'_transfer_pdids'});
$("input[type=_transfer_cascade][value=1]").attr("checked",'checked');
$('#_transfer_remark').val('');
}
//保存
function _save(){
var _transfer_actor = $.inputpop_getValue({id:'_transfer_actor'});
var _transfer_transferactor = $.inputpop_getValue({id:'_transfer_transferactor'});
var _transfer_pdids = $.inputpop_getValue({id:'_transfer_pdids'});
var _transfer_cascade = $("input[name='_transfer_cascade']:checked").val();
var _transfer_remark = $('#_transfer_remark').val();
if(null==_transfer_actor||""==_transfer_actor){
alert("请选择移交人!");
return false;
}
if(null==_transfer_transferactor||""==_transfer_transferactor){
alert("请选择被移交人!");
return false;
}
if(null==_transfer_pdids||""==_transfer_pdids){
if(!confirm("不指定流程模板将移交所有流程,是否继续?")){
return;
}
}
$.wait_open_top();
var _data = {
actorid:_transfer_actor.split(",")[0]
,actortype:_transfer_actor.split(",")[1]
,transferactorid:_transfer_transferactor.split(",")[0]
,transferactortype:_transfer_transferactor.split(",")[1]
,cascade:_transfer_cascade
,pdids:_transfer_pdids
};
$.cuajax({
url:'wdk?action=wdk.wf&method=transfer_add&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_add').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;" >
<a id="_btnaddledger" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'" href="javascript:void(0)" onclick="_add()">新增移交</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_add" class="easyui-dialog" style="width:380px;height:450px;padding:20px 40px;margin:0;" closed="true" modal="true" buttons="#dlg-buttons">
<div class="fitem" style="margin:10px;">
<div style="width:100px;margin-top:5px;float:left;">移交人:</div>
<input id="_transfer_actor" name="_transfer_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="_transfer_transferactor" name="_transfer_transferactor" class="txt" style="width:150px">
</div>
<div class="fitem" style="margin:10px;">
<div style="width:100px;margin-top:5px;float:left;">流程清单:</div>
<input id="_transfer_pdids" name="_transfer_pdids" class="txt" style="width:150px">
</div>
<div class="fitem" style="margin:10px;">
<div style="width:100px;margin-top:5px;float:left;">移交方式:</div>
<input name="_transfer_cascade" type="radio" value="1" checked>级联
<input name="_transfer_cascade" type="radio" value="0" >非级联
</div>
<div class="fitem" style="margin:10px;">
<div style="width:100px;margin-top:5px;float:left;">委托原因:</div>
<input id="_transfer_remark" name="_transfer_remark" class="txt" style="width:150px">
</div>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="_save()">保存</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg_add').dialog('close')">退出</a>
</div>
</body>
</html>