tag.asp 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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"></script>
  11. </head>
  12. <body class="clear">
  13. <!--#include file="panel.asp"-->
  14. <%
  15. Act = Request.QueryString("act")
  16. tagName=Request.QueryString("tagName")
  17. If tagName="" or IsNull(tagName) Then
  18. response.redirect "customers.asp"
  19. End If
  20. If Act="postchk" Then
  21. Keys = Server.UrlEnCode(Request.QueryString("Keys"))
  22. chkact = replace(Request.Form("chkact"),"t","")
  23. SqlStr="("&Request.Form("chkbox")&")"
  24. updateStr = "Update Customer Set cs_updatetime='"&now()&"',cs_code=Replace(cs_code,'-','/'+(select em_code from employee where id="&chkact&")+'-'),cs_belong="&chkact&",cs_chain=cs_chain+',"&chkact&"' where id in "&SqlStr
  25. deleteTag="delete from tagTable where customerId in "&SqlStr
  26. Conn.Execute (updateStr):Conn.Execute(deleteTag):Conn.Close:Set Conn=Nothing
  27. Response.Redirect "tag.asp?tagName="&server.UrlEnCode(tagName)
  28. Response.End
  29. End If 'End postchk
  30. tagStr=""
  31. Set Rs=Server.CreateObject("ADODB.RecordSet")
  32. Rs.Open "select DISTINCT tagName from tagTable where employeeId="&Session("employee_id"),conn,1
  33. Do while not Rs.bof and not Rs.eof
  34. tagStr=tagStr&"<span>"&Rs("tagName")&"</span>,"
  35. Rs.moveNext
  36. loop
  37. Rs.close
  38. %>
  39. <div id="man_zone">
  40. <div class="fastSelect clear">
  41. <H1 class="taghead" contenteditable="true" data-originaltag="<%=tagName%>" data-em="<%=Session("employee_id")%>"><%=tagName%></H1>
  42. </div>
  43. <form id="form1" method="post" action="?act=postchk&tagName=<%=server.UrlEnCode(tagName)%>" onsubmit="return false">
  44. <div width="100%" border="0" cellpadding="3" cellspacing="1" class="table2">
  45. <div class="theader">
  46. <div class="col1" ><input type="checkbox" name="chkall" id="chkall" onclick="chkboxall(this,'chkbox')"></div>
  47. <div class="col2" >序号</div>
  48. <div class="col3">客户编号</div>
  49. <div class="col4">渠道来源</div>
  50. <div class="col5">区域</div>
  51. <div class="col7">根据阶段</div>
  52. <div class="col8">录入时间</div>
  53. <div class="col10">操作</div>
  54. </div>
  55. <%
  56. Set Rs1=Server.CreateObject("ADODB.RecordSet")
  57. 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,cs_note From customer Where cs_belong="&Session("employee_id")&" and id in (select customerId from tagTable where tagName='"&tagName&"')"
  58. Rs.Open sqlStr,Conn,1,1
  59. Do while Not Rs.bof and Not Rs.eof
  60. TempNum=TempNum+1
  61. %>
  62. <div class="tline">
  63. <div class="col1" align="center"><input type="checkbox" name="chkbox" value="<%=Rs("id")%>"></div>
  64. <div class="col2" ><%=TempNum%></div>
  65. <div class="col3 slidepanel"><%=Rs("cs_code")%></div>
  66. <div class="col4">
  67. <%Rs1.Open "select ch_name from qudao where id="&Rs("cs_from")&"",conn,1,1
  68. IF Not Rs1.bof and Not Rs1.eof Then
  69. Response.write Rs1("ch_name")
  70. Else
  71. Response.write "未填写"
  72. End If
  73. Rs1.Close
  74. %>
  75. </div>
  76. <div class="col5">
  77. <%Rs1.Open "select countryName from country where id="&Rs("cs_country")&"",conn,1,1
  78. IF Not Rs1.bof and Not Rs1.eof Then
  79. Response.write Rs1("countryName")
  80. Else
  81. Response.write "未填写"
  82. End If
  83. Rs1.Close
  84. %>
  85. </div>
  86. <div class="col7"><%If Rs("cs_deal")=3 then
  87. response.write "<span style='color:red;'>成交</span>"
  88. elseif Rs("cs_deal")=2 then
  89. Response.write "明确需求"
  90. elseif Rs("cs_deal")=1 then
  91. Response.write "背景调查"
  92. else
  93. Response.write "无响应"
  94. End IF
  95. %></div>
  96. <div class="col8"><%=Rs("cs_addtime")%></div>
  97. <div class="col10" ><a href="customerEdit.asp?Keys=<%=keys%>&Ord=<%=Ord%>&Page=<%=Page%>&act=edit&id=<%=Rs(0)%>" class="ico_edit ico">修改</a></div>
  98. </div>
  99. <div class="notepanel clear">
  100. <div class="noteItem">
  101. 联系方式
  102. </div>
  103. <div class="lx">
  104. <div class="tel"><%=Rs("cs_tel")%></div>
  105. <div class="mail"><a href="mailto:<%=Rs("cs_email")%>"><%=Rs("cs_email")%></a></div>
  106. <div class="whatsapp"><%=Rs("cs_whatsapp")%></div>
  107. <div class="wechat"><%=Rs("cs_wechat")%></div>
  108. <div class="linkedin"><%=Rs("cs_linkedin")%></div>
  109. <div class="facebook"><%=Rs("cs_facebook")%></div>
  110. <div class="alibaba"><%=Rs("cs_alibaba")%></div>
  111. </div>
  112. <div class="noteItem2">
  113. 备注
  114. </div>
  115. <div class="notecontent">
  116. <%=HtmlUncode(Rs("cs_note"))%>
  117. </div>
  118. <div class="coltag mytag" data-id="<%=Rs("id")%>" data-em="<%=Session("employee_id")%>">
  119. <% tagStr1=tagStr
  120. Rs1.Open "select tagName from tagTable where customerId="&Rs("id"),conn,1,1
  121. Do while not Rs1.bof and not Rs1.eof
  122. tagStr1=replace(tagStr1,"<span>"&Rs1("tagName")&"</span>","<span class=""active"">"&Rs1("tagName")&"</span>")
  123. Rs1.moveNext
  124. loop
  125. Rs1.Close
  126. response.write tagStr1
  127. %>
  128. </div>
  129. </div>
  130. <%
  131. Rs.MoveNext
  132. Loop
  133. %>
  134. <div colspan="9">
  135. <div class="showpagebox">
  136. </div>
  137. <div class="postchkbox">
  138. <select id="chkact" name="chkact">
  139. <%
  140. Set Rs2=Server.CreateObject("ADODB.RecordSet")
  141. Rs2.Open "select id,em_code,em_user from employee order by em_code asc",conn,1,1
  142. Do while Not Rs2.bof and Not Rs2.eof
  143. %>
  144. <option value="t<%=Rs2("id")%>">转给<%=Rs2("em_user")%>(<%=Rs2("em_code")%>)</option>
  145. <%
  146. Rs2.moveNext
  147. loop
  148. Rs2.close
  149. Set Rs2=Nothing
  150. %>
  151. </select>
  152. <input type="button" value="执行" onclick="postchk(1)" class="btn1">
  153. </div>
  154. </div>
  155. </div>
  156. <%Rs.Close:Set Rs=Nothing:Set Rs1=Nothing:Conn.Close:Set Conn=Nothing%>
  157. </div>
  158. </form>
  159. </body>
  160. </html>