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

📄 g_companybj.asp

📁 一个很好的在线购物系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="../include/Pubconn.asp"-->
<!--#include file="../include/PubFun.asp"--> 
<% username=Getuser()%>
<%
'**************************************
'Author:Ruphi  Update Time:2001-09-06
'功能说明:
'************************************* 

%>
<%
'将临时表中的数据删除
set bmbj2=server.Createobject("adodb.recordset")
sql="select *  from G_Tblcompanybj"
bmbj2.open sql,Pubconn,1,3
if bmbj2.recordcount>0 then
   set bmbj1=server.Createobject("adodb.recordset")
   m_sql="delete from G_Tblcompanybj"
   bmbj1.open m_sql,Pubconn,1,3
end if 
%>

 <%                                                           
    '找出总公司                                                           
    set rst=Server.CreateObject("ADODB.RecordSet")                                                           
    sql1="Select * from A_DepartInfo where departcode='01' "                                                           
    rst.open sql1,pubconn,1                                                           
       '找出公司所有的员工
    set myrs=Server.CreateObject("ADODB.RecordSet")
    sql="Select count(stuffnum) as total from A_StuffInfo Where SaleFlag='1' and delflag='0' and Departcode like '"&Session("DepartID")&"%'  "  
    myrs.open sql,pubconn,1
    if not myrs.eof then
       ywytotal=myrs("total")
    else
       ywytotal=0
    end if     
    'response.write ywytotal  
    '统计总的预期客户数量
         set rs1=Server.CreateObject("ADODB.RecordSet")
         sql="SELECT count(clientnum) AS total FROM D_clientInfo WHERE type='预期客户'  GROUP BY type"
         rs1.open sql,Pubconn,1
         if rs1.eof  then
            yqtotal=0
         else
            yqtotal=rs1("total")
        end if                                                        
    %>    
<%
curyear=year(date())
yearid=request("yearID")    '年份
if yearid="" then
   yearid=curyear
end if 
 
monthid=request("monthid")  '月份
'response.write monthid
yy=len(monthid)
if yy=4 then
   uu=right(monthid,1)
end if 
if yy=5  then
   uu=right(monthid,2)
end  if 
%>
<%
set rscompany=server.createobject("adodb.recordset")

if monthid="" then   '当没有月份时
  
      str="select object,objyear from G_viewaim1  where  year='"&yearid&"' and departcode='01' "
 
else    '当选择了月份时
       select case monthid
             case "obj1"
               str="select object,obj1 from G_viewaim1 where departcode='01' and year='"&yearid&"'"
             case "obj2"
               str="select object,obj2 from G_viewaim1 where departcode='01' and year='"&yearid&"'"
             case "obj3"
               str="select object,obj3 from G_viewaim1 where departcode='01' and year='"&yearid&"'"
             case "obj4"
               str="select object,obj4 from G_viewaim1 where departcode='01' and year='"&yearid&"'"
             case "obj5"
               str="select object,obj5 from G_viewaim1 where departcode='01' and year='"&yearid&"'"
             case "obj6"
               str="select object,obj6 from G_viewaim1 where departcode='01' and year='"&yearid&"'"
             case "obj7"
               str="select object,obj7 from G_viewaim1 where departcode='01' and year='"&yearid&"'"
            case "obj8"
               str="select object,obj8 from G_viewaim1 where departcode='01' and year='"&yearid&"'"
            case "obj9"
               str="select object,obj9 from G_viewaim1 where departcode='01' and year='"&yearid&"'"
            case "obj10"
               str="select object,obj10 from G_viewaim1 where departcode='01' and year='"&yearid&"'"
            case "obj11"
               str="select object,obj11 from G_viewaim1 where departcode='01'and year='"&yearid&"'"
            case "obj12"
               str="select object,obj12 from G_viewaim1 where departcode='01'and year='"&yearid&"'"
          end select
   
  

end if   
rscompany.open str,Pubconn,1
'response.write str


%>                                     
<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">
</head>
<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" width="34" height="15"> 
      </font><font size="2">公司报警</font></b><hr width="40%" size="1" align="left">             
                   
    </td>             
  </tr>             
</table>                    
<form method="post" action="G_companybj.asp" name="myform">                                                   
<p>                                                   
                                                   
                                                                
                                                                
<table border="0" cellspacing="0" width="100%" align="center">                                                                 
  <tr>                                                                  
    <td width="12%" align="center" bgcolor="#F1E8DA">                 
                 
     <p align="right">                
     <font size="2">时间     
     </font>     
                
     </p>                
                
    </td>                                                                   
    <td width="19%" align="center" bgcolor="#F1E8DA">                                                                 
                
    <p align="left">                
    <select name="yearID" size="1" style="width: 64; height: 23">                                                               
                                                              
           <%for i=1990 to 2010 %>                                                             
              <option value="<%=i%>" <%    
              if yearid<>"" then     
                  if cint(yearid)=i  then     
                     response.write ("selected")     
                  end  if      
             end if      
                   
              %> ><%=i%></option>                                                             
          <%next%>                              
                                                      
    </select> 年     
    <select name="monthID" size="1" style="width: 65; height: 23">                                                               
                                           
              <option value="">全部</option>                                                             
           <%for p=1 to 12 %>                                                             
              <option value="obj<%=p%>" <%      
             
              if uu<>"" then    
                 if cint(uu)=p then     
                    response.write ("selected")     
                end if      
              end if     
               
                   
              %>      
                   
            ><%=p%></option>                                                             
          <%next%>                              
                                                          
    </select>月                
                
    </p>                
                
    </td>                                                                          
    <td width="5%" align="center" bgcolor="#F1E8DA">                
                
     <p align="right"><font size="2">公司</font>     
          
    </td>                                                               
                                                                    
    <td width="35%" align="center" bgcolor="#F1E8DA">                                                                     
               
      <p align="left">               
      <input type="text" name="T1" size="19" value="<%=rst("name")%>" readonly style="background-color: #edefef" >    
    
       <input type="submit" value="查询" class="hand" style="background-color: #D1D1D1; border-style: solid; border-width: 1"  >                  
                  
      </p>                  
                  
    </td>                                                                                         
 </tr>                                                                                        
</table>                                                                                 
                                                                                     
 <%                      
 if rscompany.eof then%>            
 <p>                      
<center>没有符合条件的记录!        
         <a href="G_objectfx.asp">返回</a></center>                      
        
                            
                       
 <%  response.end       
 else          
                                                                                     
                                                                                      
%>                       
                                                                                                 
     <% for n=1  to rscompany.recordcount   %>                     
               
     <%      
       select case  rscompany.fields(0).value      
           case "订单金额(万元)"      
                    
                if monthid="" then      
                   sql="select sum(money) as total from G_vieworder where year(orddate)='"&yearid&"' "      
                end if       
                if monthid<>""  then      
                   sql="select sum(money) as total from G_vieworder where year(orddate)='"&yearid&"' and month(orddate)='"&uu&"' "      
                end if       
             case  "销售回款(万元)"      
                    
                if monthid=""  then      
                   sql="select sum(Balmoney) as total from G_viewsell where year(gattime)='"&yearid&"' "      
                end if       
                if monthid<>"" then      
                   sql="select sum(Balmoney) as total from G_viewsell where year(gattime)='"&yearid&"' and month(gattime)='"&uu&"' "      
                end if       
      
            case  "丢单比率(%)"      
                   
              if monthid=""  then      
                sql="select count(Clientnum) as total from G_viewlost where year(reportdate)='"&yearid&"'"      
              end if        
             if monthid<>""  then      
                sql="select count(Clientnum) as total from G_viewlost where year(reportdate)='"&yearid&"' and closemonth='"&uu&"' "      
             end if       
         case  "人均访问客户次数(次)"      
                   
               if monthid=""  then      
                 sql="select count(ExecYN) as total from G_viewexec  where year(closedate)='"&yearid&"'"      

⌨️ 快捷键说明

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