Commit cee7093d authored by agping's avatar agping

邀请注册统计

parent c889d6c8
<?php
namespace app\index\controller;
/**
* Created by PhpStorm.
* User: liu yin ping
* Date: 2018/9/10
* Time: 13:10
*/
use app\index\extend\Basic;
class InviteStatistics extends Basic
{
public function inviteStatisticsList()
{
if (!$this->request->isAjax()) {
return view('inviteStatistics/inviteStatisticsList');
}
}
}
\ No newline at end of file
{layout name="global/frame_tpl" /}
<input type="hidden" class="page-load" id="inviteStatisticsList" />
<style>
.modal-body{
/*height: 600px;*/
overflow-y: auto;
padding-bottom: 60px;
}
.user-ul2{
width: 100%;
height: auto;
padding-bottom: 15px;
float: left;
}
.user-ul2 li{
list-style: none;
line-height: 30px;
}
.money_total_two{
font-weight: bold;
font-size: 15px;
}
#search{
float: left;
}
#reset{
float: left;
}
</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="javascript:;">邀请统计</a>
</li>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="10">
<form id="form_search">
<span class="fore-span ld-Marheight">客户初次登录时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_start" name="start_date1" 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="create_time_end" name="end_date1" type="date">
<select class="form-control btn4 ld-Marheight input" name="" id="district_id" >
<option value="">选择部门</option>
</select>
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
</select>
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form>
</td>
</tr>
<tr>
<th class="text-center">所属部门</th>
<th class="text-center">所属门店</th>
<th class="text-center">业务员</th>
<th class="text-center">邀请注册登陆人数</th>
</tr>
</thead>
<tbody class="text-center" id="follow_list">
</table>
</div>
<!-- /#page-content-wrapper -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--时间轴-->
<!--时间轴-->
<div class="modal fade" id="modal-time" 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" class="iframe-div-parent">
<iframe class="iframe-time-line"></iframe>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>
...@@ -291,6 +291,8 @@ Route::group('index', [ ...@@ -291,6 +291,8 @@ Route::group('index', [
'performancesubsidiaryList' => [ 'index/PerformanceSubsidiary/performancesubsidiaryList', [ 'method' => 'POST|GET' ] ],//业绩明细liu 'performancesubsidiaryList' => [ 'index/PerformanceSubsidiary/performancesubsidiaryList', [ 'method' => 'POST|GET' ] ],//业绩明细liu
'myCollectionUserList' => [ 'index/myCollectionUser/myCollectionUserList', [ 'method' => 'POST|GET' ] ],//我收藏的客户liu 'myCollectionUserList' => [ 'index/myCollectionUser/myCollectionUserList', [ 'method' => 'POST|GET' ] ],//我收藏的客户liu
'myCollectionShopList' => [ 'index/myCollectionShop/myCollectionShopList', [ 'method' => 'POST|GET' ] ],//我收藏的客户liu 'myCollectionShopList' => [ 'index/myCollectionShop/myCollectionShopList', [ 'method' => 'POST|GET' ] ],//我收藏的客户liu
'inviteStatistics' => [ 'index/InviteStatistics/inviteStatisticsList', [ 'method' => 'POST|GET' ] ],//实时业绩liu
'lookShopIndex' => [ 'index/LookShop/lookShopIndex', [ 'method' => 'GET' ] ],//商铺查看日志 'lookShopIndex' => [ 'index/LookShop/lookShopIndex', [ 'method' => 'GET' ] ],//商铺查看日志
......
define(['doT', 'text!temp/invite_statistics_list_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', "datetimepicker", 'pagination', 'bootstrapJs','blow-up'], function(doT, template) {
invitation = {
pageNo: 1,
/*第几页*/
pageSize: 15,
/*每页显示多少条*/
id: '',
house_id: '',
type: '',
valueCurrent: '',
ajaxObj: '',
stopstatus: true,
boxphoto: '',
init: function() {
//初始化dot
$(document.body).append(template);
invitation.getList(1);
invitation.event();
},
event: function() {
var _doc = $(document);
//二级联动
invitation.getDistrict(function(){
_doc.on('input', '#district_id, #district_id2', function(){
var _this = $(this);
var _id = _this.val();
_this.next().html('');//先清空
if(_id && _id != '0'){
invitation.getDistrictStoreList(_id, function(_data){
// var _str = '';
var _str = '<option value="0">全部</option>';
$.each(_data, function(i,item) {
_str += '<option value="'+item.id+'">'+item.store_name+'</option>';
});
_this.next().html(_str);
});
}else{
};
});
});
$("#search").click(function() {
invitation.getList(1);
});
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
$('#guest_stores').html('');
});
},
getList: function(pageNo) {
console.log($('#customer_name').val());
console.log($('#start_date').val());
console.log($('#shop_name').val());
invitation.pageNo = pageNo;
var params = {};
params.create_time_start =$('#create_time_start').val();
params.create_time_end =$('#create_time_end').val();
params.district_id =$('#district_id').val()*1;
params.store_id =$('#guest_stores').val()*1;
params.user_name =$('#user_name').val();
params.user_phone =$('#user_phone').val();//跟进搜索
params.report_agent_phone =$('#report_agent_phone').val();
params.report_agent_name =$('#report_agent_name').val();
params.house_title =$('#house_title').val();
params.shop_type =$('#shop_type').val()*1;//跟进搜索
params.pageNo = invitation.pageNo;
params.pageSize = invitation.pageSize;
$.ajax({
type: 'GET',
url: '/index/marchInList',//拜访列表
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('invite_statistics_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total,pageNo,invitation.pageSize,invitation.getList);
}else {
alert(data['msg']);
};
}else{
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
alert('请求超时');
};
}
});
},
//调用部门 和 门店的接口
getDistrict : function (fn) {
$.ajax ({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {"pageSize":1000},
dataType: 'json',
success: function (data) {
if (data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i,item) {
str += '<option value="'+item.id+'">'+item.district_name+'</option>';
});
$("#district_id").append(str);
$("#district_id2").append(str);
fn && fn();
}
}
});
},
getDistrictStoreList: function(id, fn){
$.ajax ({
url: '/index/getDistrictStoreList',
type: 'GET',
async: true,
data: {
'id':id,
"pageSize":1000
},
dataType: 'json',
success: function (data) {
if (data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
}
};
return invitation;
});
\ No newline at end of file
<script id="invite_statistics_list_tpl" type="text/template">
[% if(it) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['user_name'] %]</td>
<td>[%= hideTel(it[item]['user_phone']) %]</td>
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['report_agent_name'] %]</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="8" 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