Nessuna descrizione

templateLogMonthReport.blade.php 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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' })" class="input-text Wdate" 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' })" class="input-text Wdate" 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="5%">月份</th>
  36. <th width="5%">销售名</th>
  37. <th width="5%">当月PV量</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. <th width="5%">新粉订单复购率</th>
  48. <th width="5%">当月粉丝人均销售额</th>
  49. </tr>
  50. </thead>
  51. <tbody>
  52. @if($result)
  53. @foreach($result as $a)
  54. <tr class="text-c" style=" text-align:center;">
  55. <td>{{$a['mdate']}}</td>
  56. <td>{{$a['admin_name']}}</td>
  57. <td>{{$a['pv_count']}}</td>
  58. <td>{{$a['long_count']}}</td>
  59. <td>{{$a['fan_add']}}</td>
  60. <td>{{$a['cust_count']}}</td>
  61. <td>{{$a['order_count']}}</td>
  62. <td>{{$a['fugou_order_count']}}</td>
  63. <td>{{$a['order_amount']}}</td>
  64. <td>{{$a['change_rate']}}</td>
  65. <td>{{$a['new_order_rate']}}</td>
  66. <td>{{$a['cust_fugou_rate']}}</td>
  67. <td>{{$a['order_fugou_rate']}}</td>
  68. <td>{{$a['avg_amount']}}</td>
  69. </tr>
  70. @endforeach
  71. @endif
  72. </tbody>
  73. </table>
  74. </div>
  75. <div id="page" class="page_div"></div>
  76. </div>
  77. <!--_footer 作为公共模版分离出去-->
  78. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  79. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  80. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  81. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  82. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  83. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  84. <!--/_footer 作为公共模版分离出去-->
  85. <!--/_footer 作为公共模版分离出去-->
  86. <script type="text/javascript">
  87. function user_search(){
  88. var stime = $('#stime').val();
  89. var etime = $('#etime').val();
  90. var team_id = $('#team_id').val();
  91. var admin_id = $('#admin_id').val();
  92. location.href = 'templateLogMonthReport?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  93. }
  94. //导出
  95. function statistics_export(){
  96. var stime = $('#stime').val();
  97. var etime = $('#etime').val();
  98. var team_id = $('#team_id').val();
  99. var admin_id = $('#admin_id').val();
  100. location.href = 'templateLogMonthReport_export?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  101. }
  102. /*分页*/
  103. $("#page").paging({
  104. pageNo:{{$page}},
  105. totalPage: {{$pages}},
  106. totalSize: {{$count}},
  107. callback: function(num) {
  108. var stime = $('#stime').val();
  109. var etime = $('#etime').val();
  110. var team_id = $('#team_id').val();
  111. var admin_id = $('#admin_id').val();
  112. location.href='templateLogMonthReport?page='+num+'&stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  113. }
  114. })
  115. $(function(){
  116. getsale();
  117. })
  118. $('#team_id').change(function(){
  119. getsale();
  120. })
  121. function getsale(){
  122. team = $('#team_id').val();
  123. if(team=='0'){
  124. return false;
  125. }else{
  126. $.ajax({
  127. 'url':'/admin/order/teamAdmins/'+team,
  128. 'type': 'get',
  129. 'dataType':'json',
  130. 'success' : function(data){
  131. admin_id = '{{$admin_id}}';
  132. str = '<option value=\'0\'>-- 选择销售 --<\/option>';
  133. $.each(data, function(i, va){
  134. sele = '';
  135. if(va.id == admin_id){
  136. sele = 'selected';
  137. }
  138. str += '<option value="'+va.id+'" '+sele+'>' + va.realname +'<\/option>';
  139. })
  140. $('#admin_id').html(str);
  141. }
  142. });
  143. }
  144. }
  145. </script>
  146. </body>
  147. @endsection