📄 g_stufffx.asp
字号:
<a href="G_objectfx.asp">返回</a></center>
<% response.end
else
%>
<table border="1" cellspacing="0" width="100%" height="30" align="center">
<tr>
<td width="117" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">项目
</font>
</td>
<td width="149" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">目标值</font>
</td>
<td width="128" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">完成值
</font>
</td>
<td width="262" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">完成百分比
</font>
</td>
</tr>
<% 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 "丢单比率(%)"
if monthid="" then
sql="select count(Clientnum) as total from G_viewlost where year(reportdate)='"&yearid&"' and stuffnum='"&sid&"'"
end if
if monthid<>"" then
sql="select count(Clientnum) as total from G_viewlost where year(reportdate)='"&yearid&"' and closemonth='"&uu&"' and stuffnum='"&sid&"'"
end if
case "人均访问客户次数(次)"
if monthid="" then
sql="select count(ExecYN) as total from G_viewexec where year(closedate)='"&yearid&"' and stuffnum='"&sid&"'"
end if
if monthid<>"" then
sql="select count(ExecYN) as total from G_viewexec where year(closedate)='"&yearid&"' and month(closedate)='"&uu&"' and stuffnum='"&sid&"'"
end if
case "业务员行动计划完成率(%)"
if monthid="" then
sql="select count(ExecYN)as total,count(clientnum) as total1 from G_viewexec where year(closedate)='"&yearid&"' and stuffnum='"&sid&"'"
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&"' and stuffnum='"&sid&"'"
end if
case "新客户开发数量(家)"
if monthid="" then
sql="select count(clientnum) as total from D_clientInfo where (type='预期客户' or type='潜在客户') and (year(rq)='"&yearid&"') and (stuffnum='"&sid&"')"
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&"') and (stuffnum='"&sid&"')"
end if
end select
set rstj=server.createobject("adodb.recordset")
rstj.open sql,Pubconn,1,3
' response.write sql
'******************完成值的情况******************************
select case rsywy.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 "丢单比率(%)"
total=rstj("total")
case "人均访问客户次数(次)"
total=rstj("total")
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 rsywy.fields(1).value="" then
objnum=0
else
objnum=rsywy.fields(1).value/10000
end if
'百分比的值的表示
if objnum=0 then
pernum=0
else
pernum=formatpercent(total/objnum,2)
end if
%>
<%if n mod 2=1 then
bg="#f7f7f7"
else
bg="#EDEBEC"
end if%>
<tr bgcolor="<%=bg%>">
<td width="117" height="23" align="center" ><font size="2"><%=rsywy.fields(0).value%></td>
<td width="149" height="23" align="center" ><font size="2"><%=objnum%></font></td>
<td width="128" height="23" align="center" ><font size="2"><%=total%></font></td>
<td width="262" 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>
<%
rsywy.movenext
if rsywy.eof then exit for
next
%>
</table>
<p align="left">
<a href="G_objectfx.asp">返回</a>
</form>
<%
rsywy.close
set rsywy=nothing
end if %>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -