Commit d0bcb4c2 authored by zw's avatar zw

Merge branch 'test'

parents 6041f1bf 6798d511
......@@ -219,7 +219,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$('.modal-title-genjing-con>span:nth-of-type(1)').addClass('text-info').siblings().removeClass('text-info');
//初始化客户动态 带看动态两个表格切换
$('.follow-up-modal-list-area:nth-of-type(1)').show().siblings().hide();
user.getInfor();
user.getInforNew();
});
//下一页 获取客户详情
_doc.on('click', '#user_down', function() {
......@@ -228,7 +228,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$('.modal-title-genjing-con>span:nth-of-type(1)').addClass('text-info').siblings().removeClass('text-info');
//初始化客户动态 带看动态两个表格切换
$('.follow-up-modal-list-area:nth-of-type(1)').show().siblings().hide();
user.getInfor();
user.getInforNew();
});
//客户列表 收藏夹
_doc.on('click', '.user-favorites', function() {
......@@ -325,7 +325,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
//客户列表操作
$(document).delegate(".caozuo", "click", function() { //点击操作跟进详情
var _$this = $(this);
$('#modal-record iframe').attr('src', '/index/userModalList?data=' + _$this.attr('data-item') + '&id=' + _$this.attr('data-id'));
$('#modal-record iframe').attr('src', '/index/userModalList?data=' + _$this.attr('data-item') + '&idindex=' + _$this.attr('data-index') + '&id=' + _$this.attr('data-id'));
});
//查看弹出框里的tab点击事件,客户动态 带看动态
_doc.on('click', '.modal-title-genjing-con>span', function(e){
......@@ -1620,6 +1620,12 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
var doTtmpl = doT.template(temp);
$("#follow_list").html(doTtmpl(data.data.data.list));
$('[href="#modal-record"]').each(function(i, v){
$(v).attr('data-index', i);
});
localStorage.setItem('pc_user_current_list', JSON.stringify(data.data.data.list));
/*分页代码*/
add_page(data.data.data.total,pageNo,user.pageSize,user.getList);
......@@ -1894,6 +1900,9 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}
});
},
getInforNew: function() {
console.log(user_type);
},
getInfor: function(params) {
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var params={};
......
......@@ -249,7 +249,7 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css', 'c
// user.user_id = $(this).attr("data-id");
// user.getGenjinLabel();
var _$this = $(this);
$('#modal-record iframe').attr('src', '/index/userModalList?data=' + _$this.attr('data-item') + '&id=' + _$this.attr('data-id')).show();
$('#modal-record iframe').attr('src', '/index/userModalList?data=' + _$this.attr('data-item') + '&idindex=' + _$this.attr('data-index') + '&id=' + _$this.attr('data-id'));
});
$(document).delegate(".add_alert", "click", function() { //重置搜索
......@@ -1348,6 +1348,14 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css', 'c
var temp = document.getElementById ('callPhone_list_tpl').innerHTML;
var doTtmpl = doT.template (temp);
$ ("#callPhone_list").html (doTtmpl (data.data.list));
$('[href="#modal-record"]').each(function(i, v){
$(v).attr('data-index', i);
});
localStorage.setItem('pc_user_current_list', JSON.stringify(data.data.list));
/*分页代码*/
add_page(data.data.total,pageNo,user.pageSize,user.getList);
},
......
......@@ -243,7 +243,7 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
// user.user_id = $(this).attr("data-id");
// user.getGenjinLabel();
var _$this = $(this);
$('#modal-record iframe').attr('src', '/index/userModalList?data=' + _$this.attr('data-item') + '&id=' + _$this.attr('data-id')).show();
$('#modal-record iframe').attr('src', '/index/userModalList?data=' + _$this.attr('data-item') + '&idindex=' + _$this.attr('data-index') + '&id=' + _$this.attr('data-id'));
});
$(document).delegate(".add_alert", "click", function() { //重置搜索
......@@ -1461,6 +1461,13 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
var temp = document.getElementById ('my_collection_user_list_tpl').innerHTML;
var doTtmpl = doT.template (temp);
$ ("#label_list").html (doTtmpl (data.data.user_date));
$('[href="#modal-record"]').each(function(i, v){
$(v).attr('data-index', i);
});
localStorage.setItem('pc_user_current_list', JSON.stringify(data.data.user_date));
/*分页代码*/
add_page(data.data.total,pageNo,user.pageSize,user.getList);
}
......
......@@ -22,8 +22,8 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
is_outpace_call_num = 1;//拨打电话0:未超过限制 1:超过限制
var cus_obj = JSON.parse(getUrlParam('data'));
console.log(parent.location.pathname);
var idIndex = getUrlParam('idindex');
var _tempUrl = parent.location.pathname;
if((_tempUrl === '/index/users_list') || (_tempUrl === '/index/RemarkFollowList')){
......@@ -309,7 +309,7 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
if(_tempUrl === '/index/users_list'){
user.getInfor();
}else if(_tempUrl === '/index/RemarkFollowList'){
user.getInfor2();
user.getInforNew();
}else{}
});
//下一页 获取客户详情
......@@ -322,7 +322,7 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
if(_tempUrl === '/index/users_list'){
user.getInfor();
}else if(_tempUrl === '/index/RemarkFollowList'){
user.getInfor2();
user.getInforNew();
}else{}
});
......@@ -1083,11 +1083,11 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
Caozuo: function() {
//获取跟进详情的数据
//隐藏拨打电话 如果客户在保护期 并且客户不是我的
if((user_info_obj.id*1 == user.agentbaohu*1) || user.baohu*1){
$('.user_call').show();
}else{
$('.user_call').hide();
};
// if((user_info_obj.id*1 == user.agentbaohu*1) || user.baohu*1){
// $('.user_call').show();
// }else{
// $('.user_call').hide();
// };
$.ajax({
'type': 'GET',
'url': '/index/userDetail',
......@@ -1141,13 +1141,11 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
}else{
$('#user_is_collect').html('取消收藏');
};
//vip客户 查看权限
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.is_can_look == 0)){
$('.user_call').show();
}else{
//拨打电话显示 隐藏
if(data.data.is_outpace_call_num*1 == 1){
$('.user_call').hide();
};
}else{
$('.user_call').show();
};
//获取 站点城市(编辑)
data.data.user_info['site_ids'] && $.each($('.roomTagEdit'), function(i, item) {
......@@ -1459,6 +1457,32 @@ define(['doT', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'bootstrapJs']
}
});
},
getInforNew: function() {
if(user_type == 'next'){
++idIndex;
}else{
--idIndex;
};
console.log(idIndex);
if(idIndex>14){
alert('请翻页');
idIndex = 14;
return false;
}else if(idIndex<0){
alert('请翻页');
idIndex = 0;
return false;
}else{
var _tempListObj = JSON.parse(localStorage.getItem('pc_user_current_list'));
var _tempUserId = _tempListObj[idIndex].user_id;
if(_tempUrl === '/index/users_list'){
_tempUserId = _tempListObj[idIndex].id;
};
var aa = location.origin + location.pathname + '?data=' + JSON.stringify(_tempListObj[idIndex]) + '&idindex='+ idIndex +'&id=' +_tempUserId;
location.replace(aa);
}
},
getInfor: function(params) {//上一页 下一页 调用接口
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var params={};
......
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