Commit dab590e0 authored by agping's avatar agping

客户列表优化

parent 28209882
......@@ -393,7 +393,7 @@
display: none;
}
.ld-Marheight-tags{
margin-top: 20px;
margin-top: 12px;
}
/*收藏样式*/
#user_is_collect{
......
......@@ -61,6 +61,7 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
moreUser:0,//标识点击加载更多 还有没有数据
agent_id_phone:'',
isExitsNew:0,
isExitsNewInfo:1,
init: function() {
user.isExitsNew=0;
//汉化实现
......@@ -134,10 +135,7 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
user.pageNoUser=1;
user.getGenjincon();
user.getUserLogNew();//客户详情获取最近一条带看动态
$('.user-log-more').show();//显示加载更多
// user.getGenjinLabel();
_doc.delegate(".caozuo-yue", "click", function() {
//约带看初始化
$('#look_shop_date').val('');
......@@ -209,6 +207,7 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
e.preventDefault();
e.stopPropagation();
user.moreUser=1;
user.isExitsNewInfo=0;
user.getGenjincon(user.pageNoUser++)
});
......@@ -630,10 +629,8 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
user.detailTabIndexFollow = _this.index();
$('.follow-up-modal-list-area:nth-of-type('+(user.detailTabIndexFollow+1)+')').show().siblings().hide();
if(user.detailTabIndexFollow){
$('.user-log-more').hide();
user.getUserLog(2)//获取带看记录
}else{
$('.user-log-more').show();
user.pageNoUser=1;
$('#caozuo_table2').html('');
user.isExitsNew=0
......@@ -1084,7 +1081,6 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
},
// 客户详情页面 编辑和客户详情共用
Caozuo: function() {
console.log(user.isExitsNew);
//获取跟进详情的数据
//隐藏拨打电话 如果客户在保护期 并且客户不是我的
if((user_info_obj.id*1 == user.agentbaohu*1) || user.baohu*1){
......@@ -1092,7 +1088,6 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
}else{
$('.user_call').hide();
};
// checkLogin();
$.ajax({
'type': 'GET',
'url': '/index/userDetail',
......@@ -1348,9 +1343,9 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
},
getGenjincon: function() {//获取客户动态(客户详情)
if(user.isExitsNew == 1){
user.getGenjincontwo();
user.getGenjincontwo();
}else{
$('.is-show-more-followlog').show();
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({
url:'/index/followUpLogNew',
......@@ -1360,20 +1355,13 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
"AuthToken": user_info_obj.AuthToken,
"user_id": user.user_id,
"page_no": user.pageNoUser,
"page_size": 30,
"page_size": 3,
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
// if(data.data.length == 30){
// $('.is-show-more-followlog').show();
// }else{
// $('.is-show-more-followlog').hide();
//
// };
//客户动态 即跟进
var caozuo_table = "";
$.each(data['data'], function(i, item) {
......@@ -1421,19 +1409,18 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
"AuthToken": user_info_obj.AuthToken,
"user_id": user.user_id,
"page_no": user.pageNoUser,
"page_size": 30,
"page_size": 3,
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
// if(data.data.length == 30){
// $('.is-show-more-followlog').show();
// }else{
// $('.is-show-more-followlog').hide();
//
// };
if(data.data.length == 3){
$('.is-show-more-followlog').show();
}else{
$('.is-show-more-followlog').hide();
};
//客户动态 即跟进
var caozuo_table = "";
......@@ -1461,17 +1448,12 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
// $('.follow-up-modal-list-area').scrollTop(0);
}else{
alert('暂无跟进信息!!!');
// if(user.pageNoUser==1){
// $("#caozuo_table2").html('暂无跟进信息');
// $('.is-show-more-followlog').hide();
// };
// if(user.moreUser){
// alert('暂无跟进信息!!!');
// user.moreUser=0;
// };
//点击加载更多 没有数据时 隐藏加载更多
$('.is-show-more-followlog').hide();
//如果第一次 进来 没有数据 表格显示暂无跟进信息
if(user.isExitsNewInfo==1){
$("#caozuo_table2").html('暂无跟进信息!!!');
}
}
}
});
......
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