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

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

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script src="/Template/date.js" type="text/javascript"></script>
<title><%=webname%>-财务记录</title>

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

<%
'call chkyanzhengold("mycaiwu")

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



link="mycaiwu?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")
zhuangtai=SafeRequestform("zhuangtai")
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

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

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

'if youhui<>"" then
'session("youhui")=youhui
'else
'session("youhui")=""
'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("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&isb=y" method="post" name="chaxun" id="chaxun">
<br>&nbsp;时&nbsp;&nbsp;间：

<input name="date1" type="text" class="inpcss" id="date1" onFocus="this.select()" onClick="fPopCalendar(event,this,this)" value="<%if request.Cookies("date1")<>"" then
response.Write request.Cookies("date1")
end if%>" size="17" readonly="readonly" /> 

截止至：

<input name="date2" type="text" class="inpcss" id="date2" onFocus="this.select()" onClick="fPopCalendar(event,this,this)" value="<%if request.Cookies("date2")<>"" then
response.Write request.Cookies("date2")
end if%>" size="17" readonly="readonly" /> 
<select name="zhuangtai" id="zhuangtai">
  <option value="99">交易状态</option>
  <option value="99">不限</option>
  <option value="0" 
  <%
    if request.Cookies("zhuangtai")<>"" then
	if cint(request.Cookies("zhuangtai"))=0 then response.Write("selected")
	end if
  %>
  >未处理</option>
  <option value="1"
    <%
    if request.Cookies("zhuangtai")<>"" then
	if cint(request.Cookies("zhuangtai"))=1 then response.Write("selected")
	end if
  %>>交易成功</option>
  <option value="2"
    <%
    if request.Cookies("zhuangtai")<>"" then
	if cint(request.Cookies("zhuangtai"))=2 then response.Write("selected")
	end if
  %>>交易失败</option>
</select>
<br>
<br>
&nbsp;订单号：
<input name="dingdan" type="text" id="dingdan" class="inpcss" value="<%if request.Cookies("dingdan")<>"" then response.Write server.HTMLEncode(trim(request.Cookies("dingdan")))%>" size="17" maxlength="20">
财务号：
<input name="caiwuls" type="text" id="caiwuls" class="inpcss" value="<%if request.Cookies("caiwuls")<>"" then response.Write server.HTMLEncode(trim(request.Cookies("caiwuls")))%>" size="17" maxlength="20">

<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>
         <td height="35" align="center" class="border_bottom" style="font-weight: bold" >交易号|流水号</td>
         <td align="center" class="border_bottom" style="font-weight: bold">金额(元)</td> 
        <td align="center" class="border_bottom" style="font-weight: bold">类别</td> 
        <td align="center" class="border_bottom" style="font-weight: bold">描述 </td>        
        <td align="center" class="border_bottom" style="font-weight: bold">时间</td>               
       </tr>
<%
sql="select top 200 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 <%if n mod 2 = 0 then response.Write "bgcolor=#F7FFFF" %> >
        <td height="40" align="center" class="border_bottom" style="line-height:20px;">
		<%if trim(rs("aycaiwuptjy"))<>"" then%>
        <a href="mycaiwuc?cid=<%=rs("aycaiwuid")%>"><%=rs("aycaiwuptjy")%></a>
        <%
		else
			if trim(rs("aycailiushui"))<>"" then%>
			 <a href="mycaiwuc?cid=<%=rs("aycaiwuid")%>"><%=rs("aycailiushui")%></a><%if cint(rs("isalipayfz"))=1 then%><span style="color: #FF6600">[分]</span><%end if%>
			<%else
			response.Write("&nbsp;")
			end if
		end if%>
		<br>
		<%if trim(rs("aycaiwudingdan"))<>"" then%>
         <span style="color: #B9B9B9">订单号：<a style="color: #B9B9B9" href="mycaiwuc?id=<%=rs("aycaiwudingdan")%>"><%=rs("aycaiwudingdan")%></a></span>
         <%
		else
		response.Write("&nbsp;")
		 end if%>		</td>
        <td align="center" class="border_bottom" style="color: #FF0000;; font-weight: bold">
							<%
    						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>+"& Formatnumber(rs("aycaiwujine"),2,true,-1,0)&"</span>"
							else
							response.Write "<span style=color:#F00>-"& Formatnumber(rs("aycaiwujine"),2,true,-1,0)&"</span>"
							end if
                            %>		</td>
        <td align="center" class="border_bottom"><%
		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 align="center" class="border_bottom" style="line-height:20px;" >
		<%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 align="center" class="border_bottom"><%=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>
        <td height="35" colspan="5">&nbsp;
          <%call pageye()%>	 <a style="color:#339900" href="mycaiwu_all">[查看所有财务]</a></td>
      </tr></form>
    </table>
</DIV>


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

<br>

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


