Commit ea0d6a9e authored by xishifeng's avatar xishifeng

1

parent 003302a7
...@@ -47,9 +47,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -47,9 +47,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
agent_id_phone:'', agent_id_phone:'',
pageNoUser:1,//客户详情 客户动态初始化分页 pageNoUser:1,//客户详情 客户动态初始化分页
moreUser:0,//标识点击加载更多 还有没有数据 moreUser:0,//标识点击加载更多 还有没有数据
isExitsNew:0,
isTaday:1,
init: function() { init: function() {
//初始化dot //初始化dot
$("body").append(template); $("body").append(template);
...@@ -268,11 +265,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -268,11 +265,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
} }
user.delete_user(params); user.delete_user(params);
}); });
$(document).delegate(".genj_ure", "click", function() {
user.user_id = $(this).attr("data-id");
// checkLogin();
user.getGenjinLabel();
});
$(document).delegate(".add_alert", "click", function() { $(document).delegate(".add_alert", "click", function() {
document.getElementById("add_user_form").reset(); document.getElementById("add_user_form").reset();
...@@ -316,38 +308,9 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -316,38 +308,9 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}); });
//客户列表操作 //客户列表操作
$(document).delegate(".cao-zuo-record", "click", function() { //点击操作跟进详情 $(document).delegate(".caozuo", "click", function() { //点击操作跟进详情
user.isExitsNew=0; var _$this = $(this);
user.user_id = $(this).attr("data-id"); $('#modal-record iframe').attr('src', '/index/userModalList?data=' + _$this.attr('data-item') + '&id=' + _$this.attr('data-id'));
user.user_phone = $(this).attr("data-phone");
user.baohu = $(this).attr("data-baohu");
user.agent_id_infor = $(this).attr("data-agentId");
user.remark_id = $(this).attr("data-remark");
//隐藏拨打电话 相关
user.agent_id_call=$(this).attr("data-agentId");
user.agent_id_call_vip=$(this).attr("data-vip");
$('.call-user-five').html('');
$('.detail-modal-body-sec-2').show();
$('#take_look_name').html($(this).attr("data-name"));
$('#take_look_phone').html($(this).attr("data-phone"));
$('#take_look_id').html($(this).attr("data-id"));
$('#look_shop_date').val('');
$('#note_look').val('');
$('.look-shop').val('');
$('.look-shop').removeAttr('data-id');
//点击客户详情 初始化客户动态 带看动态
$('.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();
$('.detail-modal-header-tab>a:nth-of-type(1)').removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
user.detailTabIndex = 0;
$('.detail-modal-body-sec:nth-of-type(1)').show().siblings().hide();
$('.followup-modal-comment-area>textarea').val('');//清空跟进框内容
// checkLogin();
user.getSiteTagsEdit();
user.getUserLogNew();//客户详情获取最近一条带看动态
$('.user-log-more').show();//显示加载更多
}); });
//查看弹出框里的tab点击事件,客户动态 带看动态 //查看弹出框里的tab点击事件,客户动态 带看动态
_doc.on('click', '.modal-title-genjing-con>span', function(e){ _doc.on('click', '.modal-title-genjing-con>span', function(e){
...@@ -364,7 +327,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -364,7 +327,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$('.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()//获取客户动态
} }
}); });
...@@ -464,7 +426,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -464,7 +426,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
user.Caozuo(); user.Caozuo();
user.pageNoUser=1; user.pageNoUser=1;
$('#caozuo_table2').html(''); $('#caozuo_table2').html('');
user.isExitsNew=0;
user.getGenjincon(); user.getGenjincon();
} }
}); });
...@@ -684,7 +645,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -684,7 +645,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
_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 {
...@@ -732,7 +692,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -732,7 +692,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
_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']);
...@@ -1342,7 +1301,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -1342,7 +1301,6 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
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('');
// $("#modal-record").modal('hide'); // $("#modal-record").modal('hide');
...@@ -1602,29 +1560,12 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css' ...@@ -1602,29 +1560,12 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
} }
params.user_id = $.trim($("#customer_name_id").val());//区域 params.user_id = $.trim($("#customer_name_id").val());//区域
// params.disc = $.trim($("#user_area_choose").val());//区域 // params.disc = $.trim($("#user_area_choose").val());//区域
if(user.isTaday){ _startDateObj.val() != '' && (params.start_date = _startDateObj.val());
var myDate = new Date(); _endDateObj.val() != '' && (params.end_date = _endDateObj.val());
var y = myDate.getFullYear(); $.trim(_customerNameObj.val()) != '' && (params.customer = $.trim(_customerNameObj.val()));
var m = myDate.getMonth() + 1; $.trim(_customerPhoneObj.val()) != '' && (params.phone = $.trim(_customerPhoneObj.val()));
var d = myDate.getDate(); $.trim(_followContentObj.val()) != '' && (params.content = $.trim(_followContentObj.val()));
var day_end = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d); if(!$('#start_date').val() || !$('#end_date').val()){
params.start_date = day_end;
params.end_date = day_end;
}else{
params.start_date = _startDateObj.val();
params.end_date = _endDateObj.val();
var time_=getTimeStamp(getBeforeDate(1));
if(getTimeStamp(params.end_date) > time_){
alert('选择的时间不能大于等于今天!!!');
return;
}
};
params.customer = $.trim(_customerNameObj.val());
params.phone = $.trim(_customerPhoneObj.val());
params.content = $.trim(_followContentObj.val());
if(!params.start_date || !params.end_date){
alert('请您选择跟进时间!'); alert('请您选择跟进时间!');
return; return;
}; };
......
...@@ -246,10 +246,10 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css', 'c ...@@ -246,10 +246,10 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css', 'c
user.delete_user(params); user.delete_user(params);
}); });
$(document).delegate(".genj_ure", "click", function() { $(document).delegate(".genj_ure", "click", function() {
// user.user_id = $(this).attr("data-id"); user.user_id = $(this).attr("data-id");
// user.getGenjinLabel(); // $("#genj_text").val('');
var _$this = $(this); // $("input[name = 'user_status']:checked").removeAttr("checked");
$('#modal-record iframe').attr('src', '/index/userModalList?data=' + _$this.attr('data-item') + '&id=' + _$this.attr('data-id') + '&type=1').show(); user.getGenjinLabel();
}); });
$(document).delegate(".add_alert", "click", function() { //重置搜索 $(document).delegate(".add_alert", "click", function() { //重置搜索
...@@ -286,7 +286,7 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css', 'c ...@@ -286,7 +286,7 @@ define(['doT', 'text!temp/callPhone_template_tpl.html', 'css!style/home.css', 'c
}); });
//客户列表操作 //客户列表操作
$(document).delegate(".cao-zuo-record", "click", function() { //点击操作跟进详情 $(document).delegate(".caozuo", "click", function() { //点击操作跟进详情
user.user_id = $(this).attr("data-id"); user.user_id = $(this).attr("data-id");
console.log(user.user_id); console.log(user.user_id);
if(user.user_id== 'null'){ if(user.user_id== 'null'){
......
...@@ -240,10 +240,10 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home ...@@ -240,10 +240,10 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
user.delete_user(params); user.delete_user(params);
}); });
$(document).delegate(".genj_ure", "click", function() { $(document).delegate(".genj_ure", "click", function() {
// user.user_id = $(this).attr("data-id"); user.user_id = $(this).attr("data-id");
// user.getGenjinLabel(); // $("#genj_text").val('');
var _$this = $(this); // $("input[name = 'user_status']:checked").removeAttr("checked");
$('#modal-record iframe').attr('src', '/index/userModalList?data=' + _$this.attr('data-item') + '&id=' + _$this.attr('data-id') + '&type=1').show(); user.getGenjinLabel();
}); });
$(document).delegate(".add_alert", "click", function() { //重置搜索 $(document).delegate(".add_alert", "click", function() { //重置搜索
...@@ -285,7 +285,7 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home ...@@ -285,7 +285,7 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
}); });
//客户列表操作 //客户列表操作
$(document).delegate(".cao-zuo-record", "click", function() { //点击操作跟进详情 $(document).delegate(".caozuo", "click", function() { //点击操作跟进详情
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");
......
...@@ -53,10 +53,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -53,10 +53,8 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
agent_id_call_vip:"", agent_id_call_vip:"",
pageNoUser:1,//客户详情 客户动态初始化分页 pageNoUser:1,//客户详情 客户动态初始化分页
moreUser:0,//标识点击加载更多 还有没有数据 moreUser:0,//标识点击加载更多 还有没有数据
isExitsNew:0,
agent_id_phone:'',
init: function() { init: function() {
user.isExitsNew=0;
//初始化dot //初始化dot
$("body").append(template); $("body").append(template);
//初始化城市 区域筛选 //初始化城市 区域筛选
...@@ -179,42 +177,12 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -179,42 +177,12 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
e.stopPropagation(); e.stopPropagation();
$(this).parent().remove(); $(this).parent().remove();
}); });
//客户详情 关联客户
_doc.on('click', '.save-relational', function(e) {
e.preventDefault();
e.stopPropagation();
user.addRelational()
});
//客户详情 解除关联客户
_doc.on('click', '.del-relational', function(e) {
e.preventDefault();
e.stopPropagation();
var id_=$(this).attr("data-id");
user.delRelational(id_);
});
//客户列表 关联记录
_doc.on('click', '.relationalRecord', function(e) {
e.preventDefault();
e.stopPropagation();
var id_=$(this).attr("data-id");
user.relationalRecord(id_);
});
//点击客户详情 添加关联客户
_doc.on('click', '#user_add_relational', function(e) {
e.preventDefault();
e.stopPropagation();
$('#partical_name').val('');
user.agent_id_phone='';
});
//客户动态 加载更多 //客户动态 加载更多
_doc.on('click', '.user-log-more', function(e) { _doc.on('click', '.user-log-more', function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
user.moreUser=1; user.moreUser=1;
user.getGenjincon(user.pageNoUser++) user.getGenjincon(user.pageNoUser++)
}); });
//点击 无效 //点击 无效
...@@ -506,9 +474,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -506,9 +474,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}); });
//客户列表操作 //客户列表操作
$(document).delegate(".cao-zuo-record", "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");
...@@ -639,7 +605,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -639,7 +605,6 @@ 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();
} }
}); });
...@@ -658,7 +623,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -658,7 +623,6 @@ 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()//获取客户动态
} }
}); });
...@@ -868,7 +832,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -868,7 +832,6 @@ 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 {
...@@ -917,7 +880,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -917,7 +880,6 @@ 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']);
...@@ -1602,7 +1564,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1602,7 +1564,6 @@ 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 {
...@@ -1697,14 +1658,14 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -1697,14 +1658,14 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
$("#take_look_phone").html(data.data.user_info.user_phone); //约带看手机号 $("#take_look_phone").html(data.data.user_info.user_phone); //约带看手机号
$("#take_look_id").html(data.data.user_info.user_id); //约带看id $("#take_look_id").html(data.data.user_info.user_id); //约带看id
//收藏客户 取消收藏 //收藏客户 取消收藏
if(data.data.is_collect == 2){ if(data.data.user_info.is_collect == 2){
$('#user_is_collect').html('收藏'); $('#user_is_collect').html('收藏');
}else{ }else{
$('#user_is_collect').html('取消收藏'); $('#user_is_collect').html('取消收藏');
}; };
//vip客户 查看权限 //vip客户 查看权限
if(user.agent_id_call_vip*1 == 1){ 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)){ if(check_auth('auth_vip') || (user.agent_id_call*1 == user.agent_id_call_current*1) || (data.data.user_info.is_can_look == 0)){
$('.user_call').show(); $('.user_call').show();
}else{ }else{
$('.user_call').hide(); $('.user_call').hide();
...@@ -2267,7 +2228,6 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -2267,7 +2228,6 @@ 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;
...@@ -2307,14 +2267,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -2307,14 +2267,10 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}); });
}, },
getGenjincon: function() {//获取客户动态(客户详情) getGenjincon: function() {//获取客户动态(客户详情)
if(user.isExitsNew == 1){
user.getGenjincontwo();
}else{
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// checkLogin(); // checkLogin();
$.ajax({ $.ajax({
url:'/index/followUpLogNew', url:'/index/followUpLog',
type: 'GET', type: 'GET',
async: true, async: true,
data: { data: {
...@@ -2328,12 +2284,12 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -2328,12 +2284,12 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
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 == 30){
// $('.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 = "";
...@@ -2361,77 +2317,14 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -2361,77 +2317,14 @@ 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; if(user.pageNoUser==1){
//数据为空 num 置1
user.pageNoUser=1;
user.getGenjincontwo();
}
}
});
}
},
getGenjincontwo: function() {//获取客户动态(客户详情)
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({
url:'/index/followUpLog',
type: 'GET',
async: true,
data: {
"AuthToken": user_info_obj.AuthToken,
"user_id": user.user_id,
"page_no": user.pageNoUser,
"page_size": 30,
},
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) {
if(item.user_status*1){
var user_status = '【已租】'
}else{
var user_status = '【求租】'
};
if(item.type*1){
var follow_status = '跟进:'
}else{
var follow_status = '电话跟进:'
};
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + follow_status + dealPunctuation(item.content) + user_status +'</td><td>' + item.name + '</td><td>' + item.create_time +'</td></tr>';
});
if(caozuo_table){
$("#caozuo_table2").append(caozuo_table);
}else{
$("#caozuo_table2").html('暂无跟进信息'); $("#caozuo_table2").html('暂无跟进信息');
$('.is-show-more-followlog').hide();
} }
//滚动条 回到顶部 if(user.moreUser){
// $('.follow-up-modal-list-area').scrollTop(0); alert('暂无跟进信息!!!');
user.moreUser=0;
}else{ };
alert('暂无跟进信息!!!');
// if(user.pageNoUser==1){
// $("#caozuo_table2").html('暂无跟进信息');
// $('.is-show-more-followlog').hide();
// };
// if(user.moreUser){
// alert('暂无跟进信息!!!');
// user.moreUser=0;
// };
} }
} }
...@@ -2571,41 +2464,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind ...@@ -2571,41 +2464,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
} }
}); });
}, },
//跟进人 姓名搜索
search_phone_liu: function() { //手机号新增客户
$.ajax({
url: '/broker/searchUser',
type: 'GET',
async: true,
data: {
"AuthToken": user_info_obj.AuthToken,
'id' : $("#partical_name").val()
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul = "";
$.each(data.data.user_date, function(i, item) {
user_ul += '<li class="addphoneliu" data-id="' + item.user_id + '">' + item.user_name + '-' + item.user_id + '-' + item.user_phone + '</li>';
});
$(".user-ul-liu").html(user_ul);
} else {
alert(data.msg);
}
}
});
},
//将li里的值 赋给input(分佣方姓名)
addphoneliu: function(obj) {//新增客户 input赋值
var user_ht = $(obj).html()+'';
var user_ht_str=user_ht.substring(0,user_ht.length-3);
$("#partical_name").val(user_ht_str);
$(".user-ul-liu").html('');
user.agent_id_phone = $(obj).attr("data-id");
},
}; };
return user; return user;
}); });
......
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