📄 g_companyfx.asp
字号:
<% response.end
else
%>
<table border="1" cellspacing="0" width="100%" height="30" align="center">
<tr>
<td width="196" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">项 目
</font>
</td>
<td width="88" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">目 标 值</font>
</td>
<td width="92" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">完 成 值
</font>
</td>
<td width="122" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">完成百分比
</font>
</td>
</tr>
<% for n=1 to rsbm.recordcount
%>
<%if n mod 2=1 then
bg="#f7f7f7"
else
bg="#EDEBEC"
end if%>
<%
select case rsbm.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&"'"
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
' response.write sql
' response.end
set rstj=server.createobject("adodb.recordset")
rstj.open sql,Pubconn,1
'******************完成值的情况******************************
select case rsbm.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 rsbm.fields(1).value="" then
objnum=0
else
objnum=rsbm.fields(1).value/10000
end if
%>
<tr bgcolor="<%=bg%>">
<td width="196" height="23" align="center" ><font size="2"><%=rsbm.fields(0).value%></td>
<td width="88" height="23" align="center" ><font size="2"><%=objnum%></font></td>
<td width="92" height="23" align="center" ><font size="2"><%=total%></font></td>
<td width="122" height="23" align="center" ><font size="2"><%
if objnum=0 then
response.write"分母为零,无法分析"
else
response.write (formatPercent(total/objnum,2))
end if
%></font></td>
</tr>
<%
rsbm.movenext
if rsbm.eof then exit for
next
%>
</table>
<p align="left">
<a href="G_objectfx.asp">返回</a>
</form>
<%
rsbm.close
set rsbm=nothing
end if %>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -