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

<%
if SafeRequest("act")="cha" then
date1y=SafeRequestform("date1y")
date2y=SafeRequestform("date2y")

if date1y="" then call PopErr("请输入其实日期")
if date2y="" then date2r=now()

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

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

if request.Cookies("date1y")<>"" then 
sqldd=sqldd&" and  datediff(Month,ayptdate,'"&request.Cookies("date1y")&"')<=0"
end if
if request.Cookies("date2y")<>"" then 
sqldd=sqldd&" and  datediff(Month,ayptdate,'"&request.Cookies("date2y")&"')>=0"
end if


end if

%>

<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">       	
                <br><br>
                <table>
                <tr>
                <td>
                <form action="?act=cha" method="post" name="chaxun" id="chaxun">
                &nbsp;起始时间：
                <input name="date1y" type="text" class="reginputd" id="date1y" onFocus="this.select()" onClick="fPopCalendar(event,this,this)" value="<%if request.Cookies("date1y")<>"" then response.Write request.Cookies("date1y")%>" readonly="readonly" />
                截止时间：&nbsp;
                <input name="date2y" type="text" class="reginputd" id="date2y" onFocus="this.select()" onClick="fPopCalendar(event,this,this)" value="<%if request.Cookies("date2y")<>"" then response.Write request.Cookies("date2y")%>" readonly="readonly" />
                &nbsp;
                <input type="submit" name="Submit" value=" 查 询 " class="logindlregedit">
                </form>
                </td>
                </tr>
                </table>
                </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="订单-手Q扫码支付">QQ钱包</span>           
                             <td><span title="订单-京东支付">京东</span>                             
                             <td><span title="订单-云闪付支付">云闪付</span>                            
                             <td><span title="订单-充值卡支付">充值卡</span>         
                           </tr>
                    <%
                    link="tongjiyue?cact="
                    sql="select top 24 * from aypttj where aypttjzq=2 and aypttjuid="&clng(request.Cookies("aynameid"))&sqldd&" order by ayptdate desc"  
                    rs.open sql,conn,1,1
                    rs.pagesize=12 
                    pagecount=rs.pagecount 
                    if request("ypage")="" then 
                    ypage=1
                    else
                    ypage=int(request("ypage")) 
                    end if
                    if ypage<=0 then ypage=1 
                    if request("ypage")="" then ypage=1
                    if not(rs.bof and rs.eof) then
                    rs.absolutepage=ypage
                    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><%=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("jdj")%>笔)</td>
                            <td><%=Formatnumber(rs("ysfj"),1,true,-1,0)%>元(<%=rs("ysfj")%>笔)</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"))
                    yn=yn+1
                    rs.movenext
                    if yn>=rs.pagesize then exit do  
                    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>
                          <tr>
                            <td colspan="14" style="text-align:left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                              <%if pagecount=0 then   
                    response.write("首页 ")
                    elseif ypage=1 then       
                    response.write("首页 ")
                    else%>
                              <a href="<%=link%>&amp;ypage=1">首页</a>
                              <%end if
                    
                    if pagecount=0 then   
                    response.write("上页&nbsp;")
                    elseif ypage=1 then       
                    response.write("上页&nbsp;")
                    else%>
                              <a href="<%=link%>&amp;ypage=<%=ypage-1%>">上页</a>&nbsp;
                              <%end if
                    
                    if pagecount>20 then
                    if ypage<=10 then 
                    yaa=1
                    ybb=20
                    yaabu=""
                    ybbbu=" … "
                    elseif ypage>=11 then 
                    yaa=ypage-9
                    ybb=ypage+10
                    yaabu=" …"
                    ybbbu=" … "
                        if ybb>=pagecount then 
                        yaa=pagecount-20
                        ybb=pagecount
                        yaabu=" … "
                    
                        ybbbu=""
                        end if
                    end if
                    response.Write yaabu
                    for yaa=yaa to ybb
                    if ypage=yaa then
                    response.Write("<a href="&link&"&ypage="&yaa&"><strong>"&yaa&"</strong></a>&nbsp;")
                    else
                    response.Write("<a href="&link&"&ypage="&yaa&">"&yaa&"</a>&nbsp;")
                    end if
                    next
                    response.Write ybbbu
                    
                    else
                    
                    for yi=1 to pagecount
                    if ypage=yi then
                    response.Write("<a href="&link&"&ypage="&yi&"><strong>"&yi&"</a></strong>&nbsp;")
                    else
                    response.Write("<a href="&link&"&ypage="&yi&">"&yi&"</a>&nbsp;")
                    end if
                    next
                    
                    end if
                    
                    if pagecount=0 then 
                    response.write("下页&nbsp;")
                    elseif ypage=pagecount then 
                    response.write("下页&nbsp;")
                    else%>
                              <a href="<%=link%>&amp;ypage=<%=ypage+1%>">下页</a>
                              <%end if%>
                              <%if pagecount=0 then  '总页数为0 显示空
                    response.write("尾页 ") 
                    elseif ypage=pagecount then 
                    response.write("尾页 ")
                    else%>
                              <a href="<%=link%>&amp;ypage=<%=pagecount %>">尾页</a>
                              <%end if
                    
                    if pagecount<>0 then 
                    response.Write ypage&"/"&pagecount
                    end if
                    response.Write "&nbsp;共"&yzongshu&"条"
                    %></td>
                          </tr>
                        </table>

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




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



</div>








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


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

</body>
</html>