teamSeas.asp 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <!--#include file="Conn.asp"--><%Checklogin()%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>管理区域</title>
  7. <link rel="stylesheet" href="css/common.css" type="text/css" />
  8. <link rel="stylesheet" href="css/alert.css" type="text/css" />
  9. <script language="javascript" src="system/js/jquery-1.7.2.min.js"></script>
  10. <script type="text/javascript" src="js/js.js?ver=0620"></script>
  11. </head>
  12. <body class="clear">
  13. <!--#include file="panel.asp"-->
  14. <div id="man_zone">
  15. <%
  16. Act = Request.QueryString("act")
  17. Keys=Request.QueryString("Keys")
  18. Keyscode=TextEnCode(Keys)
  19. Page = Request.QueryString("Page")
  20. fliterCountry=Request.QueryString("fliterCountry")
  21. fliterQudao=Request.QueryString("fliterQudao")
  22. fliterDeal=Request.QueryString("fliterDeal")
  23. fliterBusiness=Request.QueryString("fliterBusiness")
  24. fliterBelong=Request.QueryString("fliterBelong")
  25. fliterStr=""
  26. If fliterCountry<>"" Then
  27. fliterStr=fliterStr&" and cs_country="&Cint(fliterCountry)
  28. urlStr=urlStr&"&fliterCountry="&fliterCountry
  29. End If
  30. If fliterQudao<>"" Then
  31. fliterStr=fliterStr&" and cs_from="&Cint(fliterQudao)
  32. urlStr=urlStr&"&fliterQudao="&fliterQudao
  33. End If
  34. If fliterDeal<>"" Then
  35. fliterStr=fliterStr&" and cs_deal="&Cint(fliterDeal)
  36. urlStr=urlStr&"&fliterDeal="&fliterDeal
  37. End If
  38. If fliterBusiness<>"" Then
  39. fliterStr=fliterStr&" and cs_type="&Cint(fliterBusiness)
  40. urlStr=urlStr&"&fliterBusiness="&fliterBusiness
  41. End If
  42. If fliterBelong<>"" Then
  43. fliterStr=fliterStr&" and cs_belong="&Cint(fliterBelong)
  44. urlStr=urlStr&"&fliterBelong="&fliterBelong
  45. End if
  46. Set Rs=Server.CreateObject("ADODB.RecordSet")
  47. Keys=Server.UrlEnCode(Keys)
  48. hrefstr = "?keys="&Keys
  49. If em_role=0 Then
  50. menberStr="Select id from employee where em_role="&Session("employee_id")&" or id="&Session("employee_id")
  51. Else
  52. menberStr="Select id from employee where em_role="&em_role&" or id="&em_role
  53. End if
  54. %>
  55. <form id="form1" method="post" action="?act=postchk&Keys=<%=keys%>&Page=<%=Page%>" onSubmit="return false" />
  56. <div class="fastSelect clear">
  57. <H1>搜索条件</H1>
  58. <div class="selectItem">
  59. <label>区域</label>
  60. <select name="fliterCountry" class="filterSearch">
  61. <option value="">请选择国家地区</option>
  62. <%Rs.Open "Select id,countryName from country",conn,1,1
  63. Do while Not Rs.Bof And Not Rs.eof
  64. %>
  65. <option value="<%=Rs("id")%>" <%if StrComp(fliterCountry,Rs("id"))=0 Then response.Write "Selected=""Selected"""%> ><%=Rs("countryName")%></option>
  66. <%
  67. Rs.moveNext
  68. loop
  69. Rs.close
  70. %>
  71. </select>
  72. </div>
  73. <div class="selectItem">
  74. <label>来源渠道</label>
  75. <select name="fliterQudao" class="filterSearch">
  76. <option value="">请选择渠道</option>
  77. <%Rs.Open "Select id,ch_name from qudao",conn,1,1
  78. Do while Not Rs.Bof And Not Rs.eof
  79. %>
  80. <option value="<%=Rs("id")%>" <%if StrComp(fliterQudao,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("ch_name")%></option>
  81. <%
  82. Rs.moveNext
  83. loop
  84. Rs.close
  85. %>
  86. </select>
  87. </div>
  88. <div class="selectItem">
  89. <label>跟进阶段</label>
  90. <select name="fliterDeal" class="filterSearch">
  91. <option value="">请选择</option>
  92. <option value="0" <%if StrComp(fliterDeal,"0")=0 Then response.Write "Selected=""Selected"""%>>无响应</option>
  93. <option value="1" <%if StrComp(fliterDeal,"1")=0 Then response.Write "Selected=""Selected"""%>>背景调查</option>
  94. <option value="2" <%if StrComp(fliterDeal,"2")=0 Then response.Write "Selected=""Selected"""%>>明确需求</option>
  95. </select>
  96. </div>
  97. <div class="selectItem">
  98. <label>客户类型</label>
  99. <select name="fliterBusiness" class="filterSearch">
  100. <option value="">请选择</option>
  101. <%Rs.Open "Select id,businessType from clientType",conn,1,1
  102. Do while Not Rs.Bof And Not Rs.eof
  103. %>
  104. <option value="<%=Rs("id")%>" <%if StrComp(fliterBusiness,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("businessType")%></option>
  105. <%
  106. Rs.moveNext
  107. loop
  108. Rs.close
  109. %>
  110. </select>
  111. </div>
  112. <div class="selectItem">
  113. <label>业务员</label>
  114. <select name="fliterBelong" class="filterSearch">
  115. <option value="">请选择</option>
  116. <%Rs.Open "Select id,em_user from employee where id in ("&menberStr&")",conn,1,1
  117. Do while Not Rs.Bof And Not Rs.eof
  118. %>
  119. <option value="<%=Rs("id")%>" <%if StrComp(fliterBelong,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("em_user")%></option>
  120. <%
  121. Rs.moveNext
  122. loop
  123. Rs.close
  124. %>
  125. </select>
  126. </div>
  127. </div>
  128. <div width="100%" border="0" cellpadding="3" cellspacing="1" class="table2">
  129. <div class="theader">
  130. <div class="col9" >序号</div>
  131. <div class="col3">客户编号</div>
  132. <div class="col4">渠道来源</div>
  133. <div class="col5">区域</div>
  134. <div class="col6">客户类型</div>
  135. <div class="col6">是否成交</div>
  136. <div class="col20">更新日期</div>
  137. <div class="col4">操作</div>
  138. </div>
  139. <%
  140. 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"
  141. Rs.Open sqlStr ,Conn,1,1
  142. If Not Rs.Bof And Not Rs.Eof Then
  143. Rs.PageSize = 20
  144. If Page = "" Then Page = 1
  145. If Page = "end" Then Page = Rs.PageCount
  146. If Not IsNumeric(Page) Or Page < 1 Then Page = 1
  147. Page = Cint(Page)
  148. If Page > Rs.PageCount Then Page = Rs.PageCount
  149. Rs.AbsolutePage = Page
  150. TempNum = Rs.PageSize * (Page - 1)
  151. Set Rs1=Server.CreateObject("ADODB.RecordSet")
  152. For i=1 To Rs.PageSize
  153. If Rs.Bof Or Rs.Eof Then Exit For
  154. TempNum=TempNum+1:classid=Rs(1)
  155. %>
  156. <div class="tline">
  157. <div class="col9" ><%=TempNum%></div>
  158. <div class="col3 slidepanel"><%=Rs("cs_code")%><%If Rs("cs_claimFrom")>0 Then%><img src="../images/yijiao.png" class="handover"><%End If%></div>
  159. <div class="col4">
  160. <%Rs1.Open "select ch_name from qudao where id="&Rs("cs_from")&"",conn,1,1
  161. IF Not Rs1.bof and Not Rs1.eof Then
  162. Response.write Rs1("ch_name")
  163. Else
  164. Response.write "未填写"
  165. End If
  166. Rs1.Close
  167. %>
  168. </div>
  169. <div class="col5">
  170. <%Rs1.Open "select countryName from country where id="&Rs("cs_country")&"",conn,1,1
  171. IF Not Rs1.bof and Not Rs1.eof Then
  172. Response.write Rs1("countryName")
  173. Else
  174. Response.write "未填写"
  175. End If
  176. Rs1.Close
  177. %>
  178. </div>
  179. <div class="col6">
  180. <%Rs1.Open "select businessType from clientType where id="&Rs("cs_type")&"",conn,1,1
  181. IF Not Rs1.bof and Not Rs1.eof Then
  182. Response.write Rs1("businessType")
  183. Else
  184. Response.write "未填写"
  185. End If
  186. Rs1.Close
  187. %>
  188. </div>
  189. <div class="col6">
  190. <%If Rs("cs_deal")=2 then
  191. Response.write "明确需求"
  192. elseif Rs("cs_deal")=1 then
  193. Response.write "背景调查"
  194. else
  195. Response.write "未成交"
  196. End IF
  197. %>
  198. </div>
  199. <div class="col20"><%=Rs("cs_updatetime")%></div>
  200. <div class="col4" ><span id="claim" class="claim" data-id="<%=Rs("id")%>">认领</span></div>
  201. </div>
  202. <div class="notepanel clear">
  203. <div class="noteItem2">
  204. 备注
  205. </div>
  206. <div class="notecontent">
  207. <%=HtmlUnCode(Rs("cs_note"))%>
  208. </div>
  209. </div>
  210. <%
  211. Rs.MoveNext
  212. Next
  213. Else
  214. If Keys="" Then
  215. %>
  216. <tr>
  217. <div align="center" colspan="8">Sorry,当前暂无信息</div>
  218. </tr>
  219. <%
  220. Else
  221. %>
  222. <tr>
  223. <div align="center" colspan="8"><a href="?">Sorry,没有找到“<%=Keyscode%>”相关的信息,点击返回</a></div>
  224. </tr>
  225. <%
  226. End If
  227. End If
  228. %>
  229. <div colspan="8">
  230. <div class="showpagebox">
  231. <%
  232. If Rs.PageCount > 1 Then
  233. PageName="?Keys="&Keys&urlStr&"&"
  234. Pagelen=3
  235. If Page>1 Then
  236. Response.Write "<a href="""&PageName&"Page=1"">首页</a>"
  237. Response.Write "<a href="""&PageName&"Page="&Page-1&""">上一页</a>"
  238. End If
  239. If Pagelen*2+1 >= Rs.PageCount Then
  240. StartPage=1:EndPage=Rs.PageCount
  241. Else
  242. If Page<=Pagelen+1 Then
  243. StartPage=1
  244. EndPage=Pagelen*2+1
  245. Else
  246. StartPage=Page-Pagelen
  247. EndPage=Page+Pagelen
  248. End If
  249. If Page+Pagelen>Rs.PageCount Then StartPage=Rs.PageCount-Pagelen*2:EndPage=Rs.PageCount
  250. End If
  251. For i = StartPage To EndPage
  252. If i = Page Then
  253. Response.Write "<a class=""current"">"&i&"</a>"
  254. Else
  255. Response.Write "<a href="""&PageName&"Page="&i&""">"&i&"</a>"
  256. End If
  257. Next
  258. If Page<Rs.PageCount Then
  259. If Rs.PageCount - Page > Pagelen Then Response.Write "<a href="""&PageName&"Page="&Rs.PageCount&""">..."&Rs.PageCount&"</a>"
  260. Response.Write "<a href="""&PageName&"Page="&Page+1&""">下一页</a>"
  261. Response.Write "<a href="""&PageName&"Page="&Rs.PageCount&""">尾页</a>"
  262. End If
  263. 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}"" />"
  264. End If
  265. %> </div>
  266. </div>
  267. </div>
  268. </form>
  269. <%Rs.Close:Set Rs=Nothing:Set Rs1=Nothing:Conn.Close:Set Conn=Nothing%>
  270. </div>
  271. </body>
  272. </html>