123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378 |
- <!--#include file="Conn.asp"--><%Checklogin()%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>管理区域</title>
- <link rel="stylesheet" href="css/common.css" type="text/css" />
- <link rel="stylesheet" href="css/alert.css" type="text/css" />
- <script language="javascript" src="system/js/jquery-1.7.2.min.js"></script>
- <script type="text/javascript" src="js/js.js"></script>
- </head>
- <body class="clear">
- <!--#include file="panel.asp"-->
- <div id="man_zone">
- <%
- Act = Request.QueryString("act")
- If Act="postchk" Then
- Keys = Server.UrlEnCode(Request.QueryString("Keys"))
- Page = Request.QueryString("Page")
- chkact = Request.Form("chkact")
- SqlStr=""
- For i = 1 To Request.Form("chkbox").Count
- If SqlStr<>"" Then
- SqlStr = SqlStr & " Or id="&Request.Form("chkbox")(i)
- Else
- SqlStr = " Where id="&Request.Form("chkbox")(i)
- End If
- Next
- Select Case chkact
- Case "0":SqlStr = "Update Customer Set cs_deal="&chkact&SqlStr
- Case "1":SqlStr = "Update Customer Set cs_deal="&chkact&SqlStr
- Case "2":SqlStr = "Update Customer Set cs_deal="&chkact&SqlStr
- Case Else:SqlStr = "Update Customer Set cs_belong="&replace(chkact,"t","")&SqlStr
- End Select
- Conn.Execute(SqlStr):Conn.Close:Set Conn=Nothing
- Response.Redirect "?Keys="&Keys&"&Page="&Page
- Response.End
- End If 'End postchk
- Keys=Request.QueryString("Keys")
- Keys=replace(Keys," ","")
- Keys=replace(Keys,"+","")
- Keyscode=TextEnCode(Keys)
- Page = Request.QueryString("Page")
- fliterCountry=Request.QueryString("fliterCountry")
- fliterQudao=Request.QueryString("fliterQudao")
- fliterDeal=Request.QueryString("fliterDeal")
- fliterBusiness=Request.QueryString("fliterBusiness")
- fliterContact=Request.QueryString("fliterContact")
- 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 fliterContact<>"" Then
- Select Case fliterContact
- Case "1":fliterStr=fliterStr&" and cs_tel<>''"
- Case "2":fliterStr=fliterStr&" and cs_wechat<>''"
- Case "3":fliterStr=fliterStr&" and cs_whatsapp<>''"
- Case "4":fliterStr=fliterStr&" and cs_email<>''"
- Case "5":fliterStr=fliterStr&" and cs_linkedin<>''"
- Case "6":fliterStr=fliterStr&" and cs_facebook<>''"
- Case Else:fliterStr=fliterStr&" and cs_alibaba<>''"
- End Select
- urlStr=urlStr&"&fliterContact="&fliterContact
- End If
- Set Rs=Server.CreateObject("ADODB.RecordSet")
- Keys=Server.UrlEnCode(Keys)
- hrefstr = "?keys="&Keys
- %>
- <form id="form1" method="post" action="?act=postchk&Keys=<%=keys%>&Page=<%=Page%>" onSubmit="return false" />
- <div class="fastSelect clear">
- <H1>静默客户</H1>
- <div class="selectItem">
- <label>区域</label>
- <select name="fliterCountry" class="filterSearch">
- <option value="">请选择国家地区</option>
- <%Rs.Open "Select id,countryName from country",conn,1,1
- Do while Not Rs.Bof And Not Rs.eof
- %>
- <option value="<%=Rs("id")%>" <%if StrComp(fliterCountry,Rs("id"))=0 Then response.Write "Selected=""Selected"""%> ><%=Rs("countryName")%></option>
- <%
- Rs.moveNext
- loop
- Rs.close
- %>
- </select>
- </div>
- <div class="selectItem">
- <label>来源渠道</label>
- <select name="fliterQudao" class="filterSearch">
- <option value="">请选择渠道</option>
- <%Rs.Open "Select id,ch_name from qudao",conn,1,1
- Do while Not Rs.Bof And Not Rs.eof
- %>
- <option value="<%=Rs("id")%>" <%if StrComp(fliterQudao,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("ch_name")%></option>
- <%
- Rs.moveNext
- loop
- Rs.close
- %>
- </select>
- </div>
- <div class="selectItem">
- <label>跟进阶段</label>
- <select name="fliterDeal" class="filterSearch">
- <option value="">请选择</option>
- <option value="0" <%if StrComp(fliterDeal,"0")=0 Then response.Write "Selected=""Selected"""%>>无响应</option>
- <option value="1" <%if StrComp(fliterDeal,"1")=0 Then response.Write "Selected=""Selected"""%>>背景调查</option>
- <option value="2" <%if StrComp(fliterDeal,"2")=0 Then response.Write "Selected=""Selected"""%>>明确需求</option>
- <option value="3" <%if StrComp(fliterDeal,"3")=0 Then response.Write "Selected=""Selected"""%>>已成交</option>
- </select>
- </div>
- <div class="selectItem">
- <label>客户类型</label>
- <select name="fliterBusiness" class="filterSearch">
- <option value="">请选择</option>
- <%Rs.Open "Select id,businessType from clientType",conn,1,1
- Do while Not Rs.Bof And Not Rs.eof
- %>
- <option value="<%=Rs("id")%>" <%if StrComp(fliterBusiness,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("businessType")%></option>
- <%
- Rs.moveNext
- loop
- Rs.close
- %>
- </select>
- </div>
- <div class="selectItem">
- <label>联系方式</label>
- <select name="fliterContact" class="filterSearch">
- <option value="">请选择</option>
- <option value="1" <%if StrComp(fliterContact,"1")=0 Then response.Write "Selected=""Selected"""%>>电话</option>
- <option value="2" <%if StrComp(fliterContact,"2")=0 Then response.Write "Selected=""Selected"""%>>微信</option>
- <option value="3" <%if StrComp(fliterContact,"3")=0 Then response.Write "Selected=""Selected"""%>>WhatsApp</option>
- <option value="4" <%if StrComp(fliterContact,"4")=0 Then response.Write "Selected=""Selected"""%>>邮箱</option>
- <option value="5" <%if StrComp(fliterContact,"5")=0 Then response.Write "Selected=""Selected"""%>>领英</option>
- <option value="6" <%if StrComp(fliterContact,"6")=0 Then response.Write "Selected=""Selected"""%>>Facebook</option>
- <option value="7" <%if StrComp(fliterContact,"7")=0 Then response.Write "Selected=""Selected"""%>>阿里巴巴</option>
- </select>
- </div>
- <div class="inputSearch">
- <input type="text" id="keys" class="inputTxt" value="<%If Keyscode="" Then Response.Write "请输入搜索关键词" Else Response.Write Keyscode%>" onFocus="if(this.value == '<%If Keyscode="" Then Response.Write "请输入搜索关键词" Else Response.Write Keyscode%>'){this.value='';}" onBlur="if(this.value == ''){this.value='<%If Keyscode="" Then Response.Write "请输入搜索关键词" Else Response.Write Keyscode%>';}" onKeyDown="if(event.keyCode==13){location.href='?Keys='+escape(document.getElementById('keys').value)}" /><input type="button" id="searchgo" class="searchgo" value="go" onClick="location.href='?Keys='+escape(document.getElementById('keys').value)" />
- </div>
- </div>
-
-
- <div width="100%" border="0" cellpadding="3" cellspacing="1" class="table2 em<%=Session("employee_id")%>">
- <div class="theader">
- <div class="col2" >序号</div>
- <div class="col3">客户编号</div>
- <div class="col10">渠道来源</div>
- <div class="col10">区域</div>
- <div class="col10">客户类型</div>
- <div class="col10">跟进阶段</div>
- <div class="col6">录入时间</div>
- <div class="col6">操作</div>
- </div>
- <%
- sqlStr="Select id,cs_code,cs_from,cs_country,cs_type,cs_deal,cs_addtime,cs_tel,cs_email,cs_whatsapp,cs_wechat,cs_linkedin,cs_facebook,cs_alibaba,colortag,cs_note,cs_claimFrom,cs_belong,cs_chain From customer Where is_silent=1 or (cs_deal=0 and cs_belong="&Session("employee_id")&") and (cs_code like '%"&Keyscode&"%' or cs_name like '%"&Keyscode&"%' or cs_email like '%"&Keyscode&"%' or cs_wechat like '%"&Keyscode&"%' or cs_telformat like '%"&Keyscode&"%' or cs_whatsappformat like '%"&Keyscode&"%' or cs_code like '%"&Keyscode&"%') "&fliterStr&" Order By colortag 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)
- %>
- <div class="tline color<%=Rs("colorTag")%>">
- <div class="col2" ><%=TempNum%></div>
- <div class="col3 slidepanel"><%=Rs("cs_code")%><%If Rs("cs_claimFrom")>0 Then%><img src="../images/yijiao.png" class="handover" title="来自认领"><%End If%></div>
- <div class="col10">
- <%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
- %>
- </div>
- <div class="col10">
- <%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
- %>
-
- </div>
- <div class="col10">
- <%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
- %>
- </div>
- <div class="col10"><%If Rs("cs_deal")=3 then
- response.write "<span style='color:red;'>成交</span>"
- elseif Rs("cs_deal")=2 then
- Response.write "明确需求"
- elseif Rs("cs_deal")=1 then
- Response.write "背景调查"
- else
- Response.write "无响应"
- End IF
- %>
- </div>
- <div class="col6"><%=Rs("cs_addtime")%></div>
- <div class="col6"><% If Rs("cs_belong")=Session("employee_id") Then response.write "<a href=""customerEdit.asp?id="&Rs("id")&""" class=""ico_edit ico"">修改</a>" %></div>
- </div>
- <div class="notepanel clear">
- <div class="noteItem">
- 联系方式
- </div>
- <div class="lx">
- <div class="tel"><%=Rs("cs_tel")%></div>
- <div class="mail"><a href="mailto:<%=Rs("cs_email")%>"><%=Rs("cs_email")%></a></div>
- <div class="whatsapp"><%=Rs("cs_whatsapp")%></div>
- <div class="wechat"><%=Rs("cs_wechat")%></div>
- <div class="linkedin"><%=Rs("cs_linkedin")%></div>
- <div class="facebook"><%=Rs("cs_facebook")%></div>
- <div class="alibaba"><%=Rs("cs_alibaba")%></div>
- </div>
- <div class="noteItem2">
- 备注
- </div>
- <div class="notecontent">
- <div class="chain">
- 流转记录:
- <%If Rs("cs_chain")<>"" Then
- myArray=split(Rs("cs_chain"),",")
- sqlStr="Select em_user from employee where id="&myArray(0)
- for j=1 to UBound(myArray)
- sqlStr=sqlStr&" union all Select em_user from employee where id="&myArray(j)
- next
- Rs1.open sqlStr,conn,1,1
- Do while Not Rs1.bof and Not Rs1.eof
- Response.write Rs1("em_user")&" > "
- Rs1.moveNext
- loop
- Rs1.close
- End If
- %>
- </div>
- <%=HtmlUnCode(Rs("cs_note"))%>
- </div>
- </div>
- <%
- Rs.MoveNext
- Next
- Else
- If Keys="" Then
- %>
- <tr>
- <div align="center">当前暂无沉默客户</div>
- </tr>
- <%
- Else
- %>
- <tr>
- <div align="center" ><a href="?">Sorry,没有找到“<%=Keyscode%>”相关的信息,点击返回</a></div>
- </tr>
- <%
- End If
- End If
- %>
- <div colspan="9">
- <div class="showpagebox">
- <%
- If Rs.PageCount > 1 Then
- PageName="?Keys="&Keys&urlStr&"&"
- Pagelen=3
- If Page>1 Then
- Response.Write "<a href="""&PageName&"Page=1"">首页</a>"
- Response.Write "<a href="""&PageName&"Page="&Page-1&""">上一页</a>"
- 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 "<a class=""current"">"&i&"</a>"
- Else
- Response.Write "<a href="""&PageName&"Page="&i&""">"&i&"</a>"
- End If
- Next
- If Page<Rs.PageCount Then
- If Rs.PageCount - Page > Pagelen Then Response.Write "<a href="""&PageName&"Page="&Rs.PageCount&""">..."&Rs.PageCount&"</a>"
- Response.Write "<a href="""&PageName&"Page="&Page+1&""">下一页</a>"
- Response.Write "<a href="""&PageName&"Page="&Rs.PageCount&""">尾页</a>"
- End If
- Response.Write "<input type=""text"" id=""Pagego"" value="""&Page&""" onFocus=""if(this.value == '"&Page&"'){this.value='';}"" onBlur=""if(this.value == ''){this.value='"&Page&"';}"" onKeyUp=""this.value=this.value.replace(/\D/g,'')"" onKeyDown=""if(event.keyCode==13){location.href='"&PageName&"Page='+document.getElementById('Pagego').value}"" />"
- End If
- %> </div>
- </div>
- </div>
- </form>
- <%Rs.Close:Set Rs=Nothing:Set Rs1=Nothing:Conn.Close:Set Conn=Nothing%>
- </div>
- </body>
- </html>
|