<%@ page contentType="text/html;charset=gbk" %>
<%@ 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=GBK">
<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;
    }
    //读取数据
    LcFormInfo lcFormInfo = null;
    LcForm lcForm = new LcForm();
    if (!sKEY.equals("0")) {
        lcFormInfo = (LcFormInfo)lcForm.getInfoByKey(Integer.parseInt(sKEY));
    }
    if (lcFormInfo == null) {
        lcFormInfo = new LcFormInfo();
    	lcFormInfo.setBDID(SzKey.getInstance().genNextKey("SZLC_SPBD"));
    } 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="title.jsp"%>
<table width="100%">
  <tr>
    <td>
    <% if (!bReadonly) { %>
      <%=SzPageHelp.saveButton()%>
    <% } %>
      <%=SzPageHelp.backButton()%>
    </td>
  </tr>
</table>

<!-----信息维护------>
<TABLE id=SZFORMtable1  cellSpacing=0 borderColorDark=#ffffff cellPadding=3 width=650 borderColorLight=#c0c0c0 border=1>
<DIV id=divSZFORMtable1 style="BACKGROUND: #c0c0c0; CURSOR: hand; HEIGHT: 20px"></DIV>
<TBODY>
<TR id=SZFORMtr1>
<TD class=trMouseOut id=SZFORMtd1 >表单ID</TD>
<TD class=trMouseOut id=SZFORMtd1 ><INPUT class=txtClass1 id=XX1 size=10 name=XX1></TD>
<TD class=trMouseOut id=SZFORMtd1 >表单名称</TD>
<TD class=trMouseOut id=SZFORMtd1 ><INPUT class=txtClass1 id=XX2 size=10 name=XX2></TD>
</TR>
<TR id=SZFORMtr2>
<TD class=trMouseOut id=SZFORMtd5 >表单描述</TD>
<TD class=trMouseOut id=SZFORMtd6 ><INPUT class=txtClass1 id=XX3 size=10 name=XX3></TD>
<TD class=trMouseOut id=SZFORMtd7 >信息主表</TD>
<TD class=trMouseOut id=SZFORMtd8 ><INPUT class=txtClass1 id=XX4 size=10 name=XX4></TD></TR>
<TR id=SZFORMtr3>
<TD class=trMouseOut id=SZFORMtd9 >主信息字段</TD>
<TD class=trMouseOut id=SZFORMtd10 ><INPUT class=txtClass1 id=XX5 size=10 name=XX5></TD>
<TD id=SZFORMtd11 >关键字段</TD>
<TD class=trMouseOut id=SZFORMtd12 ><INPUT class=txtClass1 id=XX6 size=10 name=XX6></TD></TR>
<TR id=SZFORMtr4>
<TD class=trMouseOut id=SZFORMtd13 >申请地址</TD>
<TD class=trMouseOut id=SZFORMtd14  colSpan=3><INPUT class=txtClass2 id=XX7 size=10 name=XX7></TD></TR>
<TR id=SZFORMtr5>
<TD class=trMouseOut id=SZFORMtd17 >待办地址</TD>
<TD class=trMouseOut id=SZFORMtd18  colSpan=3><INPUT class=txtClass2 id=XX8 size=10 name=XX8></TD></TR>
<TR id=SZFORMtr6>
<TD class=trMouseOut id=SZFORMtd21 >已办地址</TD>
<TD class=trMouseOut id=SZFORMtd22  colSpan=3><INPUT class=txtClass2 id=XX9 size=10 name=XX9></TD></TR>
<TR id=SZFORMtr7>
<TD class=trMouseOut id=SZFORMtd25 >模块XML</TD>
<TD class=trMouseOut id=SZFORMtd26 ><INPUT class=txtClass1 id=XX10 size=10 name=XX10></TD>
<TD class=trMouseOut id=SZFORMtd29 >表单名称</TD>
<TD class=trMouseOut id=SZFORMtd30 style="CURSOR: hand"><INPUT class=txtClass1 id=XX11 size=10 name=XX11></TD>
</TR>
<TR id=SZFORMtr8>
<TD class=trMouseOut id=SZFORMtd31 style="CURSOR: hand">备用字段2</TD>
<TD class=trMouseOut id=SZFORMtd32 COLSPAN="3"><INPUT class=txtClass2 id=XX12 size=10 name=XX12></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 = "<%=lcFormInfo.getBDID()%>"; 
  } 
  var oXX2 = document.getElementById("XX2");  
  if (oXX2 != null) { 
    oXX2.value = "<%=lcFormInfo.getBDMC()%>"; 
  } 
  var oXX3 = document.getElementById("XX3");  
  if (oXX3 != null) { 
    oXX3.value = "<%=lcFormInfo.getBDMS()%>"; 
  } 
  var oXX4 = document.getElementById("XX4");  
  if (oXX4 != null) { 
    oXX4.value = "<%=lcFormInfo.getBDBM()%>"; 
  } 
  var oXX5 = document.getElementById("XX5");  
  if (oXX5 != null) { 
    oXX5.value = "<%=lcFormInfo.getBDBTZD()%>"; 
  } 
  var oXX6 = document.getElementById("XX6");  
  if (oXX6 != null) { 
    oXX6.value = "<%=lcFormInfo.getBDGJZD()%>"; 
  } 
  var oXX7 = document.getElementById("XX7");  
  if (oXX7 != null) { 
    oXX7.value = "<%=lcFormInfo.getBDSQDZ()%>"; 
  } 
  var oXX8 = document.getElementById("XX8");  
  if (oXX8 != null) { 
    oXX8.value = "<%=lcFormInfo.getBDDBDZ()%>"; 
  } 
  var oXX9 = document.getElementById("XX9");  
  if (oXX9 != null) { 
    oXX9.value = "<%=lcFormInfo.getBDYBDZ()%>"; 
  } 
  var oXX10 = document.getElementById("XX10");  
  if (oXX10 != null) { 
    oXX10.value = "<%=lcFormInfo.getBDLJ()%>"; 
  } 
  var oXX11 = document.getElementById("XX11");  
  if (oXX11 != null) { 
    oXX11.value = "<%=lcFormInfo.getBDBY1()%>"; 
  } 
  var oXX12 = document.getElementById("XX12");  
  if (oXX12 != null) { 
    oXX12.value = "<%=lcFormInfo.getBDBY2()%>"; 
  } 
  //判断是否有明细，如果有就动态增加   
</script>
<script language="javascript">

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

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