<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.formEngine.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ page import="net.sz600.formCreate.*" %>
<%@ include file="/xml/formEngine2/sessionInfo2.jsp"%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="telephone=no" />
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
    BdOpenSelect bdOpenSelect = new BdOpenSelect();
    int i = 0;
    int iLen = 0;
    ArrayList list = bdOpenSelect.getList();
  
    String sModule = SzConvert.toSpaceStr(request.getParameter("module")); 
    String sObject = SzConvert.toZeroStr(request.getParameter("Object"));
    if (!sModule.equals("") && !sModule.endsWith(".xml")) {
    	sModule = sModule + ".xml";
    }

    BdFormControl formControl = new BdFormControl();
		boolean isFormEngine = formControl.isFormEngine(sModule);    
		
	  String sObjectType = SzConvert.toSpaceStr(request.getParameter("ObjectType"));
	  String sFunction = "OpenSelectWin";

    if (sObjectType.equals("101")) {
      sFunction = "OpenDetailSelectWin";
    }

%>
<!-----信息列表----->
<table width="100%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formList" method="post">
  <input type="hidden" name="name" value="">
  <input type="hidden" name="Object" value="<%=sObject%>">
  <tr class="trClassTitle2">
    <td>关联名称</td>
    <td>关联说明</td>
    <td>所属模块</td>      

    <td width="65">操作</td>
  </tr>
<%
		String temp = "";
		String str[]=null;
		BdOpenSelectInfo info = null;
		iLen = list.size();
		int j = 0;
    for (i=0; i<iLen; i++ ) {
    	info = (BdOpenSelectInfo)list.get(i);
   	
    	if (!sModule.equals("") && !sModule.equals(info.getModuleName())) {
    		continue;
    	}
    	temp = info.getGLSM();
    	j ++;
    	
%>
  <tr onMouseOver="javascript:this.className='trMouseOver'" onMouseOut="javascript:this.className='trMouseOut'">
    <td><%=temp%>&nbsp;</td>
    <td><%=info.getGLBZ()%>&nbsp;</td>
    <td><%=info.getModuleName()%>&nbsp;</td>
    <td width="30"><a href="#"  OnClick="Save('<%=temp %>');">确定</a></td>
  </tr>
<%
    }
    out.println(SzPageHelp.outIndexTableTr(j, SzProperties.I_PageSize, 4));
%>
  </form>
</table>

<!-----下面的工具栏------>
<table width="100%" cellpadding="1" cellspacing="0">
  <form name="formPage" method="post">
  <input type="hidden" name="name" value="">
  <input type="hidden" name="Object" value="<%=sObject%>">  
  <tr>
    <td align="right">
      &nbsp;
    </td>
  </tr>
  </form>
</table>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
</form>
<script language="javascript" src="<%=strLevel_SESSION%>share/js/commonTool.js"></script>
<script language="javascript">
  function Save(name) { 
  	var vObject = formList.Object.value;
  	if (vObject != null) {
  		//var oWindow = window.dialogArguments;
  		var oWindow = window.opener;
  		eval("oWindow." + vObject + ".value='" + name + "';"); 
  	}    
    window.close();
  }
</script>
