Commit 4f816908 authored by agping's avatar agping

客户跟进列表 显示橙色 同步客户列表

parent 841b134c
......@@ -298,7 +298,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
});
// 点击缓存
$(document).delegate(".caozuo-add-color", "click", function() { //点击操作跟进详情
user.user_id = $(this).attr("data-id");
user.remark_id = $(this).attr("data-remark");
$(this).removeClass('btn-success');
$(this).addClass('btn-warning');
//数组去重 的方法
......@@ -311,14 +311,14 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}
return hash;
}
if(JSON.parse(localStorage.getItem('id_details_str')) == null){
if(JSON.parse(localStorage.getItem('id_details_str_remark')) == null){
var id_details_arr=[];
id_details_arr.push(user.user_id);
localStorage.setItem('id_details_str',JSON.stringify(id_details_arr));
id_details_arr.push(user.remark_id);
localStorage.setItem('id_details_str_remark',JSON.stringify(id_details_arr));
}else{
var id_details_arr=JSON.parse(localStorage.getItem('id_details_str'));
id_details_arr.push(user.user_id);
localStorage.setItem('id_details_str',JSON.stringify(unique1(id_details_arr)));
var id_details_arr=JSON.parse(localStorage.getItem('id_details_str_remark'));
id_details_arr.push(user.remark_id);
localStorage.setItem('id_details_str_remark',JSON.stringify(unique1(id_details_arr)));
}
});
......
......@@ -249,7 +249,7 @@ function hideStr(str){
return str;
}
//判断数组里有没有 某个字段 返回类名
//判断数组里有没有 某个字段 返回类名 客户列表
function getLoaclId(id){
var tempArr = JSON.parse(localStorage.getItem('id_details_str'));
if(tempArr == null){
......@@ -258,6 +258,17 @@ function hideStr(str){
var _index = tempArr.indexOf(String(id));
return _index>=0?'btn-warning':'btn-success';
}}
//判断数组里有没有 某个字段 返回类名 客户跟进列表
function getLoaclRemarkId(id){
var tempArr = JSON.parse(localStorage.getItem('id_details_str_remark'));
if(tempArr == null){
return 'btn-success';
}else{
var _index = tempArr.indexOf(String(id));
return _index>=0?'btn-warning':'btn-success';
}}
//处理url信息,改为当前域名的协议
function urlDeal(urlStr, httpStr) {
//处理
......
......@@ -33,7 +33,7 @@
<td width="16%">
[% if((check_auth('auth_vip') && it[item]['vip']*1) || (it[item]['agent_id']*1 == 0) || (it[item]['agent_id']*1 == user_info_obj.id*1) || (check_auth('index/useraction_search') && it[item]['vip']*1 == 0)) { %]
<a class="btn1 caozuo genj_ure btn-success" href="#modal-record" data-toggle="modal" data-phone='[%= it[item]["user_phone"] %]' data-id='[%= it[item]["user_id"] %]' data-agentId='[%= it[item]["agent_id"] %]' data-name='[%= it[item]["user_name"] %]' data-baohu='[%= it[item]["is_outstrip_twenty_four_hours"] %]' data-remark='[%= it[item]["id"] %]'>详情/跟进</a>&nbsp;
<a class="btn1 caozuo genj_ure caozuo-add-color [%= getLoaclRemarkId(it[item]['id']) %]" href="#modal-record" data-toggle="modal" data-phone='[%= it[item]["user_phone"] %]' data-id='[%= it[item]["user_id"] %]' data-agentId='[%= it[item]["agent_id"] %]' data-name='[%= it[item]["user_name"] %]' data-baohu='[%= it[item]["is_outstrip_twenty_four_hours"] %]' data-remark='[%= it[item]["id"] %]'>详情/跟进</a>&nbsp;
[% if(it[item]['agent_id'] == it[item]['current_agent_id'] || check_auth('index/pcEditClient')) { %]
<a class="btn1 btn-success caozuo" href="#modal-record-edit" data-toggle="modal" data-phone='[%= it[item]["user_phone"] %]' data-id='[%= it[item]["user_id"] %]'>客户编辑</a>&nbsp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment