Commit 2e77a22a authored by agping's avatar agping

修改

parent 699275bf
...@@ -6,10 +6,8 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -6,10 +6,8 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
/*每页显示多少条*/ /*每页显示多少条*/
mainTabIndex: 0, mainTabIndex: 0,
detailTabIndex: 0, detailTabIndex: 0,
bargain_id: '', district_id: 0,//部门id
order_id: 0,//订单id
panfangData: null, panfangData: null,
maidTotalCommission: 0,//应收总佣金
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
...@@ -105,9 +103,7 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -105,9 +103,7 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
}, },
//获取部门业绩 门店业绩 个人业绩 的共用方法 //获取部门业绩 门店业绩 个人业绩 的共用方法
getList: function(pageNo){ getList: function(pageNo){
console.count('bar');
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
console.log(user_info_obj);
var params = { var params = {
'pageNo': pageNo, 'pageNo': pageNo,
'pageSize': bargain.pageSize, 'pageSize': bargain.pageSize,
...@@ -118,7 +114,6 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -118,7 +114,6 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
'end_day':$('#maintable_end_time').val(), 'end_day':$('#maintable_end_time').val(),
'request_source_type':1, 'request_source_type':1,
'second_select':0 'second_select':0
}; };
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
...@@ -160,15 +155,22 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -160,15 +155,22 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
//获取门店排行详情 //获取门店排行详情
getListStore: function(pageNo){ getListStore: function(pageNo){
console.count('bar'); var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
var params = { var params = {
'pageNo': pageNo, 'pageNo': pageNo,
'pageSize': bargain.pageSize, 'pageSize': bargain.pageSize,
'type':bargain.switchType(),
'AuthToken':user_info_obj.AuthToken,
'agent_id':user_info_obj.id,
'start_day':$('#maintable_create_time').val(),
'end_day':$('#maintable_end_time').val(),
'request_source_type':1,
'second_select':1,
'second_id':0,
}; };
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: bargain.switchUrl(), url: '/broker/selectPerformanceByTime',
data: params, data: params,
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
...@@ -176,8 +178,6 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -176,8 +178,6 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
success: function(data) { success: function(data) {
if(typeof data === 'object') { if(typeof data === 'object') {
if(data.code == 200) { if(data.code == 200) {
var tpl=bargain.switchTpl();
console.log(tpl);
var doTtmpl = doT.template(document.getElementById('store_list_tpl').innerHTML); var doTtmpl = doT.template(document.getElementById('store_list_tpl').innerHTML);
$("#store_details_list").html(doTtmpl(data.data)); $("#store_details_list").html(doTtmpl(data.data));
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<th class="text-center">团队人数</th> <th class="text-center">团队人数</th>
</tr> </tr>
[% for(var item in it["list"]){ %] [% for(var item in it["list"]){ %]
<tr data-id="[%= it['list'][item]['id'] %]" data-orderid="[%= it['list'][item]['order_id'] %]"> <tr data-id="[%= it['list'][item]['district_id'] %]">
<td class="text-center">[%= it["list"][item]['index_'] %]</td> <td class="text-center">[%= it["list"][item]['index_'] %]</td>
<td class="text-center"> <td class="text-center">
<a class="store-ranking" href="#modal-store" data-toggle="modal">[%= it["list"][item]['district_name']+'-'+it["list"][item]['name'] %]</a> <a class="store-ranking" href="#modal-store" data-toggle="modal">[%= it["list"][item]['district_name']+'-'+it["list"][item]['name'] %]</a>
......
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