highSeas.asp 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  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. %>
  50. <form id="form1" method="post" action="?act=postchk&Keys=<%=keys%>&Page=<%=Page%>" onSubmit="return false" />
  51. <div class="fastSelect clear">
  52. <H1>搜索条件</H1>
  53. <div class="selectItem">
  54. <label>区域</label>
  55. <select name="fliterCountry" class="filterSearch">
  56. <option value="">请选择国家地区</option>
  57. <%Rs.Open "Select id,countryName from country",conn,1,1
  58. Do while Not Rs.Bof And Not Rs.eof
  59. %>
  60. <option value="<%=Rs("id")%>" <%if StrComp(fliterCountry,Rs("id"))=0 Then response.Write "Selected=""Selected"""%> ><%=Rs("countryName")%></option>
  61. <%
  62. Rs.moveNext
  63. loop
  64. Rs.close
  65. %>
  66. </select>
  67. </div>
  68. <div class="selectItem">
  69. <label>来源渠道</label>
  70. <select name="fliterQudao" class="filterSearch">
  71. <option value="">请选择渠道</option>
  72. <%Rs.Open "Select id,ch_name from qudao",conn,1,1
  73. Do while Not Rs.Bof And Not Rs.eof
  74. %>
  75. <option value="<%=Rs("id")%>" <%if StrComp(fliterQudao,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("ch_name")%></option>
  76. <%
  77. Rs.moveNext
  78. loop
  79. Rs.close
  80. %>
  81. </select>
  82. </div>
  83. <div class="selectItem">
  84. <label>跟进阶段</label>
  85. <select name="fliterDeal" class="filterSearch">
  86. <option value="">请选择</option>
  87. <option value="0" <%if StrComp(fliterDeal,"0")=0 Then response.Write "Selected=""Selected"""%>>无响应</option>
  88. <option value="1" <%if StrComp(fliterDeal,"1")=0 Then response.Write "Selected=""Selected"""%>>背景调查</option>
  89. <option value="2" <%if StrComp(fliterDeal,"2")=0 Then response.Write "Selected=""Selected"""%>>明确需求</option>
  90. </select>
  91. </div>
  92. <div class="selectItem">
  93. <label>客户类型</label>
  94. <select name="fliterBusiness" class="filterSearch">
  95. <option value="">请选择</option>
  96. <%Rs.Open "Select id,businessType from clientType",conn,1,1
  97. Do while Not Rs.Bof And Not Rs.eof
  98. %>
  99. <option value="<%=Rs("id")%>" <%if StrComp(fliterBusiness,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("businessType")%></option>
  100. <%
  101. Rs.moveNext
  102. loop
  103. Rs.close
  104. %>
  105. </select>
  106. </div>
  107. <div class="selectItem">
  108. <label>业务员</label>
  109. <select name="fliterBelong" class="filterSearch">
  110. <option value="">请选择</option>
  111. <%Rs.Open "Select id,em_user from employee",conn,1,1
  112. Do while Not Rs.Bof And Not Rs.eof
  113. %>
  114. <option value="<%=Rs("id")%>" <%if StrComp(fliterBelong,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("em_user")%></option>
  115. <%
  116. Rs.moveNext
  117. loop
  118. Rs.close
  119. %>
  120. </select>
  121. </div>
  122. </div>
  123. <div width="100%" border="0" cellpadding="3" cellspacing="1" class="table2">
  124. <div class="theader">
  125. <div class="col9" >序号</div>
  126. <div class="col3">客户编号</div>
  127. <div class="col4">渠道来源</div>
  128. <div class="col5">区域</div>
  129. <div class="col6">客户类型</div>
  130. <div class="col6">是否成交</div>
  131. <div class="col20">更新日期</div>
  132. <div class="col4">操作</div>
  133. </div>
  134. <%
  135. 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"
  136. Rs.Open sqlStr ,Conn,1,1
  137. If Not Rs.Bof And Not Rs.Eof Then
  138. Rs.PageSize = 20
  139. If Page = "" Then Page = 1
  140. If Page = "end" Then Page = Rs.PageCount
  141. If Not IsNumeric(Page) Or Page < 1 Then Page = 1
  142. Page = Cint(Page)
  143. If Page > Rs.PageCount Then Page = Rs.PageCount
  144. Rs.AbsolutePage = Page
  145. TempNum = Rs.PageSize * (Page - 1)
  146. Set Rs1=Server.CreateObject("ADODB.RecordSet")
  147. For i=1 To Rs.PageSize
  148. If Rs.Bof Or Rs.Eof Then Exit For
  149. TempNum=TempNum+1:classid=Rs(1)
  150. %>
  151. <div class="tline">
  152. <div class="col9" ><%=TempNum%></div>
  153. <div class="col3 slidepanel"><%=Rs("cs_code")%></div>
  154. <div class="col4">
  155. <%Rs1.Open "select ch_name from qudao where id="&Rs("cs_from")&"",conn,1,1
  156. IF Not Rs1.bof and Not Rs1.eof Then
  157. Response.write Rs1("ch_name")
  158. Else
  159. Response.write "未填写"
  160. End If
  161. Rs1.Close
  162. %>
  163. </div>
  164. <div class="col5">
  165. <%Rs1.Open "select countryName from country where id="&Rs("cs_country")&"",conn,1,1
  166. IF Not Rs1.bof and Not Rs1.eof Then
  167. Response.write Rs1("countryName")
  168. Else
  169. Response.write "未填写"
  170. End If
  171. Rs1.Close
  172. %>
  173. </div>
  174. <div class="col6">
  175. <%Rs1.Open "select businessType from clientType where id="&Rs("cs_type")&"",conn,1,1
  176. IF Not Rs1.bof and Not Rs1.eof Then
  177. Response.write Rs1("businessType")
  178. Else
  179. Response.write "未填写"
  180. End If
  181. Rs1.Close
  182. %>
  183. </div>
  184. <div class="col6">
  185. <%If Rs("cs_deal")=2 then
  186. Response.write "明确需求"
  187. elseif Rs("cs_deal")=1 then
  188. Response.write "背景调查"
  189. End IF
  190. %>
  191. </div>
  192. <div class="col20"><%=Rs("cs_updatetime")%></div>
  193. <div class="col4" ><span id="claim1" class="claim" data-id="<%=Rs("id")%>">认领</span></div>
  194. </div>
  195. <div class="notepanel clear">
  196. <div class="noteItem2">
  197. 备注
  198. </div>
  199. <div class="notecontent">
  200. <%=HtmlUnCode(Rs("cs_note"))%>
  201. </div>
  202. </div>
  203. <%
  204. Rs.MoveNext
  205. Next
  206. Else
  207. If Keys="" Then
  208. %>
  209. <tr>
  210. <div align="center" colspan="8">Sorry,当前暂无信息</div>
  211. </tr>
  212. <%
  213. Else
  214. %>
  215. <tr>
  216. <div align="center" colspan="8"><a href="?">Sorry,没有找到“<%=Keyscode%>”相关的信息,点击返回</a></div>
  217. </tr>
  218. <%
  219. End If
  220. End If
  221. %>
  222. <div colspan="8">
  223. <div class="showpagebox">
  224. <%
  225. If Rs.PageCount > 1 Then
  226. PageName="?Keys="&Keys&urlStr&"&"
  227. Pagelen=3
  228. If Page>1 Then
  229. Response.Write "<a href="""&PageName&"Page=1"">首页</a>"
  230. Response.Write "<a href="""&PageName&"Page="&Page-1&""">上一页</a>"
  231. End If
  232. If Pagelen*2+1 >= Rs.PageCount Then
  233. StartPage=1:EndPage=Rs.PageCount
  234. Else
  235. If Page<=Pagelen+1 Then
  236. StartPage=1
  237. EndPage=Pagelen*2+1
  238. Else
  239. StartPage=Page-Pagelen
  240. EndPage=Page+Pagelen
  241. End If
  242. If Page+Pagelen>Rs.PageCount Then StartPage=Rs.PageCount-Pagelen*2:EndPage=Rs.PageCount
  243. End If
  244. For i = StartPage To EndPage
  245. If i = Page Then
  246. Response.Write "<a class=""current"">"&i&"</a>"
  247. Else
  248. Response.Write "<a href="""&PageName&"Page="&i&""">"&i&"</a>"
  249. End If
  250. Next
  251. If Page<Rs.PageCount Then
  252. If Rs.PageCount - Page > Pagelen Then Response.Write "<a href="""&PageName&"Page="&Rs.PageCount&""">..."&Rs.PageCount&"</a>"
  253. Response.Write "<a href="""&PageName&"Page="&Page+1&""">下一页</a>"
  254. Response.Write "<a href="""&PageName&"Page="&Rs.PageCount&""">尾页</a>"
  255. End If
  256. 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}"" />"
  257. End If
  258. %> </div>
  259. </div>
  260. </div>
  261. </form>
  262. <%Rs.Close:Set Rs=Nothing:Set Rs1=Nothing:Conn.Close:Set Conn=Nothing%>
  263. </div>
  264. </body>
  265. </html>