Commit e538706f authored by agping's avatar agping

重置

parent 02a4abf1
...@@ -478,6 +478,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -478,6 +478,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}); });
//客户列表操作 //客户列表操作
$(document).delegate(".caozuo", "click", function() { //点击操作跟进详情 $(document).delegate(".caozuo", "click", function() { //点击操作跟进详情
//重置客户动态 全局变量
user.isExitsNew=0;
user.user_id = $(this).attr("data-id"); user.user_id = $(this).attr("data-id");
user.user_phone = $(this).attr("data-phone"); user.user_phone = $(this).attr("data-phone");
user.agent_id_infor = $(this).attr("data-agentId"); user.agent_id_infor = $(this).attr("data-agentId");
...@@ -608,6 +610,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -608,6 +610,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
user.Caozuo(); user.Caozuo();
user.pageNoUser=1; user.pageNoUser=1;
$('#caozuo_table2').html(''); $('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon(); user.getGenjincon();
} }
}); });
...@@ -626,6 +629,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -626,6 +629,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$('.user-log-more').show(); $('.user-log-more').show();
user.pageNoUser=1; user.pageNoUser=1;
$('#caozuo_table2').html(''); $('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon()//获取客户动态 user.getGenjincon()//获取客户动态
} }
}); });
...@@ -835,6 +839,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -835,6 +839,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
_btnSave.css('display','block'); _btnSave.css('display','block');
user.pageNoUser=1; user.pageNoUser=1;
$('#caozuo_table2').html(''); $('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon(); user.getGenjincon();
}; };
}else { }else {
...@@ -883,6 +888,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -883,6 +888,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
_genjinModal.hide(); _genjinModal.hide();
user.pageNoUser=1; user.pageNoUser=1;
$('#caozuo_table2').html(''); $('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon(); user.getGenjincon();
}else { }else {
layerTipsX(data['msg']); layerTipsX(data['msg']);
...@@ -1567,6 +1573,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1567,6 +1573,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
alert('修改成功'); alert('修改成功');
user.pageNoUser=1; user.pageNoUser=1;
$('#caozuo_table2').html(''); $('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon(); user.getGenjincon();
$('#genj_text').val(''); $('#genj_text').val('');
} else { } else {
...@@ -2231,6 +2238,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -2231,6 +2238,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
user.getUserLogNew(); user.getUserLogNew();
user.pageNoUser=1; user.pageNoUser=1;
$('#caozuo_table2').html(''); $('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon(); user.getGenjincon();
if(data.data.user_id==data.data.max_user_id){ if(data.data.user_id==data.data.max_user_id){
user.user_id=data.data.max_user_id-1; user.user_id=data.data.max_user_id-1;
...@@ -2270,13 +2278,11 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -2270,13 +2278,11 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}); });
}, },
getGenjincon: function() {//获取客户动态(客户详情) getGenjincon: function() {//获取客户动态(客户详情)
console.log(user.isExitsNew);
if(user.isExitsNew == 1){ if(user.isExitsNew == 1){
user.getGenjincontwo(); user.getGenjincontwo();
}else{ }else{
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// checkLogin();
$.ajax({ $.ajax({
url:'/index/followUpLogNew', url:'/index/followUpLogNew',
type: 'GET', type: 'GET',
...@@ -2325,7 +2331,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -2325,7 +2331,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
// $('.follow-up-modal-list-area').scrollTop(0); // $('.follow-up-modal-list-area').scrollTop(0);
}else{ }else{
user.isExitsNew = 1; user.isExitsNew = 1;
//数据为空 num 置1 //数据为空 num 置1
user.pageNoUser=1; user.pageNoUser=1;
user.getGenjincontwo(); user.getGenjincontwo();
...@@ -2338,7 +2344,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -2338,7 +2344,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
getGenjincontwo: function() {//获取客户动态(客户详情) getGenjincontwo: function() {//获取客户动态(客户详情)
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// checkLogin();
$.ajax({ $.ajax({
url:'/index/followUpLog', url:'/index/followUpLog',
type: 'GET', type: 'GET',
......
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