Commit 37c41628 authored by agping's avatar agping

客户列表 客户跟进列表 加收藏

parent cb74827d
...@@ -357,6 +357,12 @@ ...@@ -357,6 +357,12 @@
.ld-Marheight-tags{ .ld-Marheight-tags{
margin-top: 20px; margin-top: 20px;
} }
/*收藏样式*/
#user_is_collect{
margin-left: 30px;
font-weight: 600;
cursor: pointer;
}
</style> </style>
<!--导航star--> <!--导航star-->
...@@ -722,6 +728,8 @@ ...@@ -722,6 +728,8 @@
<div class="user_up_con"> <div class="user_up_con">
<span id="user_up" class="ld-Marheight text-primary ld-Marheight">上一条客户</span> <span id="user_up" class="ld-Marheight text-primary ld-Marheight">上一条客户</span>
<span id="user_down" class="ld-Marheight text-primary ld-Marheight">下一条客户</span> <span id="user_down" class="ld-Marheight text-primary ld-Marheight">下一条客户</span>
<span id='user_is_collect' class='ld-Marheight text-primary'>收藏</span>
</div> </div>
</div> </div>
<div class="modal-body modal-body1"> <div class="modal-body modal-body1">
......
...@@ -332,6 +332,12 @@ ...@@ -332,6 +332,12 @@
.ld-Marheight-tags{ .ld-Marheight-tags{
margin-top: 20px; margin-top: 20px;
} }
/*收藏样式*/
#user_is_collect{
margin-left: 30px;
font-weight: 600;
cursor: pointer;
}
</style> </style>
<div id="page-content-wrapper"> <div id="page-content-wrapper">
<div class="container"> <div class="container">
...@@ -421,6 +427,7 @@ ...@@ -421,6 +427,7 @@
<div class="user_up_con"> <div class="user_up_con">
<span id="user_up" class="ld-Marheight text-primary">上一条客户</span> <span id="user_up" class="ld-Marheight text-primary">上一条客户</span>
<span id="user_down" class="ld-Marheight text-primary">下一条客户</span> <span id="user_down" class="ld-Marheight text-primary">下一条客户</span>
<span id='user_is_collect' class='ld-Marheight text-primary'>收藏</span>
</div> </div>
</div> </div>
<div class="modal-body modal-body1"> <div class="modal-body modal-body1">
......
...@@ -136,6 +136,44 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -136,6 +136,44 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
//自动筛选 区域 //自动筛选 区域
_doc.on('input', '#user_area_choose', function() { _doc.on('input', '#user_area_choose', function() {
user.getList(); user.getList();
});
//客户详情跟进 取消收藏
_doc.on('click', '#user_is_collect', function() {
if(!confirm('是否继续?')) {
return;
}
var params = {
};
var str = $.trim($(this).html());
if(str == "收藏") {
params.type = 1;
$(this).html('取消收藏');
} else if(str == "取消收藏") {
params.type = 2;
$(this).html('收藏');
} else {
params.type = 3;
};
checkLogin();
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({ //禁用
'type': 'POST',
'url': '/broker/addCollectUser',//客户收藏 取消收藏
data: {
"agents_id": user_info_obj.id,
"status": params.type,
"user_id": user.user_id,
"AuthToken": user_info_obj.AuthToken
},
dataType: "json",
success: function(data) {
if(data.code != 200) {
alert("禁用失败!")
}
}
});
}); });
//城市 区域 筛选 //城市 区域 筛选
_doc.on('input', '#user_city_add,#user_city_edit', function() { _doc.on('input', '#user_city_add,#user_city_edit', function() {
...@@ -1301,7 +1339,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -1301,7 +1339,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
'type': 'GET', 'type': 'GET',
'url': '/index/useraction_search', 'url': '/index/useraction_search',
data: { data: {
"user_id": user.user_id "user_id": user.user_id,
'agent_id':user_info_obj.id
}, },
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
...@@ -1326,6 +1365,12 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -1326,6 +1365,12 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$("#take_look_name").html(data.data.user_info.user_name); //约带看姓名 $("#take_look_name").html(data.data.user_info.user_name); //约带看姓名
$("#take_look_phone").html(data.data.user_info.user_phone); //约带看手机号 $("#take_look_phone").html(data.data.user_info.user_phone); //约带看手机号
$("#take_look_id").html(data.data.user_info.user_id); //约带看id $("#take_look_id").html(data.data.user_info.user_id); //约带看id
//收藏客户 取消收藏
if(data.data.user_info.is_collect == 2){
$('#user_is_collect').html('收藏');
}else{
$('#user_is_collect').html('取消收藏');
};
//vip客户 查看权限 //vip客户 查看权限
if(user.agent_id_call_vip*1 == 1){ if(user.agent_id_call_vip*1 == 1){
if(check_auth('auth_vip') || (user.agent_id_call*1 == user.agent_id_call_current*1) || (data.data.user_info.is_can_look == 0)){ if(check_auth('auth_vip') || (user.agent_id_call*1 == user.agent_id_call_current*1) || (data.data.user_info.is_can_look == 0)){
......
...@@ -280,6 +280,44 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -280,6 +280,44 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
_doc.on('click', '#look_shop_date', function() { _doc.on('click', '#look_shop_date', function() {
$('.datetimepicker').show(); $('.datetimepicker').show();
}); });
//客户详情跟进 取消收藏
_doc.on('click', '#user_is_collect', function() {
if(!confirm('是否继续?')) {
return;
}
var params = {
};
var str = $.trim($(this).html());
if(str == "收藏") {
params.type = 1;
$(this).html('取消收藏');
} else if(str == "取消收藏") {
params.type = 2;
$(this).html('收藏');
} else {
params.type = 3;
};
checkLogin();
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({ //禁用
'type': 'POST',
'url': '/broker/addCollectUser',//客户收藏 取消收藏
data: {
"agents_id": user_info_obj.id,
"status": params.type,
"user_id": user.user_id,
"AuthToken": user_info_obj.AuthToken
},
dataType: "json",
success: function(data) {
if(data.code != 200) {
alert("禁用失败!")
}
}
});
});
//上一页 获取客户详情 //上一页 获取客户详情
_doc.on('click', '#user_up', function() { _doc.on('click', '#user_up', function() {
user_type='last'; user_type='last';
...@@ -1534,7 +1572,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1534,7 +1572,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
'type': 'GET', 'type': 'GET',
'url': '/index/useraction_search', 'url': '/index/useraction_search',
data: { data: {
"user_id": user.user_id "user_id": user.user_id,
'agent_id':user_info_obj.id
}, },
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
...@@ -1561,6 +1600,12 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1561,6 +1600,12 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$("#take_look_name").html(data.data.user_info.user_name); //约带看姓名 $("#take_look_name").html(data.data.user_info.user_name); //约带看姓名
$("#take_look_phone").html(data.data.user_info.user_phone); //约带看手机号 $("#take_look_phone").html(data.data.user_info.user_phone); //约带看手机号
$("#take_look_id").html(data.data.user_info.user_id); //约带看id $("#take_look_id").html(data.data.user_info.user_id); //约带看id
//收藏客户 取消收藏
if(data.data.user_info.is_collect == 2){
$('#user_is_collect').html('收藏');
}else{
$('#user_is_collect').html('取消收藏');
};
//vip客户 查看权限 //vip客户 查看权限
if(user.agent_id_call_vip*1 == 1){ if(user.agent_id_call_vip*1 == 1){
if(check_auth('auth_vip') || (user.agent_id_call*1 == user.agent_id_call_current*1) || (data.data.user_info.is_can_look == 0)){ if(check_auth('auth_vip') || (user.agent_id_call*1 == user.agent_id_call_current*1) || (data.data.user_info.is_can_look == 0)){
......
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