<%@ page contentType="text/html; charset=GBK" %>
<%@ page import = "zr.zrpower.common.util.SysPreperty" %>
<%@ page import = "zr.zrpower.common.util.DateWork" %>
<%@ page import = "zr.zrpower.entity.sys.SessionUser" %>
<%@ page import = "zr.zrpower.ejb.sys.UnitService" %>
<%@ page import = "zr.zrpower.flowengine.mode.base.Package" %>
<%@ page import = "zr.zrpower.flowengine.service.FlowControl"%>
<%@ page import = "zr.zrpower.flowengine.service.FlowConfig"%>
<%@ page import = "zr.zrpower.ejb.sys.UIService" %>
<%@ page import = "java.lang.Object"%>
<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
Package[] Package = null;
UnitService unitMgr = new UnitService();
String strtype = request.getParameter("type");
if (strtype==null){strtype="1";}


FlowConfig FlowConfig =new FlowConfig();
FlowControl FControl = new FlowControl();

String strTitle ="";
strTitle = "流程包";

%>
<%
String strCode = "";
String strName = "";

//得到查询的记录集
String strWhere = "  1=1 ";
Package = FlowConfig.GetPackageCustomList(strWhere);

String strFCode = "";
String Showdata = "";
String strPageName = "javascript:void(0)";

//得到查询的记录集
if (Package!=null && Package.length>0){

           Showdata = "tree.add('000','-1','流程包列表','"+strPageName+"');\r\n";
           for(int i=0;i<Package.length;i++){
             strCode = Package[i].getID();
             strFCode = Package[i].getFID();
             strName = Package[i].getNAME();
             Showdata = Showdata + "tree.add('"+strCode+"','"+strFCode+"','"+strName+"','"+strPageName+"');\r\n";

          }
}

%>

<HTML>
<HEAD>
<TITLE>选择流程包</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>
<link rel="StyleSheet" href="../../../ZrwebGui/dtree/dtree.css" type="text/css" />
<script type="text/javascript" src="../../../ZrwebGui/dtree/dtree.js"></script>
</HEAD>
<BODY class="BodyMain">
<Form name="webform" method="post" action="">

             <DIV id="divMessage1" style='padding-left:0;padding-top:0;width:100%;height:100%;overflow:auto'>

             <script type="text/javascript">

		var tree = new dTree('tree','../../../ZrwebGui/dtree/');

                <%=Showdata%>

		document.write(tree);

                tree.s=function(nodeId){ //添加单击事件

                  var type = "<%=strtype%>";


                  if (type=="1")
                  {
                     if (confirm("真的要移动到选择的流程包下吗？"))
                     {

                             window.returnValue = nodeId;
                             window.close();

                     }
                 }else
                 {
                    window.returnValue = nodeId;
                    window.close();
                 }

                }

	        </script>

<br><center>
           <table cellspacing="0" cellpadding="0" border='0'>
               <tr>
                 <%=userUI.ClickButton1("关 闭","window.close();","buttonClose.gif",user.getUserImage())%>
              </tr>
           </table>
</center>
             </DIV>




</form>

</BODY>

</HTML>
<%
//清空相关对象
user = null;
userUI = null;
Package = null;
unitMgr = null;
FlowConfig = null;
FControl = null;
%>
