📄 d_clientareamainfrm.asp
字号:
<!--#include file="../include/Pubconn.asp"-->
<!--#include file="../include/PubConnCode.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title><link href="../cread.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%">
<tr>
<td width="100%" valign="middle"><img border="0" src="it_22.gif" width="34" height="15"> <b><font size="2">客户区域分布分析</font></b><hr width="40%" align="left" color="#C0C0C0" size="1"></td>
</tr>
</table>
<%set rs=server.CreateObject("adodb.recordset")
if rs.state=1 then rs.close
rs.open "select distinct Area from D_clientinfo where tag='kh' and Area<>''",pubconn,1,3%>
<%if rs.recordcount<=0 then
response.write "没记录!"%>
<center><a href="D_FenXiMainFrm.asp"><font size="2">返回</font></a></center>
<%response.end()
end if%>
<%set rs2=server.CreateObject("adodb.recordset")
if rs2.state=1 then rs2.close
rs2.open "select count(*) as Latent from D_clientinfo where tag='kh' and type='潜在客户' and Area<>''",pubconn,1,3%>
<%TotalLatent=rs2.fields("Latent") '潜在客户总数%>
<%set rs3=server.CreateObject("adodb.recordset")
if rs3.state=1 then rs3.close
rs3.open "select count(*) as Prev from D_clientinfo where tag='kh' and type='预期客户' and Area<>''",pubconn,1,3%>
<%TotalPrev=rs3.fields("Prev") '预期客户总数%>
<%set rs4=server.CreateObject("adodb.recordset")
if rs4.state=1 then rs4.close
rs4.open "select count(*) as FirstBuy from D_clientinfo where tag='kh' and type='首次购买客户' and Area<>''",pubconn,1,3%>
<%TotalFirstBuy=rs4.fields("FirstBuy") '首次购买客户总数%>
<%set rs5=server.CreateObject("adodb.recordset")
if rs5.state=1 then rs5.close
rs5.open "select count(*) as ZhongCheng from D_clientinfo where tag='kh' and type='忠诚客户' and Area<>''",pubconn,1,3%>
<%TotalZhongCheng=rs5.fields("ZhongCheng") '忠诚客户总数%>
<%set rs10=server.CreateObject("adodb.recordset")
if rs10.state=1 then rs10.close
rs10.open "select count(*) as chongfu from D_clientinfo where tag='kh' and type='重复购买客户' and Area<>''",pubconn,1,3%>
<%Totalchongfu=rs10.fields("chongfu") '重复购买客户总数%>
<%set rs11=server.CreateObject("adodb.recordset")
if rs11.state=1 then rs11.close
rs11.open "select count(*) as refuse from D_clientinfo where tag='kh' and type='拒绝客户' and Area<>''",pubconn,1,3%>
<%Totalrefuse=rs11.fields("refuse") '拒绝客户总数%>
<%'''''''''''''''''Total=TotalLatent+TotalPrev+TotalFirstBuy+TotalZhongCheng%>
<%rs.movefirst%>
<center><table border=1 cellspacing=0 width="636">
<tr>
<td width="36" bgcolor="#DDD2C4">
<p align="center">
区域</p>
</td>
<td width="42" bgcolor="#DDD2C4">
<p align="center">
潜在客户数</p>
</td>
<td width="35" bgcolor="#DDD2C4">
<p align="center">
百分比(%)</p>
</td>
<td width="43" bgcolor="#DDD2C4">
<p align="center">
预期客户数</p>
</td>
<td width="35" bgcolor="#DDD2C4">
<p align="center">
百分比(%)</p>
</td>
<td width="43" bgcolor="#DDD2C4">
<p align="center">
首次购买客户数</p>
</td>
<td width="35" bgcolor="#DDD2C4">
<p align="center">
百分比(%)</p>
</td>
<td width="44" bgcolor="#DDD2C4">
<p align="center">
重复购买客户数</p>
</td>
<td width="38" bgcolor="#DDD2C4">
<p align="center">
百分比(%)</p>
</td>
<td width="42" bgcolor="#DDD2C4">
<p align="center">
忠诚客户数</p>
</td>
<td width="37" bgcolor="#DDD2C4">
<p align="center">
百分比(%)</p>
</td>
<td width="42" bgcolor="#DDD2C4">
<p align="center">
拒绝客户数</p>
</td>
<td width="37" bgcolor="#DDD2C4">
<p align="center">
百分比(%)</p>
</td>
</tr>
<%line=0%>
<%while not rs.eof %>
<%if line mod 2 =0 then%>
<%backcolor="#f7f7f7"%>
<%else%>
<%backcolor="#EDEBEC"%>
<%end if%>
<%set rs6=server.CreateObject("adodb.recordset")
if rs6.state=1 then rs6.close
rs6.open " select count(*) as Latent from D_clientinfo where tag='kh' and type='潜在客户' and Area='"& trim(rs.fields("Area")) &"'",pubconn,1,3 ''''潜在客户数%>
<%set rs7=server.CreateObject("adodb.recordset")
if rs7.state=1 then rs7.close
rs7.open "select count(*) as Latent from D_clientinfo where tag='kh' and type='预期客户' and Area='"& trim(rs.fields("Area")) &"'",pubconn,1,3 ''''预期客户数%>
<%set rs8=server.CreateObject("adodb.recordset")
if rs8.state=1 then rs8.close
rs8.open "select count(*) as Latent from D_clientinfo where tag='kh' and type='首次购买客户' and Area='"& trim(rs.fields("Area")) &"'",pubconn,1,3 ''''首次购买客户数%>
<%set rs9=server.CreateObject("adodb.recordset")
if rs9.state=1 then rs9.close
rs9.open "select count(*) as Latent from D_clientinfo where tag='kh' and type='忠诚客户' and Area='"& trim(rs.fields("Area")) &"'",pubconn,1,3 ''''忠诚客户数%>
<%set rs18=server.CreateObject("adodb.recordset")
if rs18.state=1 then rs18.close
rs18.open "select count(*) as chongfu from D_clientinfo where tag='kh' and type='重复购买客户' and Area='"& trim(rs.fields("Area")) &"'",pubconn,1,3 ''''首次购买客户数%>
<%set rs19=server.CreateObject("adodb.recordset")
if rs19.state=1 then rs19.close
rs19.open "select count(*) as refuse from D_clientinfo where tag='kh' and type='拒绝客户' and Area='"& trim(rs.fields("Area")) &"'",pubconn,1,3 ''''忠诚客户数%>
<tr bgcolor=<%=backcolor%>>
<td width="36">
<p align="center">
<%=rs.fields("Area")%></td> <%'行业%>
<%'response.write rs.fields("occupation")%>
<td width="42">
<p align="center">
<%=rs6.fields("Latent")%></td> <%'潜在客户数%>
<%if rs2.fields("Latent")<>0 then%>
<td width="35">
<p align="center">
<%=round(rs6.fields("Latent")/rs2.fields("Latent"),2)*100%></td> <%'占百分比%>
<%else%>
<td width="43">
<p align="center">
</p>
</td>
<%end if%>
<td width="35">
<p align="center">
<%=rs7.fields("Latent")%></td> <%'预期客户数%>
<%if rs3.fields("Prev")<>0 then%>
<td width="43">
<p align="center">
<%=round(rs7.fields("Latent")/rs3.fields("Prev"),2)*100%></td> <%'占百分比%>
<%else%>
<td width="35">
<p align="center">
</p>
</td>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -