123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305 |
- <!--#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?ver=0620"></script>
- </head>
- <body class="clear">
- <!--#include file="panel.asp"-->
- <div id="man_zone">
- <%
- 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
- If em_role=0 Then
- menberStr="Select id from employee where em_role="&Session("employee_id")&" or id="&Session("employee_id")
- Else
- menberStr="Select id from employee where em_role="&em_role&" or id="&em_role
- End if
- %>
- <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>
- </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="fliterBelong" class="filterSearch">
- <option value="">请选择</option>
- <%Rs.Open "Select id,em_user from employee where id in ("&menberStr&")",conn,1,1
- Do while Not Rs.Bof And Not Rs.eof
- %>
- <option value="<%=Rs("id")%>" <%if StrComp(fliterBelong,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("em_user")%></option>
- <%
- Rs.moveNext
- loop
- Rs.close
- %>
- </select>
- </div>
- </div>
-
-
- <div width="100%" border="0" cellpadding="3" cellspacing="1" class="table2">
- <div class="theader">
- <div class="col9" >序号</div>
- <div class="col3">客户编号</div>
- <div class="col4">渠道来源</div>
- <div class="col5">区域</div>
- <div class="col6">客户类型</div>
- <div class="col6">是否成交</div>
- <div class="col20">更新日期</div>
- <div class="col4">操作</div>
- </div>
- <%
- sqlStr="Select * From customer Where cs_deal<>3 and cs_type<>2 and DATEDIFF(day,cs_updatetime,getDate())>60 and cs_wechat not like 'wxid%' and cs_belongclient=0 and cs_belong<>"&Session("employee_id")&" and cs_belong in ("&menberStr&") 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)
- %>
- <div class="tline">
- <div class="col9" ><%=TempNum%></div>
- <div class="col3 slidepanel"><%=Rs("cs_code")%><%If Rs("cs_claimFrom")>0 Then%><img src="../images/yijiao.png" class="handover"><%End If%></div>
- <div class="col4">
- <%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="col5">
- <%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="col6">
- <%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="col6">
- <%If Rs("cs_deal")=2 then
- Response.write "明确需求"
- elseif Rs("cs_deal")=1 then
- Response.write "背景调查"
- else
- Response.write "未成交"
- End IF
- %>
- </div>
- <div class="col20"><%=Rs("cs_updatetime")%></div>
- <div class="col4" ><span id="claim" class="claim" data-id="<%=Rs("id")%>">认领</span></div>
- </div>
- <div class="notepanel clear">
- <div class="noteItem2">
- 备注
- </div>
- <div class="notecontent">
- <%=HtmlUnCode(Rs("cs_note"))%>
- </div>
- </div>
- <%
- Rs.MoveNext
- Next
- Else
- If Keys="" Then
- %>
- <tr>
- <div align="center" colspan="8">Sorry,当前暂无信息</div>
- </tr>
- <%
- Else
- %>
- <tr>
- <div align="center" colspan="8"><a href="?">Sorry,没有找到“<%=Keyscode%>”相关的信息,点击返回</a></div>
- </tr>
- <%
- End If
- End If
- %>
- <div colspan="8">
- <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>
|