<%@ page contentType="text/html; charset=GB2312" %>
<%@ 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.flowengine.service.FlowMonitor"%>
<%@ page import = "zr.zrpower.flowengine.mode.monitor.FLOW_CONFIG_ENTRUST"%>
<%@ page import = "zr.zrpower.ejb.sys.UIService" %>

<%@ page import = "java.lang.Object" %>
<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
String userid=user.getUserID();
UIService userUI =new UIService();
FlowMonitor Fmonitor = new FlowMonitor();
String ID = request.getParameter("SelectedItems");
FLOW_CONFIG_ENTRUST  Entrust=Fmonitor.getEntrustID(ID);
DateWork dw=new DateWork();
%>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<link REL="stylesheet" type="text/css" href="../../../zrsysmanage/css/<%=user.getUserCSS()%>">
<Script Language="JavaScript" Src="../../../zrsysmanage/script/Public.js"></Script>
<LINK type="text/css" rel="stylesheet" href="../../../zrsysmanage/html5/css/style_tables.css">
<SCRIPT LANGUAGE="JavaScript" src="../../../zrsysmanage/html5/script/jquery-2.0.3.min.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="../../../zrsysmanage/html5/layer/layer.js"></SCRIPT>
<SCRIPT LANGUAGE="Javascript" src="../../../zrsysmanage/html5/script/systype.js"></SCRIPT>

<script language="JavaScript" type="text/JavaScript">
<!--
function Check(theForm)
{
  if ((trim(theForm.SDATE.value)=="")){
    <%if(user.getUserWINDOWTYPE().equals("6")){ %>
         layer.alert('开始时间名称不能为空!', {icon: 7});
    <%}else{%>
         alert("开始时间名称不能为空!");
    <%}%>
    theForm.PLANDATEBEGIN.focus();
    return false;
  }

    if ((trim(theForm.EDATE.value)=="")){
    <%if(user.getUserWINDOWTYPE().equals("6")){ %>
         layer.alert('结束时间不能为空!', {icon: 7});
    <%}else{%>
         alert("结束时间不能为空!");
    <%}%>
    theForm.PLANDATEEND.focus();
    return false;
  }

   if ((trim(theForm.Browse_User_Name.value)=="")){
    <%if(user.getUserWINDOWTYPE().equals("6")){ %>
         layer.alert('所选择用户人员不能为空!', {icon: 7});
    <%}else{%>
         alert("所选择用户人员不能为空!");
    <%}%>
    theForm.Browse_User_Name.focus();
    return false;
  }
  RegForm.Act.value='edit';
return (true);
}


function Check1(theForm)
{
  if (confirm("确定要删除当前选中的委托人吗？"))
  {RegForm.Act.value='del';
  return true;}
  else
  {return false;}
}
//-->
</script>
</HEAD>
<BODY class="BodyMain">
<FORM name="RegForm" method="post" action="../../../flowentrust.do" onsubmit="return Check(this);">
 <input type="hidden" id="Act" name="Act" value="edit">
 <input type="hidden" name="SUSERNO" value="<%=userid%>">
<input type="hidden" name="ID" value='<%=ID%>' >


<%if(!user.getUserWINDOWTYPE().equals("6")){ %>
<!--HTML Head表单头显示[显示内容,图标文件,用户肤色的图片文件夹]-->
<%=userUI.ShowHeadHtml("委托人管理","IcoTitle.gif",user.getUserImage())%>
<!--HTML Body Start显示表单开始部分-->
<%=userUI.ShowBodyStartHtml()%>
<%}%>
<br>&nbsp;
           <DIV id="divMessage" style='padding-left:0;padding-top:0;width:100%;height:100%;overflow:auto'>
           &nbsp;
             <fieldset style="width:96%">
           <legend>编辑委托人员</legend>
             <TABLE class="inputTable" border='0' width="100%"  cellspacing="0" cellpadding="0" align=center>
               <TR>
               <TD class="inputTdtitle">委托开始时间：</TD>
               <TD class="inputTd"><input name="SDATE" size="56" class="text" onkeypress="return CheckDate();" onblur="ValidDate(this);" onkeyup="onlyDate();"  maxlength="10" value="<%=dw.DateToString(Entrust.getSDATE())%>"></TD>
             </TR>
             <TR>
               <TD class="inputTdtitle">委托结束时间：</TD>
               <TD class="inputTd"><input name="EDATE" size="56" class="text" onkeypress="return CheckDate();" onblur="ValidDate(this);" onkeyup="onlyDate();"  maxlength="10" value="<%=dw.DateToString(Entrust.getEDATE())%>"></TD>
             </TR>
               <TR>
               <TD class="inputTdtitle">委托人：</TD>
           <td>
               <table cellspacing="0" cellpadding="0" border='0'>
          <tr>
            <td><input type="text" class="text" id="Browse_User_Name" name="Browse_User_Name" size="56" maxlength="1000" readonly="true" value="<%=Fmonitor.GetTrueName(Entrust.getIUSERNO())%>">
                  <input type="hidden" name="IUSERNO" id="IUSERNO" value="<%=Entrust.getIUSERNO()%>"></td>
        </tr></table>
               </td>
             </TR>
    </table>
             <br>
              </fieldset>
              <center><br>
                 <table cellspacing="0" cellpadding="0" border='0'><tr>
                 <td><%=userUI.ClickButton("修 改","JavaScript:if(Check(document.RegForm)){document.RegForm.submit();}","buttonSave.gif",user.getUserImage())%></td><td width="20"></td>
                 <td><%=userUI.ClickButton("删 除","JavaScript:if(Check1(document.RegForm)){document.RegForm.submit();}","buttonDelete.gif",user.getUserImage())%></td><td width="20"></td>
                 <td><%=userUI.ClickButton("重 填","JavaScript:document.RegForm.reset();","buttonReset.gif",user.getUserImage())%></td><td width="20"></td>
                 <td><%=userUI.ClickButton("返 回","JavaScript:history.back();","buttonReturn.gif",user.getUserImage())%></td><td width="20"></td>
                 </tr></table>
                 </center>
           </DIV>

<%if(!user.getUserWINDOWTYPE().equals("6")){ %>
<!--HTML Foot显示表单尾-->
<%=userUI.ShowFootHtml()%>
<%}%>
</FORM>
</BODY>
</HTML>
<%
//清空相关对象
user = null;
userUI = null;
Fmonitor = null;
Entrust = null;
%>
