通达OA工作流引入任意工作流,可以替换父子流程,

来源:互联网 发布:大智慧大数据终端破解 编辑:程序博客网 时间:2024/05/18 21:41

应用场景:采购申请单、出差申请单、合同审批单审批结束后要再发起付款申请的流程,采购申请单、出差申请单、合同审批单审批结束后要再发起付款申请的流程,

可是再发起付款流程的时候相关人员要知道这个付款是根据哪一个流程而产生的,往往的解决办法都是采用父子流程,可是再发起付款流程的时候相关人员要知道这个付款是根据哪一个流程而产生的,往往的解决办法都是采用父子流程,

新的解决办法是不在采用父子流程,付款申请单可以引入一个或多个流程:


解决办法是外部数据选择控件+表单js+php页面。

数据库建立视图:

select `flow_run`.`RUN_ID` AS `run_id`,`flow_run`.`RUN_NAME` AS `run_name`,`flow_run`.`FLOW_ID` AS `flow_id`,`flow_run`.`BEGIN_USER` AS `begin_user`,`flow_run`.`BEGIN_TIME` AS `begin_time` from `flow_run` order by `flow_run`.`RUN_ID` desc limit 0,999999;

工作流设计-->外部数据源设置。

表单设计-->外部数据选择控件。

js代码:

function chakan(){
//alert(g_run_id);
  window.open("chakanliucheng.php?run_id="+g_run_id, "newwindow");
}

接下来就是php页面chakanliucheng.php的代码编写了:

<?include_once( "inc/auth.inc.php" );include_once( "inc/utility_all.php" );include_once( "inc/utility_org.php" );$HTML_PAGE_TITLE = _("查看工作流程");include_once("inc/header.inc.php");?><script src="<?=MYOA_JS_SERVER?>/static/js/module.js?v=<?=MYOA_SYS_VERSION?>"></script><?$run_id=$_REQUEST["run_id"];$query="select data_23 from flow_data_9 where run_id='$run_id' limit 1";$cursor=exequery(TD::conn(),$query);while($row=mysql_fetch_array($cursor)){$liushuihao=$row["data_23"];}if($liushuihao==""){message( _( "警告" ), "请选择相关流程并保存工作流!" );exit;} else {$query1="select flow_id from flow_run where run_id='$liushuihao' limit 1";$cursor1=exequery(TD::conn(),$query1);while($row1=mysql_fetch_array($cursor1)){$flow_id=$row1["flow_id"];}}if($liushuihao!="" and $flow_id!=""){header("Location:/general/workflow/list/print/index.php?actionType=view&MENU_FLAG=&RUN_ID=".$liushuihao."&PRCS_KEY_ID=&FLOW_ID=".$flow_id);}?></body></html>



演示效果:


1 0
原创粉丝点击