📄 turn_next_free.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility.php" );
include_once( "inc/utility_html.php" );
include_once( "../../prcs_role.php" );
$RUN_ROLE = run_role( $RUN_ID, $PRCS_ID );
if ( !find_id( $RUN_ROLE, 1 ) || !find_id( $RUN_ROLE, 2 ) || !find_id( $RUN_ROLE, 3 ) )
{
exit( );
}
$PRCS_TEXT = "\r\n <div style=\"line-height:18px;\">\r\n <a href=\"javascript:;\" id=TOP_FLAG onmouseover=showMenu(this.id,\"1\")>主办人:".menu_arrow( "DOWN" )."</a><input type=hidden name=TOP_FLAG value=0>\r\n <div id=\"TOP_FLAG_menu\" class=attach_div small><a href=\"javascript:set_top(0,'');\">主办人:</a><a href=\"javascript:set_top(2,'');\">无主办人会签</a><a href=\"javascript:set_top(1,'');\">先接收者主办</a></div>\r\n <span id=PRCS_OP_USER_NAME></span><input type=hidden name=PRCS_OP_USER id=PRCS_OP_USER></div>\r\n <div style=\"line-height:18px;\">经办人:<span id=PRCS_USER_NAME></span><input type=hidden name=PRCS_USER id=PRCS_USER></div>\r\n <input type=button class=SmallButton onclick=LoadWindow(\"\") value=\"选择人员\"> \r\n <a href=\"javascript:;\" class=\"orgClear\" onclick=cancel_all(\"\") title=清空人员>清空</a> \r\n <a href=\"javascript:ShowItem('')\">可写字段</a>\r\n ";
if ( $PRCS_ID == 1 )
{
$query = "select * from FLOW_TYPE where FLOW_ID=".$FLOW_ID;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$FORM_ID = $ROW['FORM_ID'];
$FLOW_DOC = $ROW['FLOW_DOC'];
}
$query = "select * from FLOW_FORM_TYPE where FORM_ID=".$FORM_ID;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$PRINT_MODEL = $ROW['PRINT_MODEL'];
}
$ELEMENT_ARRAY = html_element( $PRINT_MODEL );
$ARRAY_COUNT = sizeof( $ELEMENT_ARRAY );
$I = 0;
for ( ; $I < $ARRAY_COUNT; ++$I )
{
$ETITLE = get_attr( $ELEMENT_ARRAY[$I], "TITLE" );
$ECLASS = get_attr( $ELEMENT_ARRAY[$I], "CLASS" );
if ( !( $ECLASS != "DATE" ) && !( $ECLASS != "USER" ) )
{
$ITEM_NAME_ALL .= $ETITLE.",";
}
}
if ( $FLOW_DOC == "1" )
{
$ITEM_NAME_ALL .= "[A@],";
}
$ITEM_NAME_ALL .= "[B@],";
$ITEM_NAME_ALL = str_replace( "+", "+", $ITEM_NAME_ALL );
$ITEM_NAME_ALL = str_replace( "#", "#", $ITEM_NAME_ALL );
}
else
{
$query = "select * from FLOW_RUN_PRCS where RUN_ID=".$RUN_ID." and PRCS_ID={$PRCS_ID} and OP_FLAG=1";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$ITEM_NAME_ALL = $ROW['FREE_ITEM'];
}
}
echo "\r\n<html>\r\n<head>\r\n<title>工作办结</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/theme/";
echo $LOGIN_THEME;
echo "/dialog.css\">\r\n<script src=\"/inc/js/dialog.js\"></script>\r\n<script language=\"javascript\" src=\"/inc/js/attach.js\"></script>\r\n<script Language=\"JavaScript\">\r\nfunction isUndefined(variable) {\r\n\treturn typeof variable == 'undefined' ? true : false;\r\n}\r\nfunction cancel_user(obj,flag,num)\r\n{\r\n\tif(flag==0) //主办人\r\n\t \$(\"PRCS_OP_USER\"+num).value=\"\";\r\n\telse //经办人\r\n\t{\r\n\t\tvar user_str=\$(\"PRCS_USER\"+num).value;\r\n\t\tvar user=obj.parentNode.id;\r\n\t\tif(user_str.indexOf(user)>=0)\r\n\t\t user_str.replace(user,'');\r\n\t}\r\n\tif(is_moz)\r\n\t{\r\n\t\tvar obj_parent=obj.parentNode;\r\n\t\tobj_parent.parentNode.removeChild(obj_parent);\r\n\t}\r\n\telse\r\n\t obj.parentNode.removeNode(true);\r\n}\r\nfunction cancel_all(num)\r\n{\r\n\tdocument.getElementById(\"PRCS_OP_USER\"+num).value=\"\";\r\n\tdocument.getElementById(\"PRCS_OP_USER_NAME\"+num).innerHTML=\"\";\r\n\tdocument.getElementById(\"PRCS_USER\"+num).value=\"\";\r\n\tdocument.getElementById(\"PRCS_USER_NAME\"+num).innerHTML=\"\";\r\n}\r\n\r\nfunction LoadDialogWindow(URL, parent, loc_x, loc_y, width, height)\r\n{\r\n if(is_ie)//window.open(URL);\r\n window.showModalDialog(URL,parent,\"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:\"+width+\"px;dialogHeight:\"+height+\"px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\",true);\r\n else\r\n window.open(URL,parent,\"height=\"+height+\",width=\"+width+\",status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=\"+loc_y+\",left=\"+loc_x+\",resizable=yes,modal=yes,dependent=yes,dialog=yes,minimizable=no\",true);\r\n}\r\nfunction LoadWindow(line_count)\r\n{\r\n URL=\"user_select?FLOW_ID=";
echo $FLOW_ID;
echo "&RUN_ID=";
echo $RUN_ID;
echo "&PRCS_ID=";
echo $PRCS_ID;
echo "&LINE_COUNT=\"+line_count;\r\n loc_y=loc_x=200;\r\n if(is_ie)\r\n {\r\n loc_x=document.body.scrollLeft+event.clientX-event.offsetX;\r\n loc_y=document.body.scrollTop+event.clientY-event.offsetY;\r\n }\r\n LoadDialogWindow(URL,self,loc_x, loc_y, 380, 350);\r\n}\r\n\r\nvar line_count=0;\r\nvar line_begin=0;\r\nfunction add_prcs(line)\r\n{\r\n var mytable=\$(\"prcs_table\");\r\n\r\n if(line_count==0)\r\n {\r\n line_begin=line;\r\n \$(\"del_btn\").style.display=\"\";\r\n }\r\n\r\n line_count++;\r\n \$(\"LINE_COUNT\").value=line_count;\r\n\r\n line=line_begin+line_count-1;\r\n\r\n mynewrow = mytable.insertRow(line);\r\n mynewrow.className=\"TableContent\";\r\n\r\n mynewcell=mynewrow.insertCell(-1);\r\n //mynewcell.width=\"150\";\r\n mynewcell.innerHTML=\"第<b><span class=big4>\"+line+\"</span></b>步:(预设步骤)\";\r\n\r\n mynewcell=mynewrow.insertCell(-1);\r\n var str='';\r\n str += '<div style=\"line-height:18px;\"><a href=\"javascript:;\" id=TOP_FLAG'+line_count+' onmouseover=showMenu(this.id,\"1\")>主办人:";
echo menu_arrow( "DOWN" );
echo "</a><input type=hidden name=TOP_FLAG'+line_count+' value=0> <div id=\"TOP_FLAG'+line_count+'_menu\" class=attach_div small><a href=\"javascript:set_top(0,'+line_count+');\">主办人:</a><a href=\"javascript:set_top(2,'+line_count+');\">无主办人会签</a><a href=\"javascript:set_top(1,'+line_count+');\">先接收者主办</a></div><span id=PRCS_OP_USER_NAME'+line_count+'></span><input type=hidden name=PRCS_OP_USER'+line_count+' id=PRCS_OP_USER'+line_count+'></div>';\r\n str += '<div style=\"line-height:18px;\">经办人:<span id=PRCS_USER_NAME'+line_count+'></span><input type=hidden name=PRCS_USER'+line_count+' id=PRCS_USER'+line_count+'></div>';\r\n str += '<input type=button class=\"SmallButton\" onclick=\"LoadWindow('+line_count+')\" value=选择人员> ';\r\n str += '\\n<a href=\"javascript:;\" class=\"orgClear\" onclick=\"cancel_all('+line_count+')\" title=清空人员>清空</a> ';\r\n str += ' <a href=\"javascript:ShowItem('+line_count+')\">可写字段</a>';\r\n\r\n mynewcell.innerHTML=str;\r\n CorrectButton();\r\n}\r\n\r\nfunction del_prcs()\r\n{\r\n\tif(line_count>0)\r\n\t{\r\n\t var mytable=\$(\"prcs_table\");\r\n\t line=line_begin+line_count-1;\r\n mytable.deleteRow(line)\r\n line_count--;\r\n \$(\"LINE_COUNT\").value=line_count;\r\n }\r\n\r\n if(line_count==0)\r\n \$(\"del_btn\").style.display=\"none\";\r\n}\r\nfunction set_top(flag,line_count)\r\n{\r\n eval(\"document.form1.TOP_FLAG\"+line_count+\".value=\"+flag);\r\n if(flag==\"0\")\r\n \$('TOP_FLAG'+line_count).innerHTML=\"主办人:\";\r\n else if(flag==\"1\")\r\n \$('TOP_FLAG'+line_count).innerHTML=\"先接收者主办\";\r\n else\r\n \$('TOP_FLAG'+line_count).innerHTML=\"无主办人会签\";\r\n \$('TOP_FLAG'+line_count).innerHTML+='";
echo menu_arrow( "DOWN" );
echo "';\r\n if(flag!=\"0\")\r\n {\r\n\t \$(\"PRCS_OP_USER\"+line_count).value=\"\";\r\n\t \$(\"PRCS_OP_USER_NAME\"+line_count).innerHTML=\"\";\r\n }\r\n hideMenu();\r\n}\r\n\r\nfunction set_item(count)\r\n{\r\n\tif(isUndefined(count)) count=\"\";\r\n\t\$(\"tmp_count\").value=count;\r\n\tvar free_item=\$(\"FREE_ITEM\"+count);\r\n\tif(!free_item)\r\n\t{\r\n\t free_item=document.createElement(\"input\");\r\n\t free_item.type=\"hidden\";\r\n\t free_item.name=\"FREE_ITEM\"+count;\r\n\t free_item.id=\"FREE_ITEM\"+count;\r\n\t free_item=document.form1.appendChild(free_item);\r\n }\r\n\tfld_str=\"\";\r\n for (i=0; i< \$(\"select1\").options.length; i++)\r\n {\r\n options_value=\$(\"select1\").options(i).value;\r\n fld_str+=options_value+\",\";\r\n }\r\n\tfree_item.value=fld_str;\r\n\tHideDialog('set_item');\r\n\t//alert(free_item.value);\r\n}\r\nfunction ShowItem(count)\r\n{\r\n\t\$(\"select1\").options.length=0;\r\n\tif(isUndefined(count)) count=\"\";\r\n\t\$(\"tmp_count\").value=count;\r\n\tvar obj=\$('FREE_ITEM'+count);\r\n\tif(obj && obj.value!=\"\")\r\n\t{\r\n\t\tvar item_arr=obj.value.split(\",\");\r\n\t\tfor(i=0;i<item_arr.length-1;i++)\r\n\t\t{\r\n\t\t\tif(item_arr[i]!=\"\")\r\n\t\t\t{\r\n\t\t\tvar my_option = document.createElement(\"OPTION\");\r\n my_option.value=item_arr[i];\r\n my_option.text=item_arr[i];\r\n if(my_option.text==\"[A@]\") my_option.text=\"[流程公共附件]\";\r\n if(my_option.text==\"[B@]\") my_option.text=\"[工作名称/文号]\";\r\n \$(\"select1\").add(my_option);\r\n }\r\n\t\t}\r\n\t}\r\n\tShowDialog('set_item');\r\n \$(\"setBtn\").onclick=function(){set_item(\$(\"tmp_count\").value);};\r\n}\r\n\r\nfunction func_insert()\r\n{\r\n var item_str=\"\";\r\n for (i=select1.options.length-1; i>=0; i--)\r\n item_str += select1.options(i).value+\",\";\r\n \t \r\n for (i=select2.options.length-1; i>=0; i--)\r\n {\r\n \toption_text=select2.options(i).text;\r\n option_value=select2.options(i).value;\r\n if(select2.options(i).selected && item_str.indexOf(option_value+\",\")<0)\r\n { \r\n var my_option = document.createElement(\"OPTION\");\r\n my_option.text=option_text;\r\n my_option.value=option_value;\r\n select1.add(my_option);\r\n }\r\n }//for\r\n}\r\n\r\nfunction func_delete()\r\n{\r\n for (i=select1.options.length-1; i>=0; i--)\r\n {\r\n if(select1.options(i).selected)\r\n select1.remove(i);\r\n }//for\r\n}\r\n\r\nfunction func_select_all1()\r\n{\r\n for (i=select1.options.length-1; i>=0; i--)\r\n select1.options(i).selected=true;\r\n}\r\n\r\nfunction func_select_all2()\r\n{\r\n for (i=select2.options.length-1; i>=0; i--)\r\n select2.options(i).selected=true;\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\" onload=\"function(){var select1=\$('select1');var select2=\$('select2');}\">\r\n\r\n";
$query = "SELECT FLOW_NAME,FREE_PRESET from FLOW_TYPE WHERE FLOW_ID=".$FLOW_ID;
$cursor1 = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$FLOW_NAME = $ROW['FLOW_NAME'];
$FREE_PRESET = $ROW['FREE_PRESET'];
}
$query = "SELECT RUN_NAME from FLOW_RUN WHERE RUN_ID=".$RUN_ID;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$RUN_NAME = $ROW['RUN_NAME'];
}
echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/green_arrow.gif\" align=\"absmiddle\"><span class=\"big3\"> ";
echo $FLOW_NAME;
echo " - 转交下一步骤</span><br>\r\n </td>\r\n </tr>\r\n</table>\r\n<br>\r\n<form action=\"turn_submit_free.php\" method=\"post\" name=\"form1\" onsubmit=\"return CheckForm();\">\r\n<table id=\"prcs_table\" class=\"TableList\" width=\"95%\">\r\n <tr class=\"TableHeader\">\r\n <td nowrap colspan=\"2\"><div style=\"float:left;font-weight:bold\"><img src=\"/images/menu/workflow.gif\" align=\"absmiddle\"> 流水号";
echo $RUN_ID;
echo " - ";
echo $RUN_NAME;
echo "</div></td>\r\n </tr>\r\n\r\n";
$PRCS_ID_I = 1;
for ( ; $PRCS_ID_I <= $PRCS_ID; ++$PRCS_ID_I )
{
$query = "SELECT * from FLOW_RUN_PRCS where RUN_ID=".$RUN_ID." and PRCS_ID={$PRCS_ID_I} order by OP_FLAG desc";
$cursor = exequery( $connection, $query );
$USER_NAME_STR = "";
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$USER_ID = $ROW['USER_ID'];
$PRCS_FLAG = $ROW['PRCS_FLAG'];
$OP_FLAG = $ROW['OP_FLAG'];
$query1 = "SELECT USER_NAME from USER where USER_ID='".$USER_ID."'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$USER_NAME = $ROW['USER_NAME'];
if ( $OP_FLAG )
{
$USER_NAME .= "[主办人]";
}
if ( $PRCS_FLAG == 1 )
{
$USER_NAME_STR .= "<font color=red>".$USER_NAME."(未接收)</font>,";
}
else if ( $PRCS_FLAG == 2 )
{
$USER_NAME_STR .= "<font color=red>".$USER_NAME."(办理中)</font>,";
}
else if ( $PRCS_FLAG == 4 )
{
$USER_NAME_STR .= "<font color=green>".$USER_NAME."(已办结)</font>,";
}
else
{
$USER_NAME_STR .= $USER_NAME.",";
}
}
if ( $PRCS_ID_I == $PRCS_ID && $PRCS_FLAG != 4 && $USER_ID != $LOGIN_USER_ID )
{
$NOT_ALL_FINISH .= $ROW['USER_NAME'].",";
}
if ( $PRCS_ID_I == $PRCS_ID && ( $PRCS_FLAG == 3 || $PRCS_FLAG == 4 ) && $USER_ID == $LOGIN_USER_ID && $OP != "MANAGE" )
{
$TURN_FORBIDDEN = 1;
}
else
{
$TURN_FORBIDDEN = 0;
}
}
$USER_NAME_STR = substr( $USER_NAME_STR, 0, strlen( $USER_NAME_STR ) - 1 );
echo " <tr class=\"TableContent\">\r\n <td nowrap width=\"20%\">第<b><span class=big4>";
echo $PRCS_ID_I;
echo "</span></b>步:";
if ( $PRCS_ID_I == $PRCS_ID )
{
echo "(当前步骤)";
}
echo "</td>\r\n <td>";
echo $USER_NAME_STR;
echo "</td>\r\n </tr>\r\n";
}
if ( $TURN_FORBIDDEN )
{
message( "提示", "已经转交,不能重复转交" );
button_back( );
exit( );
}
$query = "SELECT * from FLOW_RUN_PRCS where RUN_ID=".$RUN_ID." and PRCS_ID='{$PRCS_ID_I}' and PRCS_FLAG=5 order by OP_FLAG desc";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$USER_ID = $ROW['USER_ID'];
$OP_FLAG = $ROW['OP_FLAG'];
$query1 = "SELECT USER_NAME from USER where USER_ID='".$USER_ID."'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$USER_NAME = $ROW['USER_NAME'];
}
if ( $OP_FLAG )
{
$USER_NAME .= "[主办人]";
}
$PRESET .= $USER_NAME.",";
}
if ( $PRESET != "" )
{
$PRESET .= "<input type=hidden name=PRESET value=1><input type=hidden name=PRCS_USER value=1><input type=hidden name=PRCS_OP_USER value=1><input type=hidden name=TOP_FLAG value=1>";
$PRCS_TEXT = $PRESET;
}
echo " <tr class=\"TableData\">\r\n <td>第<b><span class=big4>";
echo $PRCS_ID_I;
echo "</span></b>步:(下一步骤)";
if ( $PRESET != "" )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -