customers.asp 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. <!--#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">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>管理区域</title>
  6. <link rel="stylesheet" href="css/common.css" type="text/css" />
  7. <script language="javascript" src="js/jquery-1.7.2.min.js"></script>
  8. <script type="text/javascript" src="js/js.js"></script>
  9. <script type="text/javascript" src="xheditor-1.1.9/xheditor-1.1.9-zh-cn.min.js"></script>
  10. <script>
  11. $(document).ready(function(){
  12. $('.txt2').xheditor({
  13. tools:'full',hoverExecDelay:-1,urlBase:'system/',//urlType:'root',//plugins:allPlugin,
  14. upLinkUrl:"upload.asp",upLinkExt:"zip,rar,txt,pdf",
  15. upImgUrl:"upload.asp",upImgExt:"jpg,jpeg,gif,png",
  16. upFlashUrl:"upload.asp",upFlashExt:"swf",
  17. upMediaUrl:"upload.asp",upMediaExt:"wmv,avi,wma,mp3,mid"//,loadCSS:'css/edit.css'
  18. });
  19. });
  20. </script>
  21. </head>
  22. <body>
  23. <div id="man_zone">
  24. <%
  25. Act = Request.QueryString("act")
  26. If act = "save" Then
  27. Set Rs = Server.CreateObject("ADODB.RecordSet")
  28. isedit = False
  29. id = Request.Form("id")
  30. If id<>"" And IsNumeric(id) Then isedit = True
  31. cs_code=TextEnCode(Request.Form("cs_code"))
  32. cs_company=TextEnCode(Request.Form("cs_company"))
  33. cs_name=TextEnCode(Request.Form("cs_name"))
  34. cs_belong=Request.Form("cs_belong")
  35. cs_country=Request.Form("cs_country")
  36. cs_from=Request.Form("cs_from")
  37. cs_tel=TextEnCode(Request.Form("cs_tel"))
  38. cs_email=TextEnCode(Request.Form("cs_email"))
  39. cs_whatsapp=TextEnCode(Request.Form("cs_whatsapp"))
  40. cs_wechat=TextEnCode(Request.Form("cs_wechat"))
  41. cs_linkedin=TextEnCode(Request.Form("cs_linkedin"))
  42. cs_facebook=TextEnCode(Request.Form("cs_facebook"))
  43. cs_alibaba=TextEnCode(Request.Form("cs_alibaba"))
  44. cs_state=Request.Form("cs_state")
  45. cs_deal=Request.Form("cs_deal")
  46. no_content=HtmlEnCode(Request.Form("no_content"))
  47. allowedit=Request.Form("allowedit")
  48. IF allowedit<>1 Then allowedit=0
  49. If isedit Then
  50. Rs.Open "Select * From customer Where id="&id,Conn,1,3
  51. If Not Rs.bof and Not Rs.eof Then
  52. Rs("cs_code") = cs_code
  53. Rs("cs_company") = cs_company
  54. Rs("cs_name")=cs_name
  55. Rs("cs_belong") = cs_belong
  56. Rs("cs_country")=cs_country
  57. Rs("cs_from") = cs_from
  58. Rs("cs_tel")=cs_tel
  59. Rs("cs_email")=cs_email
  60. Rs("cs_whatsapp")=cs_whatsapp
  61. Rs("cs_wechat")=cs_wechat
  62. Rs("cs_linkedin")=cs_linkedin
  63. Rs("cs_facebook")=cs_facebook
  64. Rs("cs_alibaba")=cs_alibaba
  65. Rs("cs_state") = cs_state
  66. Rs("cs_deal")=cs_deal
  67. Rs("cs_note")=no_content
  68. Rs("allowedit")=allowedit
  69. myArray=split(Rs("cs_chain"),",")
  70. myLen=UBound(myArray)
  71. Litem=myArray(myLen)
  72. IF Litem+0<>cs_belong+0 Then
  73. Rs("cs_chain")=Rs("cs_chain")&","&cs_belong
  74. End If
  75. Rs.Update:Rs.Close
  76. Page = Request.QueryString("Page")
  77. Keys=Server.UrlEnCode(Request.QueryString("Keys"))
  78. Response.Redirect "?keys="&Keys&"&Page="&Page&urlStr
  79. Set Rs=Nothing:Conn.Close:Set Conn=Nothing
  80. Else
  81. Response.write "<script>alert('不存在该客户');history.back();</script>"
  82. Rs.close
  83. Set Rs=Nothing
  84. Conn.close
  85. Set Conn=Nothing
  86. Response.End
  87. End If
  88. End If
  89. Conn.Close:Set Conn=Nothing
  90. Response.End
  91. End If 'end save
  92. If Act = "edit" Then
  93. id = Request.QueryString("id")
  94. isedit = False
  95. If id<>"" And IsNumeric(id) Then isedit=True
  96. If isedit Then
  97. Set Rs = Server.CreateObject("ADODB.RecordSet")
  98. Rs.Open "Select * From customer Left Join myNote on customer.cs_code=myNote.c_code Where customer.id="&id,Conn,1,1
  99. If Not Rs.Bof And Not Rs.Eof Then
  100. cs_code=TextUnCode(Rs("cs_code"))
  101. cs_company=TextUnCode(Rs("cs_company"))
  102. cs_name=TextUnCode(Rs("cs_name"))
  103. cs_country=Rs("cs_country")
  104. cs_from=Rs("cs_from")
  105. cs_tel=TextUnCode(Rs("cs_tel"))
  106. cs_telBu=TextUnCode(Rs("cs_telBu"))
  107. cs_Wechat=TextUnCode(Rs("cs_Wechat"))
  108. cs_WechatBu=TextUnCode(Rs("cs_WechatBu"))
  109. cs_Whatsapp=TextUnCode(Rs("cs_Whatsapp"))
  110. cs_WhatsappBu=TextUnCode(Rs("cs_WhatsappBu"))
  111. cs_email=TextUnCode(Rs("cs_email"))
  112. cs_emailBu=TextUnCode(Rs("cs_emailBu"))
  113. cs_linkedin=TextUnCode(Rs("cs_linkedin"))
  114. cs_linkedinBu=TextUnCode(Rs("cs_linkedinBu"))
  115. cs_facebook=TextUnCode(Rs("cs_facebook"))
  116. cs_facebookBu=TextUnCode(Rs("cs_facebookBu"))
  117. cs_alibaba=TextUnCode(Rs("cs_alibaba"))
  118. cs_alibabaBu=TextUnCode(Rs("cs_alibabaBu"))
  119. cs_address=TextUnCode(Rs("cs_address"))
  120. cs_addtime=Rs("cs_addtime")
  121. cs_updatetime=Rs("cs_updatetime")
  122. cs_belong=Rs("cs_belong")
  123. cs_state=Rs("cs_state")
  124. cs_deal=Rs("cs_deal")
  125. cs_note=HtmlUnCode(Rs("cs_note"))
  126. allowedit=Rs("allowedit")
  127. Else
  128. isedit = False
  129. End If
  130. Rs.Close:Set Rs=Nothing
  131. End If
  132. Page = Request.QueryString("Page")
  133. Keys=Server.UrlEnCode(Request.QueryString("Keys"))
  134. Ord=Server.UrlEnCode(Request.QueryString("Ord"))
  135. hrefstr = "?keys="&Keys&"&Page="&Page&"&Ord="&Ord
  136. %>
  137. <form name="form1" method="post" action="<%=hrefstr%>&act=save">
  138. <table width="100%" border="0" cellpadding="3" cellspacing="1" class="table1">
  139. <tbody>
  140. <tr>
  141. <th width="8%">客户编号</th>
  142. <td ><input type="text" id="cs_code" name="cs_code" value="<%=cs_code%>" class="txt1" /><input type="hidden" name="id" value="<%=id%>" /></td>
  143. </tr>
  144. <tr>
  145. <th width="8%">公司名称</th>
  146. <td ><input type="text" id="cs_company" name="cs_company" value="<%=cs_company%>" class="txt1" /></td>
  147. </tr>
  148. <tr>
  149. <th width="8%">联系人</th>
  150. <td ><input type="text" id="cs_name" name="cs_name" value="<%=cs_name%>" class="txt1" /></td>
  151. </tr>
  152. <tr>
  153. <th width="8%">所属业务</th>
  154. <td ><select name="cs_belong">
  155. <option value="0">请选择</option>
  156. <%
  157. Set Rs1=Server.CreateObject("ADODB.RecordSet")
  158. Rs1.Open "Select id,em_user from employee",conn,1,1
  159. Do while Not Rs1.bof and Not Rs1.eof
  160. %>
  161. <option value="<%=Rs1("id")%>" <%If Rs1("id")=cs_belong Then Response.write "Selected=""Selected""" End If%>><%=Rs1("em_user")%></option>
  162. <%
  163. Rs1.moveNext
  164. loop
  165. Rs1.close
  166. %>
  167. </select>
  168. </td>
  169. </tr>
  170. <tr>
  171. <th width="8%">国家</th>
  172. <td ><select name="cs_country" >
  173. <option value="0">请选择</option>
  174. <%
  175. Set Rs1=Server.CreateObject("ADODB.RecordSet")
  176. Rs1.Open "Select id,countryCode,countryName from country",conn,1,1
  177. Do while Not Rs1.bof and Not Rs1.eof
  178. %>
  179. <option value="<%=Rs1("id")%>" <%If Rs1("id")=cs_country Then Response.write "Selected=""Selected""" End If%>><%=Rs1("countryName")%></option>
  180. <%
  181. Rs1.moveNext
  182. loop
  183. Rs1.close
  184. %>
  185. </select>
  186. </td>
  187. </tr>
  188. <tr>
  189. <th width="8%">来源</th>
  190. <td ><select name="cs_from" >
  191. <option value="0">请选择</option>
  192. <%
  193. Set Rs1=Server.CreateObject("ADODB.RecordSet")
  194. Rs1.Open "Select id,ch_name from qudao",conn,1,1
  195. Do while Not Rs1.bof and Not Rs1.eof
  196. %>
  197. <option value="<%=Rs1("id")%>" <%If Rs1("id")=Cint(cs_from) Then Response.write "Selected=""Selected""" End If%>><%=Rs1("ch_name")%></option>
  198. <%
  199. Rs1.moveNext
  200. loop
  201. Rs1.close
  202. %>
  203. </select>
  204. </td>
  205. </tr>
  206. <tr>
  207. <th width="8%">录入时间</th>
  208. <td ><%=cs_addtime%></td>
  209. </tr>
  210. <tr>
  211. <th width="8%">更新时间</th>
  212. <td ><%=cs_updatetime%></td>
  213. </tr>
  214. <tr>
  215. <th width="8%" rowspan="7">联系方式</th>
  216. <td><input type="text" id="cs_tel" name="cs_tel" value="<%=cs_tel%>" class="txt5 tel" />备份:<%=cs_telbu%></td>
  217. </tr>
  218. <tr>
  219. <td><input type="text" id="cs_email" name="cs_email" value="<%=cs_email%>" class="txt5 mail" />备份:<%=cs_emailBu%></td>
  220. </tr>
  221. <tr>
  222. <td><input type="text" id="cs_whatsapp" name="cs_whatsapp" value="<%=cs_whatsapp%>" class="txt5 whatsapp" />备份:<%=cs_whatsappBu%></td>
  223. </tr>
  224. <tr>
  225. <td><input type="text" id="cs_wechat" name="cs_wechat" value="<%=cs_wechat%>" class="txt5 wechat" />备份:<%=cs_wechatBu%></td>
  226. </tr>
  227. <tr>
  228. <td><input type="text" id="cs_linkedin" name="cs_linkedin" value="<%=cs_linkedin%>" class="txt5 linkedin" />备份:<%=cs_linkedinbu%></td>
  229. </tr>
  230. <tr>
  231. <td><input type="text" id="cs_facebook" name="cs_facebook" value="<%=cs_facebook%>" class="txt5 facebook" />备份:<%=cs_facebookBu%></td>
  232. </tr>
  233. <tr>
  234. <td><input type="text" id="cs_alibaba" name="cs_alibaba" value="<%=cs_alibaba%>" class="txt5 alibaba" />备份:<%=cs_alibabaBu%></td>
  235. </tr>
  236. <tr>
  237. <th width="8%">地址</th>
  238. <td ><input type="text" id="cs_address" name="cs_address" value="<%=cs_address%>" class="txt1" /></td>
  239. </tr>
  240. <tr>
  241. <th width="8%">标签</th>
  242. <td >
  243. <%
  244. Rs1.Open "Select id,tagName from tagTable where customerId="&id,conn,1,1
  245. Do while Not Rs1.bof and Not Rs1.eof
  246. %>
  247. <%=Rs1("tagName")%>,
  248. <%
  249. Rs1.moveNext
  250. loop
  251. Rs1.close
  252. Set Rs1=Nothing
  253. %>
  254. </td>
  255. </tr>
  256. <tr>
  257. <th width="8%">状态</th>
  258. <td >
  259. <label><input type="radio" name="cs_state" value="1"<%If cs_state=1 Then Response.Write " checked=""checked""" End If%> />有效</label>
  260. <label><input type="radio" name="cs_state" value="0"<%If cs_state<>1 Then Response.Write " checked=""checked""" End If%> />不再跟进</label>
  261. </td>
  262. </tr>
  263. <tr>
  264. <th width="8%">是否误报</th>
  265. <td >
  266. <label><input type="radio" name="allowedit" value="1"<%If allowedit=1 Then Response.Write " checked=""checked""" End If%> />审核通过</label>
  267. <label><input type="radio" name="allowedit" value="0"<%If allowedit<>1 Then Response.Write " checked=""checked""" End If%> />一般处理</label>
  268. </td>
  269. </tr>
  270. <tr>
  271. <th width="8%">是否成交</th>
  272. <td >
  273. <label><input type="radio" name="cs_deal" value="3"<%If cs_deal=3 Then Response.Write " checked=""checked""" End If%> />成交</label>
  274. <label><input type="radio" name="cs_deal" value="2"<%If cs_deal=2 Then Response.Write " checked=""checked""" End If%> />明确需求</label>
  275. <label><input type="radio" name="cs_deal" value="1"<%If cs_deal=1 Then Response.Write " checked=""checked""" End If%> />背景调查</label>
  276. <label><input type="radio" name="cs_deal" value="0"<%If cs_deal=0 Then Response.Write " checked=""checked""" End If%> />无响应</label>
  277. </td>
  278. </tr>
  279. <tr>
  280. <th>内容</th>
  281. <td ><textarea id="no_content" name="no_content" class="txt2"><%=cs_note%></textarea></td>
  282. </tr>
  283. <tr>
  284. <th></th>
  285. <td >
  286. <input type="submit" name="save" id="save" value="确定" class="btn1" /> <input type="reset" name="save" id="save" value="重置" class="btn1" /> <input type="button" value="返回" class="btn1" onClick="location.href='<%=hrefstr%>'" />
  287. </td>
  288. </tr>
  289. </tbody>
  290. </table>
  291. </form>
  292. </div>
  293. </body>
  294. </html>
  295. <%
  296. Response.End
  297. End If 'End Edit
  298. If Act="postchk" Then
  299. Keys = Server.UrlEnCode(Request.QueryString("Keys"))
  300. Page = Request.QueryString("Page")
  301. chkact = Request.Form("chkact")
  302. SqlStr = ""
  303. For i = 1 To Request.Form("chkbox").Count
  304. If SqlStr<>"" Then
  305. SqlStr = SqlStr & " Or id="&Request.Form("chkbox")(i)
  306. Else
  307. SqlStr = " Where id="&Request.Form("chkbox")(i)
  308. End If
  309. Next
  310. Select Case chkact
  311. Case "0":SqlStr = "Update customer Set cs_state="&chkact&SqlStr
  312. Case "1":SqlStr = "Update customer Set cs_state="&chkact&SqlStr
  313. Case Else:SqlStr = "Delete From customer"&SqlStr
  314. End Select
  315. Conn.Execute(SqlStr):Conn.Close:Set Conn=Nothing
  316. Response.Redirect "?Keys="&Keys&"&Page="&Page
  317. Response.End
  318. End If 'End postchk
  319. fliterQudao=Request.QueryString("fliterQudao")
  320. fliterDeal=Request.QueryString("fliterDeal")
  321. fliterTeam=Request.QueryString("fliterTeam")
  322. fliterContact=Request.QueryString("fliterContact")
  323. fliterEmployee=Request.QueryString("fliterEmployee")
  324. fliterStr=""
  325. If fliterQudao<>"" Then
  326. fliterStr=fliterStr&" and cs_from="&Cint(fliterQudao)
  327. urlStr=urlStr&"&fliterQudao="&fliterQudao
  328. End If
  329. If fliterDeal<>"" Then
  330. fliterStr=fliterStr&" and cs_deal="&Cint(fliterDeal)
  331. urlStr=urlStr&"&fliterDeal="&fliterDeal
  332. End If
  333. If fliterTeam<>"" Then
  334. fliterStr=fliterStr&" and (cs_belong="&Cint(fliterTeam)&" or cs_belong in (select id from employee where em_role="&Cint(fliterTeam)&") )"
  335. urlStr=urlStr&"&fliterTeam="&fliterTeam
  336. End If
  337. If fliterEmployee<>"" Then
  338. fliterStr=fliterStr&" and cs_belong="&Cint(fliterEmployee)
  339. urlStr=urlStr&"&fliterEmployee="&fliterEmployee
  340. End If
  341. If fliterContact<>"" Then
  342. Select Case fliterContact
  343. Case "1":fliterStr=fliterStr&" and cs_tel<>''"
  344. Case "2":fliterStr=fliterStr&" and cs_wechat<>''"
  345. Case "3":fliterStr=fliterStr&" and cs_whatsapp<>''"
  346. Case "4":fliterStr=fliterStr&" and cs_email<>''"
  347. Case "5":fliterStr=fliterStr&" and cs_linkedin<>''"
  348. Case "6":fliterStr=fliterStr&" and cs_facebook<>''"
  349. Case Else:fliterStr=fliterStr&" and cs_alibaba<>''"
  350. End Select
  351. urlStr=urlStr&"&fliterContact="&fliterContact
  352. End If
  353. Keys=Request.QueryString("Keys")
  354. Keyscode=TextEnCode(Keys)
  355. Page = Request.QueryString("Page")
  356. Ord=Request.QueryString("Ord")
  357. Keys=Server.UrlEnCode(Request.QueryString("Keys"))
  358. If Ord<>"" Then
  359. OrdStr=Ord&","
  360. Else
  361. OrdStr=""
  362. End If
  363. sqlStr="Select id,cs_code,cs_name,cs_country,cs_address,cs_tel,cs_email,cs_whatsapp,cs_wechat,cs_linkedin,cs_facebook,cs_addtime,cs_alibaba,cs_from,cs_deal,cs_updatetime,cs_belong,cs_note,cs_claimFrom,cs_chain,cs_dealdate From customer Where ( cs_code like '%"&Keyscode&"%' or cs_name like '%"&Keyscode&"%' or cs_Wechat like '%"&Keyscode&"%' or cs_alibaba like '%"&Keyscode&"%' or cs_telformat like '%"&Keyscode&"%' or cs_Whatsappformat like '%"&Keyscode&"%' or cs_email like '%"&Keyscode&"%' ) "&fliterStr&" Order By "&OrdStr&" cs_updatetime Desc"
  364. Set Rs=Server.CreateObject("ADODB.RecordSet")
  365. hrefstr = "?keys="&Keys&urlStr
  366. Set Rs1=Server.CreateObject("ADODB.RecordSet")
  367. %>
  368. <form id="form1" method="post" action="?act=postchk&Keys=<%=keys%>&Ord=<%=Ord%>&Page=<%=Page%>" onSubmit="return false" />
  369. <div class="fastSelect clear">
  370. <H1>搜索条件</H1>
  371. <div class="selectItem">
  372. <label>来源渠道</label>
  373. <select name="fliterQudao" class="filterSearch">
  374. <option value="">请选择渠道</option>
  375. <%Rs.Open "Select id,ch_name from qudao",conn,1,1
  376. Do while Not Rs.Bof And Not Rs.eof
  377. %>
  378. <option value="<%=Rs("id")%>" <%if StrComp(fliterQudao,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("ch_name")%></option>
  379. <%
  380. Rs.moveNext
  381. loop
  382. Rs.close
  383. %>
  384. </select>
  385. </div>
  386. <div class="selectItem">
  387. <label>是否成交</label>
  388. <select name="fliterDeal" class="filterSearch">
  389. <option value="">请选择</option>
  390. <option value="3" <%if StrComp(fliterDeal,"3")=0 Then response.Write "Selected=""Selected"""%>>已成交</option>
  391. <option value="2" <%if StrComp(fliterDeal,"2")=0 Then response.Write "Selected=""Selected"""%>>明确需求</option>
  392. <option value="1" <%if StrComp(fliterDeal,"1")=0 Then response.Write "Selected=""Selected"""%>>背景调查</option>
  393. <option value="0" <%if StrComp(fliterDeal,"0")=0 Then response.Write "Selected=""Selected"""%>>无响应</option>
  394. </select>
  395. </div>
  396. <div class="selectItem">
  397. <label>按组</label>
  398. <select name="fliterTeam" class="filterSearch">
  399. <option value="">请选择</option>
  400. <%Rs.Open "Select id,em_user from employee where em_role=0",conn,1,1
  401. Do while Not Rs.Bof And Not Rs.eof
  402. %>
  403. <option value="<%=Rs("id")%>" <%if StrComp(fliterTeam,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("em_user")%>组</option>
  404. <%
  405. Rs.moveNext
  406. loop
  407. Rs.close
  408. %>
  409. </select>
  410. </div>
  411. <div class="selectItem">
  412. <label>业务</label>
  413. <select name="fliterEmployee" class="filterSearch">
  414. <option value="">请选择</option>
  415. <%Rs.Open "Select id,em_user from employee",conn,1,1
  416. Do while Not Rs.Bof And Not Rs.eof
  417. %>
  418. <option value="<%=Rs("id")%>" <%if StrComp(fliterEmployee,Rs("id"))=0 Then response.Write "Selected=""Selected"""%>><%=Rs("em_user")%></option>
  419. <%
  420. Rs.moveNext
  421. loop
  422. Rs.close
  423. %>
  424. </select>
  425. </div>
  426. <div class="selectItem">
  427. <label>联系方式</label>
  428. <select name="fliterContact" class="filterSearch">
  429. <option value="">请选择</option>
  430. <option value="1" <%if StrComp(fliterContact,"1")=0 Then response.Write "Selected=""Selected"""%>>电话</option>
  431. <option value="2" <%if StrComp(fliterContact,"2")=0 Then response.Write "Selected=""Selected"""%>>微信</option>
  432. <option value="3" <%if StrComp(fliterContact,"3")=0 Then response.Write "Selected=""Selected"""%>>WhatsApp</option>
  433. <option value="4" <%if StrComp(fliterContact,"4")=0 Then response.Write "Selected=""Selected"""%>>邮箱</option>
  434. <option value="5" <%if StrComp(fliterContact,"5")=0 Then response.Write "Selected=""Selected"""%>>领英</option>
  435. <option value="6" <%if StrComp(fliterContact,"6")=0 Then response.Write "Selected=""Selected"""%>>Facebook</option>
  436. <option value="7" <%if StrComp(fliterContact,"7")=0 Then response.Write "Selected=""Selected"""%>>阿里巴巴</option>
  437. </select>
  438. </div>
  439. <div class="inputSearch">
  440. <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)+'<%=urlStr%>'}" /><input type="button" id="searchgo" class="searchgo" value="go" onClick="location.href='?Keys='+escape(document.getElementById('keys').value)+'<%=urlStr%>'" />
  441. </div>
  442. </div>
  443. <table width="100%" border="0" cellpadding="3" cellspacing="1" class="table1">
  444. <thead>
  445. <tr>
  446. <th width="4%"><input type="checkbox" name="chkall" id="chkall" onClick="chkboxall(this,'chkbox')" /></th>
  447. <th width="6%">序号</th>
  448. <th width="20%">客户编码</th>
  449. <th width="10%">联系人</th>
  450. <th width="10%">国家地区</th>
  451. <th width="7.5%">来源</th>
  452. <th width="7.5%"><a href="<%=hrefstr%><%If Ord="cs_dealdate" Then Response.Write "&Ord=cs_dealdate+Desc" Else Response.Write "&Ord=cs_dealdate"%>">是否成交</a></th>
  453. <th width="10%">业务员</th>
  454. <th width="10%">操作</th>
  455. </tr>
  456. </thead>
  457. <tbody>
  458. <%
  459. Rs.Open sqlStr,Conn,1,1
  460. If Not Rs.Bof And Not Rs.Eof Then
  461. Rs.PageSize = 18
  462. If Page = "" Then Page = 1
  463. If Page = "end" Then Page = Rs.PageCount
  464. If Not IsNumeric(Page) Or Page < 1 Then Page = 1
  465. Page = Cint(Page)
  466. If Page > Rs.PageCount Then Page = Rs.PageCount
  467. Rs.AbsolutePage = Page
  468. TempNum = Rs.PageSize * (Page - 1)
  469. Set Rs1=Server.CreateObject("ADODB.RecordSet")
  470. For i=1 To Rs.PageSize
  471. If Rs.Bof Or Rs.Eof Then Exit For
  472. TempNum=TempNum+1:classid=Rs(1)
  473. %>
  474. <tr onMouseOver="this.style.background='#F7FCFF'" onMouseOut="this.style.background='#FFFFFF'">
  475. <td align="center"><input type="checkbox" name="chkbox" value="<%=Rs(0)%>" /></td>
  476. <td align="center" ><%=TempNum%></td>
  477. <td align="center" class="code" data-id="<%=Rs(0)%>"><%=Rs("cs_code")%><%If Rs("cs_claimFrom")>0 Then%><img src="../images/yijiao.png" class="handover"></div><%End If%></td>
  478. <td align="center"><%=Rs("cs_name")%></td>
  479. <td align="center"><%
  480. Rs1.Open "Select id,countryName from country where id="&Rs("cs_country")&"",conn,1,1
  481. If Not Rs1.bof and Not Rs1.eof Then
  482. Response.write Rs1("countryName")
  483. Else
  484. Response.write "未选择"
  485. End If
  486. Rs1.close
  487. %></td>
  488. <td align="center"><%
  489. Rs1.Open "Select ch_name from qudao where id="&Rs("cs_from"),conn,1,1
  490. If not Rs1.bof and not Rs1.eof Then
  491. response.write Rs1("ch_name")
  492. Else
  493. response.write "未选择"
  494. End If
  495. Rs1.close
  496. %>
  497. </td>
  498. <td align="center"><% If Rs("cs_deal")=3 Then
  499. response.write "<span style='color:red;font-size:10px;'>"&Rs("cs_dealdate")&"成交</span>"
  500. elseif Rs("cs_deal")=2 Then
  501. Response.write "明确需求"
  502. elseif Rs("cs_deal")=1 Then
  503. Response.write "背景调查"
  504. else
  505. Response.write "无响应"
  506. End If%>
  507. </td>
  508. <td align="center"><%
  509. Rs1.Open "Select em_user from employee where id="&Rs("cs_belong"),conn,1,1
  510. If not Rs1.bof and not Rs1.eof Then
  511. response.write Rs1("em_user")
  512. Else
  513. response.write "未选择"
  514. End If
  515. Rs1.close
  516. %>
  517. </td>
  518. <td align="center"><a href="?Keys=<%=keys%>&Page=<%=Page%><%=urlStr%>&act=edit&id=<%=Rs(0)%>" class="ico_edit ico">修改</a></td>
  519. </tr>
  520. <tr class="detail_panel code<%=Rs(0)%>__panel">
  521. <td colspan="2"></td>
  522. <td colspan="7" class="cs_detail">
  523. <ul>
  524. <li class="cs_detail_addtime">录入时间:<%=Rs("cs_addtime")%></li>
  525. <li class="cs_detail_addtime">更新时间:<%=Rs("cs_updatetime")%></li>
  526. <li class="cs_detail_addtime">
  527. 流转记录:
  528. <% myArray=split(Rs("cs_chain"),",")
  529. sqlStr="Select em_user from employee where id="&myArray(0)
  530. for j=1 to UBound(myArray)
  531. sqlStr=sqlStr&" union all Select em_user from employee where id="&myArray(j)
  532. next
  533. Rs1.open sqlStr,conn,1,1
  534. Do while Not Rs1.bof and Not Rs1.eof
  535. Response.write Rs1("em_user")&" > "
  536. Rs1.moveNext
  537. loop
  538. Rs1.close
  539. %>
  540. </li>
  541. <%IF Rs("cs_tel")<>"" Then%><li class="tel"><%=Rs("cs_tel")%></li><%End if%>
  542. <%IF Rs("cs_email")<>"" Then%><li class="mail"><%=Rs("cs_email")%></li><%End if%>
  543. <%IF Rs("cs_whatsapp")<>"" Then%><li class="whatsapp"><%=Rs("cs_whatsapp")%></li> <%End if%>
  544. <%IF Rs("cs_wechat")<>"" Then%><li class="wechat"><%=Rs("cs_wechat")%></li> <%End if%>
  545. <%IF Rs("cs_linkedin")<>"" Then%><li class="linkedin"><%=Rs("cs_linkedin")%></li> <%End if%>
  546. <%IF Rs("cs_facebook")<>"" Then%><li class="facebook"><%=Rs("cs_facebook")%></li> <%End if%>
  547. <%IF Rs("cs_alibaba")<>"" Then%><li class="alibaba"><%=Rs("cs_alibaba")%></li> <%End if%>
  548. <%IF Rs("cs_address")<>"" Then%><li class="address"><%=Rs("cs_address")%></li> <%End if%>
  549. </ul>
  550. <div class="cs_detail_note"><%=HtmlUnCode(Rs("cs_note"))%></div>
  551. </td>
  552. </tr>
  553. <%
  554. Rs.MoveNext
  555. Next
  556. Else
  557. If Keys="" Then
  558. %>
  559. <tr>
  560. <td align="center" colspan="9">Sorry,当前暂无信息</td>
  561. </tr>
  562. <%
  563. Else
  564. %>
  565. <tr>
  566. <td align="center" colspan="9"><a href="?">Sorry,没有找到“<%=Keyscode%>”相关的信息,点击返回</a></td>
  567. </tr>
  568. <%
  569. End If
  570. End If
  571. %>
  572. </tbody>
  573. <tfoot>
  574. <tr>
  575. <td colspan="9">
  576. <div class="showpagebox">
  577. <%
  578. If Rs.PageCount > 1 Then
  579. PageName="?Keys="&Keys&"&Ord="&Ord&urlStr&"&"
  580. Pagelen=3
  581. If Page>1 Then
  582. Response.Write "<a href="""&PageName&"Page=1"">首页</a>"
  583. Response.Write "<a href="""&PageName&"Page="&Page-1&""">上一页</a>"
  584. End If
  585. If Pagelen*2+1 >= Rs.PageCount Then
  586. StartPage=1:EndPage=Rs.PageCount
  587. Else
  588. If Page<=Pagelen+1 Then
  589. StartPage=1
  590. EndPage=Pagelen*2+1
  591. Else
  592. StartPage=Page-Pagelen
  593. EndPage=Page+Pagelen
  594. End If
  595. If Page+Pagelen>Rs.PageCount Then StartPage=Rs.PageCount-Pagelen*2:EndPage=Rs.PageCount
  596. End If
  597. For i = StartPage To EndPage
  598. If i = Page Then
  599. Response.Write "<a class=""current"">"&i&"</a>"
  600. Else
  601. Response.Write "<a href="""&PageName&"Page="&i&""">"&i&"</a>"
  602. End If
  603. Next
  604. If Page<Rs.PageCount Then
  605. If Rs.PageCount - Page > Pagelen Then Response.Write "<a href="""&PageName&"Page="&Rs.PageCount&""">..."&Rs.PageCount&"</a>"
  606. Response.Write "<a href="""&PageName&"Page="&Page+1&""">下一页</a>"
  607. Response.Write "<a href="""&PageName&"Page="&Rs.PageCount&""">尾页</a>"
  608. End If
  609. 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}"" />"
  610. End If
  611. %> </div>
  612. <div class="postchkbox">
  613. <select id="chkact" name="chkact">
  614. <option value="1">显示</option>
  615. <option value="0">隐藏</option>
  616. <option value="-1">删除</option>
  617. </select>
  618. <input type="button" value="执行" onClick="postchk(1)" class="btn1" />
  619. <input type="button" value="新增" onClick="location.href='?act=add'" class="btn1" />
  620. </div>
  621. </td>
  622. </tr>
  623. </tfoot>
  624. </table>
  625. </form>
  626. <%Rs.Close:Set Rs=Nothing:Set Rs1=Nothing:Conn.Close:Set Conn=Nothing%>
  627. </div>
  628. </body>
  629. </html>