<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Collection" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.tool.SzDateHelp" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.flow.*" %>
<%@ include file="/sessionInfo.jsp"%>
<%
  String strLevel = "../../";
%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
    //获取提交的参数
    String sType = SzConvert.toZeroStr(request.getParameter("type"));
    String sPage = SzConvert.toZeroStr(request.getParameter("page"));
    String sSearch = SzConvert.strWriteData(request.getParameter("txtSearch"));
    String sPKEY = SzConvert.toZeroStr(request.getParameter("PKEY"));
    String sTable_type = "SZKC_CPFL";
%>
<%
    SzData szData = null;
    SzDataInfo szDataInfo = null;

    String sOPERATOR = request.getParameter("OPERATOR");
    String sKEY =  SzConvert.toZeroStr(request.getParameter("KEY"));
    String sReadonly = "";
    boolean bReadonly = false;
    if (sOPERATOR.equals("detail")) {
        sReadonly = "readonly";
        bReadonly = true;
    }
    //读取数据
    LcTypeInfo lcTypeInfo = null;
    LcType lcType = new LcType();
    if (!sKEY.equals("0")) {
        lcTypeInfo = (LcTypeInfo)lcType.getInfoByKey(Integer.parseInt(sKEY));
    }
    if (lcTypeInfo == null) {
        lcTypeInfo = new LcTypeInfo();
        lcTypeInfo.setFLDLXM(szLoginInfo_SESSION.getDLXM());
        lcTypeInfo.setFLSJ(SzDateHelp.getTimeStr());
        lcTypeInfo.setFLDLID(szLoginInfo_SESSION.getDLID());
        lcTypeInfo.setFLBMID(iBMID_SESSION);
    } else {
    }

%>

<body>
<!-----上面的工具栏------>
<form name="formUpdate" method="post">
  <input type="hidden" name="PKEY" value="<%=sPKEY%>">
  <input type="hidden" name="page" value="<%=sPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="OPERATOR" value="<%=sOPERATOR%>">
  <input type="hidden" name="KEY" value="<%=sKEY%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="detailCount" value="0">
<%@ include file="/flow/title.jsp"%>
<table width="100%">
  <tr>
    <td>
    <% if (!bReadonly) { %>
      <%=SzPageHelp.saveButton()%>
    <% } %>
      <%=SzPageHelp.backButton()%>
    </td>
  </tr>
</table>

<!-----信息维护------>
<table width="600" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="3" cellspacing="0">
<DIV id=divSZFORMtable1 style="BACKGROUND: #c0c0c0; CURSOR: hand; HEIGHT: 20px"><INPUT id=XX1 size=10 name=XX1><INPUT id=XX14 size=10 name=XX14><INPUT id=XX15 size=10 name=XX15><INPUT id=XX19 size=10 name=XX19><INPUT id=XX20 size=10 name=XX20></DIV>
<TBODY>
<TR id=SZFORMtr1>
<TD class=trMouseOut id=SZFORMtd1 style="CURSOR: hand">上级分类</TD>
<TD class=trMouseOut id=SZFORMtd2 style="CURSOR: hand"><input type=hidden class=txtClass1 id=XX10 size=10 name=XX10>
<%  String FLBH_SJ = SzLevelNumber.getParentNumber(lcTypeInfo.getFLBH()); %>
<%=SzPageHelp.numberSelectTree("SZLC_FL","FLID","FLMC","FLBH", "FLGSID=" + szCOMPANY_SESSION, "XX10_SJ", FLBH_SJ, "txtClass1")%></TD>
<TD class=trMouseOut id=SZFORMtd13 style="CURSOR: hand">分类名称</TD>
<TD class=trMouseOut id=SZFORMtd19 style="CURSOR: hand"><INPUT class=txtClass1 id=XX2 size=10 name=XX2></TD></TR>

<!-- ---------
<TR id=SZFORMtr2>
<TD class=trMouseOut id=SZFORMtd3 style="CURSOR: hand">能使用的表单</TD>
<TD class=trMouseOut id=SZFORMtd4 style="CURSOR: hand" colSpan=3>
<INPUT type='hidden' id=XX11 name=XX11>
<INPUT class=txtClass2 id=XX11_NAME readOnly size=10 name=XX11_NAME>
<input type="button" name="btnSelect" class="btnClassShort" value="选择" OnClick="javascript:OpenIdSingleWin('SZLC_SPBD', 'formUpdate.XX11','formUpdate.XX11_NAME');"></TD></TR>
<TR id=SZFORMtr3>
<TD class=trMouseOut id=SZFORMtd5 style="CURSOR: hand">能使用的部门<br>
    <% if (!bReadonly) {%>
      <input type="button" name="btnSelect" class="btnClassShort" value="选择" OnClick="javascript:OpenWin24('formUpdate.XX19','formUpdate.XX17');">
    <% } %>
</TD>

<TD class=trMouseOut id=SZFORMtd6 style="CURSOR: hand" colSpan=3><TEXTAREA class=areaClass2 id=XX17 name=XX17 readOnly></TEXTAREA></TD></TR>
<TR id=SZFORMtr4>
<TD class=trMouseOut id=SZFORMtd7 style="CURSOR: hand">能使用的人员<br>
    <% if (!bReadonly) {%>
      <input type="button" name="btnSelect" class="btnClassShort" value="选择" OnClick="javascript:OpenWin14('formUpdate.XX20','formUpdate.XX18');">
    <% } %>
</TD>

<TD class=trMouseOut id=SZFORMtd8 style="CURSOR: hand" colSpan=3><TEXTAREA class=areaClass2 id=XX18 name=XX18 readOnly></TEXTAREA></TD></TR>
<TR id=SZFORMtr5>
<TD class=trMouseOut id=SZFORMtd9 style="CURSOR: hand">其他1</TD>
<TD class=trMouseOut id=SZFORMtd10 style="CURSOR: hand"><INPUT class=txtClass1 id=XX6 size=10 name=XX6></TD>
<TD class=trMouseOut id=SZFORMtd17 style="CURSOR: hand">其他2</TD>
<TD class=trMouseOut id=SZFORMtd23 style="CURSOR: hand"><INPUT class=txtClass1 id=XX7 size=10 name=XX7></TD></TR>

-->
<TR id=SZFORMtr6>
<TD class=trMouseOut id=SZFORMtd11 style="CURSOR: hand">录入人员</TD>
<TD class=trMouseOut id=SZFORMtd12 style="CURSOR: hand"><INPUT class=txtClass1 id=XX8 readOnly size=10 name=XX8></TD>
<TD class=trMouseOut id=SZFORMtd18 style="CURSOR: hand">录入时间</TD>
<TD class=trMouseOut id=SZFORMtd24 style="CURSOR: hand"><INPUT class=txtClass1 id=XX9 readOnly size=10 value="2008-03-31 15:04" name=XX9></TD></TR></TBODY></TABLE>

</form>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
  <input type="hidden" name="page" value="<%=sPage%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="type" value="<%=sType%>">
</form>
<script language="javascript" src="../../share/js/commonTool.js"></script>
<script language="javascript">
  //动态的隐藏
  var oDivSZFORMtable1 = document.getElementById("divSZFORMtable1");
  if (oDivSZFORMtable1 != null) {
    oDivSZFORMtable1.style.display="none";
  }
  //动态的加入XX2的值
  var oXX1 = document.getElementById("XX1");
  if (oXX1 != null) {
    oXX1.value = "<%=lcTypeInfo.getFLID()%>";
  }
  var oXX2 = document.getElementById("XX2");
  if (oXX2 != null) {
    oXX2.value = "<%=lcTypeInfo.getFLMC()%>";
  }
  var oXX6 = document.getElementById("XX6");
  if (oXX6 != null) {
    oXX6.value = "<%=lcTypeInfo.getFLBY1()%>";
  }
  var oXX7 = document.getElementById("XX7");
  if (oXX7 != null) {
    oXX7.value = "<%=lcTypeInfo.getFLBY2()%>";
  }
  var oXX8 = document.getElementById("XX8");
  if (oXX8 != null) {
    oXX8.value = "<%=lcTypeInfo.getFLDLXM()%>";
  }
  var oXX9 = document.getElementById("XX9");
  if (oXX9 != null) {
    oXX9.value = "<%=lcTypeInfo.getFLSJ()%>";
  }
  var oXX10 = document.getElementById("XX10");
  if (oXX10 != null) {
    oXX10.value = "<%=lcTypeInfo.getFLBH()%>";
  }
  var oXX11 = document.getElementById("XX11");
  if (oXX11 != null) {
  var oXX11_NAME = document.getElementById("XX11_NAME");
  <%
    String XX11_NAME = "";
    szData = new SzData("SZLC_SPBD","BDID","BDMC");
    XX11_NAME = szData.getMainByKey(lcTypeInfo.getFLSYBD());
  %>
    oXX11.value = "<%=lcTypeInfo.getFLSYBD()%>";
    oXX11_NAME.value = "<%=XX11_NAME%>";

  }
  var oXX14 = document.getElementById("XX14");
  if (oXX14 != null) {
    oXX14.value = "<%=lcTypeInfo.getFLDLID()%>";
  }
  var oXX15 = document.getElementById("XX15");
  if (oXX15 != null) {
    oXX15.value = "<%=lcTypeInfo.getFLBMID()%>";
  }
  var oXX17 = document.getElementById("XX17");
  if (oXX17 != null) {
    oXX17.value = "<%=lcTypeInfo.getFLSYBMMC()%>";
  }
  var oXX18 = document.getElementById("XX18");
  if (oXX18 != null) {
    oXX18.value = "<%=lcTypeInfo.getFLSYDLXM()%>";
  }
  var oXX19 = document.getElementById("XX19");
  if (oXX19 != null) {
    oXX19.value = "<%=lcTypeInfo.getFLSYBM()%>";
  }
  var oXX20 = document.getElementById("XX20");
  if (oXX20 != null) {
    oXX20.value = "<%=lcTypeInfo.getFLSYDL()%>";
  }
  //判断是否有明细，如果有就动态增加
</script>
<script language="javascript">

  function FormSave(formName, url) {
    //检查是否可以保存
    if (!notSpace(formName.XX2, "分类名称")) {
      return false;
    }

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