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