<!--#include virtual="/show/userhead.asp"-->

<script>document.getElementById('o_4').setAttribute("class", "ed"); document.getElementById("t_4").style.display="";document.getElementById('s_4_8').setAttribute("class", "ed6");</script>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title><%=webname%>-结算记录</title>

<br>
<DIV id=main2> 
<DIV style="PADDING-LEFT:0px">
<DIV id=main_right_content>

<%
link="jiesuan?cact="


act=SafeRequest("act")
if act="cha" then
sqldd=""
anian=SafeRequestform("anian")
ayue=SafeRequestform("ayue")
ari=SafeRequestform("ari")
bnian=SafeRequestform("bnian")
byue=SafeRequestform("byue")
bri=SafeRequestform("bri")
dingdan=trim(SafeRequestform("dingdan"))
shangid=SafeRequestform("shangid")
zhuangtai=SafeRequestform("zhuangtai")
youhui=SafeRequestform("youhui")

if anian<>0 and ayue<>0 and ari<>0 then
response.Cookies("dateaa")=anian&"-"&ayue&"-"&ari
	if bnian<>0 and byue<>0 and bri<>0 then
	response.Cookies("datebb")=bnian&"-"&byue&"-"&bri
	if DateDiff("d",request.Cookies("dateaa"),request.Cookies("datebb"))<0 then call PopErr("时间输入有误")
	end if
else
response.Cookies("dateaa")=""
response.Cookies("datebb")=""
end if

if dingdan<>"" then
response.Cookies("dingdan")=dingdan
else
response.Cookies("dingdan")=""
end if

'if shangid<>"0" then
'session("shangid")=shangid
'else
'session("shangid")=""
'end if

'if zhuangtai<>"99" then
'session("zhuangtai")=zhuangtai
'else
'session("zhuangtai")=""
'end if

'if youhui<>"" then
'session("youhui")=youhui
'else
'session("youhui")=""
'end if


end if



if request.Cookies("dateaa")<>"" and request.Cookies("datebb")<>"" then 
sqldd=sqldd&" and  datediff(day,aycaiwudate,'"&dateaa&"')<=0 and datediff(day,aycaiwudate,'"&request.Cookies("datebb")&"')>=0"
elseif request.Cookies("dateaa")<>"" then
sqldd=sqldd&" and  datediff(day,aycaiwudate,'"&request.Cookies("dateaa")&"')<=0 and datediff(day,aycaiwudate,'"&now()&"')>=0"
end if
if request.Cookies("dingdan")<>"" then sqldd=sqldd&" and aycaiwudingdan='"&request.Cookies("dingdan")&"'"
'if request.Cookies("shangid")<>"" then sqldd=sqldd&" and ayddshangid='"&request.Cookies("shangid")&"'"
if request.Cookies("zhuangtai")<>"" then sqldd=sqldd&" and aycaiwuzt="&request.Cookies("zhuangtai")&""


'if request.Cookies("youhui")=1 then sqldd=sqldd&" and ayddyouhuiquanzhi<>''"
'if request.Cookies("youhui")=2 then sqldd=sqldd&" and ayddyouhuiquanzhi is null"


%>
<H2><SPAN>结算记录</SPAN></H2>
<DIV class=main4>

<form action="?act=cha" method="post" name="chaxun" id="chaxun">
<br>&nbsp;交易时间：
<select name="anian" id="anian">
  <option value="0" selected>年</option>
  <option value="0" >不限</option>
  <option value="2015" 
  <%if request.Cookies("dateaa")<>"" then
  if year(request.Cookies("dateaa"))="2015" then response.Write("selected")
  end if
  %>>2015</option>
  <option value="2014" 
  <%if request.Cookies("dateaa")<>"" then
  if year(request.Cookies("dateaa"))="2014" then response.Write("selected")
  end if
  %>>2014</option>
  <option value="2013" 
  <%if request.Cookies("dateaa")<>"" then
  if year(request.Cookies("dateaa"))="2013" then response.Write("selected")
  end if
  %>>2013</option>
</select>
<select name="ayue" id="ayue">
  <option value="0" selected>月</option>
  <option value="0" >不限</option>
  <%for i=1 to 12%>
  <option value="<%=i%>" 
  <%if request.Cookies("dateaa")<>"" then
  if Month(request.Cookies("dateaa"))=i then response.Write("selected")
  end if
  %>><%=i%></option>
  <%next%>
</select>
<select name="ari" id="ari">
  <option value="0" selected>日</option>
  <option value="0" >不限</option>
  <%for i=1 to 31%>
  <option value="<%=i%>" 
  <%if request.Cookies("dateaa")<>"" then 
  if day(request.Cookies("dateaa"))=i then response.Write("selected")
  end if
  %>><%=i%></option>
  <%next%>
</select>
至
<select name="bnian" id="bnian">
  <option value="0" selected>年</option>
  <option value="0" >不限</option>
  <option value="2015" 
  <%if request.Cookies("datebb")<>"" then
  if year(request.Cookies("datebb"))="2015" then response.Write("selected")
  end if
  %>>2015</option>
  <option value="2014" 
  <%if request.Cookies("datebb")<>"" then
  if year(request.Cookies("datebb"))="2014" then response.Write("selected")
  end if
  %>>2014</option>
  <option value="2013" 
  <%if request.Cookies("datebb")<>"" then
  if year(request.Cookies("datebb"))="2013" then response.Write("selected")
  end if
  %>>2013</option>
</select>
<select name="byue" id="byue">
  <option value="0" selected>月</option>
  <option value="0" >不限</option>
  <%for i=1 to 12%>
  <option value="<%=i%>" 
  <%if request.Cookies("datebb")<>"" then
  if Month(request.Cookies("datebb"))=i then response.Write("selected")
  end if
  %>><%=i%></option>
  <%next%>
</select>
<select name="bri" id="bri">
  <option value="0" selected>日</option>
  <option value="0" >不限</option>
  <%for i=1 to 31%>
  <option value="<%=i%>" 
  <%if request.Cookies("datebb")<>"" then 
  if day(request.Cookies("datebb"))=i then response.Write("selected")
  end if
  %>><%=i%></option>
  <%next%>
</select>
<input type="submit" name="Submit" value=" 查 询 ">
<br>

&nbsp;
</form>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_style_a2">
     <form action="?act=alldel&page=<%=page%>" method="post" name="myform" id="myform"> 
       <tr>
         <th height="35" align="center" class="border_right border_bottom" >财务流水号
         <th align="center" class="border_right border_bottom" >结算金额
         <th align="center" class="border_right border_bottom">到账金额
         <th align="center" class="border_right border_bottom">结算方式         
         <th align="center" class="border_right border_bottom">结算模式
         <th align="center" class="border_right border_bottom">收款账号  
         <th align="center" class="border_bottom border_right">申请时间           
         <th align="center" class="border_bottom border_right">处理时间                         
         <th align="center" class="border_bottom">处理状态                </tr>
<%
sql="select * from "&request.Cookies("cwku")&" where aycaiwuuser="&clng(request.Cookies("aynameid"))&" and (aycaiwuleibie=1 or aycaiwuleibie=9) "&sqldd&" order by aycaiwuid desc" 
'response.Write sql
rs.open sql,conn,1,1
rs.pagesize=20
pagecount=rs.pagecount 
if request("page")="" then 
page=1
else
page=int(request("page")) 
end if
if page<=0 then page=1 
if request("page")="" then page=1
if not(rs.bof and rs.eof) then
rs.absolutepage=page
do while not rs.eof%>

	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
        <td height="35" align="center" class="border_right border_bottom">
		<%if trim(rs("aycailiushui"))<>"" then%>
        <%=rs("aycailiushui")%>
        <%else
		response.Write("-")
		end if%></td>
        <td align="center" class="border_right border_bottom">
		
          <%
		if cint(rs("aycaiwuleibie"))=1 then
			if rs("aycaiwujine")<>0 then
			response.Write Formatnumber(rs("aycaiwujine"),3,true,-1,0)&"元"
			else
			response.Write "0.00"
			end if
		else
			if trim(rs("aycaiwujine"))<>"" then
			response.Write Formatnumber(rs("aycaiwujine"),3,true,-1,0)&"元"
			else
			response.Write ("-")
			end if
		end if
		%>        </td>
        <td align="center" class="border_right border_bottom" ><%=Formatnumber(rs("aycaiwulastjin"),3,true,-1,0)%>元</td>
        <td align="center" class="border_right border_bottom" ><%
		if cint(rs("aytxjj"))=1 then 
		response.Write "<span style=color:#FF6600>加急结算</span>"
		else
		response.Write "普通结算"
		end if
		%></td>
        <td align="center" class="border_right border_bottom"><%
		if cint(rs("aycaiwuleibie"))=0 then response.Write("入款")
		if cint(rs("aycaiwuleibie"))=1 then response.Write("<span style=color:#009900>系统结算</span>")
		if cint(rs("aycaiwuleibie"))=2 then response.Write("支出")
		if cint(rs("aycaiwuleibie"))=3 then response.Write("充值")
		if cint(rs("aycaiwuleibie"))=9 then response.Write("自助提现")
		%></td>
        <td align="center" class="border_right border_bottom">
                      		<%
							ayjname="--"
							ayjcard=""
							ayjfs=0
							ayjpic=""
							ayjbank=""
							ayjzhihang=""
                            if rs("ayjslistid")<>"" then
                                set rsjiesuan=server.CreateObject("adodb.recordset")
                                sqljiesuan="select * from ayjiesuanid where ayjid="&rs("ayjslistid")&"" 
                                rsjiesuan.open sqljiesuan,conn,1,1
                                if rsjiesuan.bof and rsjiesuan.eof then 	
                                response.Write "无结算账号"
                                else
                                ayjname=trim(rsjiesuan("ayjname"))
                                ayjcard=trim(rsjiesuan("ayjcard"))
                                ayjfs=rsjiesuan("ayjfs")
                                ayjpic=trim(rsjiesuan("ayjpic"))
                                ayjbank=trim(rsjiesuan("ayjbank"))
                                ayjzhihang=trim(rsjiesuan("ayjzhihang"))
                                end if
                                rsjiesuan.close
                            end if

                            if cint(ayjfs)=1 then%>
							<img src="<%=ossurl%>images/jz.gif" border="0" width="15px"> 支付宝
							<%end if
							
                            if cint(ayjfs)=4 then%>
							<img src="<%=ossurl%>images/jw.gif" border="0" width="15px"> 微信
							<%end if%>
                            
                            						
                            <%if cint(ayjfs)=3 then%>
                            <img src="<%=ossurl%>images/jyl.gif" border="0" width="20px"> 网银							
							<%end if%>
        </td>
        <td align="center" class="border_bottom border_right"><%=rs("aycaiwudate")%></td>
        <td align="center" class="border_bottom border_right"><%=rs("aycwdtime")%></td>
        <td align="center" class="border_bottom">
		<%if trim(rs("aycaiwutxcl"))<>"" then
          if cint(rs("aycaiwutxcl"))=0 then response.Write("未处理")
		  if cint(rs("aycaiwutxcl"))=1 then response.Write("<span style=color:#009900>处理成功</span>")
		  if cint(rs("aycaiwutxcl"))=2 then response.Write("<span style=color:#CCCC00>申请中</span>")
		end if%>
        </td>
	  </tr>
<%
n=n+1
rs.movenext  '指针向下移动
if n>=rs.pagesize then exit do  
loop
end if
zongshu=rs.RecordCount
rs.close%>
	  

      <tr>
        <td height="35" colspan="9">&nbsp;
          <%call pageye()%></td>
      </tr></form>
    </table> 
  <br>
</DIV>


</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>

<br>

	<!--#include virtual="/show/foot.asp"-->


