<%@ 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.monitor.FLOW_RUNTIME_PROCESS"%>
<%@ page import = "zr.zrpower.flowengine.mode.config.FLOW_CONFIG_ACTIVITY"%>
<%@ page import = "zr.zrpower.flowengine.service.FlowMonitor"%>
<%@ page import = "zr.zrpower.flowengine.service.FlowControl"%>
<%@ page import = "zr.zrpower.ejb.sys.UIService" %>

<%@ page import = "java.lang.Object"%>
<%@ page import = "java.util.*" %>
<%@ page import = "java.text.*" %>
<HTML>

<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
FlowMonitor fm = new FlowMonitor();
FlowControl FControl = new FlowControl();
String ID = request.getParameter("SelectedItems");
FLOW_RUNTIME_PROCESS frp = fm.getPro(ID);
//得到当前用户对当前流转的流程拥有的任务重分配的类别(1 本部门 2本单位)
String strAllotType = fm.GetUserAllotType(user.getUserID(),ID);
String showtype="1";
if (strAllotType.equals("1"))
{showtype="3";}
//根据活动ID得到活动实体
FLOW_CONFIG_ACTIVITY activity = null;
activity = FControl.GetFlowActivity(frp.getCURRACTIVITY());

%>

<HEAD>
<TITLE></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 language="JavaScript" type="">
function Check(theForm){
  if(theForm.DOPSN.value.length==0)
  {
   alert("请选择重分配的用户！");
   return false;
  }
  return true;
}
function SelectUser(){
        window.open("../../../zrsysmanage/PublicJsp/PsnIndex.jsp?type=1&id=DOPSN&name=InFile_Person","selectuser","top=60,left=100,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes,width=520,height=415");

}
</script>
</HEAD>
<BODY class="BodyMain">
<FORM action="AddFlow.jsp" method="post" name="RegForm" onsubmit="return Check(this);">
<input type="hidden" name="DOPSN" id="DOPSN" value='' >
<input type="hidden" name="ID" value='<%=ID%>'>
<input type="hidden" name="UserID" value="<%=user.getUserID()%>">
<input type="hidden" name="UNIT" value="<%=user.getUnitID()%>">
<input type="hidden" name="Act" value="edit1">

<%=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" readonly="readonly" name="NAME" size="51"  value="<%=frp.getNAME()%>" maxlength="50"></td>
           </tr>
           <tr>
               <td class="inputTdtitle">当前步骤：</td>
               <td class="inputTd"><input class="text" type="text" readonly="readonly" name="CURRACTIVITYNAME" size="51"  value="<%=activity.getNAME()%>"></td>
           </tr>
         <tr>
                  <td class="inputTdtitle">被分配人:</td>
                  <td>
                    <table cellspacing="0" cellpadding="0" border='0'>
                     <td><input class="text" readonly="readonly" type="text" name="InFile_Person" id="InFile_Person" size="51" maxlength="500" value=""></td>
                       <%=userUI.ClickButton1("选择分配人员…","SelectUser();","buttonSelect.gif",user.getUserImage())%>
                    </table>
                  </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())%><td width="20"></td>
                 <%=userUI.ClickButton("返 回","JavaScript:history.back();","buttonReturn.gif",user.getUserImage())%>
                 </tr></table>
                 </center>
          </DIV>

<!--HTML Foot显示表单尾-->
<%=userUI.ShowFootHtml()%>
</FORM>
</BODY>
</HTML>
<%
//清空相关对象
user = null;
userUI = null;
fm = null;
frp = null;
FControl = null;
activity = null;
%>
