<%@ page contentType="text/html; charset=GBK" %>
<%@ page import = "zr.zrpower.common.util.SysPreperty" %>
<%@ page import = "zr.zrpower.entity.sys.SessionUser" %>
<%@ page import = "zr.zrpower.flowengine.mode.base.Package"%>
<%@ page import = "zr.zrpower.flowengine.service.FlowSetup"%>
<%@ page import = "zr.zrpower.ejb.sys.UIService" %>

<%@ page import = "zr.zrpower.ejb.sys.UserService"%>
<%@ page import = "java.lang.Object"%>
<%@ page import = "java.util.*" %>
<%@ page import = "java.text.*" %>
<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
FlowSetup FlowPackage= new FlowSetup();
String ID = request.getParameter("SelectedItems");
Package Pack = FlowPackage.getPackageID(ID);
UserService name=new UserService();
String TureName = name.GetUserName(Pack.getCREATEPSN());
String strHelpName = "";
%>
<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 type="text/css" rel="stylesheet" href="../../../zrsysmanage/css/<%=user.getUserCSS()%>">
<SCRIPT LANGUAGE="JavaScript" src="../../../zrsysmanage/script/Public.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="">
function Check(theForm){
if (theForm.IDENTIFICATION.value == ""){
    <%if(user.getUserWINDOWTYPE().equals("6")){%>
      layer.alert('标识不能为空！', {icon: 7});
    <%}else{%>
      alert("标识不能为空！");
    <%}%>

    theForm.IDENTIFICATION.focus();
    return (false);
  }
   if (theForm.NAME.value == ""){
    <%if(user.getUserWINDOWTYPE().equals("6")){%>
      layer.alert('名称不能为空！', {icon: 7});
    <%}else{%>
      alert("名称不能为空！");
    <%}%>

    theForm.NAME.focus();
    return (false);
  }
 RegForm.Act.value='edit';
  return true;
}


function SelectHelp()
{
  var url='../../../zrsysmanage/PublicJsp/HelpList1.jsp';
  var status='dialogHeight:380px;dialogWidth:280px;status:0;help:no;center:yes';
  var rtnResult=window.showModalDialog(url,window,status);
  if (rtnResult!=null)
   {
     var   sarray=new   Array();
     sarray=rtnResult.split(',');
     RegForm.HELP.value=sarray[0];
     RegForm.AFTERUNIT.value=sarray[1];
   }
}
</script>
</HEAD>
<BODY class="BodyMain">
<FORM action="../../../flowpackage.do" method="post" name="RegForm" onsubmit="return Check(this);">
<input type="hidden" name="ID" value='<%=ID%>' >
<input type="hidden" name="Act" value="edit">
<input type="hidden" name="FID" value="<%=Pack.getFID()%>">
<input type="hidden" name="ICO" value="1">

<%if(!user.getUserWINDOWTYPE().equals("6")){ %>
<%=userUI.ShowHeadHtml("流程分类管理",user.getUserImage())%>
<%=userUI.ShowBodyStartHtml()%>
 <br>&nbsp;
<%}%>

           <DIV id="divMessage" style='padding-left:0;padding-top:0;width:96%;height:100%;overflow:auto'>
           <fieldset>
           <legend>编辑流程分类信息</legend>
           <table border="0" class="inputTable" cellspacing="0" cellpadding="0" align="center">
             <tr>
               <td class="inputTdtitle">标识：</td>
               <td class="inputTd"><input class="text" type="text" name="IDENTIFICATION" size="50" value="<%=Pack.getIDENTIFICATION()%>" readonly="readonly" maxlength="50"></td>
           </tr>
           <tr>
               <td class="inputTdtitle">名称：</td>
               <td class="inputTd" ><input class="text" type="text" name="NAME" size="50" value="<%=Pack.getNAME()%>" maxlength="100"></td>
          </tr>
          <tr>
               <td class="inputTdtitle">描述：</td>
               <td class="inputTd" ><input class="text" type="text" name="DESC1" size="50" value="<%=Pack.getDESC1()%>" maxlength="300"></td>
          </tr>


        <td class="inputTdtitle">发布状态：</td>
        <td class="inputTd">
          <input type="radio" name="STATUS" value=1 onclick="document.RegForm.STATUS.value='1'" <% if (Pack.getSTATUS().equals("1")){%>checked<%}%>>
          启用　
          <input type="radio" name="STATUS" value=0 onclick="document.RegForm.STATUS.value='0'" <% if (Pack.getSTATUS().equals("0")){%>checked<%}%>>
          停用
        </td>



            <tr>
               <td class="inputTdtitle">创建者：</td>
               <td class="inputTd" ><input class="text" type="text" name="CREATEPSNNAME" size="50"value="<%=TureName%>" maxlength="300" readonly="readonly"><input type="hidden" name="CREATEPSN" value="<%=Pack.getCREATEPSN()%>"></td>
           </tr>
            <tr>
               <td class="inputTdtitle">创建日期：</td>
               <td class="inputTd" ><input class="text" type="text" name="CREATEDATE" size="50" value="<%=Pack.getCREATEDATE().toString().substring(0,10)%>" readonly="readonly" maxlength="300"></td>
           </tr>
          </table>
          <br>
          </fieldset>
                 <center><br>

                  <table cellspacing="0" cellpadding="0" border='0'><tr>
                 <%=userUI.ClickButton("保存","JavaScript:if(Check(document.RegForm)){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>
     </DIV>
<%if(!user.getUserWINDOWTYPE().equals("6")){ %>
<!--HTML Foot显示表单尾-->
<%=userUI.ShowFootHtml()%>
<%}%>
</FORM>
</BODY>
</HTML>
<%
//清空相关对象
user = null;
userUI = null;
FlowPackage = null;
Pack = null;
name = null;
%>
