Commit b68380ec authored by agping's avatar agping

业绩排行修改

parent 8e99bdd5
......@@ -61,9 +61,9 @@
<thead>
<tr>
<td colspan="11" class="maintable-top-sub-tr">
<a class="btn btn-info liudan_pic_btn">部门业绩排行榜</a>
<a class="btn btn-default liudan_pic_btn">门店业绩排行榜</a>
<a class="btn btn-default liudan_pic_btn">个人业绩排行榜</a>
<a class="btn btn-info liudan_pic_btn" id='liudan_pic_btn_district'>部门业绩排行榜</a>
<a class="btn btn-default liudan_pic_btn" id='liudan_pic_btn_store'>门店业绩排行榜</a>
<a class="btn btn-default liudan_pic_btn" id='liudan_pic_btn_person'>个人业绩排行榜</a>
</td>
</tr>
<!--部门业绩 门店业绩 个人业绩的搜索功能-->
......@@ -270,7 +270,7 @@
×
</button>
<h4 class="modal-title">
<a href="#"><span id="performance_ranking_agent_two">报备数时间:</span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="rank_start_day_agent_two"></span>&nbsp;&nbsp;<span id="rank_end_day_agent_two"></span></a>
<a href="#"><span id="performance_ranking_agent_two">报备数时间:</span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="reported_details_time_start"></span>&nbsp;&nbsp;<span id="reported_details_time_end"></span></a>
</h4>
</div>
<div class="modal-body">
......@@ -293,7 +293,7 @@
×
</button>
<h4 class="modal-title">
<a href="#"><span id="performance_ranking_agent_two">新增商铺时间:</span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="rank_start_day_agent_two"></span>&nbsp;&nbsp;<span id="rank_end_day_agent_two"></span></a>
<a href="#"><span id="performance_ranking_agent_two">新增商铺时间:</span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="newshop_details_time_start"></span>&nbsp;&nbsp;<span id="newshop_details_time_end"></span></a>
</h4>
</div>
<div class="modal-body">
......@@ -316,7 +316,7 @@
×
</button>
<h4 class="modal-title">
<a href="#"><span id="performance_ranking_agent_two">新增客户时间:</span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="rank_start_day_agent_two"></span>&nbsp;&nbsp;<span id="rank_end_day_agent_two"></span></a>
<a href="#"><span id="performance_ranking_agent_two">新增客户时间:</span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="newuser_details_time_start"></span>&nbsp;&nbsp;<span id="newuser_details_time_end"></span></a>
</h4>
</div>
<div class="modal-body">
......@@ -339,7 +339,7 @@
×
</button>
<h4 class="modal-title">
<a href="#"><span id="performance_ranking_agent_two">团队人数时间:</span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="rank_start_day_agent_two"></span>&nbsp;&nbsp;<span id="rank_end_day_agent_two"></span></a>
<a href="#"><span id="performance_ranking_agent_two">团队人数时间:</span>&nbsp;&nbsp;&nbsp;&nbsp;<span id="team_details_time_start"></span>&nbsp;&nbsp;<span id="team_details_time_end"></span></a>
</h4>
</div>
<div class="modal-body">
......
define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/reportList_no_edit_template_tpl.html','css!style/home.css', 'css!style/report_list.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template, template_tax) {
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
realtime = {
pageNo: 1,
/*第几页*/
......@@ -17,6 +18,7 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
time_search_end:'',
bargain_id: '',
order_id: '',
switchType:3,
district_store_agent_id:'',
init: function() {
//初始化dot
......@@ -35,6 +37,22 @@ 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){
e.preventDefault();
e.stopPropagation();
realtime.switchType=3;
});
_doc.on('click', '#liudan_pic_btn_store', function(e){
e.preventDefault();
e.stopPropagation();
realtime.switchType=2;
});
_doc.on('click', '#liudan_pic_btn_person', function(e){
e.preventDefault();
e.stopPropagation();
realtime.switchType=1;
});
//点击今天按钮事件 的搜素
_doc.on('click', '#maintable_today', function(e){
//获取当天的日期 格式如 mmmm-yy-dd
......@@ -131,6 +149,34 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
realtime.district_store_agent_id = $(this).attr("data-id");
realtime.getapproachNumberDetails(1);
});
//部门-报备数-弹出框
_doc.on('click', '.reported-number-details', function(e) {
e.preventDefault();
e.stopPropagation();
realtime.district_store_agent_id = $(this).attr("data-id");
realtime.getreportedNumberDetails(1);
});
//部门-新增房源数-弹出框
_doc.on('click', '.newshop-number-details', function(e) {
e.preventDefault();
e.stopPropagation();
realtime.district_store_agent_id = $(this).attr("data-id");
realtime.getnewshopNumberDetails(1);
});
//部门-新增客户数-弹出框
_doc.on('click', '.newuser-number-details', function(e) {
e.preventDefault();
e.stopPropagation();
realtime.district_store_agent_id = $(this).attr("data-id");
realtime.getnewuserNumberDetails(1);
});
//部门-团队数-弹出框
_doc.on('click', '.team-number-details', function(e) {
e.preventDefault();
e.stopPropagation();
realtime.district_store_agent_id = $(this).attr("data-id");
realtime.getteamNumberDetails(1);
});
//点击详情按钮事件,获取报告详情
_doc.on('click', '.details-btn', function() {
......@@ -198,18 +244,17 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
},
//获取1表示个人业绩排行 2门店 3区域
switchType: function(){
switch (Number(this.mainTabIndex)){
case 0:
return 3;
case 1:
return 2;
case 2:
return 1;
default:
return '';
}
},
// 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){
......@@ -473,9 +518,11 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
getcollectionNumberDetails: 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
'end_time': realtime.time_search_end,
'AuthToken':user_info_obj.AuthToken
};
$.ajax({
type: 'GET',
......@@ -515,13 +562,14 @@ 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
'end_time': realtime.time_search_end,
'AuthToken':user_info_obj.AuthToken
};
$.ajax({
type: 'GET',
url: '/broker/housingResourcePcInfo',
url: '/broker/marchInListPcInfo',
data: params,
timeout: 30000,
dataType: 'json',
......@@ -552,6 +600,219 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'text!temp/r
}
});
},
//部门-报备-弹出框-详情
getreportedNumberDetails: function(pageNo){
var params = {
'id': realtime.district_store_agent_id,
'type': realtime.switchType,
'start_time': realtime.time_search_start,
'end_time': realtime.time_search_end,
'AuthToken':user_info_obj.AuthToken
};
$.ajax({
type: 'GET',
url: '/broker/marchInListPcInfo',
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('reported_number_details_tpl').innerHTML);
$("#reported_number_details_list").html(doTtmpl(data.data));
//获取统计时间
$('#reported_details_time_start').html(realtime.time_search_start);
$('#reported_details_time_end').html(realtime.time_search_end);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
//部门-报备-弹出框-详情
getreportedNumberDetails: function(pageNo){
var params = {
'id': realtime.district_store_agent_id,
'type': realtime.switchType,
'start_time': realtime.time_search_start,
'end_time': realtime.time_search_end,
'AuthToken':user_info_obj.AuthToken
};
$.ajax({
type: 'GET',
url: '/broker/followListPcInfo',
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('reported_number_details_tpl').innerHTML);
$("#reported_number_details_list").html(doTtmpl(data.data));
//获取统计时间
$('#reported_details_time_start').html(realtime.time_search_start);
$('#reported_details_time_end').html(realtime.time_search_end);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
//部门-新增房源-弹出框-详情
getnewshopNumberDetails: function(pageNo){
var params = {
'id': realtime.district_store_agent_id,
'type': realtime.switchType,
'start_time': realtime.time_search_start,
'end_time': realtime.time_search_end,
'AuthToken':user_info_obj.AuthToken
};
$.ajax({
type: 'GET',
url: '/broker/housingResourcePcInfo',
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('newshop_number_details_tpl').innerHTML);
$("#newshop_number_details_list").html(doTtmpl(data.data));
//获取统计时间
$('#newshop_details_time_start').html(realtime.time_search_start);
$('#newshop_details_time_end').html(realtime.time_search_end);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
//部门-新增客户-弹出框-详情
getnewuserNumberDetails: function(pageNo){
var params = {
'id': realtime.district_store_agent_id,
'type': realtime.switchType,
'start_time': realtime.time_search_start,
'end_time': realtime.time_search_end,
'AuthToken':user_info_obj.AuthToken
};
$.ajax({
type: 'GET',
url: '/broker/userResourcePcInfo',
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('newuser_number_details_tpl').innerHTML);
$("#newuser_number_details_list").html(doTtmpl(data.data));
//获取统计时间
$('#newuser_details_time_start').html(realtime.time_search_start);
$('#newuser_details_time_end').html(realtime.time_search_end);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
//部门-团队-弹出框-详情
getteamNumberDetails: function(pageNo){
var params = {
'id': realtime.district_store_agent_id,
'type': realtime.switchType,
'start_time': realtime.time_search_start,
'end_time': realtime.time_search_end,
'AuthToken':user_info_obj.AuthToken
};
$.ajax({
type: 'GET',
url: '/broker/teamNumPcInfo',
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('team_number_details_tpl').innerHTML);
$("#team_number_details_list").html(doTtmpl(data.data));
//获取统计时间
$('#team_details_time_start').html(realtime.time_search_start);
$('#team_details_time_end').html(realtime.time_search_end);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
bargaininfoShow: function() { //报告详情
$.ajax({
'type': 'GET',
......
......@@ -1524,7 +1524,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
}else{
$("#caozuo_table_edit").html('暂无数据(*^_^*)');
};
//转介绍人 记录
//转介绍人 记录
var caozuo_table_introduce = "";
$.each(data['data']['user_invite_history'], function(i, item) {
caozuo_table += '<tr><td>' + item.remark + '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
......
......@@ -124,7 +124,6 @@
<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>
......@@ -140,7 +139,6 @@
</td>
<td class="text-center">[%= it["list"][item]['performance_total'] %]</td>
<td class="text-center">[%= it["list"][item]['bargain_sum_total'] %]</td>
<!--<td class="text-center">[%= it["list"][item]['bargain_sum'] %]</td>-->
<td class="text-center">[%= it["list"][item]['paylog_total'] %]</td>
<td class="text-center">[%= it["list"][item]['march_in_num_total'] %]</td>
<td class="text-center">[%= it["list"][item]['look_at_num_total'] %]</td>
......@@ -299,7 +297,6 @@
<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]['performance_total'] %]</td>
<td class="text-center">[%= it["list"][item]['bargain_sum_total'] %]</td>
<!--<td class="text-center">[%= it["list"][item]['bargain_sum'] %]</td>-->
<td class="text-center">[%= it["list"][item]['paylog_total'] %]</td>
<td class="text-center">[%= it["list"][item]['march_in_num_total'] %]</td>
<td class="text-center">[%= it["list"][item]['look_at_num_total'] %]</td>
......@@ -386,5 +383,172 @@
[% } %]
</script>
<!--部门-报备数 -->
<!--门店-报备数 -->
<!--个人-报备数 -->
<script id="reported_number_details_tpl" type="text/template">
[% if(it&&it[0]) { %]
<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>
</tr>
[% for(var item in it){ %]
<tr data-id="[%= it[item]['id'] %]" data-orderid="[%= it[item]['order_id'] %]">
<td class="text-center">[%= it[item]['user_name'] %]</td>
<td class="text-center">[%= it[item]['user_phone'] %]</td>
<td class="text-center">[%= it[item]['create_time'] %]</td>
<td class="text-center">[%= it[item]['report_agent_name'] %]</td>
<td class="text-center">[%= it[item]['house_title'] %]</td>
<td class="text-center">[%= it[item]['predict_see_time'] %]</td>
<td class="text-center">
<a class="btn1 btn-success timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a>
</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="10" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
<!--部门-新增商铺数 -->
<!--门店-新增商铺数 -->
<!--个人-新增商铺数 -->
<script id="newshop_number_details_tpl" type="text/template">
[% if(it&&it[0]) { %]
<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>
</tr>
[% for(var item in it){ %]
<tr data-id="[%= it[item]['id'] %]" data-orderid="[%= it[item]['order_id'] %]">
<td class="text-center">[%= it[item]['id'] %]</td>
<td class="text-center">
[% if(it[item]["shop_type"] == 0) { %]
商场
[% }else{ %]
街铺
[% } %]
</td>
<td class="text-center">
[% if (it[item]['rent_type'] == 1) { %]
[%= it[item]["rent_price"] / 100 %]
[% } else if (it[item]['rent_type'] == 2) { %]
[%= it[item]["rent_price"] / 100 %] %
[% }else{ %]
[%= it[item]["rent_price"] / 100 %] //
[% } %]
</td>
<td class="text-center">
[% if(it[item]["shop_type"] == 0) { %]
[%= it[item]["shop_area_start"] + '-' + it[item]["shop_area_end"] %]
[% }else{ %]
[%= it[item]["shop_area_start"] %]
[% } %]
</td>
<td class="text-center">[%= it[item]['industry_type'] %]</td>
<td class="text-center">[%= it[item]['last_phone_follow_time'] %]</td>
<td>
[% if(it[item]["status"] == 0) { %]
已租
[% }else{ %]
待租
[% } %]
</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="10" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
<!--部门-新增客户 -->
<!--门店-新增客户 -->
<!--个人-新增客户 -->
<script id="newuser_number_details_tpl" type="text/template">
[% if(it&&it[0]) { %]
<tr>
<th class="text-center">客户ID</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>
</tr>
[% for(var item in it){ %]
<tr data-id="[%= it[item]['id'] %]" data-orderid="[%= it[item]['order_id'] %]">
<td class="text-center">[%= it[item]['id'] %]</td>
<td class="text-center">[%= it[item]['user_name'] %]</td>
<td class="text-center">[%= it[item]['user_phone'] %]</td>
<td class="text-center">[%= it[item]['create_time'] %]</td>
<td class="text-center">[%= it[item]['最后跟进时间'] %]</td>
<td class="text-center">
[% if(it[item]["user_status"] == 0) { %] 求租 [% }else if(it[item]["user_status"] == 1) { %] 已租 [% }else{ %] 无效 [% } %]
</td>
<td class="text-center">[%= it[item]['业态'] %]</td>
<td class="text-center">[%= it[item]['面积'] %]</td>
<td class="text-center">
[% if(it[item]["source"] == 10) { %]
APP注册
[% }else if(it[item]["source"] == 20 ) { %]
经纪人新增
[% }else{ %]
老数据客户
[% } %]
</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="10" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
<!--部门-团队人数 -->
<!--门店-团队人数 -->
<!--个人-团队人数 -->
<script id="team_number_details_tpl" type="text/template">
[% if(it&&it[0]) { %]
<tr>
<th class="text-center">注册时间</th>
<th class="text-center">用户ID</th>
<th class="text-center">姓名</th>
<th class="text-center">手机号</th>
</tr>
[% for(var item in it){ %]
<tr data-id="[%= it[item]['id'] %]" data-orderid="[%= it[item]['order_id'] %]">
<td class="text-center">[%= it[item]['create_time'] %]</td>
<td class="text-center">[%= it[item]['id'] %]</td>
<td class="text-center">[%= it[item]['name'] %]</td>
<td class="text-center">[%= it[item]['phone'] %]</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="10" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
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