暫無描述

dayGrandSalerTotal.blade.php 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. <div class="page-container">
  5. <div>
  6. <div>
  7. @if($self_role != '销售')
  8. <input class="input-text" style="width:6%;text-align:center" type="text" value="所属团队"/>
  9. <select style="width:10%;text-align:center" id='team_id' name="team_id">
  10. <option value="0" @if($team_id=='') selected @endif>-- 选择团队 --</option>
  11. @foreach($teamlist as $v)
  12. <option value="{{$v['id']}}" @if($team_id==$v['id']) selected @endif>{{$v['name']}}</option>
  13. @endforeach
  14. </select>
  15. <input class="input-text" style="width:6%;text-align:center" type="text" value="所属销售"/>
  16. <select style="width:8%;text-align:center" id='admin_id' name="admin_id">
  17. <option value="0" @if($admin_id=='') selected @endif>-- 选择销售 --</option>
  18. @foreach($adminlist as $v)
  19. <option value="{{$v['id']}}" @if($admin_id==$v['id']) selected @endif>{{$v['realname']}}</option>
  20. @endforeach
  21. </select>
  22. @endif
  23. <input class="input-text" style="width:6%;text-align:center" type="text" value="开始时间"/>
  24. <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:''}}">
  25. <input class="input-text" style="width:6%;text-align:center" type="text" value="结束时间"/>
  26. <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:''}}">
  27. <a class="btn btn-primary radius" style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>
  28. <a class="btn btn-primary radius" onclick="statistics_export()" href="javascript:;"><i class="Hui-iconfont"></i> 导出数据</a>
  29. </div>
  30. </div>
  31. <div class="mt-20">
  32. <table class="table table-border table-bordered table-bg table-hover table-sort">
  33. <thead>
  34. <tr class="text-c">
  35. <th width="4%">汇总日期</th>
  36. <th width="4%">销售</th>
  37. <th width="4%">所属团队</th>
  38. <th width="4%">总投放</th>
  39. <th width="4%">总客户数</th>
  40. <th width="4%">总下单数</th>
  41. <th width="4%">总销售额</th>
  42. <th width="4%">总货品成本</th>
  43. <th width="4%">总运费成本</th>
  44. <th width="4%">总售后</th>
  45. <th width="4%">总退补</th>
  46. <th width="4%">总毛利</th>
  47. <th width="4%">累计roi</th>
  48. <th width="4%">总加粉数</th>
  49. <th width="4%">总新粉下单</th>
  50. <th width="4%">总老粉下单</th>
  51. <th width="4%">总复购单数</th>
  52. <th width="4%">总复购率</th>
  53. <th width="4%">累计7日roi</th>
  54. <th width="4%">累计15日roi</th>
  55. <th width="4%">累计30日roi</th>
  56. <th width="4%">累计45日roi</th>
  57. <th width="4%">累计60日roi</th>
  58. </tr>
  59. </thead>
  60. <tbody>
  61. @if($result)
  62. @foreach($result as $a)
  63. <tr class="text-c" style=" text-align:center;">
  64. <td>{{$a['idate']}}</td>
  65. <td>{{$a['admin_name']}}</td>
  66. <td>{{$a['team_name']}}</td>
  67. <td>{{$a['throw_cost']}}</td>
  68. <td>{{$a['cust_count']}}</td>
  69. <td>{{$a['order_count']}}</td>
  70. <td>{{$a['order_amount']}}</td>
  71. <td>{{$a['goods_cost']}}</td>
  72. <td>{{$a['freight_cost']}}</td>
  73. <td>{{$a['aftersale_cost']}}</td>
  74. <td>{{$a['refund_fee']}}</td>
  75. <td>{{$a['profit']}}</td>
  76. <td>{{$a['roi']}}</td>
  77. <td>{{$a['fan_count']}}</td>
  78. <td>{{$a['new_order_count']}}</td>
  79. <td>{{$a['old_order_count']}}</td>
  80. <td>{{$a['fugou_order_count']}}</td>
  81. <td>{{$a['fugou_rate']}}</td>
  82. <td>{{$a['roi7']}}</td>
  83. <td>{{$a['roi15']}}</td>
  84. <td>{{$a['roi30']}}</td>
  85. <td>{{$a['roi45']}}</td>
  86. <td>{{$a['roi60']}}</td>
  87. </tr>
  88. @endforeach
  89. @endif
  90. </tbody>
  91. </table>
  92. </div>
  93. <div id="page" class="page_div"></div>
  94. </div>
  95. <!--_footer 作为公共模版分离出去-->
  96. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  97. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  98. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  99. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  100. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  101. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  102. <!--/_footer 作为公共模版分离出去-->
  103. <!--/_footer 作为公共模版分离出去-->
  104. <script type="text/javascript">
  105. function user_search(){
  106. var stime = $('#stime').val();
  107. var etime = $('#etime').val();
  108. var team_id = $('#team_id').val();
  109. var admin_id = $('#admin_id').val();
  110. location.href = 'dayGrandSalerTotal?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  111. }
  112. //导出
  113. function statistics_export(){
  114. var stime = $('#stime').val();
  115. var etime = $('#etime').val();
  116. var team_id = $('#team_id').val();
  117. var admin_id = $('#admin_id').val();
  118. location.href = '/admin/statistics/dayGrandSalerTotal_export?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  119. }
  120. /*分页*/
  121. $("#page").paging({
  122. pageNo:{{$page}},
  123. totalPage: {{$pages}},
  124. totalSize: {{$count}},
  125. callback: function(num) {
  126. var stime = $('#stime').val();
  127. var etime = $('#etime').val();
  128. var team_id = $('#team_id').val();
  129. var admin_id = $('#admin_id').val();
  130. location.href='dayGrandSalerTotal?page='+num+'&stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  131. }
  132. })
  133. $(function(){
  134. getsale();
  135. })
  136. $('#team_id').change(function(){
  137. getsale();
  138. })
  139. function getsale(){
  140. team = $('#team_id').val();
  141. if(team=='0'){
  142. return false;
  143. }else{
  144. $.ajax({
  145. 'url':'/admin/order/teamAdmins/'+team,
  146. 'type': 'get',
  147. 'dataType':'json',
  148. 'success' : function(data){
  149. admin_id = '{{$admin_id}}';
  150. str = '<option value=\'0\'>-- 选择销售 --<\/option>';
  151. $.each(data, function(i, va){
  152. sele = '';
  153. if(va.id == admin_id){
  154. sele = 'selected';
  155. }
  156. str += '<option value="'+va.id+'" '+sele+'>' + va.realname +'<\/option>';
  157. })
  158. $('#admin_id').html(str);
  159. }
  160. });
  161. }
  162. }
  163. </script>
  164. </body>
  165. @endsection