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

<%
link="tongji?cact="

'收款 入款金额
sql="select aycaiwuuser,aycaiwudate,aycaiwuleibie,aycaiwuzt,aycaiwujine,aycaiwubody from "&request.Cookies("cwku")&" where aycaiwuuser="&clng(request.Cookies("aynameid"))&" and datediff(day,aycaiwudate,'"&now()&"')=0 and aycaiwuzt=1 and (aycaiwuleibie=0 or aycaiwuleibie=8 or aycaiwuleibie=17 or aycaiwuleibie=18)" 
rs.open sql,conn,1,1
	ddin=0  '订单入款
	shouin=0  '收款金额
	zongshoujin=0  '总收款金额
	shoubi=0 '收款笔数
	dailib=0 '代理入款笔数
	dailij=0 '代理入款金额
	fandian=0
	fandianj=0
	if not(rs.bof and rs.eof) then
	do while not rs.eof
    if cint(rs("aycaiwuleibie"))=0 then  '订单入款
	ddin=ddin+ccur(rs("aycaiwujine"))
	elseif cint(rs("aycaiwuleibie"))=8 then
	fandian=fandian+1
	fandianj=fandianj+ccur(rs("aycaiwujine"))
	elseif cint(rs("aycaiwuleibie"))=17 then '收款金额
	shoubi=shoubi+1
	shouin=shouin+ccur(rs("aycaiwujine"))  '收款入款金额
	jin=replace(trim(rs("aycaiwubody")),"收款"," ")   '总收款金额
	jin=replace(trim(jin),"元"," ")
	jin=trim(jin)
	zongshoujin=ccur(zongshoujin)+ccur(jin)
	elseif cint(rs("aycaiwuleibie"))=18 then '代理入款
	dailib=dailib+1
	dailij=dailij+ccur(rs("aycaiwujine"))
	end if
	
	rs.movenext  
	loop
	end if
rs.close


'订单金额
set rsj=server.CreateObject("adodb.recordset")

sqlj="select aydingdanin,aydingdansj,aydingdanuser,aydingdanzt,aydingdanzj,aydingdancb,ayddquantity,ayddzffangshi from "&request.Cookies("ddku")&" where datediff(day,aydingdansj,'"&now()&"')=0 and aydingdanuser="&clng(request.Cookies("aynameid"))&" and aydingdanzt=1" 
rsj.open sqlj,conn,1,1

	minje=0    '订单总价
	'minjelast=0
	num=0     '成交笔数
	paybank=0  '网银成交
	payalipay=0 '支付宝成交
	paytenpay=0 '财付通成交
	paycard=0  '充值卡成交
	paybankj=0
	payalipayj=0
	paytenpayj=0
	paycardj=0
	ddlirun=0
	ayptsaoj=0          '微信金额
	ayptsaob=0          '微信笔数
	ayptsaol=0          '微信利润
	qqsaob=0
	qqsaoj=0
	
	jdj=0   
	jdb=0 
	ysfj=0
	ysfb=0
	
	
	if not(rsj.bof and rsj.eof) then
	do while not rsj.eof
	
		num=num+1   '成交笔数
		minje=ccur(minje)+ccur(rsj("aydingdanzj"))   '订单总价
		'minjelast=ccur(minjelast)+ccur(rsj("aycwinjin"))

			chengben=0
			chengben=ccur(rsj("aydingdancb"))*ccur(rsj("ayddquantity"))
			jfei=ccur(jfei)+ccur(rsj("aydingdanzj"))-ccur(rsj("aydingdanin"))	 '今日手续费
			
			fei=ccur(rsj("aydingdanzj"))-ccur(rsj("aydingdanin"))
			ddlirun=ccur(ddlirun)+ccur(rsj("aydingdanzj"))-ccur(chengben)-ccur(fei)
			
			if rsj("ayddzffangshi")=0 then '0网银 1充值卡 2支付宝 3财付通
			paybank=paybank+1
			paybankj=paybankj+ccur(rsj("aydingdanzj"))
			elseif rsj("ayddzffangshi")=1 then
			paycard=paycard+1
			paycardj=paycardj+ccur(rsj("aydingdanzj"))
			elseif rsj("ayddzffangshi")=2 or rsj("ayddzffangshi")=10 then
			payalipay=payalipay+1
			payalipayj=payalipayj+ccur(rsj("aydingdanzj"))
			elseif rsj("ayddzffangshi")=3 or rsj("ayddzffangshi")=12 then
			paytenpay=paytenpay+1
			paytenpayj=paytenpayj+ccur(rsj("aydingdanzj"))
			elseif rsj("ayddzffangshi")=4 or rsj("ayddzffangshi")=13 then
			ayptsaob=ayptsaob+1
			ayptsaoj=ayptsaoj+ccur(rsj("aydingdanzj"))
			elseif rsj("ayddzffangshi")=5 or rsj("ayddzffangshi")=14 then
			qqsaob=qqsaob+1
			qqsaoj=qqsaoj+ccur(rsj("aydingdanzj"))
			
			elseif rsj("ayddzffangshi")=6 or rsj("ayddzffangshi")=15 then '京东
			jdb=jdb+1
			jdj=jdj+ccur(rsj("aydingdanzj"))
			elseif rsj("ayddzffangshi")=7 or rsj("ayddzffangshi")=16 then '云闪付
			ysfb=ysfb+1
			ysfj=ysfj+ccur(rsj("aydingdanzj"))
			
			end if
			
	rsj.movenext  
	loop
	end if
	rsj.close
	
	
'当月流量
	dyll=0
	ayptcjbs2=0
	ayptbankj2=0
	ayptbank2=0
	ayptalipayj2=0
	ayptalipay2=0
	aypttenpayj2=0
	aypttenpay2=0
	ayptcardj2=0
	ayptcard2=0
	fandian2=0
	fandianj2=0
	shoukuanj=0 '收款金额
	dailiin=0  '代理入款
	ayptcjlr=0  '利润
	ayptsaoj2=0          '微信金额
	ayptsaob2=0          '微信笔数
	ayptsaol2=0          '微信利润
	qqsaob2=0
	qqsaoj2=0
	
	jdj2=0   
	jdb2=0 
	ysfj2=0
	ysfb2=0
	
	sql="select * from aypttj where aypttjuid="&request.Cookies("aynameid")&" and aypttjzq=3 and datediff(mm,ayptdate,'"&now()&"')=0" 
	rs.open sql,conn,1,1
	if not(rs.bof and rs.eof) then
	do while not rs.eof
	dyll=ccur(dyll)+ccur(rs("ayptcjje"))
	ayptcjbs2=ccur(ayptcjbs2)+ccur(rs("ayptcjbs"))
	
	ayptbankj2=ccur(ayptbankj2)+ccur(rs("ayptbankj"))  '***
	ayptbank2=ccur(ayptbank2)+ccur(rs("ayptbank"))    '**
	
	ayptalipayj2=ccur(ayptalipayj2)+ccur(rs("ayptalipayj"))+ccur(rs("wapalij")) '**
	ayptalipay2=ccur(ayptalipay2)+ccur(rs("ayptalipay"))+ccur(rs("wapalib"))   '**
	
	aypttenpayj2=ccur(aypttenpayj2)+ccur(rs("aypttenpayj"))+ccur(rs("waptenj"))  '**
	aypttenpay2=ccur(aypttenpay2)+ccur(rs("aypttenpay"))+ccur(rs("waptenb"))  '**
	
	ayptcardj2=ccur(ayptcardj2)+ccur(rs("ayptcardj"))
	ayptcard2=ccur(ayptcard2)+ccur(rs("ayptcard"))
	fandian2=ccur(fandian2)+ccur(rs("ayfandian"))
	fandianj2=ccur(fandianj2)+ccur(rs("ayfandianj"))
	shoukuanj=ccur(shoukuanj)+ccur(rs("shoukuanj"))
	dailiin=ccur(dailiin)+ccur(rs("dailiin"))
	ayptcjlr2=ccur(ayptcjlr2)+ccur(rs("ayptcjlr"))
	ayptsaoj2=ccur(ayptsaoj2)+ccur(rs("ayptsaoj"))
	ayptsaob2=ccur(ayptsaob2)+ccur(rs("ayptsaob"))
	
	qqsaob2=ccur(qqsaob2)+ccur(rs("qqsaob"))
	qqsaoj2=ccur(qqsaoj2)+ccur(rs("qqsaoj"))
		
	jdj2=ccur(jdj2)+ccur(rs("jdj"))
	jdb2=ccur(jdb2)+ccur(rs("jdb"))
	ysfj2=ccur(ysfj2)+ccur(rs("ysfj"))
	ysfb2=ccur(ysfb2)+ccur(rs("ysfb"))
		
	rs.movenext  
	loop
	end if
	rs.close
		
	
%>

<script language=javascript>
function tongjiall()
{
buquan1.style.display='none';
buquan2.style.display='';

var xmlhttp;try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch (e){try{xmlhttp=new XMLHttpRequest();}catch (e){}}}
xmlhttp.open("get","aoto.asp?act=all");
  		xmlhttp.onreadystatechange=function()
   		{
   		if(4==xmlhttp.readyState)
	 	{
	  		if(200==xmlhttp.status)
	  		{	
				if (xmlhttp.responseText=="ok")
				{ 
				alert('近30天数据已补齐');
				window.top.location.href='tongji';
				}
	   		}
		}
   		}
  		xmlhttp.send(null); 
		

}
</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">今日统计&nbsp;<%=date%></div>
            <div class="gexian20"></div>
                	<div class="neitable">

                    <table>
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td width="200"  >订单金额：</td>
                        <td><%=Formatnumber(minje,3,true,-1,0)%>元 | <%=Formatnumber(dyll+minje,3,true,-1,0)%>元/当月</td>
                        <td width="200">成交笔数：</td>
                        <td><%=num%>笔 | <%=ayptcjbs2+num%>笔/当月</td>
                      </tr>
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td>收款金额：</td>
                        <td><%=Formatnumber(zongshoujin,3,true,-1,0)%>元 | <%=Formatnumber(shoukuanj,3,true,-1,0)%>元/当月</td>
                        <td width="200"  >利润：</td>
                        <td><%=Formatnumber(ddlirun,3,true,-1,0)%>元 | <%=Formatnumber(ayptcjlr2,3,true,-1,0)%>元/当月</td>
                      </tr>
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td>代理入款：</td>
                        <td><%=Formatnumber(dailij,3,true,-1,0)%>元 | <%=Formatnumber(dailiin,3,true,-1,0)%>元/当月</td>
                        <td width="200"  >手续费：</td>
                        <td><%=Formatnumber(jfei,3,true,-1,0)%>元</td>
                      </tr>
                      
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td>网银支付：</td>
                        <td><%=Formatnumber(paybankj,3,true,-1,0)%>元 | <%=Formatnumber(ayptbankj2+paybankj,3,true,-1,0)%>元/当月</td>
                        <td>网银笔数：</td>
                        <td><%=paybank%>笔 | <%=ayptbank2+paybank%>笔/当月</td>
                      </tr>
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td>支付宝支付：</td>
                        <td><%=Formatnumber(payalipayj,3,true,-1,0)%>元 | <%=Formatnumber(ayptalipayj2+payalipayj,3,true,-1,0)%>元/当月</td>
                        <td>支付宝笔数：</td>
                        <td><%=payalipay%>笔 | <%=ayptalipay2+payalipay%>笔/当月</td>
                      </tr>
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td>财付通支付：</td>
                        <td><%=Formatnumber(paytenpayj,3,true,-1,0)%>元 | <%=Formatnumber(aypttenpayj2+paytenpayj,3,true,-1,0)%>元/当月</td>
                        <td>财付通笔数：</td>
                        <td><%=paytenpay%>笔 | <%=aypttenpay2+paytenpay%>笔/当月</td>
                      </tr>
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td>微信支付：</td>
                        <td><%=Formatnumber(ayptsaoj,3,true,-1,0)%>元 | <%=Formatnumber(ayptsaoj2+ayptsaoj,3,true,-1,0)%>元/当月</td>
                        <td>微信笔数：</td>
                        <td><%=ayptsaob%>笔 | <%=ayptsaob2+ayptsaob%>笔/当月</td>
                      </tr>
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td>QQ钱包支付：</td>
                        <td><%=Formatnumber(qqsaoj,3,true,-1,0)%>元 | <%=Formatnumber(qqsaoj2+qqsaoj,3,true,-1,0)%>元/当月</td>
                        <td>QQ钱包笔数：</td>
                        <td><%=qqsaob%>笔 | <%=qqsaob2+qqsaob%>笔/当月</td>
                      </tr>
                      
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td>京东支付：</td>
                        <td><%=Formatnumber(jdj,3,true,-1,0)%>元 | <%=Formatnumber(jdj2+jdj,3,true,-1,0)%>元/当月</td>
                        <td>京东笔数：</td>
                        <td><%=jdb%>笔 | <%=jdb2+jdb%>笔/当月</td>
                      </tr>

                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td>云闪付支付：</td>
                        <td><%=Formatnumber(ysfj,3,true,-1,0)%>元 | <%=Formatnumber(ysfj2+ysfj,3,true,-1,0)%>元/当月</td>
                        <td>云闪付笔数：</td>
                        <td><%=ysfb%>笔 | <%=ysfb2+ysfb%>笔/当月</td>
                      </tr>

                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td>充值卡支付：</td>
                        <td><%=Formatnumber(ysfj,3,true,-1,0)%>元 | <%=Formatnumber(ysfj2+ysfj,3,true,-1,0)%>元/当月</td>
                        <td>充值卡成交笔数：</td>
                        <td><%=ysfb%>笔 | <%=ysfb2+ysfb%>笔/当月</td>
                      </tr>
                      </table>

            		</div>
            <!-------------------------------------- 结束 -------------------------------------->
                   
                   
                   
            <!-------------------------------------- 开始 -------------------------------------->
            <div class="gexian20"></div>									
            <div class="neibiaoti"></div>
                <div class="neibiaoti2">往日统计
				<span id="buquan1" onClick="tongjiall()" style="cursor:pointer;color:#F60">[补全往日统计]</span> <a href="tongjiri" style="color:#F60">[查看全部日统计]</a> 
                <span id="buquan2" style="display:none"> <img src="<%=ossurl%>Template/Template4/images/load.gif">请稍等···</span>
                </div>
            <div class="gexian20"></div>
            <div class="neitable">
                
                    <table>
                           <tr class="hd">
                             <td>日期
                             <td><span title="只统计成功订单金额">金额</span>         
                             <td><span title="包括充值，收款，返点，代理商品入款">其他入款</span>           
                             <td><span title="平台手续费">佣金</span>         
                             <td><span title="成功订单金额-订单成本金额">利润</span>            
                             <td><span title="订单成交笔数">成交</span>                             
                             <td><span title="订单-网银支付">网银</span>                            
                             <td><span title="订单-支付宝支付">支付宝</span>   
                             <td><span title="订单-财付通支付">财付通</span>                            
                             <td><span title="订单-微信支付">微信</span>        
                             <td><span title="订单-QQ钱包支付">QQ钱包</span>   
                             <td><span title="订单-京东支付">京东</span>                             
                             <td><span title="订单-云闪付支付">云闪付</span>                             
                             <td><span title="订单-充值卡支付">充值卡</span>        
                           </tr>
                    <%
                    sql="select top 10 * from aypttj where aypttjzq=3 and aypttjuid="&clng(request.Cookies("aynameid"))&" order by ayptdate desc"  
                    rs.open sql,conn,1,1
                    if not(rs.bof and rs.eof) then
                    hayptcjje=0
                    hayptcjlr=0
                    hdailiin=0
                    hayptcjbs=0
                    hayptbankj=0
                    hayptalipayj=0
                    haypttenpayj=0
                    hayptsaoj=0
                    hayptcardj=0
                    hayfandianj=0
                    hqqsaoj=0
                    shoufei=0
                    wapalib=0        
                    wapalij=0     
                    waptenb=0      
                    waptenj=0    
                    qqsaob=0      
                    qqsaoj=0 
					jdj=0 
					ysfj=0 
					
                    do while not rs.eof%>
                          <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                            <td  ><%=DateValue(rs("ayptdate"))%></td>
                            <td  ><%=Formatnumber(rs("ayptcjje"),1,true,-1,0)%>元</td>
                            <td  ><span title="代理商品入款<%=rs("dailiin")%>元
                    其他入款<%=rs("qitain")%>元"><%=Formatnumber(ccur(rs("qitain"))+ccur(rs("dailiin")),1,true,-1,0)%>元</span></td>
                            <td  ><%=Formatnumber(rs("shoufei"),1,true,-1,0)%>元</td>
                            <td  ><%=Formatnumber(rs("ayptcjlr"),1,true,-1,0)%>元</td>
                            <td  ><%=rs("ayptcjbs")%>笔</td>
                            <td  ><%=Formatnumber(rs("ayptbankj"),1,true,-1,0)%>元(<%=rs("ayptbank")%>笔)</td>
                            <td  ><%=Formatnumber(ccur(rs("ayptalipayj"))+ccur(rs("wapalij")),1,true,-1,0)%>元(<%=ccur(rs("ayptalipay"))+ccur(rs("wapalib"))%>笔)</td>
                            <td  ><%=Formatnumber(ccur(rs("aypttenpayj"))+ccur(rs("waptenj")),1,true,-1,0)%>元(<%=ccur(rs("aypttenpay"))+ccur(rs("waptenb"))%>笔)</td>
                            <td  ><%=Formatnumber(rs("ayptsaoj"),1,true,-1,0)%>元(<%=rs("ayptsaob")%>笔)</td>
                            <td  ><%=Formatnumber(rs("qqsaoj"),1,true,-1,0)%>元(<%=rs("qqsaob")%>笔)</td>
                            <td  ><%=Formatnumber(rs("jdj"),1,true,-1,0)%>元(<%=rs("jdb")%>笔)</td>
                            <td  ><%=Formatnumber(rs("ysfj"),1,true,-1,0)%>元(<%=rs("ysfb")%>笔)</td>
                            <td  ><%=Formatnumber(rs("ayptcardj"),1,true,-1,0)%>元(<%=rs("ayptcard")%>笔)</td>
                          </tr>
                    <%
                    hayptcjje=ccur(hayptcjje)+ccur(rs("ayptcjje"))
                    hayptcjlr=ccur(hayptcjlr)+ccur(rs("ayptcjlr"))
                    hdailiin=ccur(hdailiin)+ccur(rs("qitain"))+ccur(rs("dailiin"))
                    hayptcjbs=ccur(hayptcjbs)+ccur(rs("ayptcjbs"))
                    hayptbankj=ccur(hayptbankj)+ccur(rs("ayptbankj"))
                    hayptalipayj=ccur(hayptalipayj)+ccur(rs("ayptalipayj"))+ccur(rs("wapalij"))
                    haypttenpayj=ccur(haypttenpayj)+ccur(rs("aypttenpayj"))+ccur(rs("waptenj"))
                    hayptsaoj=ccur(hayptsaoj)+ccur(rs("ayptsaoj"))
                    hayptcardj=ccur(hayptcardj)+ccur(rs("ayptcardj"))
                    hayfandianj=ccur(hayfandianj)+ccur(rs("ayfandianj"))
                    hqqsaoj=ccur(hqqsaoj)+ccur(rs("qqsaoj"))
                    shoufei=ccur(shoufei)+ccur(rs("shoufei"))
					
					hjdj=ccur(hjdj)+ccur(rs("jdj"))
					hysfj=ccur(hysfj)+ccur(rs("ysfj"))
                    rs.movenext
                    loop
                    end if
                    rs.close%>
                          
                    
                          <tr>
                            <td  ><strong>合计          	</strong></td>
                            <td  ><strong><%=Formatnumber(hayptcjje,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=Formatnumber(hdailiin,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=Formatnumber(shoufei,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=Formatnumber(hayptcjlr,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=hayptcjbs%>笔</strong></td>
                            <td  ><strong><%=Formatnumber(hayptbankj,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=Formatnumber(hayptalipayj,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=Formatnumber(haypttenpayj,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=Formatnumber(hayptsaoj,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=Formatnumber(hqqsaoj,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=Formatnumber(hjdj,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=Formatnumber(hysfj,2,true,-1,0)%>元</strong></td>
                            <td  ><strong><%=Formatnumber(hayptcardj,2,true,-1,0)%>元</strong></td>
                          </tr>
              </table>
			</div>


            <!-------------------------------------- 结束 -------------------------------------->
            
            
            
            
            <!-------------------------------------- 开始 -------------------------------------->
            <div class="gexian20"></div>									
            <div class="neibiaoti"></div>
            <div class="neibiaoti2">月统计 <a href="tongjiyue" style="color:#F60">[查看全部月统计]</a> </div>
            <div class="gexian20"></div>
            <div class="neitable">
                
                
                <table>
                   
                       <tr class="hd">
                         <td>时间
                         <td><span title="只统计成功订单金额">金额</span>          
                         <td><span title="包括充值，收款，返点，代理商品入款">其他入款</span>           
                         <td><span title="平台手续费">佣金</span>         
                         <td><span title="成功订单金额-订单成本金额">利润</span>        
                         <td>成交                         
                         <td><span title="订单-网银支付">网银</span>                         
                         <td><span title="订单-支付宝支付">支付宝</span>
                         <td><span title="订单-财付通支付">财付通</span>                         
                         <td><span title="订单-微信扫码支付">微信</span>         
                         <td><span title="订单-QQ钱包支付">QQ钱包</span>   
                         <td><span title="订单-京东支付">京东</span>                             
                         <td><span title="订单-云闪付支付">云闪付</span>                         
                         <td><span title="订单-充值卡支付">充值卡</span>         
                       </tr>
                <%
                sql="select top 6 * from aypttj where aypttjzq=2 and aypttjuid="&clng(request.Cookies("aynameid"))&sqldd&" order by ayptdate desc"  
                rs.open sql,conn,1,1
                if not(rs.bof and rs.eof) then
                hayptcjje=0
                hayptcjlr=0
                hdailiin=0
                hayptcjbs=0
                hayptbankj=0
                hayptalipayj=0
                haypttenpayj=0
                hayptsaoj=0
                hayptcardj=0
                hayfandianj=0
                hqqsaoj=0
                shoufei=0
                wapalib=0        
                wapalij=0     
                waptenb=0      
                waptenj=0 
                qqsaob=0      
                qqsaoj=0 
				jdj=0 
				ysfj=0 
				hjdj=0
				hysfj=0
                do while not rs.eof%>
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td><%=rs("aypttjjl")%></td>
                        <td><%=Formatnumber(rs("ayptcjje"),1,true,-1,0)%>元</td>
                        <td><span title="代理商品入款<%=rs("dailiin")%>元
                其他入款<%=rs("dailiin")%>元"><%=Formatnumber(ccur(rs("qitain"))+ccur(rs("dailiin")),1,true,-1,0)%>元</span></td>
                        <td><%=Formatnumber(rs("shoufei"),1,true,-1,0)%>元</td>
                        <td><%=Formatnumber(rs("ayptcjlr"),1,true,-1,0)%>元</td>
                        <td><%=rs("ayptcjbs")%>笔</td>
                        <td><%=Formatnumber(rs("ayptbankj"),1,true,-1,0)%>元(<%=rs("ayptbank")%>笔)</td>
                        <td><%=Formatnumber(ccur(rs("ayptalipayj"))+ccur(rs("wapalij")),1,true,-1,0)%>元(<%=ccur(rs("ayptalipay"))+ccur(rs("wapalib"))%>笔)</td>
                        <td><%=Formatnumber(ccur(rs("aypttenpayj"))+ccur(rs("waptenj")),1,true,-1,0)%>元(<%=ccur(rs("aypttenpay"))+ccur(rs("waptenb"))%>笔)</td>
                        <td><%=Formatnumber(rs("ayptsaoj"),1,true,-1,0)%>元(<%=rs("ayptsaob")%>笔)</td>
                        <td><%=Formatnumber(rs("qqsaoj"),1,true,-1,0)%>元(<%=rs("qqsaob")%>笔)</td>
                         <td><%=Formatnumber(rs("jdj"),1,true,-1,0)%>元(<%=rs("jdb")%>笔)</td>
                        <td><%=Formatnumber(rs("ysfj"),1,true,-1,0)%>元(<%=rs("ysfb")%>笔)</td>
                        <td><%=Formatnumber(rs("ayptcardj"),1,true,-1,0)%>元(<%=rs("ayptcard")%>笔)</td>
                      </tr>
    <%
                hayptcjje=ccur(hayptcjje)+ccur(rs("ayptcjje"))
                hayptcjlr=ccur(hayptcjlr)+ccur(rs("ayptcjlr"))
                hdailiin=ccur(hdailiin)+ccur(rs("qitain"))+ccur(rs("dailiin"))
                hayptcjbs=ccur(hayptcjbs)+ccur(rs("ayptcjbs"))
                hayptbankj=ccur(hayptbankj)+ccur(rs("ayptbankj"))
                hayptalipayj=ccur(hayptalipayj)+ccur(rs("ayptalipayj"))+ccur(rs("wapalij"))
                haypttenpayj=ccur(haypttenpayj)+ccur(rs("aypttenpayj"))+ccur(rs("waptenj"))
                hayptsaoj=ccur(hayptsaoj)+ccur(rs("ayptsaoj"))
                hayptcardj=ccur(hayptcardj)+ccur(rs("ayptcardj"))
                hayfandianj=ccur(hayfandianj)+ccur(rs("ayfandianj"))
                hqqsaoj=ccur(hqqsaoj)+ccur(rs("qqsaoj"))
                shoufei=ccur(shoufei)+ccur(rs("shoufei"))
                hjdj=ccur(hjdj)+ccur(rs("jdj"))
				hysfj=ccur(hysfj)+ccur(rs("ysfj"))
					
                rs.movenext
                loop
                end if
                yzongshu=rs.RecordCount
                rs.close%>
                      
                
                      <tr>
                        <td><strong>合计</strong></td>
                        <td><strong><%=Formatnumber(hayptcjje,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=Formatnumber(hdailiin,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=Formatnumber(shoufei,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=Formatnumber(hayptcjlr,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=hayptcjbs%>笔</strong></td>
                        <td><strong><%=Formatnumber(hayptbankj,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=Formatnumber(hayptalipayj,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=Formatnumber(haypttenpayj,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=Formatnumber(hayptsaoj,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=Formatnumber(hqqsaoj,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=Formatnumber(hjdj,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=Formatnumber(hysfj,2,true,-1,0)%>元</strong></td>
                        <td><strong><%=Formatnumber(hayptcardj,2,true,-1,0)%>元</strong></td>
                      </tr>
              </table>



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

            
            
            <!-------------------------------------- 开始 -------------------------------------->
            <div class="gexian20"></div>									
            <div class="neibiaoti"></div>
            <div class="neibiaoti2">年统计</div>
            <div class="gexian20"></div>
            <div class="neitable">
                
                
                <table>
                       <tr class="hd">
                         	<td>时间
                            <td><span title="只统计成功订单金额">金额</span>         
                            <td><span title="包括充值，收款，返点，代理商品入款">其他入款</span>          
                            <td><span title="平台手续费">佣金</span>            
                            <td><span title="成功订单金额-订单成本金额">利润</span>          
                            <td>成交                         
                            <td><span title="订单-网银支付">网银</span>                         
                            <td><span title="订单-支付宝支付">支付宝</span>
                            <td><span title="订单-财付通支付">财付通</span>                         
                            <td><span title="订单-微信扫码支付">微信</span>         
                         	<td><span title="订单-QQ钱包支付">QQ钱包</span>   
                         	<td><span title="订单-京东支付">京东</span>                             
                         	<td><span title="订单-云闪付支付">云闪付</span>                           
                            <td><span title="订单-充值卡支付">充值卡</span>         
                      </tr>
                <%
                sql="select top 5 * from aypttj where aypttjuid="&clng(request.Cookies("aynameid"))&" and aypttjzq=1 order by ayptdate desc"  
                rs.open sql,conn,1,1
                if not(rs.bof and rs.eof) then
                do while not rs.eof%>
                
                      <tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                        <td><%=rs("aypttjjl")%></td>
                        <td><%=Formatnumber(rs("ayptcjje"),1,true,-1,0)%>元</td>
                        <td><span title="代理商品入款<%=rs("dailiin")%>元
                其他入款<%=rs("dailiin")%>元"><%=Formatnumber(ccur(rs("qitain"))+ccur(rs("dailiin")),1,true,-1,0)%>元</span></td>
                        <td><%=Formatnumber(rs("shoufei"),1,true,-1,0)%>元</td>
                        <td><%=Formatnumber(rs("ayptcjlr"),1,true,-1,0)%>元</td>
                        <td><%=rs("ayptcjbs")%>笔</td>
                        <td><%=Formatnumber(rs("ayptbankj"),3,true,-1,0)%>元(<%=rs("ayptbank")%>笔)</td>
                        <td><%=Formatnumber(ccur(rs("ayptalipayj"))+ccur(rs("wapalij")),3,true,-1,0)%>元(<%=ccur(rs("ayptalipay"))+ccur(rs("wapalib"))%>笔)</td>
                        <td><%=Formatnumber(ccur(rs("aypttenpayj"))+ccur(rs("waptenj")),3,true,-1,0)%>元(<%=ccur(rs("aypttenpay"))+ccur(rs("waptenb"))%>笔)</td>
                        <td><%=Formatnumber(rs("ayptsaoj"),3,true,-1,0)%>元(<%=rs("ayptsaob")%>笔)</td>
                        <td><%=Formatnumber(rs("qqsaoj"),1,true,-1,0)%>元(<%=rs("qqsaob")%>笔)</td>
                        <td><%=Formatnumber(rs("jdj"),1,true,-1,0)%>元(<%=rs("jdb")%>笔)</td>
                        <td><%=Formatnumber(rs("ysfj"),1,true,-1,0)%>元(<%=rs("ysfb")%>笔)</td>
                        <td><%=Formatnumber(rs("ayptcardj"),3,true,-1,0)%>元(<%=rs("ayptcard")%>笔)</td>
                      </tr>
                <%
                rs.movenext
                loop
                end if
                rs.close%>
              </table>




			</div>
            <!-------------------------------------- 结束 -------------------------------------->
            
                                                                 
                   
            <div class="gexian20"></div>
            <div class="mzsmbox2" style="padding-top:20px;">
            提示：在商家登录平台时，才会自动统计，如果统计数据不完整或有遗漏，请点击"补全日统计"会重新统计30日内数据，或直接联系管理员。
            </div>
          </div>
            
           




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



</div>








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


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

</body>
</html>