Commit 46c179c5 authored by agping's avatar agping

客户跟进列表

parent 643665d2
......@@ -458,7 +458,7 @@
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
<button type="button" class="btn btn-primary del-record" style="margin: 6px;">清空解绑设备记录</button>
<!--<button type="button" class="btn btn-primary del-record" style="margin: 6px;">清空解绑设备记录</button>-->
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
......
......@@ -59,7 +59,7 @@
</li>
</div>
<div class="panel-body">
<div class="table-responsive" style="height: 820px;">
<div class="table-responsive" style="">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
......
......@@ -1234,7 +1234,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
type: 'GET',
async: true,
data: {
"phone": $(".cus_fang").val()
"phone": $(".cus_fang").val(),
"site_id": user_info_obj.site_id
},
dataType: 'json',
success: function(data) {
......@@ -1331,6 +1332,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
params.referrer_source = 10;
// params.source = $("#user_label_edit").val();
params.user_label = $("#user_label_edit").val();
params.entrust_type = 0;//商铺
$.ajax({
......@@ -1459,6 +1461,19 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
success: function(data) {
if(data.code == 200) {
if(data.data) {
//编辑需要的参数(客方编辑)
var arr_list=data.data.customer_relegation_list;
if(arr_list.length){
for(var i=0;i<arr_list.length;i++){
if(arr_list[i].site_id == user_info_obj.site_id){
user.agent_id2=arr_list[i].agent_id;
user.agent_id2_info=arr_list[i].agent_name + "-" + arr_list[i].agent_phone;
}
}
}else{
user.agent_id2='';
user.agent_id2_info='';
}
$(".cus_id").html(data.data.user_info.user_id); //客户编号
$(".cus_name").val(data.data.user_info.user_name); //姓名
$(".cus_nick").html(data.data.user_info.user_nick); //昵称
......@@ -1471,7 +1486,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
$(".cus_phone").html(hideTel(data.data.user_info.user_phone)); //电话
$(".cus_date").html(data.data.user_info.create_time); //创建时间
$(".cus_fang_edit").val(data.data.user_info.agent_info); //客方详情
$(".cus_fang").val(data.data.user_info.agent_info); //客方编辑
$(".cus_fang").val(user.agent_id2_info); //客方编辑
$("select[name=industry_type_two]").val(data.data.user_info.industry_type);
$("input[name=price_demand]").val(data.data.user_info.price_demand * 1);
$("input[name=area_demand]").val(data.data.user_info.area_demand * 1);
......@@ -1500,8 +1515,8 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
});
//获取 站点城市(详情)
$('.shangpu_tags_area_detail').show();
var site_detail= data.data.user_info.site_name.join(',');
$('.shangpu_tags_area_detail').html(site_detail);
// var site_detail= data.data.user_info.site_name.join(',');
$('.shangpu_tags_area_detail').html(data.data.site_ids_name);
var sw=function(s){
switch(Number(s))
{ case 0:return"";
......@@ -1547,7 +1562,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
}
//客方修改记录
var caozuo_table = "";
$.each(data['data']['user_history'], function(i, item) {
$.each(data['data']['user_history_log']['agent_history'], function(i, item) {
caozuo_table += '<tr><td>' + item.remark + '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
});
if(caozuo_table){
......@@ -1557,7 +1572,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'css!style/home.css'
};
//邀请人修改记录
var caozuo_table_introduce = "";
$.each(data['data']['user_invite_history'], function(i, item) {
$.each(data['data']['user_history_log']['invite_history'], function(i, item) {
caozuo_table_introduce += '<tr><td>' + item.remark + '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
});
if(caozuo_table_introduce){
......
......@@ -1234,7 +1234,9 @@ define(['doT', 'text!temp/remark_follow_office_template_tpl.html', 'css!style/ho
type: 'GET',
async: true,
data: {
"phone": $(".cus_fang").val()
"phone": $(".cus_fang").val(),
"site_id": user_info_obj.site_id
},
dataType: 'json',
success: function(data) {
......@@ -1331,7 +1333,7 @@ define(['doT', 'text!temp/remark_follow_office_template_tpl.html', 'css!style/ho
params.referrer_source = 10;
// params.source = $("#user_label_edit").val();
params.user_label = $("#user_label_edit").val();
params.entrust_type = 1;//办公楼
$.ajax({
'type': 'POST',
......@@ -1459,6 +1461,19 @@ define(['doT', 'text!temp/remark_follow_office_template_tpl.html', 'css!style/ho
success: function(data) {
if(data.code == 200) {
if(data.data) {
//编辑需要的参数(客方编辑)
var arr_list=data.data.customer_relegation_list;
if(arr_list.length){
for(var i=0;i<arr_list.length;i++){
if(arr_list[i].site_id == user_info_obj.site_id){
user.agent_id2=arr_list[i].agent_id;
user.agent_id2_info=arr_list[i].agent_name + "-" + arr_list[i].agent_phone;
}
}
}else{
user.agent_id2='';
user.agent_id2_info='';
}
$(".cus_id").html(data.data.user_info.user_id); //客户编号
$(".cus_name").val(data.data.user_info.user_name); //姓名
$(".cus_nick").html(data.data.user_info.user_nick); //昵称
......@@ -1471,7 +1486,7 @@ define(['doT', 'text!temp/remark_follow_office_template_tpl.html', 'css!style/ho
$(".cus_phone").html(hideTel(data.data.user_info.user_phone)); //电话
$(".cus_date").html(data.data.user_info.create_time); //创建时间
$(".cus_fang_edit").val(data.data.user_info.agent_info); //客方详情
$(".cus_fang").val(data.data.user_info.agent_info); //客方编辑
$(".cus_fang").val(user.agent_id2_info); //客方编辑
$("select[name=industry_type_two]").val(data.data.user_info.industry_type);
$("input[name=price_demand]").val(data.data.user_info.price_demand * 1);
$("input[name=area_demand]").val(data.data.user_info.area_demand * 1);
......@@ -1500,8 +1515,8 @@ define(['doT', 'text!temp/remark_follow_office_template_tpl.html', 'css!style/ho
});
//获取 站点城市(详情)
$('.shangpu_tags_area_detail').show();
var site_detail= data.data.user_info.site_name.join(',');
$('.shangpu_tags_area_detail').html(site_detail);
// var site_detail= data.data.user_info.site_name.join(',');
$('.shangpu_tags_area_detail').html(data.data.site_ids_name);
var sw=function(s){
switch(Number(s))
{ case 0:return"";
......@@ -1547,7 +1562,7 @@ define(['doT', 'text!temp/remark_follow_office_template_tpl.html', 'css!style/ho
}
//客方修改记录
var caozuo_table = "";
$.each(data['data']['user_history'], function(i, item) {
$.each(data['data']['user_history_log']['agent_history'], function(i, item) {
caozuo_table += '<tr><td>' + item.remark + '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
});
if(caozuo_table){
......@@ -1557,7 +1572,7 @@ define(['doT', 'text!temp/remark_follow_office_template_tpl.html', 'css!style/ho
};
//邀请人修改记录
var caozuo_table_introduce = "";
$.each(data['data']['user_invite_history'], function(i, item) {
$.each(data['data']['user_history_log']['invite_history'], function(i, item) {
caozuo_table_introduce += '<tr><td>' + item.remark + '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
});
if(caozuo_table_introduce){
......
......@@ -1233,7 +1233,7 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
var kefang_table = "";
if(data['data']['customer_relegation_list']){
$.each(data['data']['customer_relegation_list'], function(i, item) {
kefang_table += '<span>' + item.site_name +'客方:' + item.agent_name+ '-' + item.agent_phone + '</span>';
kefang_table += '<span>' + item.site_name +'客方:' + item.agent_name+ '-' + item.agent_phone + '</span>&nbsp;&nbsp;&nbsp;';
});
$('.kefang-detail').html(kefang_table);
}else{
......
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