<%
Act = Request.QueryString("act")
Keys=Request.QueryString("Keys")
Keyscode=TextEnCode(Keys)
Page = Request.QueryString("Page")
fliterCountry=Request.QueryString("fliterCountry")
fliterQudao=Request.QueryString("fliterQudao")
fliterDeal=Request.QueryString("fliterDeal")
fliterBusiness=Request.QueryString("fliterBusiness")
fliterBelong=Request.QueryString("fliterBelong")
fliterStr=""
If fliterCountry<>"" Then
fliterStr=fliterStr&" and cs_country="&Cint(fliterCountry)
urlStr=urlStr&"&fliterCountry="&fliterCountry
End If
If fliterQudao<>"" Then
fliterStr=fliterStr&" and cs_from="&Cint(fliterQudao)
urlStr=urlStr&"&fliterQudao="&fliterQudao
End If
If fliterDeal<>"" Then
fliterStr=fliterStr&" and cs_deal="&Cint(fliterDeal)
urlStr=urlStr&"&fliterDeal="&fliterDeal
End If
If fliterBusiness<>"" Then
fliterStr=fliterStr&" and cs_type="&Cint(fliterBusiness)
urlStr=urlStr&"&fliterBusiness="&fliterBusiness
End If
If fliterBelong<>"" Then
fliterStr=fliterStr&" and cs_belong="&Cint(fliterBelong)
urlStr=urlStr&"&fliterBelong="&fliterBelong
End if
Set Rs=Server.CreateObject("ADODB.RecordSet")
Keys=Server.UrlEnCode(Keys)
hrefstr = "?keys="&Keys
%>
搜索条件
序号
客户编号
渠道来源
区域
客户类型
是否成交
更新日期
操作
<%
sqlStr="Select id,cs_code,cs_from,cs_country,cs_type,cs_deal,cs_addtime,cs_updatetime,cs_note,cs_claimFrom From customer Where cs_deal<>3 and cs_deal<>0 and cs_type<>2 and cs_belong<>13 and cs_belong<>"&Session("employee_id")&" and DATEDIFF(day,cs_updatetime,getDate())>120 and cs_country<>2 and cs_country<>229 and cs_country<>13 and cs_country<>153 and cs_belongclient=0 and cs_wechat not like 'wxid%' and (cs_code like '%"&Keyscode&"%' or cs_name like '%"&Keyscode&"%' or cs_email like '%"&Keyscode&"%' or cs_wechat like '%"&Keyscode&"%' or cs_tel like '%"&Keyscode&"%' or cs_whatsapp like '%"&Keyscode&"%') "&fliterStr&" Order By cs_state desc,id Desc"
Rs.Open sqlStr ,Conn,1,1
If Not Rs.Bof And Not Rs.Eof Then
Rs.PageSize = 20
If Page = "" Then Page = 1
If Page = "end" Then Page = Rs.PageCount
If Not IsNumeric(Page) Or Page < 1 Then Page = 1
Page = Cint(Page)
If Page > Rs.PageCount Then Page = Rs.PageCount
Rs.AbsolutePage = Page
TempNum = Rs.PageSize * (Page - 1)
Set Rs1=Server.CreateObject("ADODB.RecordSet")
For i=1 To Rs.PageSize
If Rs.Bof Or Rs.Eof Then Exit For
TempNum=TempNum+1:classid=Rs(1)
%>
<%=TempNum%>
<%=Rs("cs_code")%>
<%Rs1.Open "select ch_name from qudao where id="&Rs("cs_from")&"",conn,1,1
IF Not Rs1.bof and Not Rs1.eof Then
Response.write Rs1("ch_name")
Else
Response.write "未填写"
End If
Rs1.Close
%>
<%Rs1.Open "select countryName from country where id="&Rs("cs_country")&"",conn,1,1
IF Not Rs1.bof and Not Rs1.eof Then
Response.write Rs1("countryName")
Else
Response.write "未填写"
End If
Rs1.Close
%>
<%Rs1.Open "select businessType from clientType where id="&Rs("cs_type")&"",conn,1,1
IF Not Rs1.bof and Not Rs1.eof Then
Response.write Rs1("businessType")
Else
Response.write "未填写"
End If
Rs1.Close
%>
<%If Rs("cs_deal")=2 then
Response.write "明确需求"
elseif Rs("cs_deal")=1 then
Response.write "背景调查"
End IF
%>
<%
If Rs.PageCount > 1 Then
PageName="?Keys="&Keys&urlStr&"&"
Pagelen=3
If Page>1 Then
Response.Write "首页"
Response.Write "上一页"
End If
If Pagelen*2+1 >= Rs.PageCount Then
StartPage=1:EndPage=Rs.PageCount
Else
If Page<=Pagelen+1 Then
StartPage=1
EndPage=Pagelen*2+1
Else
StartPage=Page-Pagelen
EndPage=Page+Pagelen
End If
If Page+Pagelen>Rs.PageCount Then StartPage=Rs.PageCount-Pagelen*2:EndPage=Rs.PageCount
End If
For i = StartPage To EndPage
If i = Page Then
Response.Write ""&i&""
Else
Response.Write ""&i&""
End If
Next
If Page Pagelen Then Response.Write "..."&Rs.PageCount&""
Response.Write "下一页"
Response.Write "尾页"
End If
Response.Write ""
End If
%>