Commit 687cbc06 authored by agping's avatar agping

转勤 收藏

parent de4d825b
......@@ -58,7 +58,7 @@
</li>
<br />
<div>
<select class="form-control btn4" id="user_city">
<select class="form-control btn4" id="user_city" style="width: 200px;">
</select>
<span class="btn btn-info btn3 " id="fresh_btn">搜索</span>
......
......@@ -307,7 +307,18 @@
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li><a href="#">我收藏的客户</a></li>
<li> <span class="btn btn-info btn3 " id="fresh_btn">刷新</span></li>
<!--<li>
<span class="btn btn-info btn3 " id="fresh_btn">刷新</span>
</li>-->
<div>
<select class="form-control btn4" id="user_city" style="width: 200px;">
</select>
<span class="btn btn-info btn3 " id="fresh_btn">搜索</span>
</div>
<!--<li class="active">新增</li>-->
<div class="pull-right">
<ul class="bread_btn">
......
......@@ -56,7 +56,13 @@
<li>
<a href="javascript:;">办公楼收藏</a>
</li>
<li> <span class="btn btn-info btn3 " id="fresh_btn">刷新</span></li>
<!--<li> <span class="btn btn-info btn3 " id="fresh_btn">刷新</span></li>-->
<div>
<select class="form-control btn4" id="user_city" style="width: 200px;">
</select>
<span class="btn btn-info btn3 " id="fresh_btn">搜索</span>
</div>
</div>
<div class="panel-body">
<div class="table-responsive">
......
......@@ -66,7 +66,8 @@ define(['doT', 'text!temp/my_collection_office_template_tpl.html', 'css!style/ho
var day_start = getPreMonth(day_end);
$('#create_time_start').val(day_start);
$('#create_time_end').val(day_end);//商铺跟进 添加 默认时间 一个月
house.getList(0);//商铺跟进列表
// house.getList(0);//商铺跟进列表
house.getSiteList();
//收藏 取消收藏
$(document).delegate(".is_show_shoucang", "click", function() { //点击禁用
if(!confirm('是否继续?')) {
......@@ -215,13 +216,12 @@ define(['doT', 'text!temp/my_collection_office_template_tpl.html', 'css!style/ho
},
getList: function(pageNo) { //商铺跟进列表
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
console.log(user_info_obj.AuthToken);
house.pageNo = pageNo;
var params = {};
params.pageNo = house.pageNo;
params.pageSize = house.pageSize;
params.AuthToken = user_info_obj.AuthToken;
params.agents_id = user_info_obj.id;
params.agents_id = $('#user_city').val();
params.from =1;
$.ajax({
......@@ -254,6 +254,49 @@ define(['doT', 'text!temp/my_collection_office_template_tpl.html', 'css!style/ho
};
}
});
},
//获取转勤账号城市
getSiteList: function() {
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var params = {};
params.AuthToken = user_info_obj.AuthToken;
params.agent_phone = user_info_obj.phone;
$.ajax({
type: 'GET',
url: '/broker/getAgentSiteList', //商铺跟进 对接接口
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
//获取转勤账号
var _str = '';
$.each(data.data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.city + '</option>';
});
$('#user_city').html(_str);
//默认显示本账号所在城市
$('#user_city').val(user_info_obj.id);
house.getList(1);//搜索列表
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
getFollowupList: function(){
$.ajax({
......
......@@ -223,7 +223,7 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home
params.pageSize = house.pageSize;
params.AuthToken = user_info_obj.AuthToken;
// params.agents_id = user_info_obj.id;
params.agents_id = $('.user_city').val();//城市筛选
params.agents_id = $('#user_city').val();//城市筛选
params.from =1;
......@@ -263,12 +263,10 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var params = {};
params.AuthToken = user_info_obj.AuthToken;
// params.agent_phone = user_info_obj.phone;
params.agent_phone = 15601652311;
$.ajax({
type: 'GET',
url: '/broker/getAgentSiteListV2', //商铺跟进 对接接口
url: '/broker/getAgentSiteList', //商铺跟进 对接接口
data: params,
timeout: 30000,
dataType: 'json',
......@@ -278,12 +276,12 @@ define(['doT', 'text!temp/my_collection_shop_template_tpl.html', 'css!style/home
if(data.code == 200) {
//获取转勤账号
var _str = '';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
$.each(data.data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.city + '</option>';
});
$('.user_city').html(_str);
$('#user_city').html(_str);
//默认显示本账号所在城市
$('.user_city').val(user_info_obj.id);
$('#user_city').val(user_info_obj.id);
house.getList(1);//搜索列表
} else {
......
......@@ -43,7 +43,7 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
init: function() {
//初始化dot
$("body").append(template);
user.getList();
user.getSiteList();
user.event();
//时间控件初始化
//bootstrap 时间控件选择
......@@ -1529,7 +1529,8 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
//商铺 办公楼
params.entrust_type = user.entrust_type_list;
params.agents_id = user_info_obj.id;
// params.agents_id = user_info_obj.id;
params.agents_id = $('#user_city').val();
params.pageNo = user.pageNo;
params.pageSize = user.pageSize;
params.AuthToken = user_info_obj.AuthToken;
......@@ -1557,6 +1558,49 @@ define(['doT', 'text!temp/my_collection_user_template_tpl.html', 'css!style/home
}
});
},
//获取转勤账号城市
getSiteList: function() {
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var params = {};
params.AuthToken = user_info_obj.AuthToken;
params.agent_phone = 15601652311;
$.ajax({
type: 'GET',
url: '/broker/getAgentSiteList', //商铺跟进 对接接口
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
//获取转勤账号
var _str = '';
$.each(data.data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.city + '</option>';
});
$('#user_city').html(_str);
//默认显示本账号所在城市
$('#user_city').val(user_info_obj.id);
house.getList(1);//搜索列表
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
//获取站点 标签 (编辑)
getSiteTagsEdit: function() {
$('.shangpu_tags_area_edit').html('');
......
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