📄 salesstat.asp
字号:
<option value="return" <%if request("TransNameSearch")="return" then Response.Write " selected"%>>所有退货</option>
</select>
<select name=nameSearch size=1 ID=Select1 LANGUAGE=javascript onchange="submit1()">
<option value="">--选择销售员--</option>
<%getsubordinate Request.Form("namesearch")%>
</select>
<input type=submit name="Search" value="提交"></td></tr>
</form1>
</table>
<table cellspacing=0 cellpadding=0 width="100%" border=0>
<tbody>
<tr>
<td>
<table cellspacing=0 cellpadding=0 width="100%" border=0>
<tr>
<td height="25" width=50%><strong><font class=title><b>按发货统计销售 </b></font></strong>
<select name=CollectionStat size=1 LANGUAGE=javascript onchange="submit1()">
<option value="" <%if request("CollectionStat")="" then Response.Write " selected"%>>--收款状态--</option>
<option value="Collected" <%if request("CollectionStat")="Collected" then Response.Write " selected"%>>已收款</option>
<option value="Collecting" <%if request("CollectionStat")="Collecting" then Response.Write " selected"%>>未收款</option>
</select>
<select name=InvoiceStat size=1 LANGUAGE=javascript onchange="submit1()">
<option value="" <%if request("InvoiceStat")="" then Response.Write " selected"%>>--开票状态--</option>
<option value="Invoiced" <%if request("InvoiceStat")="Invoiced" then Response.Write " selected"%>>已开票</option>
<option value="Invoicing" <%if request("InvoiceStat")="Invoicing" then Response.Write " selected"%>>未开票</option>
<option value="NoInvoice" <%if request("InvoiceStat")="NoInvoice" then Response.Write " selected"%>>不开票</option>
</select>
<select name=char size=1 ID=Select1 LANGUAGE=javascript onchange="submit1()">
<option value="close" <%if request("char")="close" then Response.Write " selected"%>>--关闭图例--</option>
<option value="pie" <%if request("char")="pie" then Response.Write " selected"%>>饼图</option>
<option value="3dbar" <%if request("char")="3dbar" or request("char")="" then Response.Write " selected"%>>3D柱形图</option>
<option value="bar" <%if request("char")="bar" then Response.Write " selected"%>>柱形图</option>
<option value="Line" <%if request("char")="Line" then Response.Write " selected"%>>线形图</option>
<option value="filledline" <%if request("char")="filledline" then Response.Write " selected"%>>填充线形图</option>
</select>
</td>
<td width=50% align="right">
<!--
<select name=StatMethod size=1 LANGUAGE=javascript onchange="submit3()">
<option value="aboutdelivery" <%if request("StatMethod")="aboutdelivery" then Response.Write " selected"%>>按发货日期统计销售</option>
<option value="aboutrecieve" <%if request("StatMethod")="aboutrecieve" then Response.Write " selected"%>>按收款日期统计销售</option>
<option value="aboutinvoice" <%if request("StatMethod")="aboutinvoice" then Response.Write " selected"%>>按开票日期统计销售</option>
</select>
-->
</td>
</tr>
<tr >
<td height="16" colspan="2" background="../images/title.gif"> </td>
</tr>
</table>
</td>
</tr>
<tr class="linecolor"><td height="2"></td></tr>
<tr height="5px"><td></td></tr>
</tbody>
</table>
<%if request("statSearch2")="" and request("statSearch3")="" then%>
<table align="center" cellspacing=1 cellpadding=1 width="100%" border=0 bgcolor="#ffffff" style="font-size:10pt">
<tr bgcolor="#dedfde">
<td align="center" width="5%" rowspan="2">排名</td>
<td align="center" width="45%"><%=dispname%>数</td>
<td align="center" width="10%">占总销售金额</td>
<td align="center" width="10%">发货单数量</td>
<td align="center" width="10%">销售金额</td>
<td align="center" width="10%">已收金额</td>
<td align="center" width="10%">销售利润</td>
</tr>
<%
TotalAmount=0
Totalnum=0
TotalQty=0
TotalCost=0
Totaltotalreceive=0
profit=0
for i=1 to alls
if rssalereport.EOF then exit for
TotalAmount=TotalAmount+Ccur(rssalereport("subprice"))
Totaltotalreceive=Totaltotalreceive+Ccur(rssalereport("subtotalreceive"))
TotalQty=TotalQty+cint(rssalereport("subqty"))
profit=profit+Ccur(rssalereport("profit"))
rssalereport.MoveNext
Next
totalprofit=totalprofit+profit
rssalereport.close
%>
<tr bgcolor="#efefef">
<td align="center"><%=alls%></td>
<td align="right">100.00%</td>
<td align="center"><%=TotalQty%></td>
<td align="right"><%=(formatnumber(ccur(TotalAmount),2))%></td>
<td align="right"><%=(formatnumber(ccur(Totaltotalreceive),2))%></td>
<td align="right">
<%if objcheck.CheckUserFunction2("viewcost","read") then%>
<%=(formatnumber(ccur(profit),2))%></td>
<%end if%>
</tr>
</table>
<%
rssalereport.open sql,connsalereport,1,1
for i=1 to alls
if rssalereport.EOF then exit for
subprice=Ccur(rssalereport("subprice"))
if totalamount=0 then totalamount=1
%>
<table align="center" cellspacing=1 cellpadding=1 width="100%" border=0 bgcolor="#ffffff" style="font-size:10pt">
<tr bgcolor="#FFFFFF">
<td align="center" width="5%"><%=i%></td>
<td align="center" width="45%"><% =rssalereport(""&strstatSearch&"")%></td>
<td align="right" width="10%"><% =(formatnumber((ccur((subprice/TotalAmount)*10000)/100),2))%>%</td>
<td align="center" width="10%"><% =rssalereport("subqty")%></td>
<td align="right" width="10%"><%=(formatnumber(ccur(rssalereport("subprice")),2))%></td>
<td align="right" width="10%"><%=(formatnumber(ccur(rssalereport("subtotalreceive")),2))%></td>
<td align="right" width="10%">
<%if objcheck.CheckUserFunction2("viewcost","read") then Response.Write formatnumber(ccur(rssalereport("profit")),2)%></td>
</tr>
<%
response.write "<tr ><td height=1 colspan=7 bgcolor=#000000></td></tr>"
rssalereport.MoveNext
next
%>
</table>
<br>
<div align="center" id=CharDisp <%if request("char")="close" then response.write "style=display:none" else response.write "style=display:block" end if%>>
<table align="center" cellspacing=0 cellpadding=1 width="100%" border=0 bgcolor="#ffffff" style="font-size:10pt">
<tr>
<td></td>
<td WIDTH=450 align="right"> </td>
<td></td>
</tr>
<tr>
<td colspan="3">
<%if request("char")="" then strchar="3dbar" else strchar=request("char")%>
<%if alls>0 then%>
<APPLET CODE="HanengCharts.class" ARCHIVE="HanengCharts2.jar" WIDTH=450 HEIGHT=250 VIEWASTEXT>
<PARAM NAME="ChartType" VALUE="<%=strchar%>">
<%
rssalereport.close
rssalereport.open sql,connsalereport,1,1
for i=1 to alls
if rssalereport.EOF then exit for
%>
<PARAM NAME="value_<%=i%>" VALUE="<% =rssalereport("subprice")%>">
<PARAM NAME="text_<%=i%>" VALUE="<% =rssalereport(""&strstatSearch&"")%>">
<%
rssalereport.MoveNext
next
%>
</APPLET>
<%end if%>
</td>
</tr>
</table>
</div>
<%
rssalereport.close
connsalereport.close
elseif request("statSearch2")<>"" and request("statSearch3")="" then
%>
<table align="center" cellspacing=1 cellpadding=1 width="100%" border=0 bgcolor="#ffffff" style="font-size:10pt">
<tr bgcolor="#DEDFDE">
<td align="center" width="25%"><%=dispname%></td>
<td align="center" width="25%"><%=dispname2%></td>
<td align="center" width="10%">占总销售金额</td>
<td align="center" width="10%">发货单数量</td>
<td align="center" width="10%">销售金额</td>
<td align="center" width="10%">已收金额</td>
<td align="center" width="10%">销售利润</td>
</tr>
<%
TotalAmount=0
Totalnum=0
Totaltotalreceive=0
profit=0
for i=1 to alls
if rssalereport.EOF then exit for
TotalAmount=TotalAmount+Ccur(rssalereport("subprice"))
Totaltotalreceive=Totaltotalreceive+Ccur(rssalereport("subtotalreceive"))
TotalQty=TotalQty+cint(rssalereport("subqty"))
profit=profit+Ccur(rssalereport("profit"))
rssalereport.MoveNext
Next
rssalereport.close
%>
<tr bgcolor="#efefef">
<td align="center"></td>
<td align="center"></td>
<td align="right">100.00%</td>
<td align="center"><%=TotalQty%></td>
<td align="right"><%=(formatnumber(ccur(TotalAmount),2))%></td>
<td align="right"><%=(formatnumber(ccur(Totaltotalreceive),2))%></td>
<td align="right">
<%if objcheck.CheckUserFunction2("viewcost","read") then%>
<%=(formatnumber(ccur(profit),2))%>
<%end if%>
</td>
</tr>
</table>
<table align="center" cellspacing=1 cellpadding=1 width="100%" border=0 bgcolor="#ffffff" style="font-size:10pt">
<%
rssalereport.open sql,connsalereport,1,1
'response.write sql
subTotaltotalreceive=0
subpercent=0
subTotalAmount=0
subTotalQty=0
subTotalCost=0
subprofit=0
profit=0
for i=1 to alls
if rssalereport.EOF then exit for
subprice=Ccur(rssalereport("subprice"))
if TotalAmount=0 then TotalAmount=1
if rssalereport(""&strstatSearch&"") <> previous then
subprofit=0
response.write "<tr bgcolor=#FFFFFF><td align=center>"&rssalereport(""&strstatSearch&"")&"</td><td colspan=6></td></tr>"
response.write "<tr bgcolor=#000000><td colspan=7></td></tr>"
subTotaltotalreceive=ccur(rssalereport("subtotalreceive"))
subpercent=ccur((subprice/TotalAmount)*10000)/100
subTotalAmount=ccur(rssalereport("subprice"))
subTotalQty=cint(rssalereport("subqty"))
'profit=profit+ccur(rssalereport("profit"))
subprofit=subprofit+ccur(rssalereport("profit"))
else
subTotaltotalreceive=subTotaltotalreceive+ccur(rssalereport("subtotalreceive"))
subpercent=subpercent+ccur((subprice/TotalAmount)*10000)/100
subTotalAmount=subTotalAmount+ccur(rssalereport("subprice"))
subTotalQty=subTotalQty+cint(rssalereport("subqty"))
'profit=profit+ccur(rssalereport("profit"))
subprofit=subprofit+ccur(rssalereport("profit"))
'Response.Write "<tr><td colspan=7>"&subprofit&"</td></tr>"
end if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -