| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- /**
- * 流程启动
- * @param id 业务id
- * @param tableName 表单名称
- * @param bpmType 流程类型
- * @param gridId 表格(列表grid)id
- * @param formUrl web端审核使用url地址(如果流程中节点配置url设置后,该参数可以传入空字符串)
- * @param mobileFormUrl 手机端审核url地址(如果流程中节点配置url设置后,该参数可以传入空字符串)
- */
- function startUserDefinedProcess(id,tableName,bpmType,gridId,formUrl,mobileFormUrl){
- if (typeof id == "undefined"||null ==id||'' ==id ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- if (typeof tableName == "undefined"||null ==tableName||'' ==tableName ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- if (typeof formUrl == "undefined"||null ==formUrl||'' ==formUrl ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- confirm('activitiController.do?startUserDefinedProcess&id='+id+'&tableName='+tableName+'&formUrl='+formUrl+'&formUrlMobile='+mobileFormUrl,'确定提交流程吗?',gridId);
- }
- /**
- * 流程重新启动
- * @param id 业务id
- * @param tableName 表单名称
- * @param bpmType 流程类型
- * @param gridId 表格(列表grid)id
- * @param formUrl web端审核使用url地址(如果流程中节点配置url设置后,该参数可以传入空字符串)
- * @param mobileFormUrl 手机端审核url地址(如果流程中节点配置url设置后,该参数可以传入空字符串)
- */
- function reStartUserDefinedProcess(id,tableName,bpmType,gridId,formUrl,mobileFormUrl){
- if (typeof id == "undefined"||null ==id||'' ==id ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- if (typeof tableName == "undefined"||null ==tableName||'' ==tableName ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- if (typeof formUrl == "undefined"||null ==formUrl||'' ==formUrl ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- confirm('activitiController.do?reStartUserDefinedProcess&id='+id+'&tableName='+tableName+'&formUrl='+formUrl+'&formUrlMobile='+mobileFormUrl,'确定提交流程吗?',gridId);
- }
- /**
- * 流程撤回
- * @param id 业务id
- * @param tableName 表单名称
- * @param processInstanceId 流程实例id
- * @param gridId 表格(列表grid)id
- */
- function retractProcess(id,tableName,processInstanceId,gridId){
- if (typeof id == "undefined"||null ==id||'' ==id ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- if (typeof tableName == "undefined"||null ==tableName||'' ==tableName ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- $.ajax({
- url : 'pubController.do?checkRetractable&procInstId='+ processInstanceId,
- type : 'POST',
- cache : false,
- success : function(data) {
- var d = data; // ------ $.parseJSON(data);
- if (d.success) {
- confirm('activitiController.do?retractProcess&id='+id+'&tableName='+tableName+'&processInstanceId='+processInstanceId,'确定撤回流程吗?',gridId);
- }else{
- tip(d.msg);
- try{
- reloadTable();
- }catch(e){
- }
- }
- }
- });
- }
- /**
- * 流程撤回
- * @param id 业务id
- * @param tableName 表单名称
- * @param processInstanceId 流程实例id
- * @param gridId 表格(列表grid)id
- */
- function retractProcess1(id,tableName,processInstanceId,gridId){
- if (typeof id == "undefined"||null ==id||'' ==id ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- if (typeof tableName == "undefined"||null ==tableName||'' ==tableName ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- confirm('activitiController.do?retractProcess&id='+id+'&tableName='+tableName+'&processInstanceId='+processInstanceId,'确定撤回流程吗?',gridId);
- }
- /**
- * 流程跟踪
- * @param id 业务id
- * @param processInstanceId 流程实例id
- */
- function processtracking(id,processInstanceId)
- {
- if (typeof id == "undefined"||null ==id||'' ==id ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- if (typeof processInstanceId == "undefined"||null ==processInstanceId||'' ==processInstanceId ) {
- $.messager.alert("error","传入参数错误",'error');
- return ;
- }
- openwindow('流程进度','activitiController.do?processTracking&businessKey='+ id+"&instId="+processInstanceId,gridname,800,600);
- }
- /**
- * 处理意见页面
- * @param title 窗口标题
- * @param width 宽度
- * @param height 高度
- * @param buttonTitle 按钮标题
- * @param taskId 业务id
- * @param nextNodeCount 下一节点数量
- * @param nextNodeId 下一节点id
- */
- function popWriteOption(title,width,height,buttonTitle,taskId,nextNodeCount,nextNodeId){
- $.dialog({
- content: 'url:activitiController.do?popDealOption'
- + "&title="+encodeURIComponent(buttonTitle)
- + "&taskId="+encodeURIComponent(taskId)
- + "&nextNodeCount="+encodeURIComponent(nextNodeCount)
- + "&nextNodeId="+encodeURIComponent(nextNodeId),
- lock : true,
- zIndex: getzIndex(),
- width:500,
- height:160,
- title:'处理意见',
- opacity : 0.3,
- cache:false
- });
- }
- /**
- * 流程流转(流程流转需要输入审核意见)
- * @param title 按钮标题
- * @param taskId 当前任务ID
- * @param nextNodeCount 下一步节点数
- * @param nextNodeId 下一步节点ID
- * @param dealOption 处理意见,如果参数没有传入空值即可
- */
- function dealProcFlow(title,taskId,nextNodeId,nextNodeCount,dealOption){
- var formData = {};
- formData["nextnode"]=nextNodeId;
- formData["nextNodeName"]=title;
- formData["operateType"]=title;
- formData["nextCodeCount"]=nextNodeCount;
- formData["taskId"]=taskId;
- formData["dealOption"]=dealOption;
- formData["model"]="1";
- {
- if(dealOption.trim()<1){
- layer.alert("请输入审核意见");
- //$.messager.alert("error",'請輸入審核意見','error');
- }
- disabledButton();
- //ajax方式提交iframe内的表单
- $.ajax({
- async : true,
- cache : false,
- type : 'POST',
- data : formData,
- url : 'activitiController.do?processComplete',// 请求的action路径
- error : function() {// 请求失败处理函数
- //$.messager.alert("error",'提交申请失败','error');
- layer.alert("提交申请失败");
- },
- success : function(data) {
- var d = data; // ------ $.parseJSON(data);
- var win = frameElement.api.opener;
- if (d.success) {
- frameElement.api.close();
- var msg = d.msg;
- try{
- win.callbackTable(msg);
- }catch(e){
- };
- }else{
- var msg = d.msg;
- $.messager.alert("error",msg,'error');
- }
- return true;
- }
- });
- }
- return true;
- }
- /**
- * 流程流转(流程流转不需要输入审核意见)
- * @param title 按钮标题
- * @param taskId 当前任务ID
- * @param nextNodeCount 下一步节点数
- * @param nextNodeId 下一步节点ID
- * @param isPop 是否是弹出页面办理方式
- */
- function dealProcFlowNoOption(title,taskId,nextNodeId,nextNodeCount,isPop){
- var formData = {};
- formData["nextnode"]=nextNodeId;
- formData["operateType"]=title;
- formData["nextCodeCount"]=nextNodeCount;
- formData["taskId"]=taskId;
- formData["nextNodeName"]=title;
- formData["model"]="1";
- $.ajax({
- async : false,
- cache : false,
- type : 'POST',
- data : formData,
- url : 'activitiController.do?processComplete',// 请求的action路径
- error : function() {// 请求失败处理函数
- $.messager.alert("error",'提交申请失败','error');
- },
- success : function(data) {
- var d = data; // ------ $.parseJSON(data);
- if (d.success) {
- var msg = d.msg;
- if(isPop){
- if (typeof window.parent.callbackTable != "undefined") {
- window.parent.callbackTable(msg);
- }
- }else{
- if (typeof callbackTable != "undefined") {
- callbackTable(msg);
- }
- }
- }else{
- var msg = d.msg;
- $.messager.alert("error",msg,'error');
- }
- }
- });
- }
|