123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- @extends('admin/master')
- @section('content')
- <body>
- <div class="page-container">
- <div>
- <div>
- @if($self_role != '销售')
- <input class="input-text" style="width:6%;text-align:center" type="text" value="所属团队"/>
- <select style="width:10%;text-align:center" id='team_id' name="team_id">
- <option value="0" @if($team_id=='') selected @endif>-- 选择团队 --</option>
- @foreach($teamlist as $v)
- <option value="{{$v['id']}}" @if($team_id==$v['id']) selected @endif>{{$v['name']}}</option>
- @endforeach
- </select>
- <input class="input-text" style="width:6%;text-align:center" type="text" value="所属销售"/>
- <select style="width:8%;text-align:center" id='admin_id' name="admin_id">
- <option value="0" @if($admin_id=='') selected @endif>-- 选择销售 --</option>
- @foreach($adminlist as $v)
- <option value="{{$v['id']}}" @if($admin_id==$v['id']) selected @endif>{{$v['realname']}}</option>
- @endforeach
- </select>
- @endif
- <input class="input-text" style="width:6%;text-align:center" type="text" value="开始时间"/>
- <input id="stime" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" class="input-text Wdate" autocomplete="off" style="width:12%;text-align:center;margin-left: -5px" name="stime" value="{{$stime?$stime:''}}">
- <input class="input-text" style="width:6%;text-align:center" type="text" value="结束时间"/>
- <input id="etime"type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd' })" class="input-text Wdate" autocomplete="off" style="width:12%;text-align:center;margin-left: -5px" name="etime" value="{{$etime?$etime:''}}">
-
- <a class="btn btn-primary radius" style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>
- <a class="btn btn-primary radius" onclick="statistics_export()" href="javascript:;"><i class="Hui-iconfont"></i> 导出数据</a>
-
- </div>
- </div>
-
- <div class="mt-20">
- <table class="table table-border table-bordered table-bg table-hover table-sort">
- <thead>
- <tr class="text-c">
- <th width="4%">汇总日期</th>
- <th width="4%">销售</th>
- <th width="4%">所属团队</th>
- <th width="4%">总投放</th>
- <th width="4%">总客户数</th>
- <th width="4%">总下单数</th>
- <th width="4%">总销售额</th>
- <th width="4%">总货品成本</th>
- <th width="4%">总运费成本</th>
- <th width="4%">总售后</th>
- <th width="4%">总退补</th>
- <th width="4%">总毛利</th>
- <th width="4%">累计roi</th>
- <th width="4%">总加粉数</th>
- <th width="4%">总新粉下单</th>
- <th width="4%">总老粉下单</th>
- <th width="4%">总复购单数</th>
- <th width="4%">总复购率</th>
- <th width="4%">累计7日roi</th>
- <th width="4%">累计15日roi</th>
- <th width="4%">累计30日roi</th>
- <th width="4%">累计45日roi</th>
- <th width="4%">累计60日roi</th>
-
- </tr>
- </thead>
- <tbody>
- @if($result)
- @foreach($result as $a)
- <tr class="text-c" style=" text-align:center;">
- <td>{{$a['idate']}}</td>
- <td>{{$a['admin_name']}}</td>
- <td>{{$a['team_name']}}</td>
- <td>{{$a['throw_cost']}}</td>
- <td>{{$a['cust_count']}}</td>
- <td>{{$a['order_count']}}</td>
- <td>{{$a['order_amount']}}</td>
- <td>{{$a['goods_cost']}}</td>
- <td>{{$a['freight_cost']}}</td>
- <td>{{$a['aftersale_cost']}}</td>
- <td>{{$a['refund_fee']}}</td>
- <td>{{$a['profit']}}</td>
- <td>{{$a['roi']}}</td>
- <td>{{$a['fan_count']}}</td>
- <td>{{$a['new_order_count']}}</td>
- <td>{{$a['old_order_count']}}</td>
- <td>{{$a['fugou_order_count']}}</td>
- <td>{{$a['fugou_rate']}}</td>
- <td>{{$a['roi7']}}</td>
- <td>{{$a['roi15']}}</td>
- <td>{{$a['roi30']}}</td>
- <td>{{$a['roi45']}}</td>
- <td>{{$a['roi60']}}</td>
-
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- </div>
- <div id="page" class="page_div"></div>
- </div>
-
- <!--_footer 作为公共模版分离出去-->
- <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
- <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
- <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
- <!--/_footer 作为公共模版分离出去-->
- <!--/_footer 作为公共模版分离出去-->
- <script type="text/javascript">
- function user_search(){
- var stime = $('#stime').val();
- var etime = $('#etime').val();
- var team_id = $('#team_id').val();
- var admin_id = $('#admin_id').val();
- location.href = 'dayGrandSalerTotal?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
- }
- //导出
- function statistics_export(){
- var stime = $('#stime').val();
- var etime = $('#etime').val();
- var team_id = $('#team_id').val();
- var admin_id = $('#admin_id').val();
- location.href = '/admin/statistics/dayGrandSalerTotal_export?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
- }
-
- /*分页*/
-
- $("#page").paging({
- pageNo:{{$page}},
- totalPage: {{$pages}},
- totalSize: {{$count}},
- callback: function(num) {
- var stime = $('#stime').val();
- var etime = $('#etime').val();
- var team_id = $('#team_id').val();
- var admin_id = $('#admin_id').val();
-
- location.href='dayGrandSalerTotal?page='+num+'&stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
- }
- })
- $(function(){
- getsale();
- })
- $('#team_id').change(function(){
- getsale();
- })
- function getsale(){
- team = $('#team_id').val();
- if(team=='0'){
- return false;
- }else{
- $.ajax({
- 'url':'/admin/order/teamAdmins/'+team,
- 'type': 'get',
- 'dataType':'json',
- 'success' : function(data){
- admin_id = '{{$admin_id}}';
- str = '<option value=\'0\'>-- 选择销售 --<\/option>';
- $.each(data, function(i, va){
- sele = '';
- if(va.id == admin_id){
- sele = 'selected';
- }
- str += '<option value="'+va.id+'" '+sele+'>' + va.realname +'<\/option>';
- })
-
- $('#admin_id').html(str);
- }
- });
- }
- }
-
- </script>
-
- </body>
- @endsection
|