Commit 7d80476a authored by agping's avatar agping

业绩排行修改

parent 9afa3ace
......@@ -37,22 +37,34 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
realtime.mainTabIndex = _this.index();
realtime.getList(1);
});
_doc.on('click', '#liudan_pic_btn_district', function(e){
//点击部门列表-参数初始化
_doc.on('click', '.performance-district-click', function(e){
e.preventDefault();
e.stopPropagation();
realtime.switchType=3;
realtime.district_id = $(this).attr("data-id");
realtime.store_id = '';
realtime.agents_id = '';
});
_doc.on('click', '#liudan_pic_btn_store', function(e){
//点击门店列表-参数初始化
_doc.on('click', '.performance-store-click', function(e){
e.preventDefault();
e.stopPropagation();
realtime.switchType=2;
realtime.district_id = '';
realtime.store_id = $(this).attr("data-id");
realtime.agents_id = '';
});
_doc.on('click', '#liudan_pic_btn_person', function(e){
//点击个人列表-参数初始化
_doc.on('click', '.performance-person-click', function(e){
e.preventDefault();
e.stopPropagation();
realtime.switchType=1;
realtime.district_id = '';
realtime.store_id = '';
realtime.agents_id = $(this).attr("data-id");
});
//点击今天按钮事件 的搜素
_doc.on('click', '#maintable_today', function(e){
//获取当天的日期 格式如 mmmm-yy-dd
......@@ -83,6 +95,7 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
e.stopPropagation();
realtime.district_id = $(this).attr("data-id");
realtime.getListStore(1);
});
//点击 门店排行 的门店名字
_doc.on('click', '.agent-ranking', function(e){
......@@ -132,7 +145,6 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
_doc.on('click', '.performance-number-details', function(e) {
e.preventDefault();
e.stopPropagation();
realtime.switchTypeId();
realtime.getPerformanceDetails(1);
});
//部门-收款数-弹出框
......@@ -243,36 +255,24 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
}
},
//获取1表示个人业绩排行 2门店 3区域
// switchType: function(){
// if(Number(this.mainTabIndex)==0){
// realtime.switchtype=3;
// }
// if(Number(this.mainTabIndex)==1){
// realtime.switchtype=2;
// }
// if(Number(this.mainTabIndex)==2){
// realtime.switchtype=1;
// }
// //获取个人-门店-区域id
// switchTypeId: function(){
// if(realtime.mainTabIndex == 0){
// realtime.district_id = $(this).attr("data-id");
// realtime.store_id = '';
// realtime.agents_id = '';
// };
// if(realtime.mainTabIndex == 1){
// realtime.district_id = '';
// realtime.store_id = $(this).attr("data-id");
// realtime.agents_id = '';
// };
// if(realtime.mainTabIndex == 2){
// realtime.district_id = '';
// realtime.store_id = '';
// realtime.agents_id = $(this).attr("data-id");
// };
// },
//获取个人-门店-区域id
switchTypeId: function(){
if(realtime.mainTabIndex == 0){
realtime.district_id = $(this).attr("data-id");
realtime.store_id = '';
realtime.agents_id = '';
};
if(realtime.mainTabIndex == 1){
realtime.district_id = '';
realtime.store_id = $(this).attr("data-id");
realtime.agents_id = '';
};
if(realtime.mainTabIndex == 2){
realtime.district_id = '';
realtime.store_id = '';
realtime.agents_id = $(this).attr("data-id");
};
},
//获取部门业绩 门店业绩 个人业绩 的共用方法
getList: function(pageNo){
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
......@@ -562,7 +562,7 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
getapproachNumberDetails: function(pageNo){
var params = {
'id': realtime.district_store_agent_id,
'type': realtime.switchtype,
'type': realtime.switchType,
'start_time': realtime.time_search_start,
'end_time': realtime.time_search_end,
'AuthToken':user_info_obj.AuthToken
......
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