123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <!--#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"></script>
- </head>
- <body class="clear">
- <!--#include file="panel.asp"-->
- <%
- Act = Request.QueryString("act")
- tagName=Request.QueryString("tagName")
- If tagName="" or IsNull(tagName) Then
- response.redirect "customers.asp"
- End If
- If Act="postchk" Then
- Keys = Server.UrlEnCode(Request.QueryString("Keys"))
- chkact = replace(Request.Form("chkact"),"t","")
- SqlStr="("&Request.Form("chkbox")&")"
- 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
- deleteTag="delete from tagTable where customerId in "&SqlStr
- Conn.Execute (updateStr):Conn.Execute(deleteTag):Conn.Close:Set Conn=Nothing
- Response.Redirect "tag.asp?tagName="&server.UrlEnCode(tagName)
- Response.End
- End If 'End postchk
- tagStr=""
- Set Rs=Server.CreateObject("ADODB.RecordSet")
- Rs.Open "select DISTINCT tagName from tagTable where employeeId="&Session("employee_id"),conn,1
- Do while not Rs.bof and not Rs.eof
- tagStr=tagStr&"<span>"&Rs("tagName")&"</span>,"
- Rs.moveNext
- loop
- Rs.close
- %>
- <div id="man_zone">
- <div class="fastSelect clear">
- <H1 class="taghead" contenteditable="true" data-originaltag="<%=tagName%>" data-em="<%=Session("employee_id")%>"><%=tagName%></H1>
- </div>
- <form id="form1" method="post" action="?act=postchk&tagName=<%=server.UrlEnCode(tagName)%>" onsubmit="return false">
- <div width="100%" border="0" cellpadding="3" cellspacing="1" class="table2">
- <div class="theader">
- <div class="col1" ><input type="checkbox" name="chkall" id="chkall" onclick="chkboxall(this,'chkbox')"></div>
- <div class="col2" >序号</div>
- <div class="col3">客户编号</div>
- <div class="col4">渠道来源</div>
- <div class="col5">区域</div>
- <div class="col7">根据阶段</div>
- <div class="col8">录入时间</div>
- <div class="col10">操作</div>
- </div>
- <%
- Set Rs1=Server.CreateObject("ADODB.RecordSet")
- 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&"')"
- Rs.Open sqlStr,Conn,1,1
- Do while Not Rs.bof and Not Rs.eof
- TempNum=TempNum+1
- %>
- <div class="tline">
- <div class="col1" align="center"><input type="checkbox" name="chkbox" value="<%=Rs("id")%>"></div>
- <div class="col2" ><%=TempNum%></div>
- <div class="col3 slidepanel"><%=Rs("cs_code")%></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="col7"><%If Rs("cs_deal")=3 then
- response.write "<span style='color:red;'>成交</span>"
- elseif Rs("cs_deal")=2 then
- Response.write "明确需求"
- elseif Rs("cs_deal")=1 then
- Response.write "背景调查"
- else
- Response.write "无响应"
- End IF
- %></div>
-
- <div class="col8"><%=Rs("cs_addtime")%></div>
- <div class="col10" ><a href="customerEdit.asp?Keys=<%=keys%>&Ord=<%=Ord%>&Page=<%=Page%>&act=edit&id=<%=Rs(0)%>" class="ico_edit ico">修改</a></div>
- </div>
- <div class="notepanel clear">
- <div class="noteItem">
- 联系方式
- </div>
- <div class="lx">
- <div class="tel"><%=Rs("cs_tel")%></div>
- <div class="mail"><a href="mailto:<%=Rs("cs_email")%>"><%=Rs("cs_email")%></a></div>
- <div class="whatsapp"><%=Rs("cs_whatsapp")%></div>
- <div class="wechat"><%=Rs("cs_wechat")%></div>
- <div class="linkedin"><%=Rs("cs_linkedin")%></div>
- <div class="facebook"><%=Rs("cs_facebook")%></div>
- <div class="alibaba"><%=Rs("cs_alibaba")%></div>
- </div>
- <div class="noteItem2">
- 备注
- </div>
- <div class="notecontent">
- <%=HtmlUncode(Rs("cs_note"))%>
- </div>
- <div class="coltag mytag" data-id="<%=Rs("id")%>" data-em="<%=Session("employee_id")%>">
- <% tagStr1=tagStr
- Rs1.Open "select tagName from tagTable where customerId="&Rs("id"),conn,1,1
- Do while not Rs1.bof and not Rs1.eof
- tagStr1=replace(tagStr1,"<span>"&Rs1("tagName")&"</span>","<span class=""active"">"&Rs1("tagName")&"</span>")
- Rs1.moveNext
- loop
- Rs1.Close
- response.write tagStr1
- %>
- </div>
- </div>
- <%
- Rs.MoveNext
- Loop
- %>
- <div colspan="9">
- <div class="showpagebox">
- </div>
- <div class="postchkbox">
- <select id="chkact" name="chkact">
- <%
- Set Rs2=Server.CreateObject("ADODB.RecordSet")
- Rs2.Open "select id,em_code,em_user from employee order by em_code asc",conn,1,1
- Do while Not Rs2.bof and Not Rs2.eof
- %>
- <option value="t<%=Rs2("id")%>">转给<%=Rs2("em_user")%>(<%=Rs2("em_code")%>)</option>
- <%
- Rs2.moveNext
- loop
- Rs2.close
- Set Rs2=Nothing
- %>
- </select>
- <input type="button" value="执行" onclick="postchk(1)" class="btn1">
- </div>
- </div>
- </div>
-
- <%Rs.Close:Set Rs=Nothing:Set Rs1=Nothing:Conn.Close:Set Conn=Nothing%>
- </div>
- </form>
- </body>
- </html>
|