Commit 148e3f13 authored by agping's avatar agping

收藏客户修改

parent 52ef868a
...@@ -132,7 +132,7 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home ...@@ -132,7 +132,7 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
if(data.code != 200) { if(data.code != 200) {
alert("禁用失败!") alert(data.msg)
} }
} }
}); });
......
...@@ -163,10 +163,14 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -163,10 +163,14 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$(this).parent().remove(); $(this).parent().remove();
}); });
//收藏 取消收藏 //收藏 取消收藏
$(document).delegate(".is_show", "click", function() { //点击禁用 $(document).delegate(".is_show", "click", function() { //点击收藏 取消收藏
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
user.baohu = $(this).attr("data-baohu");
user.agentbaohu = $(this).attr("data-agent");
if(!confirm('是否继续?')) { if(!confirm('是否继续?')) {
return; return;
} }
if((user_info_obj.id*1 == user.agentbaohu*1) || user.baohu*1){
user.id = $(this).attr("data-id"); user.id = $(this).attr("data-id");
var params = { var params = {
...@@ -184,6 +188,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -184,6 +188,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
} else { } else {
params.type = 3; params.type = 3;
}; };
}else{
alert('该客户在保护期内,暂不能收藏');
return;
}
checkLogin(); checkLogin();
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({ //禁用 $.ajax({ //禁用
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<td width="16%"> <td width="16%">
[% if((check_auth('auth_vip') && it[item]['vip']*1) || (it[item]['agent_id']*1 == 0) || (it[item]['agent_id']*1 == it[item]['current_agent_id']*1) || (check_auth('index/useraction_search') && it[item]['vip']*1 == 0)) { %] [% if((check_auth('auth_vip') && it[item]['vip']*1) || (it[item]['agent_id']*1 == 0) || (it[item]['agent_id']*1 == it[item]['current_agent_id']*1) || (check_auth('index/useraction_search') && it[item]['vip']*1 == 0)) { %]
<a class="btn1 caozuo genj_ure caozuo-add-color [%= getLoaclId(it[item]['id']) %]" href="#modal-record" data-toggle="modal" data-phone='[%= it[item]["user_phone"] %]' data-id='[%= it[item]["id"] %]' data-baohu='[%= it[item]["is_outstrip_twenty_four_hours"] %]' data-agent='[%= it[item]["agent_id"] %]'>详情/跟进</a>&nbsp; <a class="btn1 caozuo genj_ure caozuo-add-color [%= getLoaclId(it[item]['id']) %]" href="#modal-record" data-toggle="modal" data-phone='[%= it[item]["user_phone"] %]' data-id='[%= it[item]["id"] %]' data-baohu='[%= it[item]["is_outstrip_twenty_four_hours"] %]' data-agent='[%= it[item]["agent_id"] %]'>详情/跟进</a>&nbsp;
<a class="btn1 is_show [%= sw(it[item]['is_collect']) %]" data-id='[%= it[item]["id"] %]' data-cid='[%= it[item]["is_collect"] %]'> <a class="btn1 is_show [%= sw(it[item]['is_collect']) %]" data-id='[%= it[item]["id"] %]' data-cid='[%= it[item]["is_collect"] %]' data-baohu='[%= it[item]["is_outstrip_twenty_four_hours"] %]' data-agent='[%= it[item]["agent_id"] %]'>
[% if(it[item]["is_collect"] == 2) { %] [% if(it[item]["is_collect"] == 2) { %]
收藏 收藏
[% }else if(it[item]["is_collect"] == 1 ) { %] [% }else if(it[item]["is_collect"] == 1 ) { %]
......
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