Commit efbce62c authored by agping's avatar agping

业绩排行 倒序 正序

# Conflicts: # application/index/view/member/users_list.html
parent 79b801fd
......@@ -338,10 +338,10 @@
<tr>
<td colspan="11">
<form action="" method="get" id="form_search">
<!--<span class="fore-span ld-Marheight">创建时间:</span>
<span class="fore-span ld-Marheight">创建时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date" type="date">
<span class="fore-span ld-Marheight">-</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date" type="date">-->
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date" type="date">
<span class="fore-span ld-Marheight">注册时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="registration_start" name="registration_start" type="date">
......
......@@ -18,7 +18,20 @@
#rank_start_day,#rank_end_day,#performance_ranking{
font-size: 16px;
}
/*倒序 正序 样式*/
.positive-sequence-yeji,.reverse-order-yeji{
position: relative;
margin-left: 5px;
cursor: pointer;
}
.positive-sequence-yeji{
top: 8px;
}
.reverse-order-yeji{
top: -3px;
left: -19px;
}
</style>
<div id="page-content-wrapper">
......
......@@ -11,6 +11,7 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
store_id_Two: 0,//二级门店id
is_today_yeji:0,//默认搜索的不是今天 传参数0
panfangData: null,
orderList:'data.data.list',
init: function() {
//初始化dot
$(document.body).append(template);
......@@ -81,6 +82,20 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
realtime.is_today_yeji=0;
realtime.getList(1); //一级审核搜索
});
//正序
_doc.on('click', '.positive-sequence-yeji', function(e) {
e.preventDefault();
e.stopPropagation();
realtime.orderList='data.data.list.reverse()';
realtime.getList(1);
});
//倒序
_doc.on('click', '.reverse-order-yeji', function(e) {
e.preventDefault();
e.stopPropagation();
realtime.orderList='data.data.list';
realtime.getList(1);
});
//搜索的重置
$("#maintable_reset").click(function() {
......@@ -140,7 +155,7 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
var tpl=realtime.switchTpl();
console.log(tpl);
var doTtmpl = doT.template(document.getElementById(tpl).innerHTML);
$("#maintable_list").html(doTtmpl(data.data));
$("#maintable_list").html(doTtmpl(eval(realtime.orderList)));
//获取统计时间
$('#rank_start_day').html(data.data.start_time);
$('#rank_end_day').html(data.data.end_time);
......
<!--部门业绩排行-->
<script id="realtimePerformance_list_tpl_one" type="text/template">
[% if(it["list"] && it["list"].length && it["list"].length>0) { %]
[% if(it && it.length && it.length>0) { %]
<tr class="maintable-tr-bar">
<th class="text-center">排名</th>
<th class="text-center">部门</th>
<th class="text-center">业绩(元)</th>
<th class="text-center">业绩(元)<span class="glyphicon glyphicon-triangle-bottom positive-sequence-yeji"></span><span class="glyphicon glyphicon-triangle-top reverse-order-yeji"></span></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>
......@@ -14,21 +13,20 @@
<th class="text-center">新增客户</th>
<th class="text-center">团队人数</th>
</tr>
[% for(var item in it["list"]){ %]
<tr data-id="[%= it['list'][item]['district_id'] %]">
<td class="text-center">[%= it["list"][item]['index_'] %]</td>
[% for(var item in it){ %]
<tr data-id="[%= it[item]['district_id'] %]">
<td class="text-center">[%= it[item]['index_'] %]</td>
<td class="text-center">
<a class="store-ranking" href="#modal-store" data-toggle="modal" data-id="[%= it['list'][item]['district_id'] %]">[%= it["list"][item]['district_name']+'-'+it["list"][item]['name'] %]</a>
<a class="store-ranking" href="#modal-store" data-toggle="modal" data-id="[%= it[item]['district_id'] %]">[%= it[item]['district_name']+'-'+it[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>
<td class="text-center">[%= it["list"][item]['add_house_num_total'] %]</td>
<td class="text-center">[%= it["list"][item]['add_user_num_total'] %]</td>
<td class="text-center">[%= it["list"][item]['team_num'] %]</td>
<td class="text-center">[%= it[item]['performance_total'] %]</td>
<td class="text-center">[%= it[item]['bargain_sum_total'] %]</td>
<td class="text-center">[%= it[item]['paylog_total'] %]</td>
<td class="text-center">[%= it[item]['march_in_num_total'] %]</td>
<td class="text-center">[%= it[item]['look_at_num_total'] %]</td>
<td class="text-center">[%= it[item]['add_house_num_total'] %]</td>
<td class="text-center">[%= it[item]['add_user_num_total'] %]</td>
<td class="text-center">[%= it[item]['team_num'] %]</td>
</tr>
[% } %]
......@@ -41,13 +39,12 @@
<!--门店业绩排行-->
<script id="realtimePerformance_list_tpl_two" type="text/template">
[% if(it["list"] && it["list"].length && it["list"].length>0) { %]
[% if(it && it.length && it.length>0) { %]
<tr class="maintable-tr-bar">
<th class="text-center">排名</th>
<td class="text-center">门店</td>
<th class="text-center">业绩(元)</th>
<th class="text-center">业绩(元)<span class="glyphicon glyphicon-triangle-bottom positive-sequence-yeji"></span><span class="glyphicon glyphicon-triangle-top reverse-order-yeji"></span></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>
......@@ -55,21 +52,20 @@
<th class="text-center">新增客户</th>
<th class="text-center">团队人数</th>
</tr>
[% for(var item in it["list"]){ %]
[% for(var item in it){ %]
<tr>
<td class="text-center">[%= it["list"][item]['index_'] %]</td>
<td class="text-center">[%= it[item]['index_'] %]</td>
<td class="text-center">
<a class="agent-ranking" href="#modal-agent" 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>
<a class="agent-ranking" href="#modal-agent" data-toggle="modal" data-id="[%= it[item]['store_id'] %]">[%= it[item]['district_name']+'-'+it[item]['store_name']+'-'+it[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>
<td class="text-center">[%= it["list"][item]['add_house_num_total'] %]</td>
<td class="text-center">[%= it["list"][item]['add_user_num_total'] %]</td>
<td class="text-center">[%= it["list"][item]['team_num'] %]</td>
<td class="text-center">[%= it[item]['performance_total'] %]</td>
<td class="text-center">[%= it[item]['bargain_sum_total'] %]</td>
<td class="text-center">[%= it[item]['paylog_total'] %]</td>
<td class="text-center">[%= it[item]['march_in_num_total'] %]</td>
<td class="text-center">[%= it[item]['look_at_num_total'] %]</td>
<td class="text-center">[%= it[item]['add_house_num_total'] %]</td>
<td class="text-center">[%= it[item]['add_user_num_total'] %]</td>
<td class="text-center">[%= it[item]['team_num'] %]</td>
</tr>
[% } %]
[% }else{ %]
......@@ -81,31 +77,29 @@
<!--个人业绩排行-->
<script id="realtimePerformance_list_tpl_three" type="text/template">
[% if(it["list"] && it["list"].length && it["list"].length>0) { %]
[% if(it && it.length && it.length>0) { %]
<tr class="maintable-tr-bar">
<th class="text-center">排名</th>
<th class="text-center">经纪人</th>
<th class="text-center">业绩(元)</th>
<th class="text-center">业绩(元)<span class="glyphicon glyphicon-triangle-bottom positive-sequence-yeji"></span><span class="glyphicon glyphicon-triangle-top reverse-order-yeji"></span></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["list"]){ %]
<tr data-id="[%= it['list'][item]['id'] %]" data-orderid="[%= it['list'][item]['order_id'] %]">
<td class="text-center">[%= it["list"][item]['index_'] %]</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]['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>
<td class="text-center">[%= it["list"][item]['add_house_num_total'] %]</td>
<td class="text-center">[%= it["list"][item]['add_user_num_total'] %]</td>
[% for(var item in it){ %]
<tr data-id="[%= it[item]['id'] %]" data-orderid="[%= it[item]['order_id'] %]">
<td class="text-center">[%= it[item]['index_'] %]</td>
<td class="text-center">[%= it[item]['district_name']+'-'+it[item]['store_name']+'-'+it[item]['name'] %]</a></td>
<td class="text-center">[%= it[item]['performance_total'] %]</td>
<td class="text-center">[%= it[item]['bargain_sum_total'] %]</td>
<td class="text-center">[%= it[item]['paylog_total'] %]</td>
<td class="text-center">[%= it[item]['march_in_num_total'] %]</td>
<td class="text-center">[%= it[item]['look_at_num_total'] %]</td>
<td class="text-center">[%= it[item]['add_house_num_total'] %]</td>
<td class="text-center">[%= it[item]['add_user_num_total'] %]</td>
</tr>
[% } %]
[% }else{ %]
......@@ -115,6 +109,9 @@
[% } %]
</script>
<!--门店业绩 详情-->
<script id="store_list_tpl" type="text/template">
[% if(it["list"] && it["list"].length && it["list"].length>0) { %]
......
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