⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 salesinvoicestat.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
📖 第 1 页 / 共 3 页
字号:
	<option value="ordernum" <%if request("statSearch3")="ordernum" then Response.Write " selected"%>>按合同</option>
	<option value="deliveryno" <%if request("statSearch3")="deliveryno" then Response.Write " selected"%>>按发货单</option>
	<option value="transactdate" <%if request("statSearch3")="transactdate" then Response.Write " selected"%>>按每日</option>
	<option value="transactmonth" <%if request("statSearch3")="transactmonth" then Response.Write " selected"%>>按每月</option>
	<option value="model" <%if request("statSearch3")="model" then Response.Write " selected"%>>按产品</option>
	<option value="producttype" <%if request("statSearch3")="producttype" then Response.Write " selected"%>>按产品类型</option>
	<option value="transactid" <%if request("statSearch3")="transactid" then Response.Write " selected"%>>按销售明细</option>
	</select>
	从<input name=FdateSearch size=10 language=javascript id=dupdatetime value='<%=strFdate%>'  readonly><% call AddImg("date")%>
                <input type = hidden name=clicksource>
                <input type = hidden name=clickresult >
	到<input name=EdateSearch size=10 language=javascript id=dupdatetime2 value='<%=strEdate%>'  readonly><% call AddImg("date2")%>
	<select name=TransNameSearch size=1 LANGUAGE=javascript  onchange="submit1()">
	<option value="" <%if request("TransNameSearch")="" then Response.Write " selected"%>>扣除退货</option>
	<option value="send" <%if request("TransNameSearch")="send" then Response.Write " selected"%>>所有发货</option>&nbsp;
	<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>按开票统计销售&nbsp;&nbsp;</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="" <%if request("char")="" then Response.Write " selected"%>>--查看图例--</option>
			<option value="pie" <%if request("char")="pie" then Response.Write " selected"%>>饼图</option>
			<option value="3dbar" <%if request("char")="3dbar" 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="aboutinvoice" <%if request("StatMethod")="aboutinvoice" then Response.Write " selected"%>>按开票日期统计销售</option>
	<option value="aboutrecieve" <%if request("StatMethod")="aboutrecieve" then Response.Write " selected"%>>按收款日期统计销售</option>
	<option value="aboutdelivery" <%if request("StatMethod")="aboutdelivery" then Response.Write " selected"%>>按发货日期统计销售</option>
	</select>
	  </td>
    </tr>
    <tr > 
      <td height="16" colspan="2" background="../images/title.gif">&nbsp;</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
				for i=1 to alls
					if rssalereport.EOF then exit for
				TotalAmount=TotalAmount+Ccur(rssalereport("subprice"))
				Totalinvoicedamount=Totalinvoicedamount+Ccur(rssalereport("subinvoicedamount"))
				TotalQty=TotalQty+cint(rssalereport("subqty"))
				TotalCost=TotalCost+Ccur(rssalereport("subcost"))
				rssalereport.MoveNext
				Next
				rssalereport.close
				%>
	         <tr bgcolor="#efefef">
                <td align="center"><%=alls%></td>
			    <td align="center">100.00%</td>
                <td align="center"><%=TotalQty%></td>
                <td align="center"><%=(formatnumber(ccur(TotalAmount),2))%></td>
                <td align="center"><%=(formatnumber(ccur(Totalinvoicedamount),2))%></td>
                <td align="center"><%=(formatnumber(ccur(TotalAmount)-ccur(TotalCost),2))%></td>
              </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="center" width="10%"><% =(formatnumber((ccur((subprice/TotalAmount)*10000)/100),2))%>%</td>
                <td align="center" width="10%"><% =rssalereport("subqty")%></td>
                <td align="center" width="10%"><%=(formatnumber(ccur(rssalereport("subprice")),2))%></td>
                <td align="center" width="10%"><%=(formatnumber(ccur(rssalereport("subinvoicedamount")),2))%></td>
                <td align="center" width="10%"><%=(formatnumber(ccur(rssalereport("subprice"))-ccur(rssalereport("subcost")),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")="" 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"><input type=button name="closechar"  onClick="JavaScript:form1.char.value='';form1.submit();"    value="关闭图例" class=black></td><td></td></tr>
    <tr><td></td>
      <td WIDTH=450> 
        <APPLET CODE="HanengCharts.class" ARCHIVE="HanengCharts2.jar" WIDTH=450 HEIGHT=250 VIEWASTEXT>
            <PARAM NAME="ChartType" VALUE="<%=request("char")%>">
<%
 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>
      </td><td></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
				for i=1 to alls
					if rssalereport.EOF then exit for
				TotalAmount=TotalAmount+Ccur(rssalereport("subprice"))
				Totalinvoicedamount=Totalinvoicedamount+Ccur(rssalereport("subinvoicedamount"))
				TotalQty=TotalQty+cint(rssalereport("subqty"))
				TotalCost=TotalCost+Ccur(rssalereport("subcost"))
				rssalereport.MoveNext
				Next
				rssalereport.close
				%>
	      <tr bgcolor="#efefef">
                <td align="center"></td>
                <td align="center"></td>
			    <td align="center">100.00%</td>
                <td align="center"><%=TotalQty%></td>
                <td align="center"><%=(formatnumber(ccur(TotalAmount),2))%></td>
                <td align="center"><%=(formatnumber(ccur(subinvoicedamount),2))%></td>
                <td align="center"><%=(formatnumber(ccur(TotalAmount)-ccur(TotalCost),2))%></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
  subTotalinvoicedamount=0
  subpercent=0
  subTotalAmount=0
  subTotalQty=0
  subTotalCost=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
		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>"
		subTotalinvoicedamount=ccur(rssalereport("subinvoicedamount"))
		subpercent=ccur((subprice/TotalAmount)*10000)/100
		subTotalAmount=ccur(rssalereport("subprice"))
		subTotalQty=cint(rssalereport("subqty"))
		subTotalCost=ccur(rssalereport("subcost"))
	else
		subTotalinvoicedamount=subTotalinvoicedamount+ccur(rssalereport("subinvoicedamount"))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -