<%Checklogin()%> 管理区域   

数据看板

<%Set Rs=Server.CreateObject("ADODB.RecordSet") Rs.Open "select count(DISTINCT cs_code) as CustomerTotal from customer where cs_belong="&Session("employee_id"),conn,1,1 tn=Rs("customerTotal") Rs.Close Rs.Open "select count(DISTINCT cs_code) as CustomerTotal from customer where cs_deal=3 and cs_belong="&Session("employee_id"),conn,1,1 tdn=Rs("customerTotal") Rs.Close Rs.Open "Select businessType,count(DISTINCT cs_code) as cc from customer left Join clientType on customer.cs_type=clientType.id where cs_belong="&Session("employee_id")&" Group by(businessType)",conn,1,1 Do while Not Rs.bof and Not Rs.eof data_arr1=data_arr1&FormatNumber(Rs("cc")/tn,-1,-1)&"," text_arr1=text_arr1&Rs("businessType")&"," Rs.moveNext loop Rs.close %>

客户类型

   浏览器不支持canvas               
<% Rs.Open "Select cs_deal,count(DISTINCT cs_code) as cc from customer where cs_belong="&Session("employee_id")&" Group by(cs_deal) order by cs_deal desc",conn,1,1 Do while Not Rs.bof and Not Rs.eof data_arr2=data_arr2&FormatNumber(Rs("cc")/tn,-1,-1)&"," Rs.moveNext loop Rs.close %>

成交比例

   浏览器不支持canvas               
<% Rs.Open "Select ch_name,count(cs_from) as cc from customer Left Join qudao on customer.cs_from=qudao.id where cs_belong="&Session("employee_id")&" Group by(ch_name)",conn,1,1 Do while Not Rs.bof and Not Rs.eof data_arr3=data_arr3&FormatNumber(Rs("cc")/tn,-1,-1)&"," text_arr3=text_arr3&Rs("ch_name")&"," Rs.moveNext loop Rs.close %>

我的客户来源

   浏览器不支持canvas               
<% Rs.Open "select top 9 countryName,count(DISTINCT cs_code) as cc from customer Left Join country on customer.cs_country=country.id where cs_deal=3 and cs_belong="&Session("employee_id")&" Group BY(countryName) Order by cc DESC",conn,1,1 tp=1 Do while Not Rs.bof and Not Rs.eof data_arr5=data_arr5&FormatNumber(Rs("cc")/tdn,-1,-1)&"," text_arr5=text_arr5&Rs("countryName")&"," tp=tp-FormatNumber(Rs("cc")/tdn,-1,-1) Rs.moveNext loop Rs.close %> ">

已成交客户分布(Top10)

   浏览器不支持canvas  
<% Rs.Open "select top 9 countryName,count(DISTINCT cs_code) as cc from customer Left Join country on customer.cs_country=country.id where cs_belong="&Session("employee_id")&" Group BY(countryName) Order by cc DESC",conn,1,1 tp=1 Do while Not Rs.bof and Not Rs.eof data_arr4=data_arr4&FormatNumber(Rs("cc")/tn,-1,-1)&"," text_arr4=text_arr4&Rs("countryName")&"," tp=tp-FormatNumber(Rs("cc")/tn,-1,-1) Rs.moveNext loop Rs.close %> ">

客户分布(Top10)

   浏览器不支持canvas  
<%Set Rs=Nothing:Conn.Close:Set Conn=Nothing%>