📄 g_statetj.asp
字号:
<!--#include file="../include/Pubconn.asp"-->
<!--#include file="../include/PubFun.asp"-->
<% username=Getuser()
userclass=TableVisitor("G_TblCloseState",username)
if userclass<1 then
response.write"<br>"
response.write"<br>"
response.write "<center><font size=2>抱歉,您没有此项操作权限!<a href=G_mainstate.asp>返回</a>"
response.end
end if
%>
<%
tag=request("tag") '返回的标志
'**************************************
'Author:Ruphi Update Time: 2001-08-22
'状态统计功能
'**************************************
Bmid=request("departID") '部门代号
'response.write bmid
'接近统计
set Rs1=server.createobject("ADODB.RecordSet")
str1="select CloseState,count(CloseState) as jj from G_viewstate where departcode like '"&Session("DepartID")&"%'"
if Bmid<>"" then
str1=str1&" and DepartCode='"&Bmid&"'"
end if
str1=str1&" group by CloseState "
Rs1.open str1,pubconn,1
'response.write str1
'调查统计
set Rs2=server.createobject("ADODB.RecordSet")
str2="select InquiryState,count(InquiryState) as dc from G_viewstate where departcode like '"&Session("DepartID")&"%'"
if Bmid<>"" then
str2=str2&" and DepartCode='"&Bmid&"'"
end if
str2=str2&" group by InquiryState "
Rs2.open str2,pubconn,1
'response.write str2
'问题统计
set Rs3=server.createobject("ADODB.RecordSet")
str3="select Problem,count(Problem) as wt from G_viewstate where departcode like '"&Session("DepartID")&"%'"
if Bmid<>"" then
str3=str3&" and DepartCode='"&Bmid&"'"
end if
str3=str3&" group by Problem "
Rs3.open str3,pubconn,1
'response.write str3
'方案统计
set Rs4=server.createobject("ADODB.RecordSet")
str4="select ProjectState,count(ProjectState) as fa from G_viewstate where departcode like '"&Session("DepartID")&"%'"
if Bmid<>"" then
str4=str4&" and DepartCode='"&Bmid&"'"
end if
str4=str4&" group by ProjectState "
Rs4.open str4,pubconn,1
'response.write str4
'价格条件统计
set rs5=server.createobject("ADODB.RecordSet")
str5="select PriceTerm,count(PriceTerm) as jg from G_viewstate where departcode like '"&Session("DepartID")&"%'"
if Bmid<>"" then
str5=str5&" and DepartCode='"&Bmid&"'"
end if
str5=str5&" group by PriceTerm "
rs5.open str5,pubconn,1
'response.write str5
'关键人统计
set rs6=server.createobject("ADODB.RecordSet")
str6="select MainPerson,count(MainPerson) as gjr from G_viewstate where departcode like '"&Session("DepartID")&"%'"
if Bmid<>"" then
str6=str6&" and DepartCode='"&Bmid&"'"
end if
str6=str6&" group by MainPerson "
rs6.open str6,pubconn,1
'response.write str6
'展示统计
set rs7=server.createobject("ADODB.RecordSet")
str7="select UsherState,count(UsherState) as br from G_viewstate where departcode like '"&Session("DepartID")&"%'"
if Bmid<>"" then
str7=str7&" and DepartCode='"&Bmid&"'"
end if
str7=str7&" group by UsherState "
rs7.open str7,pubconn,1
'response.write str7
'建议书统计
set rs8=server.createobject("ADODB.RecordSet")
str8="select VoteState,count(VoteState) as vote from G_viewstate where departcode like '"&Session("DepartID")&"%'"
if Bmid<>"" then
str8=str8&" and DepartCode='"&Bmid&"'"
end if
str8=str8&" group by VoteState "
rs8.open str8,pubconn,1
'response.write str8
'签约统计
set rs9=server.createobject("ADODB.RecordSet")
str9="select VisaState,count(VisaState) as qy from G_viewstate where departcode like '"&Session("DepartID")&"%'"
if Bmid<>"" then
str9=str9&" and DepartCode='"&Bmid&"'"
end if
str9=str9&" group by VisaState "
rs9.open str9,pubconn,1
'response.write str9
%>
<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">
</font><font size="2">客户跟进状态报告统计查询</font></b><hr width="40%" size="1" align="left">
</td>
</tr>
</table>
<form method="post" action="G_statetj.asp" name="myform">
<p>
<table border="0" cellspacing="0" width="100%" align="center">
<tr>
<td width="11%" bgcolor="#F1E8DA"><p align="center"> 单位
<select name="departID" style="width:100" size="1">
<%
'部门列表
set rst=Server.CreateObject("ADODB.RecordSet")
sql="Select * from A_DepartInfo where DepartCode like '"&Session("DepartID")&"%' and delflag<>'1'"
rst.open sql,pubconn,1
%>
<option value="">全部</option>
<%do while not rst.eof%>
<option value="<%=rst("DepartCode")%>"
<%
if Bmid<>"" then
if trim(Bmid)=rst("DepartCode") then
response.write("selected")
end if
end if
%> ><%=rst("Name")%></option>
<%
rst.movenext
loop
set rst=nothing
%>
</select> <input type="submit" value="查询" >
</td>
</tr>
</table>
<%
if (Rs1.eof) and (Rs2.eof) and (Rs3.eof) and (Rs4.eof) and (Rs5.eof) and (Rs6.eof) and (Rs7.eof) and (Rs8.eof) and (rs9.eof)then%>
<center><p><font size="2">没有符合条件的记录!
<%if request("tag")=2 then%>
<a href="G_tjcx.asp">返回
<%else%>
</a>
<a href=G_mainstate.asp>返回</a></font></center>
<%end if %>
<%else
' if request.querystring("page")<>"" then
' page=cint(request.querystring("page"))
'else
' page=1
'end if
'RSte.pagesize=10
'if page>=RSte.pagecount then
' page=RSte.pagecount
'else
' if page<1 then
' page=1
' end if
'end if
'RSte.absolutepage=page
%>
<table border="1" cellspacing="0" width="100%" height="30">
<tr>
<td width="79" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">进度
</font>
</td>
<td width="51" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">接近
</font>
</td>
<td width="68" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">调查
</font>
</td>
<td width="54" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">问题
</font>
</td>
<td width="48" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">方案
</font>
</td>
<td width="71" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">价格条件
</font>
</td>
<td width="59" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">关键人
</font>
</td>
<td width="51" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">展示
</font>
</td>
<td width="52" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">建议书
</font>
</td>
<td width="37" height="24" align="center" bgcolor="#DDD2C4">
<font size="2">签约
</font>
</td>
</tr>
<%
'接近表示
lucy11=0 'lucy11表完成
lucy12=0 'lucy12表延期
lucy13=0 'lucy13表失败
lucy14=0 'lucy14表无
for i= 1 to Rs1.RecordCount
if trim(Rs1("CloseState"))="〇" then
lucy11=Rs1("jj")
end if
if trim(Rs1("CloseState"))="△" then
lucy12=Rs1("jj")
end if
if trim(Rs1("CloseState"))="╳" then
lucy13=Rs1("jj")
end if
if trim(Rs1("CloseState"))="" then
lucy14=Rs1("jj")
end if
Rs1.MoveNext
next
%>
<%
'调查表示
lucy21=0 'lucy21表完成
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -