📄 g_losttj.asp
字号:
<!--#include file="../include/Pubconn.asp"-->
<!--#include file="../include/PubFun.asp"-->
<% username=Getuser()
userclass=TableVisitor("G_TblLostReport",username)
if userclass<1 then
response.write "<center>抱歉,您没有此项操作权限!<a href=G_mainlost.asp>返回</a>"
response.end
end if
%>
<%
'***********************************
'Author:Ruphi Update Time:2001-08-29
'功能说明:客户丢失报告统计,对于不同的选择从不同的方面去统计
'
'***********************************
tag=request("tag") '返回的标志
%>
<%
'统计总的预期客户数量
set rs1=Server.CreateObject("ADODB.RecordSet")
sql="SELECT count(clientnum) AS total FROM D_clientInfo WHERE type='预期客户' GROUP BY type"
rs1.open sql,Pubconn,1
if rs1.eof then
yqtotal=0
else
yqtotal=rs1("total")
end if
'response.write yqtotal
%>
<%
MonthID=request("MonthID")
bm=request("bm")
%>
<%
'********************************
'以下为默认时即当为全部时统计各个部门的丢单情况
if MonthID="" then
str="select DepartName as[部门] ,count(ClientNum) as [丢失客户数量] from G_viewlost group by departname"
else
str="select DepartName as[部门] ,count(ClientNum) as [丢失客户数量] ,CloseMonth from G_viewlost where CloseMonth='"&MonthID&"' group by departname,CloseMonth"
end if
'*********************************************
'*********************************************
' 以下为当选择分支机构时, 统计各个业务员的丢单的情况
if bm<>"" then '分支机构
if MonthID="" then
str="select StuffName as [业务员] ,count(ClientNum) as [丢失客户数量] from G_viewlost group by StuffName"
else
str="select StuffName as [业务员] ,count(ClientNum) as [丢失客户数量],CloseMonth from G_viewlost where CloseMonth='"&MonthID&"' group by StuffName,CloseMonth"
end if
end if
'*****************************************
'response.write str
set RStj=Server.CreateObject("ADODB.RecordSet")
RStj.open str,Pubconn,1,3
%>
<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>
<script language="vbscript">
sub GoPage()
a="G_losttj.asp?page="+document.myform.page1.value+"&MonthID="+document.myform.MonthID.value+"&bm="+document.myform.bm.value+"&tag="+document.myform.tag.value
window.location=a
end sub
</script>
<body bgcolor="#FFFFFF" >
<table border="0" cellspacing=0 width="100%" cellpadding="0" bordercolorlight="#FFFFFF" bordercolor="#000000" >
<tr>
<td width="100%"><b><font size="3"><img border="0" src="../pic/it_22.gif" width="34" height="15">
</font><font size="2">客户丢失报告统计查询 </font></b><hr width="40%" size="1" align="left">
</td>
</tr>
</table>
<form method="post" action="G_losttj.asp" name="myform">
<table border="1" cellspacing="0" align="center" width="100%" bordercolorlight="#FFFFFF" >
<tr bgcolor="F1E8DA">
<td width="12%" align="center" width="151" width="150" bordercolor="#F1E8DA" bordercolorlight="#F1E8DA" >
<p align="right">
<font size="2">月份
</font>
</p>
</td>
<td width="19%" align="center" width="104" width="104" bordercolor="#F1E8DA" bordercolorlight="#F1E8DA" >
<p align="left">
<select name="MonthID" size="1" style="width:100">
<% if MonthID<>"" then%>
<option value="">全部</option>
<% for i=1 to 12 %>
<option value="<%=i%>" <% if cint(trim(MonthID))=i then
response.write ("selected")
end if
%>>第<%=i%>月</option>
<%next%>
<%else%>
<option value="">全部</option>
<%for i=1 to 12 %>
<option value="<%=i%>" >第<%=i%>月</option>
<%next%>
<%end if %>
</select>
</p>
</td>
<td width="11%" align="center" width="96" width="123" bordercolor="#F1E8DA" bordercolorlight="#F1E8DA" >
<p align="right">
<font size="2">
单位
</font>
</p>
</td>
<td width="29%" align="center" width="263" width="243" bordercolor="#F1E8DA" bordercolorlight="#F1E8DA" >
<p align="left">
<select name="bm" style="width:100" size="1">
<%if bm="" then%>
<option value="" selected>全部</option>
<option value="2" >分支机构</option>
<%else%>
<option value="" >全部</option>
<option value="2" selected>分支机构</option>
<%end if%>
</select> <input type="submit" value="查询" class="hand" style="background-color: #D1D1D1; border-style: solid; border-width: 1" >
</p>
</td>
</tr>
</table>
<br>
<%
if RStj.eof then%>
<center><p>
<font size="2">没有符合条件的记录!
</font>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -