Нет описания

salerOrderFugou.blade.php 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. <div class="page-container">
  5. <div>
  6. <div>
  7. <input class="input-text" style="width:6%;text-align:center" type="text" value="所属团队"/>
  8. <select style="width:10%;text-align:center" id='team_id' name="team_id">
  9. <option value="0" @if($team_id=='') selected @endif>-- 选择团队 --</option>
  10. @foreach($teamlist as $v)
  11. <option value="{{$v['id']}}" @if($team_id==$v['id']) selected @endif>{{$v['name']}}</option>
  12. @endforeach
  13. </select>
  14. <input class="input-text" style="width:6%;text-align:center" type="text" value="所属销售"/>
  15. <select style="width:8%;text-align:center" id='admin_id' name="admin_id">
  16. <option value="0" @if($admin_id=='') selected @endif>-- 选择销售 --</option>
  17. @foreach($adminlist as $v)
  18. <option value="{{$v['id']}}" @if($admin_id==$v['id']) selected @endif>{{$v['realname']}}</option>
  19. @endforeach
  20. </select>
  21. <input class="input-text" style="width:6%;text-align:center" type="text" value="排序方式"/>
  22. <select style="width:10%;text-align:center" id='sort' name="sort">
  23. <option value="0" @if($sort==0) selected @endif>订单复购率降序</option>
  24. <option value="1" @if($sort==1) selected @endif>用户复购率降序</option>
  25. </select>
  26. <a class="btn btn-primary radius" style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>
  27. <a class="btn btn-primary radius" onclick="statistics_export()" href="javascript:;"><i class="Hui-iconfont"></i> 导出数据</a>
  28. </div>
  29. </div>
  30. <div class="mt-20">
  31. <table class="table table-border table-bordered table-bg table-hover table-sort">
  32. <thead>
  33. <tr class="text-c">
  34. <th width="5%">销售</th>
  35. <!--th width="5%">PV量</th>
  36. <th width="5%">累计预估加粉数</th>
  37. <th width="5%">加粉转化率</th-->
  38. <th width="5%">累计加粉数</th>
  39. <th width="5%">下单用户数</th>
  40. <th width="5%">用户转化率</th>
  41. <th width="5%">累计下单数</th>
  42. <th width="5%">累计销售额</th>
  43. <th width="5%">复购订单数</th>
  44. <th width="5%">订单复购率</th>
  45. <th width="5%">复购用户数</th>
  46. <th width="5%">用户复购率</th>
  47. </tr>
  48. </thead>
  49. <tbody>
  50. @if($result)
  51. @foreach($result as $a)
  52. <tr class="text-c" style=" text-align:center;">
  53. <td>{{$a['admin_name']}}</td>
  54. <!--td>{{$a['pv_count']}}</td>
  55. <td>{{$a['long_count']}}</td>
  56. <td>{{$a['fan_add']}}</td>
  57. <td>{{$a['change_rate']}}</td-->
  58. <td>{{$a['fan_add']}}</td>
  59. <td>{{$a['customer_count']}}</td>
  60. <td>{{$a['cust_order_rate']}}</td>
  61. <td>{{$a['order_count']}}</td>
  62. <td>{{$a['order_amount']}}</td>
  63. <td>{{$a['fugou_count']}}</td>
  64. <td>{{$a['fugou_rate']}}</td>
  65. <td>{{$a['customer_fugou_count']}}</td>
  66. <td>{{$a['cust_fugou_rate']}}</td>
  67. </tr>
  68. @endforeach
  69. @endif
  70. </tbody>
  71. </table>
  72. </div>
  73. <div id="page" class="page_div"></div>
  74. </div>
  75. <!--_footer 作为公共模版分离出去-->
  76. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  77. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  78. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  79. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  80. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  81. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  82. <!--/_footer 作为公共模版分离出去-->
  83. <!--/_footer 作为公共模版分离出去-->
  84. <script type="text/javascript">
  85. function user_search(){
  86. var team_id = $('#team_id').val();
  87. var admin_id = $('#admin_id').val();
  88. var sort = $('#sort').val();
  89. location.href = 'salerOrderFugou?team_id='+team_id+'&admin_id='+admin_id+'&sort='+sort;
  90. }
  91. //导出
  92. function statistics_export(){
  93. var team_id = $('#team_id').val();
  94. var admin_id = $('#admin_id').val();
  95. var sort = $('#sort').val();
  96. location.href = 'salerOrderFugou_export?team_id='+team_id+'&admin_id='+admin_id+'&sort='+sort;
  97. }
  98. /*分页*/
  99. $("#page").paging({
  100. pageNo:{{$page}},
  101. totalPage: {{$pages}},
  102. totalSize: {{$count}},
  103. callback: function(num) {
  104. var team_id = $('#team_id').val();
  105. var admin_id = $('#admin_id').val();
  106. var sort = $('#sort').val();
  107. location.href='salerOrderFugou?page='+num+'&team_id='+team_id+'&admin_id='+admin_id+'&sort='+sort;
  108. }
  109. })
  110. $(function(){
  111. getsale();
  112. })
  113. $('#team_id').change(function(){
  114. getsale();
  115. })
  116. function getsale(){
  117. team = $('#team_id').val();
  118. if(team=='0'){
  119. return false;
  120. }else{
  121. $.ajax({
  122. 'url':'/admin/order/teamAdmins/'+team,
  123. 'type': 'get',
  124. 'dataType':'json',
  125. 'success' : function(data){
  126. admin_id = '{{$admin_id}}';
  127. str = '<option value=\'0\'>-- 选择销售 --<\/option>';
  128. $.each(data, function(i, va){
  129. sele = '';
  130. if(va.id == admin_id){
  131. sele = 'selected';
  132. }
  133. str += '<option value="'+va.id+'" '+sele+'>' + va.realname +'<\/option>';
  134. })
  135. $('#admin_id').html(str);
  136. }
  137. });
  138. }
  139. }
  140. </script>
  141. </body>
  142. @endsection