Commit a5919466 authored by agping's avatar agping

业绩修改

parent 1ac1a719
...@@ -26,21 +26,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -26,21 +26,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
//初始化dot //初始化dot
business.getDistrict(); business.getDistrict();
// $.ajax({ //获取区域
// 'type': 'get',
// 'url': '/api/filtrateCondition',
// dataType: "json",
// success: function(data) {
// if(data.code == 200) {
// if(data.data) {}
// } else {
// alert("推荐失败!")
// }
// }
// });
$("body").append(template); $("body").append(template);
function  getPreMonth(date)  {             function  getPreMonth(date)  {            
var  arr  =  date.split('-');             var  arr  =  date.split('-');            
...@@ -728,7 +713,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -728,7 +713,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
//面积筛选 //面积筛选
$.each(data.data.acreage, function(i, item) { $.each(data.data.acreage, function(i, item) {
if(item.id!=-1){ if(item.id!=-1){
str_area += '<option value="' + item.id + '">' + item.value + '</option>'; str_area += '<option value="' + (item.id*1+1) + '">' + item.value + '</option>';
} }
}); });
//区域筛选 //区域筛选
......
...@@ -78,14 +78,14 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -78,14 +78,14 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
}, },
//获取部门业绩 门店业绩 个人业绩 不同的ajax请求url //获取部门业绩 门店业绩 个人业绩 不同的ajax请求url
switchType: function(){ switchUrl: function(){
switch (Number(this.mainTabIndex)){ switch (Number(this.mainTabIndex)){
case 0: case 0:
return 3; return '/index/selectDistrictPerformance';
case 1: case 1:
return 2; return '/index/selectStorePerformance';
case 2: case 2:
return 1; return '/index/selectIndividualPerformance';
default: default:
return ''; return '';
} }
...@@ -109,17 +109,12 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -109,17 +109,12 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
var params = { var params = {
'pageNo': pageNo, 'pageNo': pageNo,
'pageSize': realtime.pageSize, 'pageSize': realtime.pageSize,
'type':realtime.switchType(),
'AuthToken':user_info_obj.AuthToken,
'agent_id':user_info_obj.id,
'start_day':$('#maintable_create_time').val(), 'start_day':$('#maintable_create_time').val(),
'end_day':$('#maintable_end_time').val(), 'end_day':$('#maintable_end_time').val(),
'request_source_type':1,
'second_select':0
}; };
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: '/broker/selectPerformanceByTime', url: realtime.switchUrl(),
data: params, data: params,
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
...@@ -161,19 +156,15 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -161,19 +156,15 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
var params = { var params = {
'pageNo': pageNo, 'pageNo': pageNo,
'pageSize': realtime.pageSize, 'pageSize': realtime.pageSize,
'type':realtime.switchType(), 'father_id': realtime.district_id,
'AuthToken':user_info_obj.AuthToken,
'agent_id':user_info_obj.id,
'start_day':$('#maintable_create_time').val(), 'start_day':$('#maintable_create_time').val(),
'end_day':$('#maintable_end_time').val(), 'end_day':$('#maintable_end_time').val(),
'request_source_type':1,
'second_select':1,
'second_id':realtime.district_id
}; };
console.log(realtime.district_id); console.log(realtime.district_id);
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: '/broker/selectPerformanceByTime', url: '/index/selectStorePerformance',
data: params, data: params,
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
...@@ -208,18 +199,14 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -208,18 +199,14 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
var params = { var params = {
'pageNo': pageNo, 'pageNo': pageNo,
'pageSize': realtime.pageSize, 'pageSize': realtime.pageSize,
'type':realtime.switchType(), 'father_id': realtime.store_id,
'AuthToken':user_info_obj.AuthToken,
'agent_id':user_info_obj.id,
'start_day':$('#maintable_create_time').val(), 'start_day':$('#maintable_create_time').val(),
'end_day':$('#maintable_end_time').val(), 'end_day':$('#maintable_end_time').val(),
'request_source_type':1,
'second_select':1,
'second_id':realtime.store_id
}; };
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: '/broker/selectPerformanceByTime', url: '/index/selectIndividualPerformance',
data: params, data: params,
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
......
...@@ -118,8 +118,11 @@ ...@@ -118,8 +118,11 @@
<script id="store_list_tpl" type="text/template"> <script id="store_list_tpl" type="text/template">
[% if(it["list"] && it["list"].length && it["list"].length>0) { %] [% if(it["list"] && it["list"].length && it["list"].length>0) { %]
<tr> <tr>
<th class="text-center">门店</th> <th class="text-center">排名</th>
<td class="text-center">门店</td>
<th class="text-center">业绩(元)</th> <th class="text-center">业绩(元)</th>
<th class="text-center">成交单数</th>
<!--<th class="text-center">成交报告(其他)</th>-->
<th class="text-center">收款数</th> <th class="text-center">收款数</th>
<th class="text-center">进场数</th> <th class="text-center">进场数</th>
<th class="text-center">报备数</th> <th class="text-center">报备数</th>
...@@ -129,14 +132,19 @@ ...@@ -129,14 +132,19 @@
</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]['id'] %]" data-orderid="[%= it['list'][item]['order_id'] %]">
<td class="text-center">[%= it["list"][item]['create_time'] %]</td> <td class="text-center">[%= it["list"][item]['index_'] %]</td>
<td class="text-center">[%= it["list"][item]['is_open']?'是':'否' %]</td> <td class="text-center">
<td class="text-center">[%= it["list"][item]['internal_address'] %]</td> <a class="store-ranking" href="#modal-store" data-toggle="modal" data-id="[%= it['list'][item]['store_id'] %]">[%= it["list"][item]['district_name']+'-'+it["list"][item]['store_name']+'-'+it["list"][item]['name'] %]</a>
<td class="text-center">[%= it["list"][item]['house_number'] %]</td> </td>
<td class="text-center">[%= it["list"][item]['user_name'] %]</td> <td class="text-center">[%= it["list"][item]['performance_total'] %]</td>
<td class="text-center">[%= it["list"][item]['user_phone'] %]</td> <td class="text-center">[%= it["list"][item]['bargain_sum'] %]</td>
<td class="text-center">[%= it["list"][item]['trade_type'] %]</td> <!--<td class="text-center">[%= it["list"][item]['bargain_sum'] %]</td>-->
<td class="text-center">[%= it["list"][item]['commission'] %]</td> <td class="text-center">[%= it["list"][item]['paylog'] %]</td>
<td class="text-center">[%= it["list"][item]['march_in_num'] %]</td>
<td class="text-center">[%= it["list"][item]['look_at_num'] %]</td>
<td class="text-center">[%= it["list"][item]['add_house_num'] %]</td>
<td class="text-center">[%= it["list"][item]['add_user_num'] %]</td>
<td class="text-center">[%= it["list"][item]['team_num'] %]</td>
</tr> </tr>
[% } %] [% } %]
[% }else{ %] [% }else{ %]
...@@ -146,12 +154,17 @@ ...@@ -146,12 +154,17 @@
[% } %] [% } %]
</script> </script>
<!--个人业绩 详情--> <!--个人业绩 详情-->
<script id="agent_list_tpl" type="text/template"> <script id="agent_list_tpl" type="text/template">
[% if(it["list"] && it["list"].length && it["list"].length>0) { %] [% if(it["list"] && it["list"].length && it["list"].length>0) { %]
<tr> <tr>
<th class="text-center">排名</th>
<th class="text-center">经纪人</th> <th class="text-center">经纪人</th>
<th class="text-center">业绩(元)</th> <th class="text-center">业绩(元)</th>
<th class="text-center">成交单数</th>
<!--<th class="text-center">成交报告(其他)</th>-->
<th class="text-center">收款数</th> <th class="text-center">收款数</th>
<th class="text-center">进场数</th> <th class="text-center">进场数</th>
<th class="text-center">报备数</th> <th class="text-center">报备数</th>
...@@ -160,16 +173,16 @@ ...@@ -160,16 +173,16 @@
</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]['id'] %]" data-orderid="[%= it['list'][item]['order_id'] %]">
<td class="text-center">[%= it["list"][item]['create_time'] %]</td> <td class="text-center">[%= it["list"][item]['index_'] %]</td>
<td class="text-center">[%= it["list"][item]['is_open']?'是':'否' %]</td> <td class="text-center">[%= it["list"][item]['district_name']+'-'+it["list"][item]['store_name']+'-'+it["list"][item]['name'] %]</a></td>
<td class="text-center">[%= it["list"][item]['internal_address'] %]</td> <td class="text-center">[%= it["list"][item]['performance_total'] %]</td>
<td class="text-center">[%= it["list"][item]['house_number'] %]</td> <td class="text-center">[%= it["list"][item]['bargain_sum'] %]</td>
<td class="text-center">[%= it["list"][item]['user_name'] %]</td> <!--<td class="text-center">[%= it["list"][item]['bargain_sum'] %]</td>-->
<td class="text-center">[%= it["list"][item]['user_phone'] %]</td> <td class="text-center">[%= it["list"][item]['paylog'] %]</td>
<td class="text-center">[%= it["list"][item]['trade_type'] %]</td> <td class="text-center">[%= it["list"][item]['march_in_num'] %]</td>
<td class="text-center">[%= it["list"][item]['commission'] %]</td> <td class="text-center">[%= it["list"][item]['look_at_num'] %]</td>
<td class="text-center">[%= it["list"][item]['commission'] %]</td> <td class="text-center">[%= it["list"][item]['add_house_num'] %]</td>
<td class="text-center">[%= it["list"][item]['add_user_num'] %]</td>
</tr> </tr>
[% } %] [% } %]
[% }else{ %] [% }else{ %]
......
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