Commit 1169fb05 authored by agping's avatar agping

业绩排行 加城市 筛选

parent a659b4d9
......@@ -89,11 +89,8 @@
<div class="panel-heading breadcrumb">
<li>
<a href="#" class="performance-ranking-head" style=""><span id="performance_ranking">业绩排行</span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="rank_start_day"></span>&nbsp;&nbsp;<span id="rank_end_day"></span></a>
<!--<select class="form-control btn2-city" id="realtime_city_choose" style="display: block;margin-top: 6px;">
<option value="">全部</option>
<option value="上海市">上海市</option>
<option value="杭州市">杭州市</option>
</select>-->
<select class="form-control btn2-city" id="realtime_city_choose" style="display: block;margin-top: 6px;">
</select>
</li>
</div>
<div class="panel-body">
......
......@@ -25,8 +25,8 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
init: function() {
//初始化dot
$(document.body).append(template + template_tax);
//初始化城市 区域筛选
realtime.initializationCityFunction();
//初始化 站点城市筛选
realtime.getSiteTags();
realtime.event();
},
event: function() {
......@@ -414,8 +414,8 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
'district_id':$('#district_id').val(),
'store_id':$('#guest_stores').val(),
'agent_id':realtime.agent_id_choose,
'order':realtime.order_ranking
// 'city':$('#realtime_city_choose').val()
'order':realtime.order_ranking,
'site_id':$('#realtime_city_choose').val()
};
$.ajax({
......@@ -463,6 +463,42 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
}
});
},
//获取站点 标签
getSiteTags: function() {
$.ajax({
type: 'GET',
url: '/index/getSiteList',
data: {},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
var _str = '<option value="">城市筛选</option>';
$.each(_data.data.list, function(i, item) {
_str += '<option value="' + item.id + '">' + item.city + '</option>';
});
$("#realtime_city_choose").html(_str);
realtime.getList(1);
} else {
alert(_data['msg']);
}
} else {
alert('数据错误');
};
},
error: function() {
alert('enter error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
//处理超时的逻辑
alert('请求超时,请重试');
};
}
});
},
//初始化 城市
initializationCityFunction: function(params) {
$.ajax({
......
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