可是再发起付款流程的时候相关人员要知道这个付款是根据哪一个流程而产生的,往往的解决办法都是采用父子流程,可是再发起付款流程的时候相关人员要知道这个付款是根据哪一个流程而产生的,往往的解决办法都是采用父子流程,
新的解决办法是不在采用父子流程,付款申请单可以引入一个或多个流程:
解决办法是外部数据选择控件+表单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>
演示效果: