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

<%
'call chkyanzheng("mycaiwu_all")

if SafeRequest("isb")<>"y" then
response.Cookies("date1")=""
response.Cookies("date2")=""
response.Cookies("dingdan")=""
response.Cookies("caiwuls")=""
end if


link="mycaiwu_all?cact=&isb=y"


act=SafeRequest("act")
if act="cha" then
sqldd=""
date1=SafeRequestform("date1")
date2=SafeRequestform("date2")
caiwuls=trim(SafeRequestform("caiwuls"))
dingdan=trim(SafeRequestform("dingdan"))
shangid=SafeRequestform("shangid")
youhui=SafeRequestform("youhui")

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

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

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


end if


if request.Cookies("date1")<>"" then 
sqldd=sqldd&" and  datediff(day,aycaiwudate,'"&request.Cookies("date1")&"')<=0"
end if
if request.Cookies("date2")<>"" then 
sqldd=sqldd&" and  datediff(day,aycaiwudate,'"&request.Cookies("date2")&"')>=0"
end if


if request.Cookies("caiwuls")<>"" then sqldd=sqldd&" and aycailiushui='"&request.Cookies("caiwuls")&"'"
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("youhui")=1 then sqldd=sqldd&" and ayddyouhuiquanzhi<>''"
'if request.Cookies("youhui")=2 then sqldd=sqldd&" and ayddyouhuiquanzhi is null"


%>
<script src="/Template/date.js" type="text/javascript"></script>

<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="gexian"></div>
   	 		<div class="neitablewu">
					<table>
                  		<tr>
                          <td>

            <form action="?act=cha&isb=y" method="post" name="chaxun" id="chaxun">
             
            &nbsp;订单编号：
            <input name="dingdan" type="text" id="dingdan" class="reginputd" value="<%if request.Cookies("dingdan")<>"" then response.Write server.HTMLEncode(trim(request.Cookies("dingdan")))%>" maxlength="20">

            &nbsp;财务号：
            <input name="caiwuls" type="text" id="caiwuls" class="reginputd" value="<%if request.Cookies("caiwuls")<>"" then response.Write server.HTMLEncode(trim(request.Cookies("caiwuls")))%>" maxlength="20">


            &nbsp;起始时间：
            <input name="date1" type="text" class="reginputd" id="date1" onFocus="this.select()" onClick="fPopCalendar(event,this,this)" 
            value="<%if request.Cookies("date1")<>"" then response.Write request.Cookies("date1")%>" size="17" readonly="readonly" /> 
            &nbsp;截止时间：
            <input name="date2" type="text" class="reginputd" id="date2" onFocus="this.select()" onClick="fPopCalendar(event,this,this)" 
            value="<%if request.Cookies("date2")<>"" then response.Write request.Cookies("date2")%>" size="17" readonly="readonly" /> 
                    


            &nbsp;<input type="submit" name="Submit" value=" 财务查询 " class="logindlregedit">
            </form>
                         </td>
                        </tr>
                    </table>
       		</div>
            <div class="gexian20"></div>

            <!-------------------------------------- 结束 -------------------------------------->
                   
                   
           
            
            
            
            <!-------------------------------------- 开始 -------------------------------------->									
                	<div class="neitabled">
                    <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>
                      </tr>
						<%
                        sql="select aycaiwuuser,aycaiwuleibie,aycaiwuid,aycaiwudate,aycailiushui,aycaiwudingdan,aycaiwuzt,aycaiwuptjy,isalipayfz,aycaiwujine,aycaiwubody,ayshouname,aycaishoubei,aycaiwuyue,aycaiwuzhifu from "&request.Cookies("cwku")&" where aycaiwuuser="&clng(request.Cookies("aynameid"))&" and (aycaiwuleibie<>1 and aycaiwuleibie<>9)"&sqldd&" order by aycaiwuid desc" 
                        'response.Write sql
                        rs.open sql,conn,1,1
                        rs.pagesize=50
                        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
                        n=0
                        do while not rs.eof%>
                  		<tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                       	  <td height="60">
							<%if trim(rs("aycaiwuptjy"))<>"" then%>
                            交易号：<%=rs("aycaiwuptjy")%>|
                            <%
                            end if
							
							
                            if trim(rs("aycaiwudingdan"))<>"" then%>
                            订单号：<%=rs("aycaiwudingdan")%><%if cint(rs("isalipayfz"))=1 then%><span style="color: #FF6600">[秒]</span><%end if%>
                            <%end if
   
                            'if trim(rs("aycailiushui"))<>"" then
                            'response.Write "<br>财务号："&rs("aycailiushui")
							'end if
                            %>
							
							

                         </td>
                            <td>
							<%
    						if cint(rs("aycaiwuleibie"))=0 or cint(rs("aycaiwuleibie"))=3 or cint(rs("aycaiwuleibie"))=4 or cint(rs("aycaiwuleibie"))=5 or cint(rs("aycaiwuleibie"))=6 or cint(rs("aycaiwuleibie"))=17 or cint(rs("aycaiwuleibie"))=18 then
							response.Write "<span style=color:#390;font-weight:bold>+"& Formatnumber(rs("aycaiwujine"),2,true,-1,0)&"</span>"
							else
							response.Write "<span style=color:#F00;font-weight:bold>-"& Formatnumber(rs("aycaiwujine"),2,true,-1,0)&"</span>"
							end if
                            %>
                            </td>
                       	  <td>
						<%
                        if cint(rs("aycaiwuleibie"))=0 then response.Write("入款")
                        if cint(rs("aycaiwuleibie"))=1 then response.Write("结算")
                        if cint(rs("aycaiwuleibie"))=2 then response.Write("支出")
                        if cint(rs("aycaiwuleibie"))=3 then response.Write("充值")
                        if cint(rs("aycaiwuleibie"))=4 then response.Write("点卡返款")
                        if cint(rs("aycaiwuleibie"))=5 then response.Write("消费")
                        if cint(rs("aycaiwuleibie"))=6 then response.Write("开通VIP")
                        if cint(rs("aycaiwuleibie"))=7 then response.Write("解冻消保金")
                        if cint(rs("aycaiwuleibie"))=8 then response.Write("返点")
                        if cint(rs("aycaiwuleibie"))=9 then response.Write("提现")
                        if cint(rs("aycaiwuleibie"))=11 then response.Write("冻结")
                        if cint(rs("aycaiwuleibie"))=12 then response.Write("寄卖预支")
                        if cint(rs("aycaiwuleibie"))=13 then response.Write("寄卖支出")
                        if cint(rs("aycaiwuleibie"))=14 then response.Write("秒结手续费")
                        if cint(rs("aycaiwuleibie"))=15 then response.Write("加急手续费")
                        if cint(rs("aycaiwuleibie"))=16 then response.Write("手续费")
                        if cint(rs("aycaiwuleibie"))=17 then response.Write("收款")
                        if cint(rs("aycaiwuleibie"))=18 then response.Write("代理入款")
                        %>
                        </td>
                         <td>
						<%cmiaoshu="no"
                         if trim(rs("aycaiwubody"))<>"" then
                            if trim(rs("aycaiwubody"))="补款" then 
                            response.Write "补款 "
                            end if
                         end if
                         
                         if trim(rs("aycaiwubody"))<>"" then
                            if left(trim(rs("aycaiwubody")),2)="收款" then 
                            if cint(rs("aycaiwuzt"))=0 then response.Write " 未处理"
                            if cint(rs("aycaiwuzt"))=1 then response.Write "<font color=#00FF00>成功</font>("&trim(rs("ayshouname"))&")"
                            if cint(rs("aycaiwuzt"))=2 then response.Write "<font color=#FF0000>失败</font>("&trim(rs("ayshouname"))&")"
                            response.Write "<br>"
                            response.Write "付款姓名："&trim(rs("ayshouname"))&"<br>"
                            response.Write "付款备注："&trim(rs("aycaishoubei"))&"<br>"
                            
                            end if
                         end if
                         
                        if not isnull(rs("aycaiwuzhifu")) and cint(rs("aycaiwuleibie"))=3 then
                        if cint(rs("aycaiwuzt"))=0 then response.Write "未处理 "
                        if cint(rs("aycaiwuzt"))=1 then response.Write "<font color=#00FF00>成功</font>"
                        if cint(rs("aycaiwuzt"))=2 then response.Write "<font color=#FF0000>失败</font>"
                        end if
                        'if cmiaoshu="no" then
                        'response.Write "-"
                        'else
                        'response.Write cmiaoshu
                        'end if
                        
                        if trim(rs("aycaiwubody"))<>"" then
                            'if instr(1,trim(rs("aycaiwubody")),"手续费")>0 then 
                            'response.Write mid(trim(rs("aycaiwubody")),1,instr(1,trim(rs("aycaiwubody")),"(")-1)    
                            'else
                            response.Write trim(rs("aycaiwubody"))
                            'end if
                        else
                        response.Write"&nbsp;"
                        end if
                        %>
                        </td>
                        <td><%=rs("aycaiwudate")%></td>

                            
                    	</tr>
						<%
                        n=n+1
                        rs.movenext 
                        if n>=rs.pagesize then exit do  
                        loop
                        end if
                        zongshu=rs.RecordCount
                        rs.close%>
                        
                        <tr  class="hd">
                        <td colspan="5" style="text-align:left">
						&nbsp;&nbsp;<%call pageye()%>
                        </td>
                      </tr>

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


                                                                 
                   
            <div class="gexian20"></div>
            <div class="mzsmbox2" style="padding-top:20px;">
            相关说明：<br>
			交易号：交易号为支付接口交易号，如支付宝。<br>
            财务号：财务号为平台生成的财务流水号。<br>
            订单号：订单号为该笔财务记录对应的订单号
            </div>

            </div>
            
           




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



</div>








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


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

</body>
</html>