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

📄 report_sellby.asp

📁 Activity——活动管理模块 Analyse——分析模块 Client——客户管理系统模块 Email——E-mail管理模块 Fee——费用管理模块 Report——报表模块 Sel
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<!--#include file="../isuser.asp"-->
<!--#include file="../pub_fun.asp"-->

<HEAD>
<META NAME="Keywords" CONTENT="FastReport"/>
<META NAME="Description" CONTENT="The FastReport report"/>
<LINK href="../css.css" rel="stylesheet" type="text/css" media="all">

<TITLE>销售统计报表</TITLE></head>
<script language="VBScript">
sub print_onclick()
fm1.txturl.value="show"
fm1.submit
end sub

sub down_onclick()
fm1.txturl.value="down"
fm1.submit
end sub
</script>
<%
if  request("txturl")<>"" then
''生成查询条件
textsql=""
    if request("S_time")<>"0" then
	    textsql=textsql & " and  selldate between '"&trim(request("start_time"))&"' and  '"&trim(request("end_time"))&"'"
	end if 
	if request("s_operator")<>"0" then
	    textsql=textsql & " and  sellCreatorID="&trim(request("s_operator"))
	end if
	

''查询条件加密
textsql=encrypt(textsql)

''判断进行的是哪种操作 
	if trim(request("txturl"))="show"  then
	'' 根据用户选择的统计类型转到不同的页面
	   select case trim(request("S_kind"))
	     case 0
%>
<script language="javaScript">   
      window.open("show_report_sellbyclient.asp?sql=<%=textsql%>","show","resizable,scrollbars=no,dependent,status=yes,width=725,height=680");
</script>
<%
	     case 1
%>
<script language="javaScript">   
      window.open("show_report_sellbyoperator.asp?sql=<%=textsql%>","show","resizable,scrollbars=no,dependent,status=yes,width=725,height=680");
</script>
<%
	     case 2
%>
<script language="javaScript">   
      window.open("show_report_sellbyproduct.asp?sql=<%=textsql%>","show","resizable,scrollbars=no,dependent,status=yes,width=725,height=680");
</script>
<%
	     case 3
%>
<script language="javaScript">   
      window.open("show_report_sellsumproduct.asp?sql=<%=textsql%>","show","resizable,scrollbars=no,dependent,status=yes,width=725,height=680");
</script>
<%   end select
	else
	'' 根据用户选择的统计类型转到不同的页面
	   select case trim(request("S_kind"))
	     case 0
%>
<script language="javaScript">   
      window.open("down_report_sellbyclient.asp?sql=<%=textsql%>","down","resizable,scrollbars=no,dependent,status=yes,width=400,height=240");
</script>
<%
	     case 1
%>
<script language="javaScript">   
      window.open("down_report_sellbyoperator.asp?sql=<%=textsql%>","down","resizable,scrollbars=no,dependent,status=yes,width=400,height=240");
</script>
<%
	     case 2
%>
<script language="javaScript">   
      window.open("down_report_sellbyproduct.asp?sql=<%=textsql%>","down","resizable,scrollbars=no,dependent,status=yes,width=400,height=240");
</script>
<%
	     case 3
%>
<script language="javaScript">   
      window.open("down_report_sellsumproduct.asp?sql=<%=textsql%>","down","resizable,scrollbars=no,dependent,status=yes,width=400,height=240");
</script>

<%   end select
	end if
end if
%>


<body >
<form method="post" name="fm1" >

<input type="hidden" name="txturl">
<table width="751" border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td>
	 <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr> 
            <td colspan="2"><div align="right"> 
                <table width="100%" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2">

                  <tr> 
                    <td width="180" bgcolor="#566CDB"><font color="#FFFFFF"><img src="../images/DispStation.gif">报表-销售统计报表 
                      </font></td>
                    <td width="300"></td>
					  <td align="right"><input  onclick="javascript:location.href='../menu.asp';" name="BackButton" type="button" class="button_all"  value="返回"></td>
                  </tr>
                </table>
              </div></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td valign="middle" bgcolor="#FFFFFF"><table width="96%" border="0" align="center" cellpadding="0" 

cellspacing="0">
                <tr> 
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td><fieldset>
                          <legend>范围选择</legend>
                          <br>
                          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="21%"><div align="right">日期范围: </div></td>
                        <td width="79%">
						<select name="S_time" class="text120"  >
                            <option value="0" selected>全部</option>
                            <option value="1">自定义</option>
                        </select>
						</td>
                      </tr>
                      <tr>
                        <td><div align="right">开始时间: </div></td>
                        <td><input name="start_time" type="text" class="text120" size="15" maxlength=10 >
                              </td>
                      </tr>
                      <tr>
                        <td><div align="right">结束时间: </div></td>
                        <td><input name="end_time" type="text" class=text120 size="15" maxlength=10 >
                              </td>
                      </tr>
                            <tr> 
                              <td><div align="right">创建者: </div>
                                <div align="right"></div></td>
                              <td>
							  <select name="s_operator" class=text120>
                                   <option value="0"  selected >全部</option>
<%
	set rs_s = server.createobject("adodb.recordset")
	sql_s= "select distinct username,userid from [user] order by userid "
	rs_s.open sql_s,conn,3
	if not rs_s.eof then
	for i=1 to rs_s.recordcount	
%>
                                  <option value=<%=rs_s("userid")%>> <%=rs_s("username")%></option>
<%
      rs_s.movenext
	 next
	 end if
	 set rs_s=nothing
%>  
                                </select>
								</td>
                            </tr>
                      <tr>
                        <td width="21%"><div align="right">统计类型: </div></td>
                        <td width="79%">
						<select name="S_kind" class="text120"  >
                            <option value="0" selected>销售统计——按客户</option>
                            <option value="1">销售统计——按操作者</option>
							<option value="2">销售统计——按产品</option>
							<option value="3">产品销售汇总表 </option>
                        </select>
						</td>
                      </tr>
                          </table>
                          <br>
                          <br>
                          </fieldset></td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td>&nbsp;</td>
                </tr>
              </table></td>

          </tr>
          <tr bgcolor="#FFFFFF"> 
		      <td>
                 <table width="100%">
				   <tr> 
				     <td width="80%"> <div align="right"> 
					 <input type="button" name="Button" value="下载结果" class="button_all" onClick="down_onclick()" 
style="width:100px"></div></td>
				     <td  ><div align="right"> 
                <input type="button" name="Button" value="打印报表" class="button_all" onClick="print_onclick()" 
style="width:100px">
                </div>
				    </td>
				  </tr>
			    </table>
              </td>
          </tr>
        </table></td>
  </tr>
  
</table>

</form>
</BODY>
</HTML>

⌨️ 快捷键说明

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