Commit a1420fd2 authored by agping's avatar agping

后台业绩对比图

parent da2d7fc5
...@@ -151,5 +151,13 @@ class RealTimePerformance extends Basic ...@@ -151,5 +151,13 @@ class RealTimePerformance extends Basic
return view('realtime/deal_map'); return view('realtime/deal_map');
} }
} }
//业绩对比图
public function performanceContrast()
{
if (!$this->request->isAjax()) {
return view('realtime/performanceContrast');
}
}
} }
\ No newline at end of file
{layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="performanceContrast" />
<style>
.user-ul{
text-align:center;
float: left;
position: relative;
overflow-y:scroll ;
height:100px;
left: 0px;
width:100%;
line-height: 30px;
}
.table-bordered > tbody > tr > td{
border: 1px solid rgba(121, 121, 121, 1);
color: #333333;
line-height: 1.2;
}
.user-ul li{
list-style: none;
line-height: 20px;
}
.modal-body1 {
height: 660px;
overflow-y: auto;
padding-bottom: 60px;
}
.modal-body2{
padding: 35px;
/*height: 380px;*/
}
.input {
width: 16%!important;
}
.text-left {
float: left;
display: inline-block;
height: 26px;
line-height: 26px;
font-size: 14px;
}
.text-right {
float: right;
display: inline-block;
}
#batch {
float: left;
height: 34px;
line-height: 34px;
}
.ld-Marheight {
margin-top: 15px;
}
.clear {
clear: both;
}
.left{
float: left;
font-size: 12px;
}
.bottom{
margin-top: 30px;
}
.btn6_1{
width: 80% !important;
float: left;
}
.btn4{
width: 123px!important;
}
</style>
<div id="page-content-wrapper">
<div class="container">
<div class="row">
<div class="">
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li>
<a href="#">业绩对比</a>
</li>
<div class="pull-right">
<ul class="bread_btn">
<li>
</li>
</ul>
</div>
</div>
<div class="panel-body">
<div class="table-responsive" >
<table class="table table-bordered table-hover table-condensed" style="width: 880px;">
<thead>
<tr>
<td colspan="11">
<form action="" method="get" id="form_search">
<span class="fore-span ld-Marheight">对比月份(至少选择3个月):</span>
<input id="count_time1" class="form-control btn4 ld-Marheight" type="text" placeholder="请选择"
onClick="WdatePicker({el:this,dateFmt:'yyyy-MM',readOnly:'readonly' })">
<span class="fore-span ld-Marheight">-</span>
<input id="count_time2" class="form-control btn4 ld-Marheight" type="text" placeholder="请选择"
onClick="WdatePicker({el:this,dateFmt:'yyyy-MM',readOnly:'readonly' })">
<span class="fore-span ld-Marheight">实收对比时间:</span>
<input id="count_time3" class="form-control btn4 ld-Marheight" type="text" placeholder="请选择"
onClick="WdatePicker({el:this,dateFmt:'dd',readOnly:'readonly' })">
<span class="fore-span ld-Marheight">-</span>
<input id="count_time4" class="form-control btn4 ld-Marheight" type="text" placeholder="请选择"
onClick="WdatePicker({el:this,dateFmt:'dd',readOnly:'readonly' })">
<span class="fore-span ld-Marheight">业绩对比时间:</span>
<input id="count_time5" class="form-control btn4 ld-Marheight" type="text" placeholder="请选择"
onClick="WdatePicker({el:this,dateFmt:'dd',readOnly:'readonly' })">
<span class="fore-span ld-Marheight">-</span>
<input id="count_time6" class="form-control btn4 ld-Marheight" type="text" placeholder="请选择"
onClick="WdatePicker({el:this,dateFmt:'dd',readOnly:'readonly' })">
<span class="btn btn-info btn3 margin-top-ld" id="search" style="float: left;">搜索</span>
<span class="btn btn-info btn3 margin-top-ld" id="reset" style="float: left;">重置</span>
</form>
</td>
</tr>
<!--<tr>
<th class="text-center">查看时间</th>
<th class="text-center">查看人</th>
<th class="text-center">客户ID</th>
</tr>-->
</thead>
</table>
<!--<div style="width: 680px;height: 700px;overflow-y: scroll;">-->
<table class="table table-bordered table-hover table-condensed" style="width: 650px;font-size: 13px;">
<tbody id="users_list" class="text-center">
</tbody>
</table>
<!--</div>-->
</div>
<!-- /#page-content-wrapper -->
<!-- <div class="text-left">
每页显示<span id="page">15</span>条 | 共<span id="total_page"></span>条
</div> -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /#wrapper -->
<!-- /#新增公告模态框 -->
<div class="modal fade" id="modal_add_user" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
新增公告
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" action="/agents/add_user" id="add_user_form">
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">标题:</label>
<div class="col-sm-9">
<input type="text" class="form-control btn6" name="user_name" id="announcement_title" placeholder="请输入标题">
<span class="use-span text-danger">(50字以内,显示在首页列表)</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">内容:</label>
<div class="col-sm-9">
<textarea class="form-control btn6_1" name="agent_id" autocomplete="off" id="announcement_content" rows="10" cols="40" placeholder="请输入内容"></textarea>
<ul class="user-ul">
</ul>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="add_announcement">
保存
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--公告详情-->
<div class="modal fade" id="modal-record" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h4 class="modal-title">
公告详情
</h4>
</div>
<div class="modal-body modal-body1">
<div class="notice-title text-center">清明节放假通知</div>
<div class="notice-time text-right">2018-12-12 12:00:00</div>
<div class="clear"></div>
<div class="notice-text"></div>
<div class="notice-fujian-area">
<span>附件(点击可下载):</span>
<ul id="fujian_ul">
</ul>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /#删除模态框 -->
<div class="modal fade" id="modal-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
删除
</h4>
</div>
<div class="modal-body">
<div class="modal-body">
<input type="hidden" value="" id="delete_id" /> 确认删除吗?
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary" id="confirm_delete">
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
...@@ -380,6 +380,7 @@ Route::group('index', [ ...@@ -380,6 +380,7 @@ Route::group('index', [
'delCostCheck' => ['index/RealTimePerformance/delCost', ['method' => 'GET']],//删除报销 liu 'delCostCheck' => ['index/RealTimePerformance/delCost', ['method' => 'GET']],//删除报销 liu
'locationMap' => ['index/RealTimePerformance/locationMap', ['method' => 'GET']],//定位地图 liu 'locationMap' => ['index/RealTimePerformance/locationMap', ['method' => 'GET']],//定位地图 liu
'dealMap' => ['index/RealTimePerformance/dealMap', ['method' => 'GET']],//成交地图 liu 'dealMap' => ['index/RealTimePerformance/dealMap', ['method' => 'GET']],//成交地图 liu
'performanceContrast' => ['index/RealTimePerformance/performanceContrast', ['method' => 'GET']],//业绩对比 liu
'shopinspectionLog' => ['index/ShopInspectionLog/shopinspectionLogList', ['method' => 'POST|GET']],//商铺查看日志liu 'shopinspectionLog' => ['index/ShopInspectionLog/shopinspectionLogList', ['method' => 'POST|GET']],//商铺查看日志liu
'opensquareLog' => ['index/OpenSquareLog/opensquarelogList', ['method' => 'POST|GET']],//开盘广场liu 'opensquareLog' => ['index/OpenSquareLog/opensquarelogList', ['method' => 'POST|GET']],//开盘广场liu
'redEnvelope' => ['index/RedEnvelope/redEnvelopeList', ['method' => 'POST|GET']],//活动列表liu 'redEnvelope' => ['index/RedEnvelope/redEnvelopeList', ['method' => 'POST|GET']],//活动列表liu
......
...@@ -40,9 +40,10 @@ ...@@ -40,9 +40,10 @@
<td>人数</td> <td>人数</td>
</tr> </tr>
<tr class="main-con" v-for="(item2,index) in item.value"> <tr class="main-con" v-for="(item2,index) in item.value">
<td>{{(item2.real_performance_time).replace(/-/g, '.')}}</td> <!--<td>{{(item2.real_performance_time).replace(/-/g, '.')}}</td>-->
<td>{{(item2.real_performance_time)}}</td>
<td>{{item2.real_performance}}</td> <td>{{item2.real_performance}}</td>
<td>{{(item2.performance_time).replace(/-/g, '.')}}</td> <td>{{(item2.performance_time)}}</td>
<td>{{item2.performance}}</td> <td>{{item2.performance}}</td>
<td>{{item2.people_num}}</td> <td>{{item2.people_num}}</td>
</tr> </tr>
...@@ -253,7 +254,7 @@ ...@@ -253,7 +254,7 @@
font-size: .2rem; font-size: .2rem;
} }
.main-con td:nth-of-type(1),.main-con td:nth-of-type(3){ .main-con td:nth-of-type(1),.main-con td:nth-of-type(3){
width: 2.6rem; /*width: 2.6rem;*/
} }
.main-con td:nth-of-type(2),.main-con td:nth-of-type(4){ .main-con td:nth-of-type(2),.main-con td:nth-of-type(4){
/*width: 1.16rem;*/ /*width: 1.16rem;*/
......
define (['doT', 'text!temp/performanceContrast_template_tpl.html','ckfinder','ckfinderStart', 'css!style/home.css','pagination','bootstrapJs'], function (doT, template) {
var user = {
pageNo: 1, /*第几页*/
pageSize: 15, /*每页显示多少条*/
user_id : 0,
urls: '',
agent_id_two:'',
agent_id2 : 0,
agent_id_phone:'',
init: function () {
//初始化dot
$ ("body").append (template);
user.getList ();
user.event ();
},
event: function () {
var _doc = $(document);
$("#search").click(function(){
user.getList(1);
});
$("#reset").click(function () {
document.getElementById("form_search").reset();
$(".user-ul").html('');
user.agent_id_phone = '';
});
//分佣方 姓名下拉式
$(document).on("input", "#comit_name", function() { //手机号新增搜索客方
if($("#comit_name").val() == '') {
user.agent_id_phone='';
$(".user-ul").html('');
} else {
user.search_person();
}
});
//点击li 列表消失
$(document).delegate(".addphone", "click", function() { //list消失新增客户 点击li事件 获取id ul消失
user.addphone(this);
});
},
search_person: function() { //手机号新增客户
$.ajax({
url: '/index/getBroker_new',
type: 'GET',
async: true,
data: {
"phone": $("#comit_name").val(),
'all' : 1
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul = "";
$.each(data.data, function(i, item) {
if(item.status == 0 || item.status == 4){
var status=' ';
};
if(item.status == 1){
var status='-长假';
};
if(item.status == 2){
var status='-离职';
};
if(item.status == 3){
var status='-转勤';
}
user_ul += '<li class="addphone" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + status + '</li>';
});
$(".user-ul").html(user_ul);
$(".user-ul").show();
} else {
alert(data.msg);
}
}
});
},
//将li里的值 赋给input(分佣方姓名)
addphone: function(obj) {//新增客户 input赋值
var that = user ;
var user_ht = $(obj).html()+'';
var user_ht_str=user_ht.substring(0,user_ht.length-3);
$("#comit_name").val(user_ht_str);
$(".user-ul").html('');
$(".user-ul").hide();
that.agent_id_phone = $(obj).attr("data-id");
},
//获取业绩对比
getList: function (pageNo) {
user.pageNo = pageNo;
var params = {};
params.time_start = $("#count_time1").val();
params.time_end = $("#count_time2").val();
params.performance_time_start = $("#count_time3").val();
params.performance_time_end = $("#count_time4").val();;
params.real_performance_time_start = $("#count_time5").val();;
params.real_performance_time_end = $("#count_time6").val();;
$.ajax ({
url: 'https://pre2.tonglianjituan.com/index/performanceStatistics',
type: 'GET',
async: true,
data: params,
dataType: 'json',
success: function (data) {
var temp = document.getElementById ('performanceContrast_list_tpl').innerHTML;
var doTtmpl = doT.template (temp);
$ ("#users_list").html (doTtmpl (data.data));
/*分页代码*/
// add_page(data.data.total,pageNo,user.pageSize,user.getList);
// $("#total_page").html(data.data.total);
}
});
},
};
return user;
});
...@@ -29,7 +29,7 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css', ...@@ -29,7 +29,7 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
// $(document).on('input','#comit_time_start',function(e){ // $(document).on('input','#comit_time_start',function(e){
// that.getList(1); // that.getList(1);
// }); // });
$('#comit_time_start').datetimepicker({ $('#comit_time_start').datetimepicker({//处理监听到数据的
format:'yyyy-mm', format:'yyyy-mm',
startView: 3, startView: 3,
maxViewMode: 1, maxViewMode: 1,
......
<script id="performanceContrast_list_tpl" type="text/template">
[% if(it && it.length) { %]
[% for(var item in it){ %]
<tr style="background: rgba(204, 204, 204, 1);">
<td colspan="5">[%= it[item]['city'] %]</td>
</tr>
<tr style="background: rgba(204, 204, 204, 1);">
<td>实收时间</td>
<td>实收</td>
<td>业绩时间</td>
<td>业绩</td>
<td>人数</td>
</tr>
[% for(var item1 in it[item]['value']){ %]
<tr>
<td>[%= it[item]['value'][item1]['people_num'] %]</td>
<td>[%= it[item]['value'][item1]['people_num'] %]</td>
<td>[%= it[item]['value'][item1]['people_num'] %]</td>
<td>[%= it[item]['value'][item1]['people_num'] %]</td>
<td>[%= it[item]['value'][item1]['people_num'] %]</td>
</tr>
[% } %]
[% } %]
[% }else{ %]
<tr>
<td colspan="7" 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