<!--#include file="head.asp"-->
<style>body{background-color: #fff;}</style>

<%
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"


%>


<main>
<div  class="container">
<div class="ui-lrctnei">
<%call userleft()%>
<div class="r"> 
<div class="ui-content">
                        
					
                            
<div class="neiye">

            
            
            <!-------------------------------------- 开始 -------------------------------------->	
                    <div class="neibiaoti"></div>
           		 	<div class="neibiaoti2">结算记录</div>
                    <div class="gexian20"></div>
                	<div class="neitable">
                    <form action="?act=alldel&page=<%=page%>" method="post" name="myform" id="myform"> 
					<table>
                        <tr class="hd">
                        	<td>财务流水号</td>
        					<td>结算金额</td>
                            <td>到账金额</td>
                            <td>结算方式</td>
                            <td>结算模式</td>
                            <td>收款账号</td>
                            <td>申请时间</td>
                            <td>处理时间</td>
                            <td>处理状态</td>
                      </tr>
						<%
                        sql="select * from "&request.Cookies("cwku")&" where aycaiwuuser="&clng(request.Cookies("aynameid"))&" and (aycaiwuleibie=1 or aycaiwuleibie=9) "&sqldd&" order by aycaiwuid desc" 
                        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='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                       	  <td>
							<%if trim(rs("aycailiushui"))<>"" then%>
                            <%=rs("aycailiushui")%>
                            <%else
                            response.Write("-")
                            end if%>
                          </td>
                          <td>
							<%
                            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><%=Formatnumber(rs("aycaiwulastjin"),3,true,-1,0)%>元</td>
                          <td>
							<%
                            if cint(rs("aytxjj"))=1 then 
                            response.Write "<span style=color:#FF6600>加急结算</span>"
                            else
                            response.Write "普通结算"
                            end if
                            %>
                          </td>
                          <td>
							<%
                            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>
                      		<%
							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><%=rs("aycaiwudate")%></td>
                          <td><%=rs("aycwdtime")%></td>
                          <td>
							<%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 colspan="9" style="text-align:left">&nbsp;<%call pageye()%></td>
                      </tr>

                    </table>
                    </form>
            		</div>
            <!-------------------------------------- 结束 -------------------------------------->
                        
            
            


                                                                 
                   
            <div class="gexian20"></div>
            <div class="mzsmbox2" style="padding-top:20px;">
            提示：财务记录，只保存180天！
            </div>

            </div>
            
           




        <div class="clearfix"></div>



</div>








</div>
</div>
</div>
</div>
</main>


<footer>
<div class="container">
</div>
</footer>

</body>
</html>