<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.database.*" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.orginaze.*" %>
<%@ include file="/sessionInfo.jsp"%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache"> 
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">  
<meta http-equiv="expires" content="0">  
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
    //获取提交的参数
    //获取提交的参数
    String sPage = SzConvert.toZeroStr(request.getParameter("page"));
		String sType = SzConvert.toZeroStr(request.getParameter("type"));
    String sSearch = SzConvert.strWriteData(request.getParameter("txtSearch"));
    String sSearchCond = SzConvert.strWriteDataHTML(request.getParameter("searchCond"));
    
		String sSearchTitle = SzConvert.strWriteData(request.getParameter("txtSearchTitle"));  
    String txtDate1 = SzConvert.strWriteData(request.getParameter("txtDate1"));
    String txtDate2 = SzConvert.strWriteData(request.getParameter("txtDate2"));       
 
    String sCond = "";
  
    String sSortField = SzConvert.toSpaceStr(request.getParameter("txtSortField"));
    int iSortOrder    = Integer.parseInt(SzConvert.toZeroStr(request.getParameter("txtSortOrder")));
    if (sSortField.equals("")) {
    	sSortField = "TXID";
    	iSortOrder = SzProperties.I_SortOrder_DESC;
    }
    int iCurrentPage = 1;
    try {
        iCurrentPage =  Integer.parseInt(sPage);
    }catch(Exception e) {
    }

    if (!sSearchTitle.equals("")) {
    	sCond += " and RYDLXM='" + sSearchTitle + "'";
    }
    if (!sSearch.equals("")) {
    	sCond += " and LCMC='" + sSearch + "'";
    }    
    
        

    int iPageSize = SzProperties.I_PageSize;
    ExportXml exportXml = new ExportXml();
    String sTableId = "FLOW_POST_STAT";
    ArrayList list  = exportXml.getList(sTableId, sCond);
    
    String str_export[] = exportXml.getExportInfo(sTableId);
    String str_name[] = null;
    if (!str_export[2].equals("")) {
    	str_name = str_export[2].split(",");
    }
    int iColumnSize = str_name.length;
    if (list == null) {
    	list = new ArrayList();
    }
    Iterator iter= list.iterator();

    int i = 0;
    int j = 0;
    
%>
<!-----上面的工具栏------>
<%@ include file="/share/title.jsp"%>
<table width="100%">
  <form name="formBar" method="post">
  <input type="hidden" name="page" value="<%=iCurrentPage%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="txtSortField" value="<%=sSortField%>"> 
  <input type="hidden" name="txtSortOrder" value="<%=iSortOrder%>">
	<input type="hidden" name="searchCond" value="<%=sSearchCond%>">
	<input type="hidden" name="sCond" value="<%=sCond%>">   
  <tr>
    <td>
		 职务名称<input type="text" name="txtSearchTitle" class="txtClassSearch" value="<%=sSearchTitle%>">
		 流程名称<input type="text" name="txtSearch" class="txtClassSearch" value="<%=sSearch%>">
  	<input type="button" class="btnClass" value="查询" OnClick="javascript:this.form.submit();">
		<input type="button" class="btnClassLong" value="导出EXCEL" OnClick="javascript:FormSubmit(formBar, 'control.jsp?OPERATOR=export&table=FLOW_POST_STAT');">  
    </td>
    <td align="right">        
    </td>
  </tr>
  </form>
</table>

<!-----信息列表----->
<table width="100%" border="1"  class="tableClass" cellpadding="1" cellspacing="0">

  <form name="formList" method="post">
  <input type="hidden" name="page" value="<%=iCurrentPage%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="txtSortField" value="<%=sSortField%>"> 
  <input type="hidden" name="txtSortOrder" value="<%=iSortOrder%>">
	<input type="hidden" name="searchCond" value="<%=sSearchCond%>">  
	<input type="hidden" name="txtSearchTitle" value="<%=sSearchTitle%>"> 	 	   
  <tr class="trClassTitle">
    <td width="5"></td>
		<%
			for (i = 0; i<iColumnSize; i++) {
				out.println("<td nowrap>");
				out.println(str_name[i]);
				out.println("</td>");
			}
		%>
  </tr>
<%
    
		String temp = "";
		String sClass = "";
		String str_value[] = null;
		
    while (iter != null && iter.hasNext()) {
    	str_value = (String[])iter.next();
      j++;
%>
  <tr  onMouseOver="javascript:this.className='trMouseOver'" onMouseOut="javascript:this.className='trMouseOut'">
    <td width="5" title="<%=j%>"><%=j%>、</td>
		<%
			for (i = 0; i<iColumnSize; i++) {
				out.println("<td nowrap>");
				out.println(str_value[i]);
				out.println("</td>");
			}
		%>
  </tr>
<%
    }
    int iLen = 10;
%>

  </form>
</table>

<!-----下面的工具栏------>
<table width="100%">
  <form name="formPage" method="post">
  <input type="hidden" name="page" value="<%=iCurrentPage%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="txtSortField" value="<%=sSortField%>"> 
  <input type="hidden" name="txtSortOrder" value="<%=iSortOrder%>">
	<input type="hidden" name="searchCond" value="<%=sSearchCond%>">  
	
  <input type="hidden" name="txtSearchTitle" value="<%=sSearchTitle%>"> 	 
  <input type="checkbox" name="chkId" id="chkId" value="0" checked style="display:none;">	  

  </form>
</table>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
  <input type="hidden" name="page" value="<%=iCurrentPage%>">
  <input type="hidden" name="type" value="<%=sType%>">
  <input type="hidden" name="txtSearch" value="<%=sSearch%>">
  <input type="hidden" name="txtSortField" value="<%=sSortField%>"> 
  <input type="hidden" name="txtSortOrder" value="<%=iSortOrder%>">
	<input type="hidden" name="searchCond" value="<%=sSearchCond%>">  

  <input type="hidden" name="txtSearchTitle" value="<%=sSearchTitle%>"> 	 
  <input type="checkbox" name="chkId" id="chkId" value="0" checked style="display:none;">	    
</form>
<script language="javascript" src="../../share/js/commonTool.js"></script>
