Commit dab590e0 authored by agping's avatar agping

客户列表优化

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