<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Collection" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ 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 sModule = SzConvert.toSpaceStr(request.getParameter("module"));
    String formName = SzConvert.toSpaceStr(request.getParameter("formName"));
    int iFormID = SzConvert.toInt(request.getParameter("formID"));
	String sType  = SzConvert.toZeroStr(request.getParameter("type"));	//关联的ID
	String sPKEY  = SzConvert.toZeroStr(request.getParameter("PKEY"));	//主表单信息ID
	String sPFORM = SzConvert.toZeroStr(request.getParameter("PFORM"));	//主表单ID    
    
    //获得要导出的字段
    String s = ""; 
    if (sModule.equals("CustomerInfo")) {
    } else if (sModule.equals("AssetsInfo")) {    		
    } else if (sModule.equals("ModuleImport")) {
    } else if (sModule.equals("MailServer")) {
    } else if (sModule.equals("LoginInfoImport")) { 
    } else {
    	BdValueControl bdValueControl = new BdValueControl();
    	if (iFormID >0) {
    		bdValueControl.setModuleInfo(iFormID);
    	} else if (!sModule.equals("") && !formName.equals(""))  {    		
    		bdValueControl.setModuleInfo(sModule, formName);
    	}
    	s = bdValueControl.getImportFieldName();
    }
    
%>
<table width="100%" align="center">
  <form name="formUpdate" method="post"  ENCTYPE="multipart/form-data">
  <input type="hidden" name="module" value="<%=sModule %>" >
  <input type="hidden" name="formName" value="<%=formName %>" >
  <input type="hidden" name="formID" value="<%=iFormID%>" >    
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="PKEY" value="<%=sPKEY%>">  
  <input type="hidden" name="PFORM" value="<%=sPFORM%>">   
  <tr>   
    <td><b>excel对应的列：</b><br>
    <% if (sModule.equals("CustomerInfo")) { %>
     中文名,英文名,客户状态,结帐类别,行业,航线,联系地址,备注,<br>
     邮寄地址,邮政编码,城市,省份,国家,公司电话,公司传真,主页,<br>
     公司邮箱,Sales Responsible,Niche-ML,VAT no/Tax id	,<br>
    Automotive/Transport,Global id,Client id,VTA/year,<br>
    Total no of shipments/year,Monthly,Geodis Wilson Office,<br>
    Credit rating,Tradelanes and services,Competitor<br>
    <% } else if (sModule.equals("MailServer")) { %>
    服务器地址,pop3地址,smtp地址,是否需要验证,说明
    <% } else if (sModule.equals("ModuleImport")) { %>
    模块ID，模块名称，模块编号，图片1，图片2，连接地址，连接窗口，模块属性，权限属性<br>
    <% } else if (sModule.equals("LoginInfoImport")) { %>
    部门名称，职务名称，登陆帐号，用户姓名，登陆密码，性别，出生年月，手机号码，电子邮箱，员工编号，联系电话<br>
    <% } else if (sModule.equals("AssetsInfo")) { %>
    "分类名称","条目名称","条目编号","规格型号","计量单位",<br>
    "购进时间","原值","存放位置","入库时间","用途"<br><br>

    <font color='red'><b>注意：</b></font>最少具备前三个字段。分类名称必须在分类中存在。
    <%
      } else {
    	   out.println(s);
      }
    %>    

    </td>
  </tr>
  <tr>
    <td align="center">
      请选择要导入的文件:<input type="file" name="fileImport">
    </td>
  </tr>
  <tr>
    <td align="center">
      <input type="button" class="btnClass" value="确定" OnClick="javascript:FormSave(formUpdate, 'excel_import_control.jsp');">
    </td>
  </tr>
  </form>
</table>

<script language="javascript" src="../../share/js/commonTool.js"></script>
<script language="javascript">
  function FormSave(formName, url) {
    if (!notSpace(formName.fileImport, "要导入的文件")) {
      return false;
    }    
    formName.action = url;
    formName.submit();
  }
</script>