?? report_sellby.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>銷售統(tǒng)計報表</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)
''判斷進(jìn)行的是哪種操作
if trim(request("txturl"))="show" then
'' 根據(jù)用戶選擇的統(tǒng)計類型轉(zhuǎn)到不同的頁面
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
'' 根據(jù)用戶選擇的統(tǒng)計類型轉(zhuǎn)到不同的頁面
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"> </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">報表-銷售統(tǒng)計報表
</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> </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">結(jié)束時間: </div></td>
<td><input name="end_time" type="text" class=text120 size="15" maxlength=10 >
</td>
</tr>
<tr>
<td><div align="right">創(chuàng)建者: </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">統(tǒng)計類型: </div></td>
<td width="79%">
<select name="S_kind" class="text120" >
<option value="0" selected>銷售統(tǒng)計——按客戶</option>
<option value="1">銷售統(tǒng)計——按操作者</option>
<option value="2">銷售統(tǒng)計——按產(chǎn)品</option>
<option value="3">產(chǎn)品銷售匯總表 </option>
</select>
</td>
</tr>
</table>
<br>
<br>
</fieldset></td>
</tr>
</table></td>
</tr>
<tr>
<td> </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="下載結(jié)果" 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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -