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

📄 g_stuffbj.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_tblstuffbj"
bmbj2.open sql,Pubconn,1,3
if bmbj2.recordcount>0 then
   set bmbj1=server.Createobject("adodb.recordset")
   m_sql="delete from G_tblstuffbj"
   bmbj1.open m_sql,Pubconn,1,3
end  if
%>

 <%                                                           
    '部门列表                                                           
    set rst=Server.CreateObject("ADODB.RecordSet")                                                           
    sql1="Select * from A_StuffInfo where saleflag='1' and delflag='0'"                                                           
    rst.open sql1,pubconn,1                                                           
    rst.movefirst                                                           
    %>    
<%
curyear=year(date())
yearid=request("yearID")    '年份
if yearid="" then
   yearid=curyear
end if 
 
monthid=request("monthid")  '月份
yy=len(monthid)
if yy=4 then
   uu=right(monthid,1)
end if 
if yy=5  then
   uu=right(monthid,2)
end  if 

sid=request("stuffID")  '业务员代号
if sid="" then
   sid=rst("stuffnum")
end if 
%>
<%
set rsywy=server.createobject("adodb.recordset")

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

end if   
rsywy.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">&nbsp;</font><font size="2">  业务员报警</font></b><hr width="40%" size="1" align="left">          
                
    </td>          
  </tr>          
</table>                 
<form method="post" action="G_stufffx.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: 57; 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: 50; 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="11%" align="center" bgcolor="#F1E8DA">             
             
     <p align="right"> 
     <font size="2">业务员 
     </font> 
            
     </p>            
            
    </td>                                                            
                                                                 
    <td width="29%" align="center" bgcolor="#F1E8DA">                                                                  
            
      <p align="left">            
      <select  name="stuffID" style="width:100" size="1">                           
                                                        
                                                      
       <% 
       rst.movefirst 
       do while not rst.eof%>                                                           
        <option  value="<%=rst("stuffnum")%>" <%                
        if sid<>"" then                
           if trim(sid)=rst("stuffnum") then                
               response.write("selected")                
           end if                 
        end if                 
                        
        %> ><%=rst("Name")%></option>                                                           
       <%                                                          
       rst.movenext                                                          
       loop                                                          
      set rst=nothing                                                          
        %>                                                          
                                                           
      </select>&nbsp;&nbsp;&nbsp;&nbsp; <input type="submit" value="查询" class="hand" style="background-color: #D1D1D1; border-style: solid; border-width: 1"  >               
               
      </p>               
               
    </td>                                                                                      
 </tr>                                                                                     
</table>                                                                              
                                                                                  
 <%                   
 if rsywy.eof then%>         
 <p>                   
<center>没有符合条件的记录!    
         <a href="G_objectfx.asp">返回</a></center>                  
    
                        
                   
 <%  response.end   
 else      
                                                                              
                                                                                  
%>                   
                                                                                
                                                                                            
                                                            
                                                                                             
     <% for n=1  to rsywy.recordcount %>                 
          
    <% 
     select case  rsywy.fields(0).value  
           case "订单金额(万元)"  
                
                if monthid="" then  
                   sql="select sum(money) as total from G_vieworder where year(orddate)='"&yearid&"' and stuffnum='"&sid&"'"  
                end if   
                if monthid<>""  then  
                   sql="select sum(money) as total from G_vieworder where year(orddate)='"&yearid&"' and month(orddate)='"&uu&"' and stuffnum='"&sid&"'"  
                end if   
            case  "销售回款(万元)"  
                
                if monthid=""  then  
                   sql="select sum(Balmoney) as total from G_viewsell where year(gattime)='"&yearid&"' and stuffnum='"&sid&"'"  
                end if   
                if monthid<>"" then  
                   sql="select sum(Balmoney) as total from G_viewsell where year(gattime)='"&yearid&"' and month(gattime)='"&uu&"' and stuffnum='"&sid&"'"  
                end if   
           case  "丢单比率(%)"  
               

⌨️ 快捷键说明

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