<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.database.SzPageInfo" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.system.SzLevelNumber" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ page import="net.sz600.flow.*" %>
<%@ page import="net.sz600.organize.*" %>
<%@ include file="/sessionInfo.jsp"%>
<head>
<title></title>
<base target="_self">
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
    //传阅窗口，选择人员后，发送给人员，自动关闭
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));
    int iFormID = SzConvert.toInt(request.getParameter("FormID"));
    int iInfoID = SzConvert.toInt(request.getParameter("InfoID"));
    String sType = SzConvert.toZeroStr(request.getParameter("type"));

    //加入选择人员的信息，选择后提交到control
    if (sOPERATOR.equals("")) {
    	sOPERATOR = "press";
    }
    //文件标题
    BdValueControl valueControl = new BdValueControl();
    valueControl.setModuleInfo(iFormID);
    String sTitle = valueControl.getMainByKey(iInfoID);
    LcFlowControl lcFlowControl = new LcFlowControl();
    String s_transact[] = lcFlowControl.getCurrentTransactingInfo(iFormID, iInfoID, ",", false); 

    String sTypeName = "";
%>
<body>
<!-----上面的工具栏------>
<form name="formUpdate" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="InfoID" value="<%=iInfoID%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="OPERATOR" value="<%=sOPERATOR%>">  
  <input type="hidden" name="CBRYXM" value="<%=sDLXM_SESSION%>">
  <input type="hidden" name="CBRY" value="<%=iDLID_SESSION%>">
  <input type="hidden" name="CBBCBRID" value="<%=s_transact[2]%>">  
  <input type="hidden" name="CBBZID" value="<%=s_transact[3]%>">
<table width="100%">
  <tr>
    <td>
    <%
    int iNextStepID = 0;
    if (sType.equals("0")) {
    	sTypeName = "催办";
    	out.println(SzPageHelp.saveButton());
    } else if (sType.equals("1")) {
    	sTypeName = "跳转";
    	iNextStepID = lcFlowControl.getSkipStepID(SzConvert.toInt(s_transact[3]),s_transact[2]);
    	if (iNextStepID > 0) {
    		out.println(SzPageHelp.saveButton());
    	} else {
    		out.println("<font color='red'>最后一个节点，不能跳！</font>");
    	}
    }     	
    %>
    <%=SzPageHelp.closeButton()%>
    <input type="hidden" name="NextStepID" value="<%=iNextStepID%>">
    </td>
  </tr>
</table>

<!-----信息维护------>
<table width="600" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="3" cellspacing="0">
  <tr>
    <td width="30%" align="right" valign="top"><font color="red">*</font>
    	<%=sTypeName%>说明
    </td>
    <td align="left">
      <TEXTAREA class=areaClass2 name="CBSM"><%=s_transact[1]%></TEXTAREA>
    </td>
  </tr> 
  <tr>
    <td width="30%" align="right" valign="top">文件标题</td>
    <td align="left">
      <input type="text" class="txtClass2" name="CBXXBT" value="<%=sTitle %>" readonly>
    </td>
  </tr> 
  <tr>
    <td width="30%" align="right" valign="top">被<%=sTypeName%>人员</td>
    <td align="left">
      <input type="text" class="txtClass2" name="CBBCBRXM" value="<%=s_transact[0]%>" readonly>
    </td>
  </tr> 
  <tr>
    <td width="30%" align="right" valign="top">提醒设置</td>
    <td align="left">
      <input type="checkbox" name="MessageAlert" value="1" checked disabled>是否即时信息提醒
    </td>
  </tr> 
  <% 
  	if (sType.equals("1")) { 
  
  %>
  <tr>
    <td width="30%" align="right" valign="top">办理人员</td>
    <td align="left">
      <%
      out.println(lcFlowControl.printTransactPersonInfo3(iNextStepID, s_transact[2])); 
      //System.out.println(lcFlowControl.printTransactPersonInfo3(iNextStepID, s_transact[2]));
      %>
    </td>
  </tr> 
  <% } %>
</table>

</form>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
  <input type="hidden" name="FormID" value="<%=iFormID%>"> 
  <input type="hidden" name="InfoID" value="<%=iInfoID%>">
  <input type="hidden" name="type" value="<%=sType%>">
</form>
<script language="javascript" src="../../share/js/commonTool.js"></script>
<script language="javascript" src="../../share/js/selectTool.js"></script>
<script language="javascript">
  function FormSave(formName, url) {    
    if (!notSpace(formName.CBSM, "说明")) {
      return false;
    }
    var vType = formName.type.value;
    if (vType == "1") {
    	var BZRYID = ValueOfCheck(formName.BZRYID);
      if (BZRYID == "0" || BZRYID == "") {
    	  alert("请至少选择一个办理人员！");
    	  return false;
      }
    }

    formName.action = url;
    formName.submit();
  }
 
</script>
</body>


