<%@page contentType="text/html; charset=GBK"%>
<%@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.ejb.sys.SecurityService"%>
<%@page import="zr.zrpower.flowengine.mode.base.Button"%>
<%@page import="zr.zrpower.flowengine.mode.base.Group"%>
<%@page import="zr.zrpower.flowengine.mode.config.FLOW_CONFIG_ACTIVITY"%>
<%@page import="zr.zrpower.flowengine.mode.config.FLOW_CONFIG_ACTIVITY_BUTTON"%>
<%@page import="zr.zrpower.flowengine.mode.config.FLOW_CONFIG_TIME"%>
<%@page import = "zr.zrpower.flowengine.mode.base.Variable"%>
<%@page import="zr.zrpower.flowengine.service.FlowManageAct"%>
<%@page import = "zr.zrpower.flowengine.service.FlowSetup"%>
<%@page import = "zr.zrpower.flowengine.service.FlowControl"%>
<%@page import="zr.zrpower.common.util.DateWork"%>
<%@page import="java.lang.Object"%>
<%@page import="java.util.*"%>
<%@page import="java.text.*"%>



<%
  int i=0;
  SessionUser user = (SessionUser) session.getAttribute("userinfo");
  UIService userUI = new UIService();
  String ID = request.getParameter("ID");
  if (ID==null){ID="";}
  FLOW_CONFIG_ACTIVITY entityActivity=null;
  FlowManageAct flowManageAct = new FlowManageAct();
  FlowSetup flowSetup = new FlowSetup();
  FlowControl FControl = new FlowControl();

  String strflowtype = request.getParameter("flowtype");
  String strformtype = request.getParameter("formtype");
  String strISBRANCH=request.getParameter("ISBRANCH");
  String ActivityType = "3";

  String IDDis="";//供显示使用
  String DocID ="";//采集引擎的配置文档ID
  if (ID.trim().length() > 0) {
    entityActivity = flowManageAct.GetActivityById(ID);
    if(entityActivity!=null)
    {
      IDDis=entityActivity.getID();
      ActivityType = entityActivity.getTYPE();
    }
    //采集引擎的配置文档ID
    DocID = flowManageAct.GetDocID(entityActivity.getFID());
  }

  //根据采集引擎的配置ID得到相关的表名串
  String strDocTables = FControl.GetDocTables(DocID);

  if (entityActivity == null) {
    entityActivity = new FLOW_CONFIG_ACTIVITY();
   // entityActivity.setID(flowManageAct.GetActivityMaxID());
    entityActivity.setID("null");//首次没有ID，故设置一特殊值，以便后台处理
    entityActivity.setIDENTIFICATION("");
    entityActivity.setFID(request.getParameter("FID"));
    entityActivity.setTYPE(request.getParameter("TYPE"));
    entityActivity.setISSIGN("0");
    entityActivity.setOPENHELP("0");
    entityActivity.setISNOTE("0");
    entityActivity.setISMESSAGE("0");
    entityActivity.setISSAVE1("0");
    entityActivity.setISSAVE2("0");
    entityActivity.setISLEAVE1("0");
    entityActivity.setISLEAVE2("0");

    entityActivity.setASTRATEGY("1");
    entityActivity.setCSTRATEGY("1");
    entityActivity.setISBRANCH("0");
    entityActivity.setATTTYPE("1");

  }



  Button[] buttons1, buttons2;
  buttons1 = flowManageAct.GetButtonList();
  buttons2 = flowManageAct.GetButtonListByFid(entityActivity.getID());
  Group[] groups1, groups2;
  groups1 = flowManageAct.GetUserGroupList();
  groups2 = flowManageAct.GetUserGroupListByFid(entityActivity.getID());
  String ctrlAbleFieldInfo;

  int iLength = 0;
  List list=new ArrayList();

  FLOW_CONFIG_TIME[] overTimeEntitys=null; //超时属性


 try
 {
   overTimeEntitys=flowManageAct.GetOverTimeList("  FID='"+entityActivity.getID()+"'");
 }
 catch(Exception ex)
 {
   out.print(ex.getMessage());
 }



  //枚举值
     HashMap enumAbnorymity = new HashMap();
     enumAbnorymity.put("01","消息提示");
     enumAbnorymity.put("02","短信提示");

     //for(i=0;i<abnormityEntitys.length;i++)
     //{
     //  enumAbnorymity.put(abnormityEntitys[i].getID(),abnormityEntitys[i].getTITLE());
     //}

       if (overTimeEntitys!=null && overTimeEntitys.length>0){
       iLength = overTimeEntitys.length;
       for(i=0;i<overTimeEntitys.length;i++){
         list.add(overTimeEntitys[i]);
       }
     }



  String  strshow_data ="";
  String strshow_data1 = flowManageAct.GetCtrlAbleFieldByFID(entityActivity.getFID(),entityActivity.getID());
  String [] strshow_data2 = null;
  if (strshow_data1!=null)
  {
   strshow_data2 = strshow_data1.split("&");

  strshow_data = strshow_data + "[";

   for(int x=0;x<strshow_data2.length;x++)
   {
      if(strshow_data2[x].length()<1)
      continue;

      String [] tempArraySub=strshow_data2[x].split("#");

      strshow_data = strshow_data + "[";
      strshow_data = strshow_data + "'"+tempArraySub[1]+"."+tempArraySub[3]+"',";
      strshow_data = strshow_data + "'"+tempArraySub[4]+"',";
      strshow_data = strshow_data + "'"+tempArraySub[5]+"',";
      strshow_data = strshow_data + "'"+tempArraySub[6]+"',";
      strshow_data = strshow_data + "'"+tempArraySub[7]+"',";

      if (ID.length()>0)
      {

        try {
              strshow_data = strshow_data + "'"+tempArraySub[8]+"',";
            }
            catch (Exception ex) {
              strshow_data = strshow_data + "' ',";
            }


      }else
      {
        strshow_data = strshow_data + "'',";
      }
       if (x <strshow_data2.length-1 )
       {
            strshow_data = strshow_data + "'"+tempArraySub[0]+"."+tempArraySub[2]+"'],\r\n";
       }else
       {
            strshow_data = strshow_data + "'"+tempArraySub[0]+"."+tempArraySub[2]+"']";
       }

   }
   strshow_data = strshow_data + "]";
   }

   int row2=0;
   String show_data2 = null;
   int jnum2=0;

  jnum2=6;
  show_data2 = "[";
  if (overTimeEntitys!=null)
  {
        row2=overTimeEntitys.length;
        jnum2=6-overTimeEntitys.length;

        for(int x=0;x<overTimeEntitys.length;x++){

              show_data2 = show_data2 + "['','','','',''],\r\n";

        }
        if (overTimeEntitys.length>=6){show_data2 = show_data2.substring(0,show_data2.length()-3);}
  }



  for(int x=0;x<jnum2;x++)
  {
       if (x <jnum2-1)
       {
          show_data2 = show_data2 + "['','','','',''],\r\n";
       }else
       {
          show_data2 = show_data2 + "['','','','','']";
       }
  }
  show_data2 = show_data2 + "]";
  row2=row2-1;


%>
<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 type='text/javascript' src="../../../zrsysmanage/script/Public.js"></SCRIPT>
<SCRIPT type='text/javascript' src="../../../zrsysmanage/script/DealList.js"></SCRIPT>
<script type='text/javascript' src='../../../dwr/engine.js'></script>
<script type='text/javascript' src='../../../dwr/util.js'></script>
<script type='text/javascript' src='../../../dwr/interface/FlowMaActBean.js'></script>
<SCRIPT type='text/javascript' src="../../js/Workflow.js"></SCRIPT>


<!--WEB组件样式和js-->
<link rel="stylesheet" type="text/css" media="all" href="../../../ZrwebGui/sigma_grid/grid/calendar/calendar-blue.css" >
<script type="text/javascript" src="../../../ZrwebGui/sigma_grid/grid/calendar/calendar.js"></script>
<script type="text/javascript" src="../../../ZrwebGui/sigma_grid/grid/calendar/calendar-setup.js"></script>
<link rel="stylesheet" type="text/css" href="../../../ZrwebGui/sigma_grid/grid/gt_grid.css">
<link rel="stylesheet" type="text/css" href="../../../ZrwebGui/sigma_grid/grid/skin/vista/skinstyle.css">
<link rel="stylesheet" type="text/css" href="../../../ZrwebGui/sigma_grid/grid/skin/pink/skinstyle.css">
<link rel="stylesheet" type="text/css" href="../../../ZrwebGui/sigma_grid/grid/skin/mac/skinstyle.css">
<script type="text/javascript" src="../../../ZrwebGui/sigma_grid/grid/gt_msg_en.js"></script>
<script type="text/javascript" src="../../../ZrwebGui/sigma_grid/grid/gt_const.js"></script>
<script type="text/javascript" src="../../../ZrwebGui/sigma_grid/grid/gt_grid_all.js"></script>
<!--WEB组件样式和js结束-->


<script type="text/javascript" >

var row2 = <%=row2%>;
var crow2 = 0;

var css = "<%=user.getUserCSS()%>";
var skincss = "vista";

if (css=="Blue.css")
{skincss = "vista";}
if (css=="Public.css")
{skincss = "default";}
if (css=="Window.css" || css=="nBlue.css" || css=="html5.css")
{skincss = "mac";}
if (css=="Yellow.css")
{skincss = "pink";}


var grid_demo_id = "myGrid1" ;
var show_data= <%=strshow_data%>;


var dsOption= {

	fields :[
		{name : 'NAME1'  },
		{name : 'NAME2'  },
                {name : 'NAME3'  },
		{name : 'NAME4'  },
                {name : 'NAME5'  },
		{name : 'NAME6'  },
		{name : 'NAME7' }

	],

	recordType : 'array',
	data : show_data
}



var colsOption = [

           {id: 'NAME1' , header: "<center>字段名称</center>" , width :280,  align : 'center',sortable:false  },
	   {id: 'NAME2' , header: "<center>是否显示</center>" , width :70 ,align : 'center',sortable:false  },
           {id: 'NAME3' , header: "<center>是否编辑</center>" , width :70,  align : 'center',sortable:false  },
	   {id: 'NAME4' , header: "<center>是否必填</center>" , width :70 ,align : 'center',sortable:false  },
           {id: 'NAME5' , header: "<center>强制设置</center>" , width :70,  align : 'center',sortable:false  },
	   {id: 'NAME6' , header: "<center>默认值</center>" , width :150 ,align : 'center',sortable:false  },
	   {id: 'NAME7' , header: "<center>字段名称(En)</center>" , width :160 , align : 'center',hidden:true  }
];


var gridOption={
	id : grid_demo_id,
	width: "770",
	height: "280",
	container : 'gridbox',
	replaceContainer : true,
	dataset : dsOption ,
	columns : colsOption,
	pageSize : 2000,
	toolbarContent : null,
        skin : skincss,

        onCellClick:function(value, record , cell, row,  colNO, rowNO,columnObj,grid){
           gridCtrlAbleFieldClick(rowNO);
        },

       showIndexColumn : false
};


var mygrid=new Sigma.Grid( gridOption );
Sigma.Util.onLoad( Sigma.Grid.render(mygrid));


//显示排序表格------------------------
var grid_demo_id2 = "myGrid2" ;
var show_data2= <%=show_data2%>;

var dsOption2= {

	fields :[
		{name : 'NAME1'  },
		{name : 'NAME2'  },
		{name : 'NAME3'  },
                {name : 'NAME4'  },
                {name : 'NAME5'  }

	],

	recordType : 'array',
	data : show_data2
}



var colsOption2 = [
           {id: 'NAME1' , header: "<center>持续时间(小时)</center>" , width :160 , align : 'center',sortable:false  },
           {id: 'NAME2' , header: "<center>名称</center>" , width :260,  align : 'center',sortable:false  },
	   {id: 'NAME3' , header: "<center>执行代理</center>" , width :160 ,align : 'center',sortable:false  },
           {id: 'NAME4' , header: "<center>执行频率(小时)</center>" , width :160 ,align : 'center',sortable:false  },
           {id: 'NAME5' , header: "sid" , width :10 , align : 'center',hidden:true }
];

var gridOption2={
	id : grid_demo_id2,
	width: "770",
	height: "200",
	container : 'gridbox2',
	replaceContainer : true,
	dataset : dsOption2 ,
	columns : colsOption2,
	pageSize : 2000,
	toolbarContent : null,
        skin : skincss,

        onCellClick:function(value, record , cell, row,  colNO, rowNO,columnObj,grid){

           crow2 = rowNO;
           gridOverTimeFieldClick();
        },

       showIndexColumn : false
};

var mygrid2 = new Sigma.Grid(gridOption2);
Sigma.Util.onLoad( Sigma.Grid.render(mygrid2));


</script>

<script type="text/javascript" src="../../../ZrwebGui/tab/tab.js"></script>
<link rel="stylesheet" type="text/css" href="../../../ZrwebGui/tab/tab.css">
<STYLE type=text/css>
#con { FONT-SIZE: 12px; MARGIN: 0px auto; WIDTH: 98% }
#tags { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px 0px 0px 10px; WIDTH: 98% ; PADDING-TOP: 0px; HEIGHT: 23px }
#tags LI { BACKGROUND: url(../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/tagleft.gif) no-repeat left bottom; FLOAT: left; MARGIN-RIGHT: 1px; LIST-STYLE-TYPE: none; HEIGHT: 23px }
#tags LI A { PADDING-RIGHT: 10px; PADDING-LEFT: 10px; BACKGROUND: url(../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/tagright.gif) no-repeat right bottom; FLOAT: left; PADDING-BOTTOM: 0px; COLOR: #999;
LINE-HEIGHT: 23px; PADDING-TOP: 0px; HEIGHT: 23px; TEXT-DECORATION: none }
.tagContent { PADDING-RIGHT: 10px; DISPLAY: none; PADDING-LEFT: 10px; BACKGROUND: url(../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/bg.gif) repeat-x; PADDING-BOTTOM: 10px; WIDTH: 100%; COLOR: #474747;
PADDING-TOP: 10px; HEIGHT: 92% }
</STYLE>


<SCRIPT LANGUAGE="javascript">
var ctrlAbleFieldInfo="";

function GetctrlAbleFieldInfo(FID,AID)
{
   var _resultStr="";
   this.getString = function()
    {
        //设置成同步
        dwr.engine.setAsync(false);


        //调用Java类FlowMaActBean的GetTableFieldCnNameByEn方法

           FlowMaActBean.GetCtrlAbleFieldByFID(FID,AID,
           function(resultStr){
              _resultStr = resultStr;

           }
           );


        //重新设置为异步方式
        dwr.engine.setAsync(true);

        return _resultStr;
    }

}



function Check(theForm)
{
  try
  {
     if(theForm.NAME.value.indexOf("/") >-1)
     {
     alert("活动名称不能包含/符号!");
     return false;
    }
    fillSelectValueToField(theForm.OperateDestList,theForm.OperateProterty);
    fillSelectValueToField(theForm.UserGroupDestList,theForm.UserGroupProterty);
    fillgridOverTimeFieldInfoStr();//超时属性的处理
    fillCtlFieldInfoStr();//可控字段的处理

    return true;
  }
  catch(e)
  {
   // alert(e.description);
    return false;
  }
}

/**************************开始输入管理*****************************************/
 function fillTableName(obj)
 {
     if(obj.selectedIndex<0)
        return;

    tableName= obj.options[obj.selectedIndex].value;
     if(RegForm.InputType.value=='1')
       RegForm.txtTableName.value=tableName;

 }







function fillSessionVariable(obj)
{

  if(obj.selectedIndex<0)
    return;


    fillValue(obj.options[obj.selectedIndex].value);
}



function btnSpecialValue(strValue)
{
   fillValue(strValue);
}



function fillValue(strValue)
{

 if(RegForm.InputType.value=='3')
 {

   if(CheckInputValueExpression(RegForm.txtValue.value,strValue))
       RegForm.txtValue.value+=strValue;
 }

 if(RegForm.InputType.value=='4')
 {
   if(CheckInputWhereExpression(RegForm.txtWhere.value,strValue))
    RegForm.txtWhere.value+=strValue;
 }

}

/**************************结束输入管理*****************************************/




//
function ShowModal()
{
  var url='CtlAbleFieldDValue.jsp?strResult='+RegForm.txtDefaultValue.value;
  var status='dialogHeight:350px;dialogWidth:850px;status:0;help:no;center:yes';
  var rtnResult=window.showModalDialog(url,window,status);
 if (rtnResult!=null)
   {
     RegForm.txtDefaultValue.value=rtnResult;
   }
}



function gridCtrlAbleFieldClick(rowNO)
{
   RegForm.row.value=rowNO;
   var allvalue = mygrid.getSelectedRecords()+",0";
   var strValue = allvalue.split(",");

   RegForm.txtCtlFieldName.value=strValue[0];

   if(strValue[1]=="是")
     RegForm.isDisplay.checked=true;
    else
     RegForm.isDisplay.checked=false;

     if(strValue[2]=="是")
     RegForm.isEdit.checked=true;
    else
     RegForm.isEdit.checked=false;

    if(strValue[3]=="是")
     RegForm.isMustFill.checked=true;
    else
     RegForm.isMustFill.checked=false;


    if(strValue[4]=="是")
     RegForm.isForce.checked=true;
    else
     RegForm.isForce.checked=false;

   RegForm.txtDefaultValue.value=strValue[5];
}


function UpdateCtlFieldGrid()
{
   var allvalue = mygrid.getSelectedRecords()+",0";

   var row=RegForm.row.value;
   if(row==null)
   {
     alert("执行的操作无效!");
     return;
   }


   if(RegForm.isDisplay.checked)
      mygrid.setCellValue("NAME2",row,"是");
   else
      mygrid.setCellValue("NAME2",row,"否");

  if(RegForm.isEdit.checked)
     mygrid.setCellValue("NAME3",row,"是");
   else
     mygrid.setCellValue("NAME3",row,"否");

  if(RegForm.isMustFill.checked)
     mygrid.setCellValue("NAME4",row,"是");
   else
     mygrid.setCellValue("NAME4",row,"否");

 if(RegForm.isForce.checked)
     mygrid.setCellValue("NAME5",row,"是");
   else
     mygrid.setCellValue("NAME5",row,"否");

  mygrid.setCellValue("NAME6",row,RegForm.txtDefaultValue.value);

  mygrid.refresh();
}

 function fillCtlFieldInfoStr()
{
  var strResult="";
  for(row=0;row<mygrid.getRowNumber();row++)
  {

      strResult+=mygrid.getCellValue("NAME7",row)+"#"+
               mygrid.getCellValue("NAME2",row)+"#"+
               mygrid.getCellValue("NAME3",row)+"#"+
               mygrid.getCellValue("NAME4",row)+"#"+
               mygrid.getCellValue("NAME5",row)+"#"+
               mygrid.getCellValue("NAME6",row)+"&";

  }
  RegForm.CtlFieldInfoStr.value=strResult;

}



function fillgridOverTimeField()  //超时属性列表填充数据
{
  var row=0;

  <%
  if(overTimeEntitys!=null)
  {
    for(i=0;i<overTimeEntitys.length;i++)
    {
      %>

       mygrid2.setCellValue("NAME1",row,"<%=overTimeEntitys[i].getDAY()%>");
       mygrid2.setCellValue("NAME2",row,"<%=overTimeEntitys[i].getNAME()%>");
       mygrid2.setCellValue("NAME3",row,"<%=enumAbnorymity.get(overTimeEntitys[i].getABNORMITYID()).toString()%>");



      <%if(overTimeEntitys[i].getFREQUENCY()!=0)
        {
      %>

        mygrid2.setCellValue("NAME4",row,"<%=overTimeEntitys[i].getFREQUENCY()%>");
      <%
        }
      %>
      mygrid2.setCellValue("NAME5",row,"<%=overTimeEntitys[i].getABNORMITYID()%>");

      mygrid2.refresh();

       row++;
      <%
    }

  }
  %>

}


function gridOverTimeFieldClick() //超时属性列表点击响应
{

   RegForm.txtDuration.value=mygrid2.getCellValue("NAME1",crow2);
   RegForm.txtLimitName.value=mygrid2.getCellValue("NAME2",crow2);
   RegForm.txtFrequency.value=mygrid2.getCellValue("NAME4",crow2);
   RegForm.selAbnormity.value=mygrid2.getCellValue("NAME5",crow2);
}

function gridOverTimeFieldAddrow()//超时属性列表增加行
{
  var row;
   if(CheckgridOverTimeInput()==false)
    return;

  if (mygrid2.getCellValue("NAME1",crow2).length>0)
  {
     crow2++;
     while (mygrid2.getCellValue("NAME2",crow2).length>0)
     {
        crow2++;
     }
  }

  mygrid2.setCellValue("NAME1",crow2,RegForm.txtDuration.value);
  mygrid2.setCellValue("NAME2",crow2,RegForm.txtLimitName.value);
  mygrid2.setCellValue("NAME3",crow2,RegForm.selAbnormity.options[RegForm.selAbnormity.selectedIndex].text);
  mygrid2.setCellValue("NAME4",crow2,RegForm.txtFrequency.value);
  mygrid2.setCellValue("NAME5",crow2,RegForm.selAbnormity.value);
  mygrid2.refresh();

  row2=row2+1;

}

function gridOverTimeFieldDeleterow()//超时属性列表删除行
{
  if(confirm("确定要删除选中的行吗?"))
  {
     mygrid2.setCellValue("NAME1",crow2,"");
     mygrid2.setCellValue("NAME2",crow2,"");
     mygrid2.setCellValue("NAME3",crow2,"");
     mygrid2.setCellValue("NAME4",crow2,"");
     mygrid2.setCellValue("NAME5",crow2,"");
     mygrid2.refresh();
  }
}

function gridOverTimeFieldUpdateRow()
{
  if(CheckgridOverTimeInput()==false)
    return;

     mygrid2.setCellValue("NAME1",crow2,RegForm.txtDuration.value);
     mygrid2.setCellValue("NAME2",crow2,RegForm.txtLimitName.value);
     mygrid2.setCellValue("NAME3",crow2,RegForm.selAbnormity.options[RegForm.selAbnormity.selectedIndex].text);
     mygrid2.setCellValue("NAME4",crow2,RegForm.txtFrequency.value);
     mygrid2.setCellValue("NAME5",crow2,RegForm.selAbnormity.value);
     mygrid2.refresh();

}

 function fillgridOverTimeFieldInfoStr()
{
  var strResult="",strTemp="";

  //异常处理ID#持续时间(小时)#限制名称#执行频率(小时)&
  for(row=0;row<=row2;row++)
  {

    if (mygrid2.getCellValue("NAME1",row).length>0)
    {
        strResult+=mygrid2.getCellValue("NAME5",row)+"#"+
               mygrid2.getCellValue("NAME1",row)+"#"+
               mygrid2.getCellValue("NAME2",row)+"#";

        strTemp=mygrid2.getCellValue("NAME4",row);
        if(trim(strTemp).length==0)
        {strTemp="NULL";}
        strResult+=strTemp+"&";
    }
  }
  RegForm.OverTimeFieldInfo.value=strResult;
}


function CheckgridOverTimeInput()
{
  var tempStr;
  tempStr=RegForm.txtDuration.value;
  if(trim(tempStr).length == 0)
  {
     alert("持续时间(小时)未输入!");
     return false;
  }

  tempStr=RegForm.txtLimitName.value;
  if(trim(tempStr).length == 0)
  {
     alert("名称未输入!");
     return false;
  }

  return true;
}


function openDoc()
{
   OpenMenuWindow("opendoc.jsp?ID=<%=DocID%>&COLL_AID=<%=IDDis%>");
}
function openRemarkDoc()
{
   OpenMenuWindow("../../../ZrCollEngine/Print/DoPrint.jsp?coll_AID=<%=IDDis%>&coll_CMODE=4");
}

</SCRIPT>
</HEAD>
<BODY class="BodyMain">
<FORM name="RegForm" method="post" action="../../../FlowMaActSer.do">
<input type="hidden" name="CREATEPSN" value="<%=user.getLoginID()%>">
<input type="hidden" name="ActivityID" value="<%=entityActivity.getID()%>">
<input type="hidden" name="FID" value="<%=entityActivity.getFID()%>"/>
<input type="hidden" name="OperateProterty" value="">
<input type="hidden" name="BDOperateProterty" value="">
<input type="hidden" name="UserGroupProterty" value=""/>
<input type="hidden" name="InputType" value="1"/>
<input type="hidden" name="CtlFieldInfoStr"/>
<input type="hidden" name="OverTimeFieldInfo"/>
<input type="hidden" name="SignatureFieldInfoStr"/>
<input type="hidden" name="Act" value="">
<input type="hidden" name="flowtype" value="<%=strflowtype%>">
<input type="hidden" name="formtype" value="<%=strformtype%>">
<input type="hidden" name="TYPE" value="<%=ActivityType%>">
<input type="hidden" name="row" value="0">
<input type="hidden" name="OPENHELP" value="1">


<% if(!"6".equals(user.getUserWINDOWTYPE())){%>
<%=userUI.ShowHeadHtml("流程活动管理[活动名称:"+entityActivity.getNAME()+"]",user.getUserImage())%>
<%=userUI.ShowBodyStartHtml()%>
<%}%>
<table width="100%">
  <tr>
    <td height="450"  valign="top">



<DIV id="con">
  <UL id="tags">
    <LI class="selectTag">
      <A onClick="selectTag('tagContent0',this)"  href="javascript:void(0)">
      <IMG src="../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/page.gif" align='absmiddle' border=0>
      基本属性
      </A>
    </LI>
     <LI>
       <A onClick="selectTag('tagContent1',this)" href="javascript:void(0)">
       <IMG src="../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/page.gif" align='absmiddle' border=0>
         策略属性
       </A>
     </LI>
     <LI>
       <A onClick="selectTag('tagContent2',this)" href="javascript:void(0)">
       <IMG src="../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/page.gif" align='absmiddle' border=0>
         超时属性
       </A>
     </LI>

     <LI>
       <A onClick="selectTag('tagContent3',this)" href="javascript:void(0)">
       <IMG src="../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/page.gif" align='absmiddle' border=0>
         操作属性
       </A>
     </LI>

     <LI>
       <A onClick="selectTag('tagContent4',this)" href="javascript:void(0)">
       <IMG src="../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/page.gif" align='absmiddle' border=0>
         可控字段属性
       </A>
     </LI>

     <LI>
       <A onClick="selectTag('tagContent5',this)" href="javascript:void(0)">
       <IMG src="../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/page.gif" align='absmiddle' border=0>
         表单属性
       </A>
     </LI>

     <LI>
       <A onClick="selectTag('tagContent6',this)" href="javascript:void(0)">
       <IMG src="../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/page.gif" align='absmiddle' border=0>
         附件属性
       </A>
     </LI>

     <LI>
       <A onClick="selectTag('tagContent7',this)" href="javascript:void(0)">
       <IMG src="../../../ZrwebGui/tab/skin/<%=user.getUserImage()%>/page.gif" align='absmiddle' border=0>
         参与者属性
       </A>
     </LI>

  </UL>



  <DIV id="tagContent">
    <DIV class="tagContent selectTag" id="tagContent0">

            &nbsp;
            <fieldset style="width: 98%">
              <legend>基本属性管理</legend>
              <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
                <tr>
                  <td colspan=2 height=8>                  </td>
                </tr>
                <% if(!entityActivity.getID().equals("null")){  %>
                 <tr>
                  <td class="PutdSet" width="30%">活动ID：</td>
                  <td>
                    <input class="text" type="text" name="IDDis" size="56" maxlength="12" value="<%=IDDis%>" readonly="readonly">

                  </td>
                </tr>
                  <tr>
                  <td colspan=2 height=8>                  </td>
                </tr>
                <tr>
                  <td class="PutdSet" width="30%">活动标识：</td>
                  <td>
                    <input class="text" type="text" name="IDENTIFICATION" size="56" maxlength="12" value="<%=entityActivity.getIDENTIFICATION()%>" readonly="readonly">

                  </td>
                </tr>
                <% } %>
                <tr>
                  <td colspan=2 height=8>                  </td>
                </tr>
                <tr>
                  <td class="PutdSet">活动名称：</td>
                  <td>
                    <input class="text" type="text" name="NAME" size="56" maxlength="100" value="<%=entityActivity.getNAME()%>">
                  </td>
                </tr>
                <tr>
                  <td colspan=2 height=8>                  </td>
                </tr>
                <tr>
                  <td class="PutdSet">活动描述：</td>
                  <td>
                    <input class="text" type="text" name="DESC1" size="56" maxlength="300" value="<%=entityActivity.getDESC1()%>">
                  </td>
                </tr>
                <tr>
                  <td class="PutdSet">活动处理后提示信息：</td>
                  <td>
                    <input class="text" type="text" name="MESSAGE" size="56" maxlength="300" value="<%=entityActivity.getMESSAGE()%>">
                  </td>
                </tr>
                <tr>
                  <td class="PutdSet"><br>处理前弹出自定义页面执行特殊操作：</td>
                  <td>
                    <br>
                    <input class="text" type="text" name="ADDFORMPATH"  onchange="RegForm.ADDFORMMESSAGE.value='执行特殊操作不成功!';" size="35" maxlength="300" value="<%=entityActivity.getADDFORMPATH()%>">
                    宽:<input class="text" type="text" name="ADDFORMWIDTH" size="4" maxlength="8" value="<%=entityActivity.getADDFORMWIDTH()%>">
                    高:<input class="text" type="text" name="ADDFORMHEIGHT" size="4" maxlength="8" value="<%=entityActivity.getADDFORMHEIGHT()%>">
                    <br><font class="WriteSign">说明：比如更新一些关联表字段的值等，参数RUNID,COLL_AID,coll_PKID,coll_FKID等<br>
                    会传递到自定义页面中，通过在自定义页面中接收相关参数使用。</font>
                  </td>
                </tr>
                <tr>
                  <td class="PutdSet">执行特殊操作不成功时提示信息：</td>
                  <td>
                    <input class="text" type="text" name="ADDFORMMESSAGE" size="56" maxlength="380" value="<%=entityActivity.getADDFORMMESSAGE()%>">
                  </td>
                </tr>


                <tr>
                  <td colspan=2 height=5>                  </td>
                </tr>
                <tr>
                  <td class="PutdSet">活动序号：</td>
                  <td>
                    <input class="text" type="text" name="ORDER1" size="26" maxlength="5" value="<%=entityActivity.getORDER1()%>" onkeypress="event.returnValue=CheckNumber();">
                    <Font class="WriteSign">注：为0时流程运转图示不显示。</Font>
                  </td>
                </tr>
                <tr>
                  <td colspan=2 height=5>                  </td>
                </tr>
                <tr>
                  <td class="PutdSet">会签是否顺序执行：</td>
                  <td>
                    <input type="radio" name="ISSIGN" value=1 <% if (entityActivity.getISSIGN().equals("1")) {out.print("checked");}%> >
                    是　
                    <input type="radio" name="ISSIGN" value=0 <% if (entityActivity.getISSIGN().equals("0")) {out.print("checked");}%>>
                    否
                  </td>
                </tr>
                <tr>
                  <td colspan=2 height=5>                  </td>
                </tr>

                <tr>
                  <td class="PutdSet">是否短信提示：</td>
                  <td>
                    <input type="radio" name="ISNOTE" value=1 <% if (entityActivity.getISNOTE().equals("1")) {out.print("checked");}%>>
                    是　
                    <input type="radio" name="ISNOTE" value=0 <% if (entityActivity.getISNOTE().equals("0")) {out.print("checked");}%>>
                    否
                    <input type="radio" name="ISNOTE" value=2 <% if (entityActivity.getISNOTE().equals("2")) {out.print("checked");}%>>
                    自定义(默认是)
                    <input type="radio" name="ISNOTE" value=3 <% if (entityActivity.getISNOTE().equals("3")) {out.print("checked");}%>>
                    自定义(默认否)


                    <input type="radio" name="ISNOTE" value=4 <% if (entityActivity.getISNOTE().equals("4")) {out.print("checked");}%>>
                    自定义(短信)

                  </td>
                </tr>
                <tr>
                  <td class="PutdSet">是否消息提示：</td>
                  <td>
                    <input type="radio" name="ISMESSAGE" value=1 <% if (entityActivity.getISMESSAGE().equals("1")) {out.print("checked");}%>>
                    是　
                    <input type="radio" name="ISMESSAGE" value=0 <% if (entityActivity.getISMESSAGE().equals("0")) {out.print("checked");}%>>
                    否
                  </td>
                </tr>

                <tr>
                  <td colspan=2 height=5></td>
                </tr>
              </table>
              <br>
            </fieldset>

 </DIV>


<DIV class="tagContent" id="tagContent1">
            <br>
            &nbsp;
            <fieldset style="width: 98%">
              <legend>分配策略</legend>
              <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
                <tr>
                  <td colspan=2 height=23>                  </td>
                </tr>
                <tr>
                  <td class="PutdSet">                  </td>
                  <td>
                    <input type="radio" name="ASTRATEGY" value=1  <% if (entityActivity.getASTRATEGY().equals("1")) {out.print("checked");}%>>
                    分配任意一个　
                    <input type="radio" name="ASTRATEGY" value=2  <% if (entityActivity.getASTRATEGY().equals("2")) {out.print("checked");}%>>
                    分配多人
                  </td>
                </tr>
                <tr>
                  <td colspan=2 height=8></td>
                </tr>
              </table>
              <br>
            </fieldset>
            &nbsp;
            <fieldset style="width: 98%">
              <legend>完成策略</legend>
              <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
                <tr>
                  <td colspan=2 height=23>                  </td>
                </tr>
                <tr>
                  <td class="PutdSet">                  </td>
                  <td>
                    <input type="radio" name="CSTRATEGY" value=1  <% if (entityActivity.getCSTRATEGY().equals("1")) {out.print("checked");}%>>
                    任意完成一个
                    <input type="radio" name="CSTRATEGY" value=2 <% if (entityActivity.getCSTRATEGY().equals("2")) {out.print("checked");}%>>
                    必须完成所有
                    <input type="radio" name="CSTRATEGY" value=3 <% if (entityActivity.getCSTRATEGY().equals("3")) {out.print("checked");}%>>
                    按完成数据
                    <input type="radio" name="CSTRATEGY" value=4 <% if (entityActivity.getCSTRATEGY().equals("4")) {out.print("checked");}%>>
                    按完成的百分比
                  </td>
                </tr>
                <tr>
                  <td colspan=2 height=8>                  </td>
                </tr>
                <tr>
                  <td colspan=2>                    &nbsp;&nbsp;
                    完成数或完成百分比：
                    <input class="text" type="text" name="CNUM" size="30" maxlength="5" value="<%=entityActivity.getCNUM()%>" onkeypress="event.returnValue=CheckNumberPoint();" >
                  </td>
                </tr>
                <tr>
                  <td colspan=2 height=8>                  </td>
                </tr>
              </table>
              <br>
            </fieldset>
            &nbsp;
            <fieldset style="width: 98%">
              <legend>其它策略</legend>
              <table border='0' width="450" cellspacing="0" cellpadding="0" align=left>
                <tr>
                  <td colspan=4 height=23> </td>
                </tr>
                <tr>
                  <td>&nbsp;前进保存数据：</td>
                  <td>
                    <input type="radio" name="ISSAVE1" value=1 <% if (entityActivity.getISSAVE1().equals("1")) {out.print("checked");}%>>是　
                    <input type="radio" name="ISSAVE1" value=0 <% if (entityActivity.getISSAVE1().equals("0")) {out.print("checked");}%>>否
                  </td>
                  <td>&nbsp;后退保存数据：</td>
                  <td>
                    <input type="radio" name="ISSAVE2" value=1 <% if (entityActivity.getISSAVE2().equals("1")) {out.print("checked");}%>>是　
                    <input type="radio" name="ISSAVE2" value=0 <% if (entityActivity.getISSAVE2().equals("0")) {out.print("checked");}%>>否
                  </td>
                </tr>
                <tr>
                  <td >&nbsp;前进必填留言：</td>
                  <td>
                    <input type="radio" name="ISLEAVE1" value=1 <% if (entityActivity.getISLEAVE1().equals("1")) {out.print("checked");}%>>是　
                    <input type="radio" name="ISLEAVE1" value=0 <% if (entityActivity.getISLEAVE1().equals("0")) {out.print("checked");}%>>否
                  </td>
                  <td >&nbsp;后退必填留言：</td>
                  <td>
                    <input type="radio" name="ISLEAVE2" value=1 <% if (entityActivity.getISLEAVE2().equals("1")) {out.print("checked");}%>>是　
                    <input type="radio" name="ISLEAVE2" value=0 <% if (entityActivity.getISLEAVE2().equals("0")) {out.print("checked");}%>>否
                  </td>
                </tr>
                <tr>
                  <td >&nbsp;多分支是否体现在操作按钮上：</td>
                  <td>
                    <input type="radio" name="ISBRANCH" value=1 <% if (entityActivity.getISBRANCH().equals("1")) {out.print("checked");}%>>是　
                    <input type="radio" name="ISBRANCH" value=0 <% if (entityActivity.getISBRANCH().equals("0")) {out.print("checked");}%>>否
                  </td>
                  <td >&nbsp; </td>
                  <td>&nbsp; </td>
                </tr>
                <tr>
                  <td colspan=4 height=10></td>
                </tr>
              </table>
              <br>
            </fieldset>

             </DIV>


<DIV class="tagContent" id="tagContent2">

           <br>
            &nbsp;
            <fieldset style="width: 98%">
              <legend>超时属性管理</legend>
            <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
              <tr>
                <td colspan=2 height=150>
                  <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
                  <tr>
                    <td align=right width="12%" height="25">持续时间(小时)：</td>
                    <td width="38%" align=left><input class="text" type="text" name="txtDuration" size="35"   maxlength="6" onkeypress="event.returnValue=CheckNumber();" ></td>
                    <td align=right width="12%">名称:</td>
                    <td width="38%">
                      <input class="text" type="text" name="txtLimitName" size="35"   maxlength="50" >
                    </td>
                   </tr>
                   <tr>
                    <td align=right width="10%" height="25">执行代理：</td>
                    <td width="40%" align=left>
                     <select name="selAbnormity"  style="width=228" >
                       <option value='01' selected="selected">消息提示</option>
                       <option value='02'>短信提示</option>
                    </select>
                    </td>
                    <td align=right width="10%">执行频率(小时):</td>
                    <td width="40%" align="left">
                      <input class="text" type="text" name="txtFrequency" size="35"   maxlength="6" onkeypress="event.returnValue=CheckNumber();">
                    </td>
                   </tr>

                <tr>
                 <td colspan="4" align="center" height="25">
                   <table cellspacing="0" cellpadding="0" border='0'>
                   <tr>
                     <%=userUI.ClickButton("增加行","JavaScript:gridOverTimeFieldAddrow();","IcoAdd.gif",user.getUserImage())%>
                     <%=userUI.ClickButton("删除行","JavaScript:gridOverTimeFieldDeleterow();","buttonDelete.gif",user.getUserImage())%>
                     <%=userUI.ClickButton("更  新","JavaScript:gridOverTimeFieldUpdateRow();","buttonCancel.gif",user.getUserImage())%>
                  </tr>
                 </table>
                 <br>
                 </td>
                </tr>
             </table>

             <div id="gridbox2" style="border:0px solid #cccccc;background-color:#f3f3f3;padding:5px;height:180px;width:880px;" ></div>
             <br>

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

             </fieldset>

    </DIV>


<DIV class="tagContent" id="tagContent3">

            <br>
            &nbsp;
            <fieldset style="width: 98%">
              <legend>操作属性管理</legend>
              <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
                <tr>
                  <td colspan=2 height=23>                  </td>
                </tr>
                <tr>
                  <td colspan="2">
                    <table border='0' width="70%" cellspacing="0" cellpadding="0" align=center>
                      <tr>
                        <td colspan=3 height=23>                        </td>
                      </tr>
                      <tr>
                        <td width="45%" align="center" height=23>
                          <font class="AlertSign">待选功能</font>
                        </td>
                        <td width="10%" align="center">
                          <font class="AlertSign">操作</font>
                        </td>
                        <td width="45%" align="center">
                          <font class="AlertSign">已选功能</font>
                        </td>
                      </tr>
                      <tr>
                        <td>
                          <select name="OperateSrcList"  style="width:320px;height:180px" size=15 multiple>
                          <%
                            if (buttons1 != null)
                              for (i = 0; i < buttons1.length; i++) {
                                out.print("<option value='" + buttons1[i].getID() + "'>" + buttons1[i].getBNAME() + "</option>");
                              }
                          %>
                          </select>
                          <br>
                          <input type="checkbox" name="SelAllX" onClick="JavaScript:CheckBoxSel(this.checked,'OperateSrcList');">
                          全选
                          &nbsp;&nbsp;
                          <Font class="WriteSign">注：使用Ctrl键可选择多个</Font>
                          <br>
                        </td>
                        <td align=center>
                          <img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/PuArrow_U.gif" style="cursor:pointer" title="上移" onclick="javascript:upItemSelection(window.RegForm.OperateDestList);"><br><br>
                          <img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/PuArrow_R.gif" style="cursor:pointer" title="增加功能" onClick="javascript:addSrcToDestListPu(window.RegForm.OperateSrcList,window.RegForm.OperateDestList)">
                          <br>
                          <br>
                          <img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/PuArrow_L.gif" style="cursor:pointer" title="删除功能" onClick="javascript:deleteFromDestListPu(window.RegForm.OperateDestList)">
                          <br>
                          <br>
                          <img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/PuArrow_D.gif"  style="cursor:pointer" title="下移" onclick="javascript:downItemSelection(window.RegForm.OperateDestList);">
                        </td>
                        <td>
                          <select name="OperateDestList"  style="width:320px;height:180px"  size=15 multiple>
                          <%
                            if (buttons2 != null)
                              for (i = 0; i < buttons2.length; i++) {
                                out.print("<option value='" + buttons2[i].getID() + "'>" + buttons2[i].getBNAME() + "</option>");
                              }
                          %>
                          </select>
                          <br>
                          <input type="checkbox" name="SelAllX" onClick="JavaScript:CheckBoxSel(this.checked,'OperateDestList');">
                          全选
                          &nbsp;&nbsp;
                          <Font class="WriteSign">注：使用Ctrl键可选择多个</Font>
                          <br>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>
              <br>
            </fieldset>

     </DIV>





        <%if (strformtype.equals("1")){%>
        <DIV class="tagContent" id="tagContent4">
           <br>
            &nbsp;
            <fieldset style="width: 98%">
              <legend>可控字段属性管理</legend>
            <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
              <tr>
                <td colspan=2 height=150>
                  <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
                  <tr>
                    <td align=right width="10%" height="30">字段名称：</td>
                    <td width="40%"><input class="text" type="text" name="txtCtlFieldName" size="35"   maxlength="100" value=""  readonly="readonly"></td>
                    <td align=left width="50%" colspan="2">

                       <table cellspacing="0" cellpadding="0" border='0'><tr>
                       <td><input type="checkbox" name="isDisplay" value="0" />显示
                        &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="isEdit" value="0" />编辑
                       &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="isMustFill" value="0" />必填&nbsp;&nbsp;</td>
                       <%=userUI.ClickButton("查看模板","JavaScript:openDoc()","IcoBrowse.gif",user.getUserImage())%>
                       </tr></table>

                   </td>
                   </tr>
                    <tr>
                    <td align=right height="30"><input type="checkbox" name="isForce" value="0" />强制设置</td>
                    <td  align="left" colspan="3">
                     <table cellspacing="0" cellpadding="0" border='0'>
                       <tr>
                          <td>
                               &nbsp;&nbsp;默认值：<input class="text" type="text" name="txtDefaultValue" size="65" maxlength="1000" >

                                <%=userUI.ClickButton("设置","JavaScript:ShowModal();","buttonSelect.gif",user.getUserImage())%>
                                <%=userUI.ClickButton("更新","JavaScript:UpdateCtlFieldGrid();","buttonCancel.gif",user.getUserImage())%>
                          </td>
                       </tr>
                   </table>
                   &nbsp;&nbsp;<font class="WriteSign">说明：设置默认值时选强制设置时字段中有无值时都设置。</font>
                 </td>
                </tr>

             </table>

             <div id="gridbox" style="border:0px solid #cccccc;background-color:#f3f3f3;padding:5px;height:600px;width:800px;" ></div>


              </td>
              </tr>
            </table>
             </fieldset>
          </DIV>

        <%}%>

        <DIV class="tagContent" id="tagContent5">
           <br>
            &nbsp;
            <fieldset style="width: 98%">
              <legend>表单属性管理</legend>
            <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
              <tr>
                <td align=right width="15%" height="30">自定义表单页面地址：</td>
                <td height=30>
                  <input class="text" type="text" name="FORMPATH" size="80" maxlength="250" value="<%=entityActivity.getFORMPATH()%>">
                  <br><br>说明：设置有自定义表单地址时流程的相关活动连接到设置的地址。
              </td>
              </tr>
            </table>
             </fieldset>
          </DIV>

        <DIV class="tagContent" id="tagContent6">
            <br>
            &nbsp;
            <fieldset style="width: 98%">
              <legend>附件类型</legend>
              <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
                <tr>
                  <td height=23></td>
                </tr>
                <tr>
                  <td>
                    <input type="radio" name="ATTTYPE" value=1  <% if (entityActivity.getATTTYPE().equals("1")) {out.print("checked");}%>>
                    无附件
                    <input type="radio" name="ATTTYPE" value=2  <% if (entityActivity.getATTTYPE().equals("2")) {out.print("checked");}%>>
                    管理所有附件
                    <input type="radio" name="ATTTYPE" value=3  <% if (entityActivity.getATTTYPE().equals("3")) {out.print("checked");}%>>
                    管理个人上传的附件
                    <input type="radio" name="ATTTYPE" value=4  <% if (entityActivity.getATTTYPE().equals("4")) {out.print("checked");}%>>
                    浏览附件
                  </td>
                </tr>

              </table>
              <br>
            </fieldset>
            <br>
            &nbsp;
            <fieldset style="width: 98%">
              <legend>需上传附件数(可上传附件时生效)</legend>
              <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
                <tr>
                  <td height=23></td>
                </tr>

                <tr>
                  <td>
                    <input class="text" type="text" name="ATTNUM" size="30" maxlength="3" value="<%=entityActivity.getATTNUM()%>" onkeypress="event.returnValue=CheckNumberPoint();" >

                  </td>
                </tr>
              </table>
              <br>
            </fieldset>
          </DIV>
        <DIV class="tagContent" id="tagContent7">
            <br>
            &nbsp;
            <fieldset style="width: 98%">
              <legend>参与者属性管理</legend>
              <table border='0' width="100%" cellspacing="0" cellpadding="0" align=center>
                <tr>
                  <td colspan=2 height=23>                  </td>
                </tr>
                <tr>
                  <td colspan="2">
                    <table border='0' width="70%" cellspacing="0" cellpadding="0" align=center>
                      <tr>
                        <td colspan=3 height=23>                        </td>
                      </tr>
                      <tr>
                        <td width="45%" align="center" height=23>
                          <font class="AlertSign">待选用户组</font>
                        </td>
                        <td width="10%" align="center">
                          <font class="AlertSign">操作</font>
                        </td>
                        <td width="45%" align="center">
                          <font class="AlertSign">已选用户组</font>
                        </td>
                      </tr>
                      <tr>
                        <td>
                          <select name="UserGroupSrcList"  style="width:320px;height:180px"  size=15 multiple>
                          <%
                            if (groups1 != null)
                              for (i = 0; i < groups1.length; i++) {
                                out.print("<option value='" + groups1[i].getID() + "'>" + groups1[i].getNAME() + "</option>");
                              }
                          %>
                          </select>
                          <br>
                          <input type="checkbox" name="SelAllX" onClick="JavaScript:CheckBoxSel(this.checked,'UserGroupSrcList');">
                          全选
                          &nbsp;&nbsp;
                          <Font class="WriteSign">注：使用Ctrl键可选择多个</Font>
                          <br>
                        </td>
                        <td align=center>
                          <!--img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/PuArrow_U.gif" style="cursor:pointer" title="上移" onclick="javascript:upFromDestList();"><br><br-->
                          <img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/PuArrow_R.gif" style="cursor:pointer" title="增加功能" onClick="javascript:addSrcToDestListPu(window.RegForm.UserGroupSrcList,window.RegForm.UserGroupDestList)">
                          <br>
                          <br>
                          <img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/PuArrow_L.gif" style="cursor:pointer" title="删除功能" onClick="javascript:deleteFromDestListPu(window.RegForm.UserGroupDestList)">
                          <br>
                          <br>
                          <!--img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/PuArrow_D.gif"  style="cursor:pointer" title="下移" onclick="javascript:downFromDestList();"-->
                        </td>
                        <td>
                          <select name="UserGroupDestList"  style="width:320px;height:180px"  size=15 multiple>
                          <%
                            if (groups2 != null)
                              for (i = 0; i < groups2.length; i++) {
                                out.print("<option value='" + groups2[i].getID() + "'>" + groups2[i].getNAME() + "</option>");
                              }
                          %>
                          </select>
                          <br>
                          <input type="checkbox" name="SelAllX" onClick="JavaScript:CheckBoxSel(this.checked,'UserGroupDestList');">
                          全选
                          &nbsp;&nbsp;
                          <Font class="WriteSign">注：使用Ctrl键可选择多个</Font>
                          <br>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>
              <br>
            </fieldset>
          </DIV>
        </DIV>
        </DIV>

    </td>
  </tr>
  <tr valign="bottom" >
    <td valign="bottom">
      <center>
        <table cellspacing="0" cellpadding="0" border='0'>
          <tr>
            <%=userUI.ClickButton("保存","JavaScript:if(Check(document.RegForm)){window.RegForm.Act.value='Operate';document.RegForm.submit();}","buttonSave.gif",user.getUserImage())%>
            <% if("6".equals(user.getUserWINDOWTYPE())){%>
                 <%=userUI.ClickButton1("关闭","window.parent.document.location.reload();parent.layer.closeAll();","buttonClose.gif",user.getUserImage())%>
            <% }else{%>
                 <%=userUI.ClickButton("关闭","JavaScript:window.opener.document.location.reload();window.close();","buttonReturn.gif",user.getUserImage())%>
            <% }%>

          </tr>
        </table>
      </center>
    </td>
  </tr>
</table>
<% if(!"6".equals(user.getUserWINDOWTYPE())){%>
<%=userUI.ShowFootHtml()%>
<%}%>
<SCRIPT LANGUAGE="javascript">

 setTimeout("fillgridOverTimeField()",300);

</SCRIPT>
</FORM>
</BODY>
</HTML>
<%
//清空相关对象
user =null;
userUI=null;
entityActivity=null;
flowManageAct=null;
flowSetup=null;
%>
