<!--#include virtual="/show/adminhead.asp"-->
<!--#include file="adminleft.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />


<BODY>
<title><%=webname%>-最高权限-财务结算记录</title>
<%
'On error resume next 

call logquanxian("e6",1)

admincwku="aycaiwu"
if SafeRequest("cwku")="aycaiwu" then admincwku="aycaiwu"
if SafeRequest("cwku")="aycaiwu01" then admincwku="aycaiwu01"
if SafeRequest("cwku")="aycaiwu02" then admincwku="aycaiwu02"
if SafeRequest("cwku")="aycaiwu03" then admincwku="aycaiwu03"
if SafeRequest("cwku")="aycaiwu04" then admincwku="aycaiwu04"
if SafeRequest("cwku")="aycaiwu05" then admincwku="aycaiwu05"
%>

<DIV>

<SCRIPT LANGUAGE="JavaScript">
var checkflag1 = "false";
function check1(field) {
if (checkflag1 == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag1 = "true";
return "false"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag1 = "false";
return "true"; }
}

function unselectall1()
{
    if(document.myform.chkAll1.checked){
	document.myform.chkAll1.checked = document.myform.chkAll1.checked&0;
	checkflag1 = "false";
    } 	
}
</script>
<%

act=SafeRequest("act")
cact=SafeRequest("cact")
page=SafeRequest("page")
if SafeRequest("uid")<>"" then uid=SafeRequest("uid")
link="adminjiesuanjl.asp?ct=&uid="&uid&"&cwku="&admincwku

if cact="cha" then
link="adminjiesuanjl.asp?cact=cha&cwku="&admincwku

if SafeRequestform("shangid")<>""then
shangid=SafeRequestform("shangid")
elseif SafeRequest("shangid")<>""then
shangid=SafeRequest("shangid")
end if
'if shangid=0 and request.Cookies("shangid")="" then call PopErr("请选择商品名称")
'if shangid=0 then response.Cookies("shangid")=""
if shangid<>0 then
response.Cookies("shangid")=shangid
sql2=" and aykagoodid='"&shangid&"'"
end if
if request.Cookies("shangid")<>"" then
sql2=" and aykagoodid='"&request.Cookies("shangid")&"'"
end if

end if


if act="del" then
call lognamecode()
id=SafeRequest("id")
sql="select * from "&admincwku&" where aycaiwuid="&clng(id)&"" 
rs.open sql,conn,1,3

if not(rs.bof and rs.eof) then
rs.delete
end if
rs.close
call logadd(request.Cookies("aynameid"),"管理-结算记录删除成功"&id,0,0)
call PopErr2("删除成功","adminjiesuanjl.asp?page="&page&"&cwku="&admincwku)
end if




if act="alldel" then
call lognamecode()
list1=SafeRequestform("list1")
cwku=SafeRequest("cwku")
if list1="" then call PopErr("未找到此项目")

	delid=split(list1,",")
	For dianka=0 To Ubound(delid) 
	sql="select * from "&cwku&" where aycaiwuid="&trim(delid(dianka))&"" 
	rs.open sql,conn,1,3
	rs.delete
	rs.close
	next
	call logadd(request.Cookies("aynameid"),"管理-结算记录多选删除成功",0,0)
	call PopErr2("删除成功","admincaiwu.asp?page="&page&"&cwku="&cwku)
			
end if

%>
<DIV id=main1200> 
<%call webleft()%>

<DIV id=main_right>
<DIV id=main_right_content>
<STYLE>.apply_style {
	POSITION: absolute
}
.right_title A {
	LINE-HEIGHT: 27px; WIDTH: 126px; DISPLAY: inline-block; BACKGROUND: url(<%=ossurl%>images/bg22.gif) no-repeat; HEIGHT: 27px
}
.right_title A.current {
	BACKGROUND: url(<%=ossurl%>images/main_right_title_bg.gif) no-repeat; COLOR: #fff; FONT-WEIGHT: bold
}
.table_style_1 TD {
	HEIGHT: 38px
}
.table_style_home_info TD {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; HEIGHT: 30px; PADDING-TOP: 0px
}
</STYLE>

<DIV class=right_titleadmin>&nbsp;&nbsp;财务记录管理</DIV>
<DIV class=main>

<br>
  <table width="99%" border="0" cellpadding="0" cellspacing="0" class="table_style_a1">
     <form action="?act=alldel&page=<%=page%>&cwku=<%=SafeRequest("cwku")%>" method="post" name="myform" id="myform"> 
       <tr>
        <th width="10" 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">会员ID
        <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_right border_bottom">处理时间        
        <th align="center" class="border_right border_bottom">状态        
        <th align="center" class="border_bottom">操作       </tr>
<%
if uid<>"" then
sql="select top 200 * from "&admincwku&" where aycaiwuuser="&uid&" and (aycaiwuleibie=1 or aycaiwuleibie=9) order by aycaiwuid desc" 
else
sql="select top 200 * from "&admincwku&" where (aycaiwuleibie=1 or aycaiwuleibie=9) order by aycaiwuid desc" 
end if

rs.open sql,conn,1,1
rs.pagesize=30
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 align="center" class="border_right border_bottom"><input name="list1" type="checkbox" id="list1" value="<%=rs("aycaiwuid")%>" onClick="unselectall1()"></td>
        <td align="center" class="border_right border_bottom">
		<%'0入款 1提现 2支出 3充值
		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">
		<%
		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">
		<a target="_blank" href="adminuseredit.asp?id=<%=rs("aycaiwuuser")%>"><%=rs("aycaiwuuser")%></a></td>
        <td align="center" class="border_right border_bottom">
		<%
		set rsu=server.CreateObject("adodb.recordset")
		sqlu="select aynameid,aytrueuser from ayname where aynameid="&rs("aycaiwuuser")&"" 
		rsu.open sqlu,conn,1,1
		response.Write trim(rsu("aytrueuser"))
		rsu.close
		%>
	    </td>
        <td align="center" class="border_right border_bottom">
		<%=Formatnumber(rs("aycaiwujine"),3,true,-1,0)%>		</td>
        <td align="center" class="border_right border_bottom">
		<%if rs("aycaiwulastjin")<>"" then
		response.Write Formatnumber(rs("aycaiwulastjin"),3,true,-1,0)
		else
		response.Write"-"
		end if
		%></td>
        <td align="center" class="border_right border_bottom">
		<%
		ayjfs=0
	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(rs("aycaiwuleibie"))=0 then
		if cint(rs("aycaiwuzhifu"))=0 then response.Write("网银")
		if cint(rs("aycaiwuzhifu"))=1 then response.Write("充值卡")
		if cint(rs("aycaiwuzhifu"))=2 then response.Write("支付宝")
		if cint(rs("aycaiwuzhifu"))=3 then response.Write("财付通")
		if cint(rs("aycaiwuzhifu"))=4 then response.Write("快捷")
		if cint(rs("aycaiwuzhifu"))=99 then response.Write("账户余额")
		elseif cint(rs("aycaiwuleibie"))=1 then
		'if cint(rs("aycaiwufangshi"))=1 then response.Write("支付宝结算")
		'if cint(rs("aycaiwufangshi"))=2 then response.Write("财付通结算")
		'if cint(rs("aycaiwufangshi"))=3 then response.Write("网银结算")
		'if cint(rs("aycaiwufangshi"))=4 then response.Write("平台操作")

        fs=""
        if cint(ayjfs)=1 then fs="支付宝"
        if cint(ayjfs)=2 then fs="财付通"
        if cint(ayjfs)=3 then fs="银行"
        if cint(ayjfs)=4 then fs="微信"
        response.Write fs
		
		elseif cint(rs("aycaiwuleibie"))=2 then
		if cint(rs("aycaiwuzhifu"))=0 then response.Write("网银")
		if cint(rs("aycaiwuzhifu"))=1 then response.Write("充值卡")
		if cint(rs("aycaiwuzhifu"))=2 then response.Write("支付宝")
		if cint(rs("aycaiwuzhifu"))=3 then response.Write("财付通")
		if cint(rs("aycaiwuzhifu"))=4 then response.Write("快捷")
		if cint(rs("aycaiwuzhifu"))=99 then response.Write("账户余额")
		elseif cint(rs("aycaiwuleibie"))=3 then
		if cint(rs("aycaiwuzhifu"))=0 then response.Write("网银")
		if cint(rs("aycaiwuzhifu"))=1 then response.Write("充值卡")
		if cint(rs("aycaiwuzhifu"))=2 then response.Write("支付宝")
		if cint(rs("aycaiwuzhifu"))=3 then response.Write("财付通")
		if cint(rs("aycaiwuzhifu"))=4 then response.Write("快捷")
		if cint(rs("aycaiwuzhifu"))=99 then response.Write("账户余额")
		elseif cint(rs("aycaiwuleibie"))=9 then
		if cint(rs("aycaiwufangshi"))=1 then response.Write("支付宝结算")
		if cint(rs("aycaiwufangshi"))=2 then response.Write("财付通结算")
		if cint(rs("aycaiwufangshi"))=3 then response.Write("网银结算")
		if cint(rs("aycaiwufangshi"))=4 then response.Write("平台操作")
		end if
		%>		</td>
        <td align="center" class="border_right border_bottom"><%=rs("aycaiwudate")%></td>
        <td align="center" class="border_right border_bottom"><%=rs("aycwdtime")%></td>
        <td align="center" class="border_right border_bottom">
          <%
		if cint(rs("aycaiwuleibie"))=9 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>" 
		if cint(rs("aycaiwutxcl"))=3 then response.Write "<span style=color:#FF0000>失败</span>"
		else
		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:#FF0000>失败</span>"
		end if
		%>		</td>
        <td align="center" class="border_bottom">		<a href="?act=del&id=<%=rs("aycaiwuid")%>&page=<%=page%>"  onclick="javascript:return confirm('您确定要删除吗？');"><img src="<%=ossurl%>images/ico_del.gif" alt="删除ID" border="0"></a></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="12">&nbsp;<input name="chkAll1" type="checkbox" id="chkAll1" onClick="this.value=check1(this.form.list1)" value="checkbox"> 
        全选
          <input type="submit" name="Submit" value="删除选定" onClick="javascript:return confirm('您确定要删除吗？');"> 

<%if pagecount=0 then   
response.write("首页 ")
elseif page=1 then       
response.write("首页 ")
else%>                   
<a href="<%=link%>&page=1">首页</a>
<%end if

if pagecount=0 then   
response.write("上页&nbsp;")
elseif page=1 then       
response.write("上页&nbsp;")
else%>                   
<a href="<%=link%>&page=<%=page-1%>">上页</a>&nbsp;
<%end if

if pagecount>20 then
if page<=10 then 
aa=1
bb=20
aabu=""
bbbu=" … "
elseif page>=11 then 
aa=page-9
bb=page+10
aabu=" …"
bbbu=" … "
	if bb>=pagecount then 
	aa=pagecount-20
	bb=pagecount
	aabu=" … "
	bbbu=""
	end if
end if
response.Write aabu
for aa=aa to bb
if page=aa then
response.Write("<a href="&link&"&page="&aa&"><strong>"&aa&"</strong></a>&nbsp;")
else
response.Write("<a href="&link&"&page="&aa&">"&aa&"</a>&nbsp;")
end if
next
response.Write bbbu

else

for i=1 to pagecount
if page=i then
response.Write("<a href="&link&"&page="&i&"><strong>"&i&"</a></strong>&nbsp;")
else
response.Write("<a href="&link&"&page="&i&">"&i&"</a>&nbsp;")
end if
next

end if

if pagecount=0 then 
response.write("下页&nbsp;")
elseif page=pagecount then 
response.write("下页&nbsp;")
else%>                    
<a href="<%=link%>&page=<%=page+1%>">下页</a>
<%end if%>
<%if pagecount=0 then  '总页数为0 显示空
response.write("尾页 ") 
elseif page=pagecount then 
response.write("尾页 ")
else%>                    
<a href="<%=link%>&page=<%=pagecount %>">尾页</a>
<%end if

if pagecount<>0 then 
response.Write page&"/"&pagecount
end if
response.Write "&nbsp;共"&zongshu&"条"
%>		</td>
      </tr></form>
    </table>
</DIV>


</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>
<SCRIPT>
$(function(){
$('.left_title').each(function(){
   $(this).click(function(){
	   var index=$('.left_title').index(this);
	   if($(this).next().hasClass('hide_m')){
		   $(this).next().removeClass('hide_m');
           $(this).next().show();		 
		   $(this).find('img').attr('src','<%=ossurl%>images/expansion.gif');
		   $.cookie('m_index_'+index,'',{expires:0});
	   } else {
	       $(this).next().hide();
		   $(this).next().addClass('hide_m');
		   $(this).find('img').attr('src','<%=ossurl%>images/shrank.gif');		   
		   $.cookie('m_index_'+index,'none',{expires:365});
	   }
   })
})

$('.left_title').each(function(){
	var index=$('.left_title').index(this);
    $(this).next().css('display',$.cookie('m_index_'+index) ? $.cookie('m_index_'+index) : '');
	if($.cookie('m_index_'+index)){
	    $(this).next().addClass('hide_m');
	}
	$(this).find('img').attr('src',$.cookie('m_index_'+index) ? '<%=ossurl%>images/shrank.gif' : '<%=ossurl%>images/expansion.gif');
})
})

</SCRIPT>


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

