⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ywykhfx.asp

📁 一个很好的在线购物系统
💻 ASP
字号:

<!--#include file="../include/Pubconn.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>商品销售查询</title><link href="../cread.css" rel="stylesheet" type="text/css">
<%
xsbm=request("xsbm")
khlx=request("khlx")
bz=request("bz")
'response.write bz
'response.write spxl 
 if request("currentpage")<>"" then  
   currentpage=cint(request.querystring("currentpage"))  
else  
   currentpage=1  
end if   
 %>

</head>
<script language="vbscript">
 sub win()
    
    xsbm=document.myform.xsbm.value
    khlx=document.myform.khlx.value
  window.location="ywykhfx.asp?currentpage="+document.myform.page1.value+"&bz="+document.myform.bz.value+"&khlx="+khlx+"&xsbm="+xsbm
   end sub


</script>

<body bgcolor="#FFFFFF">

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td width="100%"><b><font size="3"><img border="0" src="../pic/it_22.gif"> 
      </font><font size="2">客户/业务员分析</font></b><hr width="40%" size="1" align="left">             
                   
    </td>             
  </tr>             
</table>    
<br>  
<form method="post" action="ywykhfx.asp" name=myform>  
<center> 
<table border="1" cellspacing="0" width="100%" height="40">  
  <tr>    
        
    <td width="11%" align="right" bgcolor="#F1E8DA" bordercolorlight="#F1E8DA" height="36" bordercolor="#F1E8DA"><font size="2">销售部门</font></td> 
    <td width="1%" bgcolor="#F1E8DA" bordercolorlight="#F1E8DA" height="36" bordercolor="#F1E8DA"> 
    
    <select size="1" name="xsbm" > 
    <option selected value="">全部</option>  
    <% sql1="select * from a_departinfo where delflag='0'" 
 set rs1 = pubconn.Execute (sql1)  
    if xsbm<>"" then                                                                
do while not rs1.eof                                                               
if rs1("departcode")=xsbm then                                                               
%>                                                          
<option selected value="<%=trim(rs1("departcode"))%>" ><%=trim(rs1("name"))%></option>                                                               
                                                          
 <%end if    
                                                            
rs1.movenext                                                              
loop                                                              
rs1.movefirst                                                              
end if 
do while not rs1.eof  
%>  
<option value="<%=trim(rs1("departcode"))%>"><%=trim(rs1("name"))%></option>  
 <%  
rs1.movenext  
loop %> 
  </select>  
        </td>       
 
    </center>  
      
    <td width="9%" bgcolor="#F1E8DA" bordercolorlight="#F1E8DA" height="36" bordercolor="#F1E8DA"> 
    
    <p align="right">客户类型  
        </td>       
 
<center> 
    <td width="20%" bgcolor="#F1E8DA" bordercolorlight="#F1E8DA" height="36" bordercolor="#F1E8DA"> 
    
    <select size="1" name="khlx" > 
     <% 
   if khlx<>"" then 
   %> 
   <option selected value="<%=khlx%>"><%=khlx%></option> 
   <option select value="">全部</option>   
   <%else%> 
   <option selected value="">全部</option> 
   <%end if%> 
    <option select value="潜在客户" >潜在客户</option> 
<option value="预期客户">预期客户</option>  
 <option value="首次购买客户">首次购买客户</option>  
 <option value="重复购买客户">重复购买客户</option>  
 <option value="忠诚客户">忠诚客户</option>  
 <option value="拒绝客户">拒绝客户</option>  
  </select>  
        </td>       
 
    </center>  
      
    <td width="8%" height="36" bgcolor="#F1E8DA" bordercolorlight="#F1E8DA" bordercolor="#F1E8DA">        
              
    <p align="left"> 
    <input type="submit" value="确定" style="background-color: #D1D1D1; border-style: solid; border-width: 1">      
    </p>
 </td>        
  </tr>        
</table>      
      
<input type=hidden name=bz value="1">       
   <%set rs=server.createobject("adodb.recordset")        
 rs.CursorLocation=3          
rs.CursorType = adOpenStatic  
   if bz="1" then 
          
 sql="select count(*) as num,stuffnum,name,departcode from viewcs where clientnum<>''"        
         
 if xsbm<>"" then    
 sql=sql&" and departcode='"&xsbm&"'"        
  end if        
   
  if khlx<>"" then 
  sql=sql&" and type='"&khlx&"'" 
   end if 
     
  sql=sql&" group by stuffnum,name,departcode order by count(*) desc"    
   else 
    
  sql="select count(*) as num,name,departcode from viewcs group by stuffnum,name,departcode order by  count(*) desc"      
 end if 
      
 rs.open sql,pubconn,1,3  
     
 if rs.recordcount>=1 then        
 rs.pagesize=10        
 if currentpage>=rs.pagecount then        
   currentpage=rs.pagecount        
else        
   if currentpage<1 then        
      currentpage=1        
   end if        
end if        
rs.absolutepage=currentpage        
  pagenum=rs.pagecount        
  if pagenum<1 then        
 pagenum=1        
 end if        
 
khsql="select count(*) as znum from viewcs where clientnum<>''" 
if xsbm<>"" then         
khsql=khsql&" and departcode='"&xsbm&"'" 
end if 
 
if khlx<>"" then 
khsql=khsql&" and type='"&khlx&"'"  
end if 
 
set khrs=pubconn.execute(khsql) 
znum=khrs("znum") 
khrs.close      
%>        
<br>       
<div align="center"> 
  <center>       
<table border="1" cellspacing="0" width="100%" height="38">        
  <tr>        
            
    <td width="10%" height="1" align="center" bgcolor="#DDD2C4"><font size="2">排名</font></td>       
     <td width="14%" height="1" align="center" bgcolor="#DDD2C4"><font size="2">业务员</font></td>       
    <td width="15%" height="20" align="center" bgcolor="#DDD2C4"><font size="2">销售部门</font></td>       
         <td width="1%" height="1" align="center" bgcolor="#DDD2C4"><font size="2">客户数量</font></td>       
     <td width="5%" height="1" align="center" bgcolor="#DDD2C4"><font size="2">百分比(%)</font></td>       
  </tr>       
  <% hzb=""
  zzb=""  
  pm=0 
  for i=1 to rs.pagesize  %>       
  <%                  
 if i mod 2=1 then%>                 
  <tr  bgcolor="#f7f7f7"   >                    
  <%else%>                 
  <tr bgcolor="#EDEBEC" >                  
          <%end if%>          
      <%          
    recno=(currentpage-1)*rs.pagesize+i    %> 
     <td width="10%" height="1" align=center><font size="2">  
     第<%=recno%>名</font></td>   
        <%hzb=hzb&rs("name")&","%>
    <td width="14%" height="1" align="center"><font size="2"><%=rs("name")%></font></td>          
          
    <%departcode1=rs("departcode")          
      str1="select * from a_departinfo where departcode='"&departcode1&"' and delflag='0'"          
 set  myxs= pubconn.Execute (str1)           
            
     %>          
    <td width="15%" height="1" align="center"><font size="2"><%=myxs("name")%></font></td>          
      <%zzb=zzb&rs("num")&","%> 
    <td width="1%" height="1" align=center><font size="2"><%=rs("num")%></font></td>       
      <%newnum=rs("num") 
      if znum="" then 
      bfb=0 
      else       
      bfb=formatpercent((newnum/znum),2,-1) 
      end if 
      %> 
      <td width="5%" height="1" align=center><font size="2"><%=bfb%></font></td>       
 
  </tr>       
  <%       
  rs.MoveNext   
     
  yf=yf+1   
                                                                                                                              
		 if  rs.EOF then                                                                                     
		   exit for                                                                                                               
		 end if                                                                                                                                    
		 next   %>       
		        
     
<tr>       
        
    <td width="18%" height="1" align="center" colspan="3"><font size="2">合计</font></td>       
          
     <td width="15%" height="1" align="center" ><font size="2"><%=znum%></font></td>       
       <td width="16%" height="1" align="center" ><font size="2"><%="100.00%"%></font></td>       
 
  </tr>       
	       
	        
	 
</table>   </center> 
</div> 
<br>    
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;         
共<%=rs.pagecount%>页                       
<a href="ywykhfx.asp?currentPage=1&amp;bz=<%=bz%>&xsbm=<%=xsbm%>">首 页</a>                       
<%                      
if currentPage<pagenum then%>                    
<a href="ywykhfx.asp?currentPage=<%=currentpage+1%>&amp;bz=<%=bz%>&amp;xsbm=<%=xsbm%>">下一页</a>                        
     <% else%>                  
下一页   <%                               
end if                              
if currentPage>1 then                              
%> <a href="ywykhfx.asp?currentPage=<%=currentpage-1%>&amp;bz=<%=bz%>&xsbm=<%=xsbm%>">上一页</a>                                
     <% else%>                  
上一页   <%                               
end if                              
 %>                        
<a href="ywykhfx.asp?currentPage=<%=rs.pagecount%>&amp;bz=<%=bz%>&xsbm=<%=xsbm%>">尾 页</a>                         
<select name="page1" >                               
                <%                      
                for j=1 to rs.pagecount%>                               
                   <option value=<%=j%>><%=j%>                               
                <%next%>                                  
             </select>                        
                            
         <input type="button" value="Go" name="page" onclick="win()" style="background-color: #D1D1D1; border-style: solid; border-width: 1">     
<a href="khtx.asp?hzb=<%=hzb%>&zzb=<%=zzb%>&bz=1&unit=个&tablename=客户/业务员分析">图形</a>                                     
    <a href="#" onclick="window.print()" >打印</a>           
<%else%>                           
                       
<p align="center">                           
<font size="2">                          
经查询,没有记录显示,请重新选择!                        
                             
<%end if            
%>          
 <br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="d_fenximainfrm.asp">返回</a>                   
</form>                         
<br>                         
                         
</font>                         
                         
</body>                         
                         
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -