<%@ page contentType="text/html; charset=GBK"  errorPage="../../error.jsp" %>
<%@ page import = "zr.zrpower.common.util.SysPreperty"%>
<%@ page import = "zr.zrpower.entity.sys.SessionUser"%>
<%@ page import = "zr.zrpower.ejb.sys.UIService"%>
<%@ page import = "zr.zrpower.flowengine.service.FlowControl"%>
<%@ page import = "zr.zrpower.flowengine.mode.config.FLOW_CONFIG_PROCESS"%>
<%@ page import = "zr.zrpower.flowengine.mode.config.FLOW_CONFIG_ACTIVITY"%>
<%@ page import = "zr.zrpower.flowengine.mode.monitor.FLOW_RUNTIME_PROCESS"%>
<%@ page import = "java.lang.Object"%>
<%@ page import = "zr.zrpower.flowengine.runtime.ActFlowRun"%>
<%@ page import = "zr.zrpower.common.util.DateWork"%>


<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
FlowControl FControl = new FlowControl();

String strWEBPATH = "";
strWEBPATH = SysPreperty.getProperty().AppUrl;

//得到独立运转流程的单位编号位数
int len = 2;

String ImagePath = "";
FLOW_CONFIG_PROCESS Process = null;
FLOW_CONFIG_ACTIVITY activity = null;

String strExecute_No=""; //流转ID
String strWorkflow_No=""; //流程ID
String strHelp="";        //帮助内容
String strFlowLink="";    //关联流程
String strFlowActivityLink="";//流程步骤示例
String strFlowName="";    //流程名称
String StrNode_No_S="";   //当前节点编号
String strM_Node_No_E=""; //下一节点
String strM_Node_No_S_E="";//下一节点选择后
String strS_Node_No_E=""; //上一节点
String strS_Node_No_S_E=""; //选择后的上一节点
String strFormID="";      //表单ID
String strTitleName="";   //标题名称
String strOtherID="";     //流程的关联值
String strParentID="";    //父ID
String strParentID1="";    //父ID1
String strRID ="";         //关联流程
String strActivityName="";//当前步骤的名称
String strActivityType="";//当前步骤的类型
String strFlowDoLog="";   //流程的处理记录
String strDocID = "";     //流程配置文档的ID
String strIdentification = "";//流程标识

String strCollType="";    //采集引擎调用类型,1全部是只读形式显示，否则按流程设置的显示
String strisNew="0";      //是否是新建流程,1是，0否
String unitid = "";
String tmpUnitid = "";    //临时单位编号
boolean isDoFlow = false; //当前用户是否拥有处理权限
String strCollActivityID="";//调用采集引擎的活动ID
String strFristActivityID="";//第一个的活动ID
String strNeedNewFlow="";//必须新建但还没有新建的流程名称
String strtype = "";//流程调用特殊类型主要用于刷新父级页面
String strISwhere = "0";//与当前步骤相关的线上是否设置有和字段值相关的条件

String AttType = "4";     //附件类型
String AttMessage = "";   //附件提示
int Attnum1 =0;           //需上传的附件数
int Attnum2 =0;           //已经上传的附件数
int Attnum3 =0;           //还需上传的附件数
String strFlowFormType ="";//流程的表单类别
String strFormPath ="";//流程自定义表单页面的路径
String strISSAVE ="0"; //是否保存过
String strTYPE ="";    //类别 1流程管理
String strISBRANCH="";//多路分支是否在操作按钮上实现

//得到流程标识
strIdentification = request.getParameter("FlowNo");
if (strIdentification==null){strIdentification="";}
strWorkflow_No = strIdentification;
strExecute_No = request.getParameter("ExecuteNo");
if (strExecute_No==null){strExecute_No="";}
strFormID = request.getParameter("FormID");
if (strFormID==null){strFormID="";}
strOtherID = request.getParameter("OtherID");
if (strOtherID==null){strOtherID="";}
strParentID = request.getParameter("ParentID");
if (strParentID==null){strParentID="";}
strParentID1 = request.getParameter("ParentID1");
if (strParentID1==null){strParentID1="";}
strRID = request.getParameter("RID");
if (strRID==null){strRID="";}
strISSAVE = request.getParameter("ISSAVE");
if (strISSAVE==null){strISSAVE="";}
strTYPE = request.getParameter("TYPE");
if (strTYPE==null){strTYPE="";}
strtype = request.getParameter("type");
if (strtype==null){strtype ="";}
strISBRANCH=request.getParameter("ISBRANCH");
if(strISBRANCH==null)
{
  strISBRANCH="";
}

//接收分送阅读时的活动id
String strsendid = request.getParameter("sendid");
if (strsendid==null){strsendid ="";}
//--------------
String strRECORDID = "";
String strTakeBack = "0";
String strFlowFormPath = "";
String strWindowTitle = "";
String strISSAVE1 = "";
//后退保存数据
String strISSAVE2 = "";
//前进必填留言
String strISLEAVE1 = "";
//后退必填留言
String strISLEAVE2 = "";
//活动处理前填写表单地址
String strADDFORMPATH = "";
String strADDFORMWIDTH = "";
String strADDFORMHEIGHT = "";
String strADDFORMMESSAGE = "";
String showidea = "";
ActFlowRun ActFlowRun = null;
String showuserid = "";
String showuserunit = "";
String UserImage = "";
String UserCss = "";
String StrFlowState = "";

try {
try {
   showuserid = user.getUserID();
}
catch (Exception ex2) {
   user = (SessionUser)session.getAttribute("userinfo");
   showuserid = user.getUserID();
}



showuserunit = user.getUnitID();
UserCss = user.getUserCSS();
UserImage = user.getUserImage();
ImagePath = SysPreperty.getProperty().AppUrl+"zrsysmanage/images/"+UserImage+"/";//图片路径


unitid = user.getUnitID().substring(0,len);//单位编号(前6位表示行政区划)

if (strExecute_No.length()==0)//生成文件编号
{
     strRECORDID = FControl.GlobalID(showuserid);
}

//得到标题----
if (strExecute_No.length()>0)
{strTitleName = FControl.GetTitle(strExecute_No);}

//初始化流程默认运转参数------------------
ActFlowRun = new ActFlowRun();

//-------------------------------------------
if (strExecute_No!=null && strExecute_No.length()>0){
   FLOW_RUNTIME_PROCESS Fprocess = null;
   Fprocess = FControl.GetFlowRuntimeprocess(strExecute_No);

   StrFlowState = Fprocess.getSTATE();

   //根据流程流转表的ID得到流程标识
   strWorkflow_No = Fprocess.getFLOWID();
   //根据流程流转表的ID得到流程当前步骤
   StrNode_No_S = Fprocess.getCURRACTIVITY();

   //是分送阅读时-------------
  if (strsendid.length()>0)
  {StrNode_No_S = strsendid;}
  //-----------------------------

   strRECORDID = Fprocess.getRECORDID();//得到附件ID

   //根据流程标识得到流程ID
   strWorkflow_No = FControl.GetFlowID(strWorkflow_No);


}
else
{
   //根据流程标识得到流程ID
   strWorkflow_No = FControl.GetFlowID(strWorkflow_No);

   //根据流程ID得到当前流程第一个活动(步骤)的ID
   StrNode_No_S = FControl.GetFirstActivityID(strWorkflow_No);

   strisNew="1";//是新建流程
}

if (StrNode_No_S.length()==0 || StrNode_No_S==null)
{
  //第一个步骤编号
  strFristActivityID = FControl.GetFirstActivityID(strWorkflow_No);
  StrNode_No_S = strFristActivityID;
}
//根据流程ID得到流程实体
Process = FControl.GetFlowProcess(strWorkflow_No);

//根据流程编号得到流程名称
strFlowName = Process.getNAME();
//根据活动ID得到活动实体
activity = FControl.GetFlowActivity(StrNode_No_S);

strISBRANCH=activity.getISBRANCH();

ActFlowRun.FlowInitDefault(strExecute_No,strIdentification,strOtherID,strParentID,strParentID1,strRID,strRECORDID,strISBRANCH);


//得到活动的名称
strActivityName =activity.getNAME();
//根据当前活动的编号得到下一步的分支活动
strM_Node_No_E = FControl.GetNextActivityID(StrNode_No_S,ActFlowRun,user);
//根据当前活动及下一步的分支活动串得到包含接收类型的活动串
strM_Node_No_S_E = FControl.GetNextActivityTypeList(StrNode_No_S,strM_Node_No_E);
//根据当前活动的编号得到上一步的分支活动
strS_Node_No_E = FControl.GetUpSelectActivityID(StrNode_No_S,ActFlowRun,user);
//根据当前活动及上一步的分支活动串得到包含接收类型的活动串
strS_Node_No_S_E = FControl.GetNextActivityTypeList(StrNode_No_S,strS_Node_No_E);

strISwhere = FControl.GetISwhere(StrNode_No_S);


//得到当前流程相关的可操作流程
if (strExecute_No!=null && strExecute_No.length()>0){
   //得到关联流程的标识串
   strFlowLink = FControl.GetNextIFlowID(StrNode_No_S,ActFlowRun,user);
   //得到关联的但还没有新建的关联流程名
   if (strFlowLink.length()>0)
   {strNeedNewFlow = FControl.GetNeedFlowList(strFlowLink,StrNode_No_S,ActFlowRun);
   //初始化流程默认运转参数------------------
   ActFlowRun.FlowInitDefault(strExecute_No,strIdentification,strOtherID,strParentID,strParentID1,strExecute_No,strRECORDID,strISBRANCH);
   strFlowLink = FControl.GetFlowRunIDHTML(strFlowLink,"FlowRunWindow.jsp","table_title4.gif",user.getUserImage(),unitid,ActFlowRun,user);
   //初始化流程默认运转参数------------------
   ActFlowRun.FlowInitDefault(strExecute_No,strIdentification,strOtherID,strParentID,strParentID1,strRID,strRECORDID,strISBRANCH);
   }
}


//得到流程跟踪记录
if (strExecute_No.length()>0)
{strFlowDoLog = FControl.GetFlowDoLog(strExecute_No,ImagePath);}



//得到流程配置文档的ID
strDocID = Process.getDOCID();

//得到当前步骤的类型
strActivityType= activity.getTYPE();
//得到当前用户是否拥有处理权限
if (strExecute_No.length()>0)
{
isDoFlow = FControl.GetIsFlowDoList(strExecute_No,ActFlowRun,user);
}

//得到调用采集引擎是否全为只读的类型
if ((strActivityType.equals("2") || !isDoFlow) && strisNew.equals("0"))
{
  //strCollType="1";

  if (isDoFlow==false && strExecute_No.length()>0)
  {strCollType="1";}

  //没有权限或完成的流程显示按最后一步显示
  strCollActivityID = FControl.GetLastlyActivityID(strWorkflow_No);//将用最后一步的流程属性来显示采集引擎


}else
{
 strCollActivityID =StrNode_No_S;
}



//得到流程处理图示
strFlowActivityLink=FControl.GetFlowActivityLink(strWorkflow_No,StrNode_No_S,"../FlowShow/FlowShowMap/ShowActivity.jsp");

//根据活动ID得到活动实体
activity = FControl.GetFlowActivity(strCollActivityID);

//得到当前活动的附件类型
AttType = activity.getATTTYPE();
Attnum1 = activity.getATTNUM();
//多路分支按钮是否在操作按钮上
strISBRANCH=activity.getISBRANCH();

//根据流程编号得到流程的表单类别
strFlowFormType = Process.getFORMTYPE();
//得到当前活动的自定义表单链接路径
strFormPath = activity.getFORMPATH();
if (strFormPath==null){strFormPath="";}
if (strFormPath.length()>0)//为自定义表单形式
{
   if (strFormPath.length()>0)
   {
     if (strFormPath.lastIndexOf("?") > -1)//已经带参数
     {
       strFormPath = strFormPath + "&RUNID="+strExecute_No+"&COLL_AID="+strCollActivityID+"&coll_PKID="+strFormID+"&coll_FKID="+strOtherID+"&PAID1="+strParentID+"&PAID2="+strParentID1;
     }else
     {
       strFormPath = strFormPath + "?RUNID="+strExecute_No+"&COLL_AID="+strCollActivityID+"&coll_PKID="+strFormID+"&coll_FKID="+strOtherID+"&PAID1="+strParentID+"&PAID2="+strParentID1;
     }
   }else
   {
     strFormPath ="flowmessage.jsp";
   }
}

//流程数据显示完整路径
if (isDoFlow==false && strExecute_No.length()>0)
{
   strCollType = "1";
}
if (strFormPath.length()>0)//为自定义表单形式
{
   strFlowFormPath = strFormPath;
}else
{
   strFlowFormPath = "../../collengine.do?COLL_AID="+strCollActivityID+"&coll_PKID="+strFormID+"&coll_FKID="+strOtherID+"&coll_MODE=2&coll_READ="+strCollType+"&PAID1="+strParentID+"&PAID2="+strParentID1+"&RID="+strRID;
}

strWindowTitle = "["+strFlowName+"]→["+strActivityName+"]";

//得到是否显示收回按钮(1是0否)

if (isDoFlow==false)
{
  strTakeBack = FControl.GetIsTakeBack(strExecute_No,showuserid);
}

//前进保存数据
strISSAVE1 = activity.getISSAVE1();
//后退保存数据
strISSAVE2 = activity.getISSAVE2();
//前进必填留言
strISLEAVE1 = activity.getISLEAVE1();
//后退必填留言
strISLEAVE2 = activity.getISLEAVE2();
//活动处理前填写表单地址
strADDFORMPATH = activity.getADDFORMPATH();
if (strADDFORMPATH==null){strADDFORMPATH="";}
//活动处理前填写表单宽
strADDFORMWIDTH = activity.getADDFORMWIDTH();
if (strADDFORMWIDTH==null){strADDFORMWIDTH="";}
//活动处理前填写表单高
strADDFORMHEIGHT = activity.getADDFORMHEIGHT();
if (strADDFORMHEIGHT==null){strADDFORMHEIGHT="";}
//活动处理前非正确填写表单提示
strADDFORMMESSAGE = activity.getADDFORMMESSAGE();
if (strADDFORMMESSAGE==null){strADDFORMMESSAGE="";}
if (strADDFORMMESSAGE.trim().length()==0)
{
  strADDFORMMESSAGE = "请先填写系统设置的表单!";
}

showidea = "";
if (isDoFlow==false && strExecute_No.length()>0)
{showidea = "none";

}

if (strADDFORMPATH.trim().length()>0)
{
     if (strADDFORMPATH.lastIndexOf("?") > -1)//已经带参数
     {
       strADDFORMPATH = "../../"+strADDFORMPATH + "&RUNID="+strExecute_No+"&COLL_AID="+strCollActivityID+"&coll_PKID="+strFormID+"&coll_FKID="+strOtherID+"&PAID1="+strParentID+"&PAID2="+strParentID1;
     }else
     {
       strADDFORMPATH = "../../"+strADDFORMPATH + "?RUNID="+strExecute_No+"&COLL_AID="+strCollActivityID+"&coll_PKID="+strFormID+"&coll_FKID="+strOtherID+"&PAID1="+strParentID+"&PAID2="+strParentID1;
     }
}





}
catch (Exception ex1) {

}
%>
<HTML>
<HEAD>
<TITLE><%=SysPreperty.getProperty().SystemName%><%=SysPreperty.getProperty().Versoin%></TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=GBK">
<link REL="stylesheet" type="text/css" href="../../zrsysmanage/css/<%=user.getUserCSS()%>">
<SCRIPT LANGUAGE="JavaScript" src="../../zrsysmanage/script/Public.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="../js/Workflow.js"></SCRIPT>
<script src="../../zrsysmanage/html5/script/jquery-2.0.3.min.js" type="text/jscript" ></script>
<script src="../../zrsysmanage/html5/layer/layer.js" type="text/jscript" ></script>

<SCRIPT language="javascript" type="text/javascript">
var isSave = "0";


function showTable(){

    if (document.getElementById("show1").style.display=='none')
       {document.getElementById("show1").style.display='';}
    else
       {document.getElementById("show1").style.display='none';}

}


function save_return(PKID,FKID,TITLE){
   if (PKID==null || PKID.length==0)
   {alert("保存失败！");
   }else{
   var strtype = webform.type.value;
   var strExecute_No = webform.Execute_No.value;
   var strFormID = webform.FormID.value;


   var attnum1 = webform.ATTNUM.value;
   var atttype = webform.ATTTYPE.value;
   if (atttype=="2" || atttype=="3")//可上传附件
   {
    var attnum2 = document.getElementById('att').contentWindow.document.RegForm.ATTNUM.value;
    if (attnum2<attnum1)//附件没有上传完
    {
      var attnum3 = attnum1-attnum2;
      webform.AttMessage.value ="请先上传附件!\r\n"+"已上传"+attnum2+"个,还需上传"+attnum3+"个。";
    }else
    {
        webform.AttMessage.value ="";
    }
   }

   if ((strExecute_No.length==0 && strFormID.length==0) || strExecute_No.length>0)//第一次保存，避免第一次重复增加
   {
     webform.FormID.value = PKID;


     if (FKID.length>4)
     {
         webform.OtherID.value = FKID;
     }else
     {
	 webform.OtherID.value = PKID;
     }
     var par1= webform.ParentID.value;
     var par2= webform.ParentID1.value;
     if (par1.length==0)
     {
        webform.ParentID.value = PKID;
     }
     if (par2.length==0)
     {
        webform.ParentID1.value = PKID;
     }

     webform.TitleName.value = TITLE;
     if (strtype=="1")
     {//保存流程
        var DoIdea = webform.DoIdea.value;
        if (strExecute_No.length==0 || (strExecute_No.length>0 && DoIdea.length>0))
        {
         doSave();
        }
     }else
     {
     doSubmit();
     }
   }else
   {ShowWainForWin("none");
    if (strExecute_No.length==0 && strFormID.length>0)
    {doSave();}
    else
    {
      doSubmit();
    }
   }
    ShowWainForWin("none");
   }
   ShowWainForWin("none");
}

function saveColl(type){
   if (isSave=="1")
   {return;}
   isSave=="1";
   //显示提示
   ShowWainForWin("");
   webform.type.value = "";//清空
   webform.type.value = type;
   //调用采集引擎保存

  //前进保存数据
  var ISSAVE1=webform.ISSAVE1.value;
  //前进必填留言
  var ISLEAVE1=webform.ISLEAVE1.value;
  if (type=="2" && ISLEAVE1=="1")//提交必填留言
  {
      var DoIdea = webform.DoIdea.value;
      if (DoIdea.length==0)
      {
         alert("请先填写处理意见!");
         ShowWainForWin("none");
         return;
      }
  }
  if (type=="2" && ISSAVE1=="0")//提交不保存数据的情况
  {
      var atttype = webform.ATTTYPE.value;
      if (atttype=="2" || atttype=="3")//可上传附件
      {
        var attnum1 = webform.ATTNUM.value;
        var attnum2 = document.att.document.RegForm.ATTNUM.value;
        if (attnum2<attnum1)//附件没有上传完
        {
          var attnum3 = attnum1-attnum2;
          webform.AttMessage.value ="请先上传附件!\r\n"+"已上传"+attnum2+"个,还需上传"+attnum3+"个。";
        }else
        {
          webform.AttMessage.value ="";
        }
      }
      doSubmit();
      return;
  }

  var isFalse = window.CollDataTable.saveColl();
  if (isFalse!=true)
  {ShowWainForWin("none");}
  //return isFalse;
}
//弹出最大窗体(打开案件流程)
function OpenCaseFlowWindow(strURL){
  var w,h,s;
  var OtherID = document.webform.OtherID.value;
  var ParentID = document.webform.ParentID.value;
  var ParentID1 = document.webform.ParentID1.value;

  var MenuWindow = null;
  w = screen.availWidth - 4;
  h = screen.availHeight - 43;
  s = "directories=no,left=0,top=0,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,width=" + w + ",height=" + h;
  if(strURL.indexOf("OtherID=")==-1)
  {
    strURL=strURL+"&OtherID="+OtherID+"&ParentID="+ParentID+"&ParentID1="+ParentID1+"&type=1";
  }
  MenuWindow = window.open("../.."+strURL,"_blank",s);
  MenuWindow.moveTo(-4,-4);
  MenuWindow.focus();
}

function closeFload()
{
  //需刷新父窗口
  <%if (strISSAVE.equals("1")){%>

   <%if (strExecute_No==null || strExecute_No.length()==0){
        if (strtype.equals("1")){
        %>
        //刷新流转过程中的上一个窗口
        window.opener.location.reload();

        <%}else{%>
        //刷新总台上的页面
        window.opener.location.reload();
        window.opener.parent.flowLeft.location.reload();

   <%}}else{if (!strtype.equals("0")){%>
       //刷新流转过程中的上一个窗口
        window.opener.location.reload();
   <%}}}%>
}
//屏幕JS错误
function killErrors() {
   return true;
}
window.onerror = killErrors;
//根据分辨率显示
function resetup()
{
  var atttype = "<%=AttType%>";
  //var sheight = window.screen.height;
  var sheight = document.body.clientHeight;
  document.getElementById("show1").style.height=sheight-50;

  if (atttype=="2" || atttype=="3" || atttype=="4" )
  {
     if (atttype=="2" || atttype=="3")
     {
       document.getElementById("CollDataTable").style.height=sheight-225;
     }else
     {
       document.getElementById("CollDataTable").style.height=sheight-175;
     }

  }
  else
  {
    document.getElementById("CollDataTable").style.height=sheight-138;
  }

}

setTimeout("resetup()",300);
</SCRIPT>
</HEAD>

<BODY class="BodyMain"  onunload="closeFload()">
<Form name="webform" method="post" action="../../flowrun.do">
<input type="hidden" name="Unit" value="<%=showuserunit%>">                 <!--单位编号-->
<input type="hidden" name="type" value="">                                      <!--提交类型1:保存2:提交-->
<input type="hidden" name="Identification" value="<%=strIdentification%>">      <!--流程标识-->
<input type="hidden" name="Workflow_No" value="<%=strWorkflow_No%>">            <!--流程编号-->
<input type="hidden" name="RID" value="<%=strRID%>">                            <!--关联流程(流程流转ID)-->
<input type="hidden" name="Node_No_S" value="<%=StrNode_No_S%>">                <!--当前节点编号-->
<input type="hidden" name="M_Node_No_E" value="<%=strM_Node_No_E%>">            <!--下一节点编号(多分支)-->
<input type="hidden" name="M_Node_No_S_E" value="<%=strM_Node_No_S_E%>">          <!--下一节点编号(多分支选择后)-->
<input type="hidden" name="S_Node_No_E" value="<%=strS_Node_No_E%>">            <!--上一节点编号(多分支)-->
<input type="hidden" name="S_Node_No_S_E" value="<%=strS_Node_No_S_E%>">          <!--上一节点编号(多分支选择后)-->
<input type="hidden" name="OptCmd" value="">                                    <!--记录属性按钮命令值-->
<input type="hidden" name="OptCmd_Name" value="">                               <!--记录属性按钮命令值中文-->
<input type="hidden" name="UserNo" value="<%=showuserid%>">                     <!--当前用户编号-->
<input type="hidden" name="Execute_No" value="<%=strExecute_No%>">              <!--流程运转编号-->
<input type="hidden" name="ParentID" value="<%=strParentID%>">                  <!--父流程ID值或父表单记录值-->
<input type="hidden" name="ParentID1" value="<%=strParentID1%>">                <!--父流程ID1值或父表单记录值-->
<input type="hidden" name="FormID" value="<%=strFormID%>">                      <!--业务表的ID值-->
<input type="hidden" name="TitleName" value="<%=strTitleName%>">                <!--业务表的标题名称-->
<input type="hidden" name="OtherID" value="<%=strOtherID%>">                    <!--关联字段的ID值-->
<input type="hidden" name="Path" value="/ZrWorkFlow/FlowRun/FlowRunWindow.jsp">   <!--当前文件的路径-->
<input type="hidden" name="Do_User_Nos" value="">                               <!--选择的处理人编号-->
<input type="hidden" name="NeedNewFlow" value="<%=strNeedNewFlow%>">            <!--必须新建但还未建的流程名称-->
<input type="hidden" name="AttMessage" value="<%=AttMessage%>">                 <!--当前步骤附件情况提示-->
<input type="hidden" name="FlowFormPath" value="<%=strFlowFormPath%>">          <!--流程表单完整路径-->
<input type="hidden" name="MsgType" value="0">                                  <!--短信提示类别-->
<input type="hidden" name="ISSAVE1" value="<%=strISSAVE1%>">                    <!--前进保存数据-->
<input type="hidden" name="ISSAVE2" value="<%=strISSAVE2%>">                    <!--后退保存数据-->
<input type="hidden" name="ISLEAVE1" value="<%=strISLEAVE1%>">                  <!--前进必填留言-->
<input type="hidden" name="ISLEAVE2" value="<%=strISLEAVE2%>">                  <!--后退必填留言-->
<input type="hidden" name="ADDFORMPATH" value="<%=strADDFORMPATH%>">            <!--活动处理前填写表单地址-->
<input type="hidden" name="ADDFORMWIDTH" value="<%=strADDFORMWIDTH%>">          <!--活动处理前填写表单宽-->
<input type="hidden" name="ADDFORMHEIGHT" value="<%=strADDFORMHEIGHT%>">        <!--活动处理前填写表单高-->
<input type="hidden" name="ADDFORMMESSAGE" value="<%=strADDFORMMESSAGE%>">      <!--活动处理前非正确填写表单提示-->
<input type="hidden" name="RECORDID" value="<%=strRECORDID%>">                  <!--附件ID-->
<input type="hidden" name="ATTNUM" value="<%=Attnum1%>">                        <!--需要上传附件数-->
<input type="hidden" name="ATTTYPE" value="<%=AttType%>">                       <!--附件类型-->
<input Type="hidden" name="ISBRANCH" value="<%=strISBRANCH%>">                  <!--多路分支按钮是否在操作按钮上-->
<input Type="hidden" name="ISWHERE" value="<%=strISwhere%>">                    <!--与当前步骤相关联的线上是否有与字段相关的条件-->
<input Type="hidden" name="WEBPATH" value="<%=strWEBPATH%>">                    <!--web路径-->
<input Type="hidden" name="SELECTDEPTID" value="">                              <!--自定义指定部门ID或人员ID,多个ID间用逗号分隔,用于选人时指定相应部门下的角色或直接指定人员-->
<input Type="hidden" name="WINDOWTYPE" value="<%=user.getUserWINDOWTYPE()%>">   <!--肤色类型-->



<!--HTML Head表单头显示[显示内容,图标文件,用户肤色的图片文件夹]-->
<TABLE border='0' width='100%' height='100%' cellSpacing='0' cellPadding='0'>
  <TR>
     <TD width='100%' height='100%' valign='center' align='center'>
       <TABLE width='100%' height='100%' class='Window' cellSpacing='0' cellPadding='0' align='center' border='0'>
         <TR>
           <TD height='22' width='100%'>
             <TABLE border='0' width='100%' height='100%' cellspacing='0' cellpadding='0'>
               <TR>
                 <TD align='left' background='<%=ImagePath%>WindowTitle.gif' align=center>&nbsp;<img align='absmiddle' src='<%=ImagePath%>IcoTitle.gif'>&nbsp;<font class='titleFont'><%=strWindowTitle%></font></TD><td align="right" background='<%=ImagePath%>WindowTitle.gif'>

                       <table cellspacing="0" cellpadding="0" border='0'><tr>

                        <!--得到当前流程当前步骤的按钮-->
                        <%=FControl.GetActivityButton(strExecute_No,StrNode_No_S,"1","2",ActFlowRun,user)%>
                        <!--得到流程创建人的按钮-->
                        <%=FControl.GetCreateButton(strExecute_No,showuserid,"1","2",ActFlowRun,user)%>
                        <!--得到已经分配过的公共类型的按钮-->
                        <%if (StrFlowState.equals("4")){%>
                        <%=FControl.GetDPublicButton(strWorkflow_No,"1","2",ActFlowRun,user)%>
                        <%}%>
                        <!--得到公共类型的按钮-->
                        <%=FControl.GetPublicButton("1","2",ActFlowRun,user)%>
                       </tr></table>

                </td>
               </TR>
             </TABLE>
           </TD>
         </TR>



          <tr><td align="center">

          <table  border='0' width="100%"  height="100%" cellspacing="0" cellpadding="0" align=center>
           <tr>

             <td valign="top">
             <div id="show1" style="padding-left:0;padding-top:0;width:100%;height:800;overflow:auto">
             <table border=0  cellspacing='0' cellpadding='0' width='180' height='100%' align=center>
                   <tr><td>


                  <table cellSpacing="0" cellPadding="0" border="0" height="100%" width="100%" class="MenuTbl"><tr><td>

                           <table cellSpacing="0" cellPadding="0" border="0" height="100%" width="100%" class="MenuTbl">
                                  <tr><td align='left' width='100%' height=28  background='<%=ImagePath%>menu_title_back1.jpg'> &nbsp;&nbsp;&nbsp;<img src='<%=ImagePath%>menu_a_02.gif' border='0' align='absmiddle'>&nbsp;<font class="titlefont">处理情况</font></td></tr>
                                  <tr><td  id=MENU name=001 height=100% valign=top background='<%=ImagePath%>menu_back.jpg'>



                                         <%=strFlowDoLog.replaceAll("<tr><td><a href=#","<tr><td><a href=#  style='color:red'")%>
                                         <br>
                                           <%=strFlowActivityLink%>

                                  </td></tr>

                                  <%if (strHelp.length()>0){%>
                                  <tr><td align='left' width='100%' height=28  background='<%=ImagePath%>menu_title_back1.jpg'>&nbsp;&nbsp;&nbsp;<img src='<%=ImagePath%>menu_a_04.gif' border='0' align='absmiddle'>&nbsp;<font class="titlefont">操作帮助</font></td></tr>
                                  <tr><td  id=MENU name=002 height=100% valign=top background='<%=ImagePath%>menu_back.jpg'>

                                      <br><%=strHelp%>
                                    </td></tr>
                                  <%}%>
                        </table>


                      </td>
                     </tr>

                    <%if (strFlowLink.length()>0){%>
                    <tr><td align='left' width='100%' height=28  background='<%=ImagePath%>menu_title_back1.jpg'>&nbsp;&nbsp;&nbsp;<img src='<%=ImagePath%>menu_a_03.gif' border='0' align='absmiddle'>&nbsp;<font class="titlefont">可新建的流程</font></td></tr>
                    <tr><td height="145">

                            <%=strFlowLink%>

                    </td></tr>
                    <%}%>
                  </table>

             </td></tr></table>

             </div>
             </td>

             <td class=Pnld  background='<%=SysPreperty.getProperty().AppUrl%>/zrsysmanage/images/<%=UserImage%>/menu_title_left_back.jpg' onMouseOver="if (document.getElementById('show1').style.display=='none') document.getElementById('left_image').src='<%=SysPreperty.getProperty().AppUrl%>/zrsysmanage/images/<%=UserImage%>/menu_title_left3.gif'; else document.getElementById('left_image').src='<%=SysPreperty.getProperty().AppUrl%>/zrsysmanage/images/<%=UserImage%>/menu_title_left1.gif';" onMouseOut="if (document.getElementById('show1').style.display=='none') document.getElementById('left_image').src='<%=SysPreperty.getProperty().AppUrl%>/zrsysmanage/images/<%=UserImage%>/menu_title_left2.gif'; else document.getElementById('left_image').src='<%=SysPreperty.getProperty().AppUrl%>/zrsysmanage/images/<%=UserImage%>/menu_title_left.gif';" onclick="showTable();">

                <table border='0' width="7"  height="100%" cellspacing="0" cellpadding="0" align=center>
                 <tr>
                  <td>
                    <img id="left_image" name="left_image" src='<%=SysPreperty.getProperty().AppUrl%>/zrsysmanage/images/<%=UserImage%>/menu_title_left.gif' border='0' align='absmiddle' alt="展开/关闭">
                </td></tr></table>

            </td>
             <td  width="100%" valign="top">

             <table border='0' width="100%"  height="500px" cellspacing="0" cellpadding="0" align=center>
                 <tr>
                  <td height="100%"  valign="top">

                     <iframe id=CollDataTable name=CollDataTable src="<%=strFlowFormPath%>" border=1 frameborder=1 width=100% height=500px></iframe>


                  </td>
                 </tr>
                 <tr><td  >

                 <%
                 String strAttFormID = strRECORDID;
                 %>

                     <%if (!AttType.equals("2") && !AttType.equals("3") && !AttType.equals("4")){%>
                        <div  id="attdiv"  style="width:'100%';height:'0px';overflow:'hidden';display:''">
                        </div>
                     <%}%>
                     <%if (AttType.equals("2")){%>
                     <div  id="attdiv"  style="width:'100%';height:'85px';overflow:'hidden';display:''">
                      <table cellspacing="0" cellpadding="0" border='0' width="100%"><tr>
                         <td height="85px">
                         <iframe id=att name=att src="../../zrsysmanage/att/AttAddFrm.jsp?FLOWID=<%=strIdentification%>&DOCID=<%=strAttFormID%>&AID=<%=strCollActivityID%>&TYPE=1" border=0 frameborder=0 width=100% height="85px"></iframe>
                         </td>
                      </tr></table>
                      </div>
                      <%}%>
                      <%if (AttType.equals("3")){%>
                      <div  id="attdiv"  style="width:'100%';height:'85px';overflow:'hidden';display:''">
                      <table cellspacing="0" cellpadding="0" border='0' width="100%"><tr>
                         <td height="85px">
                         <iframe id=att name=att src="../../zrsysmanage/att/AttAddFrm.jsp?FLOWID=<%=strIdentification%>&DOCID=<%=strAttFormID%>&AID=<%=strCollActivityID%>&TYPE=2" border=0 frameborder=0 width=100% height="85px"></iframe>
                         </td>
                      </tr></table>
                      </div>
                      <%}%>
                      <%if (AttType.equals("4")){%>
                      <div  id="attdiv"  style="width:'100%';height:'38px';overflow:'hidden';display:''">
                      <table cellspacing="0" cellpadding="0" border='0' width="100%"><tr>
                         <td height="38px">
                         <iframe id=att name=att src="../../zrsysmanage/att/AttAddFrm.jsp?FLOWID=<%=strIdentification%>&DOCID=<%=strAttFormID%>&AID=<%=strCollActivityID%>&TYPE=3" border=0 frameborder=0 width=100% height="38px"></iframe>
                         </td>
                      </tr></table>
                      </div>
                      <%}%>

                </td></tr>
                 <tr><td>
                     <center>
                     <div  id="idea"  style="width:'100%';height:50px;overflow:'hidden';display:'<%=showidea%>'">
                      <table cellspacing="0" cellpadding="0" border='0'><tr>
                         <td valign="middle">处理意见：</td><td valign="middle"><textarea name="DoIdea" rows="2" cols="50"></textarea><!--处理意见--></td>
                              <%=userUI.ClickButton1("选择","SelectIdea();","buttonSure.gif",UserImage)%>
                      </tr></table>
                      </div>
                      </center>
                </td></tr>
                <tr><td height="5">
                </td></tr>
                 <tr>
                      <td align="center">

                       <table cellspacing="0" cellpadding="0" border='0'><tr height="28px">

                        <%if(strISBRANCH.equals("1")) {%>
                        <!--得到当前流程当前步骤的按钮-->
                        <%=FControl.GetActivityButton(strExecute_No,StrNode_No_S,"2",ActFlowRun,user,strM_Node_No_E,strS_Node_No_E)%>
                        <%}else{%>
                        <!--得到当前流程当前步骤的按钮-->
                        <%=FControl.GetActivityButton(strExecute_No,StrNode_No_S,"2","1",ActFlowRun,user)%>
                         <%}%>

                        <!--得到流程创建人的按钮-->
                        <%=FControl.GetCreateButton(strExecute_No,showuserid,"2","1",ActFlowRun,user)%>
                        <%if (strTakeBack.equals("1")){%>
                           <!--收回按钮-->
                           <%=userUI.ClickButton1("收回","TakeBack();","buttonCancel.gif",UserImage)%>
                        <%}%>
                        <!--得到已经分配过的公共类型的按钮-->
                        <%if (StrFlowState.equals("4")){%>
                        <%=FControl.GetDPublicButton(strWorkflow_No,"2","1",ActFlowRun,user)%>
                        <%}%>
                        <!--得到公共类型的按钮-->
                        <%=FControl.GetPublicButton("2","1",ActFlowRun,user)%>
                       </tr></table>

                      </td>
                 </tr>
                 <tr>
                    <td >
                       <div id="wait" style="display:none" align="center">
                       <table height="10" cellspacing="0" cellpadding="0" border='0'><tr><td>
                        <Font class="WriteSign">正在处理,请等待...</font>
                        </td></tr></table>
                       </div>
                    </td>
                 </tr>

             </table>


             </td>

          </tr></table>
          </td></tr>
<!--HTML Foot显示表单尾-->
<%=userUI.ShowFootHtml()%>
</form>
</BODY>
</HTML>
<%
//清空相关对象(强制让java释放资源)
user = null;
userUI = null;
Process = null;
activity = null;
FControl = null;
ActFlowRun = null;
%>
