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

📄 g_companybj.asp

📁 一个很好的在线购物系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
              end if        
              if monthid<>""  then      
                 sql="select count(ExecYN) as total from G_viewexec  where year(closedate)='"&yearid&"' and month(closedate)='"&uu&"' "      
              end if       
        case  "业务员行动计划完成率(%)"      
                   
               if monthid=""  then      
                 sql="select  count(ExecYN)as total,count(clientnum) as total1 from G_viewexec  where year(closedate)='"&yearid&"' "      
              end if        
              if monthid<>"" then      
                 sql="select count(ExecYN) as total,count(clientnum) as total1 from G_viewexec  where year(closedate)='"&yearid&"' and month(closedate)='"&uu&"' "      
              end if       
        case "新客户开发数量(家)" 
               if monthid=""  then     
                 sql="select  count(clientnum) as total from D_clientInfo  where  (type='预期客户' or type='潜在客户') and  (year(rq)='"&yearid&"') "     
              end if       
              if monthid<>"" then     
                 sql="select  count(clientnum) as total from D_clientInfo  where (type='预期客户' or type='潜在客户')  and  (year(rq)='"&yearid&"') and (month(rq)='"&uu&"') "     
              end if  
      
     end select      
        set rstj=server.createobject("adodb.recordset")      
        rstj.open sql,Pubconn,1      
     '  response.write sql      
        '******************完成值的情况******************************    
      select case  rscompany.fields(0).value 
          case "订单金额(万元)"  
             if isnull(rstj("total")) then    
                 total=0    
             else    
                 total=rstj("total")/10000    
             end if     
 
          case  "销售回款(万元)" 
             if isnull(rstj("total")) then    
                 total=0    
             else    
                total=rstj("total")/10000    
             end if     
 
          case  "丢单比率(%)" 
              if yqtotal=0 then    '没有预期客户 
                 total=0 
              else 
                 total=formatnumber(rstj("total")/yqtotal,2) 
              end if         
 
          case  "人均访问客户次数(次)" 
                if  ywytotal=0 then  ' 当没有业务时 
                   total=0 
                else 
                  total=formatnumber(rstj("total")/ywytotal,2) 
                end if   
 
          case  "业务员行动计划完成率(%)" 
                 if  rstj("total1")=0 then    '分母为零时没有意义    
                    total=0    
                 else    
                     total=formatnumber(rstj("total")/rstj("total1"),2)    
                 end if  
 
          case "新客户开发数量(家)" 
                    total=rstj("total") 
 
      end select 
     
        
    '*****************以下为目标值的情况*****************    
      
         
            if  rscompany.fields(1).value=""  then     
               objnum=0    
            else     
              objnum=rscompany.fields(1).value/10000     
           end if      
       
     
                                              '以下为得出的百分比的值   
       if objnum=0 then   
          pernum=0   
      else   
          pernum=formatpercent(total/objnum,2)   
      end  if           
    
     
     %>    
      <%   
     '四个值rscompany.fields(0).value,objnum,total,pernum   
     '将数据填写到临时表中   
     set bmbj=server.Createobject("adodb.recordset")   
     m_sql="select *  from G_Tblcompanybj"   
     bmbj.open m_sql,Pubconn,1,3   
   
      bmbj.addnew   
        bmbj("object")=rscompany.fields(0).value   
        bmbj("objectnum")=objnum   
        bmbj("completenum")=total   
        bmbj("Percentnum")=pernum   
      bmbj.update   
        
     %>   
     <%                                                                                   
     rscompany.movenext                                                                                   
     if rscompany.eof then exit for                                                                                   
  next                                                                                   
  %>        
         
      <%   
  S="select *  from G_Tblcompanybj "   
  set bj=server.createobject("adodb.recordset")   
  bj.open S,pubconn,1    
      
  %>    
                                                                              
 <table border="1" cellspacing="0" width="100%" height="30"  align="center">                                                                                        
                                                                                              
  <tr>                                                                                                        
                                                                                        
     <td width="40%" height="24" align="center" bgcolor="#DDD2C4">                                                                                      
      <font size="2">项&nbsp;&nbsp;&nbsp; 目      
      </font>      
     </td>                                                                                                      
    <td width="20%" height="24" align="center" bgcolor="#DDD2C4">                                                                                    
     <font size="2">目 标 值</font>            
     </td>                                                                                                   
     <td width="20%" height="24" align="center" bgcolor="#DDD2C4">                                                                                  
      <font size="2">完 成 值      
      </font>      
     </td>                                                                                                  
                                                                                                     
    <td width="20%" height="24" align="center" bgcolor="#DDD2C4">                                                                                 
     <font size="2">完成百分比        
     </font>        
     </td>                                                                                                  
                                                                                                     
  </tr>    
   <% for n= 1 to bj.recordcount%>    
  <% select case  bj("object")   
       case  "订单金额(万元)"    
          'if bj("completenum")<>0 then   
            if bj("completenum")-bj("objectnum")>=0 then   
               bj.movenext   
               if bj.eof then exit for    
            end  if   
          'end if    
       case  "销售回款(万元)"   
           'if bj("completenum")<>0 then   
            if bj("completenum")-bj("objectnum")>=0 then   
               bj.movenext   
               if bj.eof then exit for    
            end  if   
          'end if    
     case  "丢单比率(%)"   
        'if bj("completenum")<>0 then   
   
            if bj("completenum")-bj("objectnum")<=0 then   
               bj.movenext  
               if bj.eof then exit for     
            end  if   
         'end if    
       case  "人均访问客户次数(次)"   
          'if bj("completenum")<>0 then   
             if bj("completenum")-bj("objectnum")>=0 then   
               bj.movenext  
               if bj.eof then exit for     
            end  if   
          'end if    
      case  "业务员行动计划完成率(%)"     
         'if bj("completenum")<>0 then   
   
            if bj("completenum")-bj("objectnum")>=0 then   
               bj.movenext  
               if bj.eof then exit for     
            end  if   
          'end  if 
     case "新客户开发数量(家)" 
          'if bj("completenum")<>0 then   
   
            if bj("completenum")-bj("objectnum")>=0 then   
               bj.movenext  
               if bj.eof then exit for     
            end  if   
          'end  if 
 
 end select   
       
    %>          
                                                                                                                                                                           
     <%if  n mod 2=1 then                          
            bg="#f7f7f7"                            
       else                          
            bg="#EDEBEC"                           
       end if%>                                                                                                 
  <tr bgcolor="<%=bg%>">                                                               
                                                                                            
                                                                                                 
   <td width="40%" height="23" align="center" ><font size="2"><%=bj("object")%></td>                                                                                  
      <td width="20%" height="23" align="center" ><font size="2"><%=bj("objectnum")%></font></td>       
                                                                               
      <td width="20%" height="23" align="center" ><font size="2"><%=bj("completenum")%></font></td>           
              
            
                                                                                              
      <td width="20%" height="23" align="center" ><font size="2"><%   
      if bj("objectnum")="0"  then   
         response.write "分母为零,无法分析"   
      else   
         response.write  bj("percentnum")   
            
      end  if %></font></td>       
         
                                                                                     
  </tr>    
 <%                                                                                 
     bj.movenext                                                                                 
     if bj.eof then exit for                                                                                 
  next %>                                                                     
                                                                                   
 </table>           
                                                           
                                                                                               
        
                                                                                           
                                                                                 
     
             
<p align="left">    
                                                                                           
                                                                                 
     
             
  <a href="G_bjxx.asp">返回</a>              
              
                                                                                                                      
 </form>                                                                                                                        
<%          
rscompany.close           
set rscompany=nothing     
bj.close   
set bj=nothing        
end if %>                    
                    
</body>                                                                                                                      
                                                                                                                      

⌨️ 快捷键说明

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