📄 statisok.asp
字号:
<!--#include file="../inc/function.asp"-->
<!--#include file="../inc/ChkPurview.asp"-->
<%
Dim Action
Action=trim(request("Action"))
if Action="" then
Call Msg("非法参数",1,"")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/mobile_sale.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="topbg">
<td height="22" colspan="2" align="center"><strong>回 笼 资 金 管 理</strong></td>
</tr>
<tr class="tdbg">
<td width="70" height="30"><strong>管理导航:</strong></td>
<td height="30">
<a href="Fund.asp">回笼资金管理</a> |
<a href="Fund.asp?T=1">今日回笼资金</a> |
<a href="Fund.asp?Action=Add">添加</a></td>
</tr>
</table><br>
<%
if Action="Stt" then
Call Sub2()
else
Call Sub1()
end if
Sub Sub1()
Dim T,Pro_ID,T_Num,T_ZJ
T=Trim(Request("T"))
Pro_ID=Trim(Request("Pro_ID"))
Sql ="Select * from T_Fund where Pro_ID="&cstr(Pro_ID)&" and IsCheck=1"
'Response.Write(sql)
Call sql_open(Rs,Sql,Conn,1,1)
Do while not Rs.eof
if DateDiff("d",Rs("InTime"), now() ) < cint(T) then
T_Num = T_Num + clng(Rs("Sale_Num"))
T_ZJ =T_ZJ +clng(clng(Rs("Sale_Num"))*clng(Rs("Price")))
end if
Rs.movenext
loop
Call Rs_end(Rs)
Dim Rst,Sqlt
Dim MC,XH,DJ
Sqlt="Select * from T_Product where Pro_ID="&Cstr(Pro_ID)&""
Call sql_open(Rst,Sqlt,conn,1,1)
if Rst.eof and Rst.bof then
MC = "Nothing"
XH = "Nothing"
DJ = "Nothing"
else
MC = Rst("Pro_MC")
XH = Rst("Pro_XH")
DJ = Rst("Pro_DJ")
end if
Call Rs_end(Rst)
%>
<table width="50%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" >
<tr>
<td class="tdbg">产品名:<%=MC%></td>
</tr>
<tr>
<td class="tdbg">型号:<%=XH%></td>
</tr>
<tr>
<td class="tdbg">单价:<%=DJ%></td>
</tr>
<tr>
<td class="tdbg">共销售 <%=T_Num%>台</td>
</tr>
<tr>
<td class="tdbg">总金额 <%=T_ZJ%>元</td>
</tr>
<tr>
<td width="65%" class="tdbg"> </td>
</tr>
</table>
<%End Sub
Sub Sub2()
Dim UName
Dim Rst,sqlt,T_ZJ
UName=trim(Request("UName"))
if UName="" then
Response.write "请输入用户名,才可以查询"
else
Sqlt = "Select * from T_User where UserName='"&UName&"' and UserGID=8"
Call sql_open(Rst,Sqlt,Conn,1,1)
if Rst.eof and Rst.bof then
response.write "此用户不存在,或不是分销商用户;不能查询"
else
Sql ="Select * from T_Fund where UserID='"&cstr(Rst("UserID"))&"'"
Call sql_open(Rs,Sql,Conn,1,1)
do while not Rs.eof
T_ZJ = T_ZJ + clng(Rs("FundZJ"))
rs.movenext
loop
Response.write "用户:"&UName&"的总销售额为"&T_ZJ&"元。"
Dim rs1,sql1
'sql1 ="Select * from T_Fund where UserID="&cstr(Rst("UserID"))&""
Sql1 = "Select * from V_Fund where UserID='"&Cstr(Rst("UserID"))&"'"
'Response.write "<br>"&sql1
'Response.end
Call sql_open(rs1,sql1,Conn,1,1)
%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr align="center" class="title">
<td height="22">流水号</td>
<td>产品名</td>
<td>型号</td>
<td>单价</td>
<td>销售量</td>
<td>销售单价</td>
<td>金额(元)</td>
<td>日期</td>
</tr>
<%
Do while not Rs1.eof
Dim Rstt,Sqltt
Dim MC,XH,DJ
Sqltt="Select * from T_Product where Pro_ID="&Cstr(Rs1("Pro_ID"))&""
Call sql_open(Rstt,Sqltt,conn,1,1)
if Rstt.eof and Rstt.bof then
MC = "Nothing"
XH = "Nothing"
DJ = "Nothing"
else
MC = Rstt("Pro_MC")
XH = Rstt("Pro_XH")
DJ = Rstt("Pro_DJ")
end if
%>
<tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
<td align="center"><%=Rs1("ZJNo")%></td>
<td><a href="ShowFund.asp?ID=<%=Rs1("FundID")%>"><%=MC%></a></td>
<td align="center"><%=XH%></td>
<td align="center"><%=DJ%></td>
<td align="center"><%=Rs1("Sale_Num")%></td>
<td align="center"><%=Rs1("Price")%></td>
<td align="center"><%=Rs1("FundZJ")%></td>
<td align="center"><%=Rs1("InTime")%></td>
</tr>
<%
Rs1.MoveNext
loop
%>
</table>
<%
call Rs_end(Rs1)
end if
Call Rs_end(Rs)
end if
End Sub
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -