📄 accountreport.asp
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "report","read"
set objcheck=nothing
if Request.Form("selusername")<>"" then
strwhere =strwhere&" and ownerid='"&Request.Form("selusername")&"'"
else
strwhere =strwhere &"and (ownerid='"&session("loginid")&"' or ownerid in(select userid from v_userreportto_all where reportto='"&session("loginid")&"'))"
end if
strwhere=strwhere&" and account like '%"&Request.Form("Contain")&"%'"
if Request.Form("accountlevel")<>"" then
strwhere=strwhere&" and accountlevel="&Request.Form("accountlevel")
end if
strwhere=strwhere&getcondition(Request.Form("selmethod1"),Request.Form("condition1"),1)
strwhere=strwhere&getcondition(Request.Form("selmethod2"),Request.Form("condition2"),2)
strwhere=strwhere&getcondition(Request.Form("selmethod3"),Request.Form("condition3"),3)
if Request.Form("disable")<>"" then
strwhere=strwhere&" and disable='"&Request.Form("disable")&"'"
end if
if Request.Form("startdate")<>"" then
strwhere=strwhere&" and createdate>='"&Request.Form("startdate")&"'"
end if
if Request.Form("enddate")<>"" then
strwhere=strwhere&" and createdate<='"&Request.Form("enddate")&"'"
end if
dim conn
dim rs
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
sql="select * from v_account where 1=1 "&strwhere&" order by owner,account"
rs.Open sql,conn,1,1
%>
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>客户报表</title>
</head>
<script language="JavaScript">
function window_onload()
{
window.moveTo(-2,-2);
window.resizeTo(screen.availWidth, screen.availHeight);
}
</script>
<body leftmargin="10" rightmargin="10" topmargin="10" onload="window_onload()">
<table align="center" width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr align="left">
<td colspan=3>
<div align="left"><strong><em><font size="4" face="黑体">客户报表</font></em></strong></div></td>
</tr>
<tr><td colspan="3" height=4></td></tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr bgcolor="006699">
<td width="8%" height=18 align=center><font color="#FFFFFF">所有者</font></td>
<td height=18 align=center><font color="#FFFFFF">客户</font></td>
<td width="12%" height="18" align=center><font color="#FFFFFF"><%=Request.Form("selmethod1")%></font></td>
<td width="12%" height="18" align=center><font color="#FFFFFF"><%=Request.Form("selmethod2")%></font></td>
<td width="12%" height="18" align=center><font color="#FFFFFF"><%=Request.Form("selmethod3")%></font></td>
<td width="10%" height="18" align=center><font color="#FFFFFF">创建日期</font></td>
<td width="10%" height="18" align=center><font color="#FFFFFF">状态</font></td>
<td width="10%" height="18" align=center><font color="#FFFFFF">星级</font></td>
</tr>
<%
set accountid=rs("accountid")
set field1=rs(session("reportfield1"))
set field2=rs(session("reportfield2"))
set field3=rs(session("reportfield3"))
set createdate=rs("createdate")
set owner=rs("owner")
set disable=rs("disable")
set account=rs("account")
set accountlevel=rs("accountlevel")
i=1
do while not rs.EOF
if owner <> previous then
response.write "<tr bgcolor=#FFFFFF height=20><td align=center>"&owner&"</td><td colspan=7></td></tr>"
response.write "<tr bgcolor=#000000><td colspan=8></td></tr>"
end if
%>
<tr bgcolor="#FFFFFF">
<td align=center></td>
<td height=18 align=center><%=account%></td>
<td align=center><%=field1%></td>
<td align=center><%=field2%></td>
<td align=center><%=field3%></td>
<td align=center><%=createdate%></td>
<td align=center><%if disable=true then response.write "<img src=../images/enabled.jpg>" else response.write "<img src=../images/disabled.jpg>" end if%></td>
<td align=center valign="middle"><font color=red><strong>
<%
if accountlevel<>"" then
if accountlevel>0 then
for l=1 to accountlevel
response.Write "★"
next
end if
end if
%>
</strong></font></td>
</tr>
<%
i=i+1
previous=owner
rs.MoveNext
if rs.eof then
accountrecord=i-1
response.write "<tr ><td height=2 colspan=8 bgcolor=#000000></td></tr>"
response.write "<tr bgcolor=ffffff valign=top><td align=center height=30>汇总</td><td align=center>"&accountrecord&"</td><td align=center></td><td align=center colspan=6></td></tr>"
elseif owner<> previous then
accountrecord=i-1
i=1
response.write "<tr ><td height=2 colspan=8 bgcolor=#000000></td></tr>"
response.write "<tr bgcolor=ffffff valign=top><td align=center height=30>汇总</td><td align=center>"&accountrecord&"</td><td align=center></td><td align=center colspan=6></td></tr>"
else
response.write "<tr ><td></td><td colspan=7 bgcolor=#000000></td></tr>"
end if
loop
rs.Close
set rs=nothing
conn.Close
set conn=nothing
%>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td width="10%"> <div align="right"><em>创建时间(从):</em></div></td>
<td width="10%"> <%=request.form("startdate")%> <div align="left"></div></td>
<td width="4%"><div align="center"><em>(至)</em></div></td>
<td width="10%"><%=request.form("enddate")%> <div align="right"></div></td>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td height=2 bgcolor="#4A699C"></td>
</tr>
<tr>
<td><div align="left"><%=getfieldvalue("company","id","1","company")%> <%=getfieldvalue("company","id","1","address")%></div></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -