Commit 7db0bb31 authored by agping's avatar agping

商铺跟进 客户详情

parent 04819e85
<script src='/resource/lib/js/require.min.js' data-main='/resource/js/main?version=20190716' charset='utf-8'></script>
<script src='/resource/lib/js/require.min.js' data-main='/resource/js/main?version=20190718' charset='utf-8'></script>
......@@ -96,9 +96,13 @@
<tr>
<td colspan="10">
<form id="form_search">
<select class="form-control btn2 ld-Marheight" id="shop_area_id">
<select class="ld-Marheight form-control btn2-city shop_city_choose_site_list"></select>
<select class="ld-Marheight form-control btn2-city" id="shop_area_id">
<option value="" selected="selected">区域</option>
</select>
<!--<select class="form-control btn2 ld-Marheight" id="shop_area_id">
<option value="" selected="selected">区域筛选</option>
</select>
</select>-->
<span class="fore-span ld-Marheight">跟进时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_start" name="start_date1" type="date">
<span class="fore-span ld-Marheight">-</span>
......
......@@ -67,7 +67,36 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
$('#create_time_start').val(day_end);
$('#create_time_end').val(day_end);//商铺跟进 添加 默认时间 一个月
//初始化城市 区域筛选
house.initializationCityFunction();
// house.initializationCityFunction();
house.getList(0);//默认城市
//初始化 商铺跟进列表城市
$.ajax({
url: '/index/getAgentGroupSite',
type: 'GET',
async: true,
data: {
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data.length != 0) {
var str = '<option value="">选择城市</option>';
$.each(data.data, function(i, item) {
str += '<option value="' + item.city + '">' + item.city + '</option>';
});
$(".shop_city_choose_site_list").append(str);
}else{
var _city = user_info_obj.city;
var _str1 = '<option value="">选择城市</option>';
var _str = _str1 + '<option value="' + _city + '">' + _city+ '</option>';
$(".shop_city_choose_site_list").append(_str);
}
}
});
// 部门 门店 二级联动
house.getDistrict(function() {
......@@ -132,7 +161,23 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
if(_this.hasClass('btn-success')){
_this.removeClass('btn-success').addClass('btn-warning');
};
});
});
//城市 区域 二级联动 筛选
_doc.on('input', '.shop_city_choose_site_list', function() {
$('#shop_area_id').val('');
var _this = $(this);
var _id = _this.val();
$('#shop_area_id').html(''); //先清空
if(_id && _id != '0') {
house.getDistrictStoreListA(_id, function(_data) {
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.name + '">' + item.name + '</option>';
});
$('#shop_area_id').html(_str);
});
} else {};
});
//点击跟进,获取商铺跟进动态的接口
_doc.on('click', '[href="#modal_followup"]', function(){
house.id = $(this).attr("data-id");
......@@ -181,9 +226,9 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
});
} else {};
});
_doc.on('input', '#shop_area_id', function() {
house.getList();
});
// _doc.on('input', '#shop_area_id', function() {
// house.getList();
// });
//查看点击事件
_doc.on('click', 'a[href="#modal_shop_detail"]', function(e){
e.preventDefault();
......@@ -225,6 +270,13 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
params.pageSize = house.pageSize;
params.AuthToken = user_info_obj.AuthToken;
params.disc = $('#shop_area_id').val(); //区域筛选
if($('.shop_city_choose_site_list').val()){
params.city = $('.shop_city_choose_site_list').val(); //城市筛选
}else{
params.city = '全部'; //城市筛选
}
if( !(params.end_time&&params.start_time)){
alert('请选择时间')
return;
......@@ -360,6 +412,23 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
}
});
},
//城市 区域 筛选
getDistrictStoreListA: function(id, fn) {
$.ajax({
url: '/index/getAllDisc',
type: 'GET',
async: true,
data: {
'city': id,
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
},
getDistrictStoreList: function(id, fn) {
$.ajax({
url: '/index/getDistrictStoreList',
......
......@@ -1503,7 +1503,7 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
}else{
var follow_status = '电话跟进:'
};
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + follow_status + dealPunctuation(item.content) + user_status +'<img src="'+ ServerHostImageLiu + '/static/chat_image/' + item.img_str +'" alt="" style="width: 20px;height: 20px;" class="diagram-image J_preview" /></td><td>' + item.name + '</td><td>' + item.create_time +'</td></tr>';
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + follow_status + dealPunctuation(item.content) + user_status +'<img src="'+ ServerHostImageLiu + '/static/chat_image/' + item.img_str +'" alt="" style="width: 30px;height: 20px;border: 1px solid #f0ad4e;border-radius: 3px;" class="diagram-image J_preview" /></td><td>' + item.name + '</td><td>' + item.create_time +'</td></tr>';
});
if(data.data.length<10){//第一个接口 数据条数小于10 加载第二个接口
......@@ -1570,7 +1570,7 @@ define(['doT', 'text!temp/user_model_template_tpl.html','css!style/home.css', 'c
}else{
var follow_status = '电话跟进:'
};
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + follow_status + dealPunctuation(item.content) + user_status +'<img src="'+ ServerHostImageLiu + '/static/chat_image/' + item.img_str +'" alt="" style="width: 20px;height: 20px;" class="diagram-image J_preview"/></td><td>' + item.name + '</td><td>' + item.create_time +'</td></tr>';
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + follow_status + dealPunctuation(item.content) + user_status +'<img src="'+ ServerHostImageLiu + '/static/chat_image/' + item.img_str +'" alt="" style="width: 30px;height: 20px;border: 1px solid #f0ad4e;border-radius: 3px;" class="diagram-image J_preview"/></td><td>' + item.name + '</td><td>' + item.create_time +'</td></tr>';
});
if(caozuo_table){
......
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