Nav apraksta

templateLogMonthReport.blade.php 9.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. <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:''}}">
  23. <input class="input-text" style="width:6%;text-align:center" type="text" value="结束时间"/>
  24. <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:''}}">
  25. <a class="btn btn-primary radius" style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>
  26. <a class="btn btn-primary radius" onclick="statistics_export()" href="javascript:;"><i class="Hui-iconfont"></i> 导出数据</a>
  27. </div>
  28. </div>
  29. <div class="mt-20">
  30. <table class="table table-border table-bordered table-bg table-hover table-sort">
  31. <thead>
  32. <tr class="text-c">
  33. <th width="5%">月份</th>
  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['month']}}</td>
  54. <td>{{$a['admin_name']}}</td>
  55. <td>{{$a['pv_count']}}</td>
  56. <td>{{$a['long_count']}}</td>
  57. <td>{{$a['fan_add']}}</td>
  58. <td>{{$a['cust_count']}}</td>
  59. <td>{{$a['order_count']}}</td>
  60. <td>{{$a['fugou_order_count']}}</td>
  61. <td>{{$a['order_amount']}}</td>
  62. <td>{{$a['change_rate']}}</td>
  63. <td>{{$a['new_order_rate']}}</td>
  64. <td>{{$a['cust_fugou_rate']}}</td>
  65. <td>{{$a['order_fugou_rate']}}</td>
  66. <td>{{$a['avg_amount']}}</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 stime = $('#stime').val();
  87. var etime = $('#etime').val();
  88. var team_id = $('#team_id').val();
  89. var admin_id = $('#admin_id').val();
  90. location.href = 'templateLogMonthReport?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  91. }
  92. //导出
  93. function statistics_export(){
  94. var stime = $('#stime').val();
  95. var etime = $('#etime').val();
  96. var team_id = $('#team_id').val();
  97. var admin_id = $('#admin_id').val();
  98. location.href = 'templateLogMonthReport_export?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  99. }
  100. /*分页*/
  101. $("#page").paging({
  102. pageNo:{{$page}},
  103. totalPage: {{$pages}},
  104. totalSize: {{$count}},
  105. callback: function(num) {
  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='templateLogMonthReport?page='+num+'&stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  111. }
  112. })
  113. $(function(){
  114. getsale();
  115. })
  116. $('#team_id').change(function(){
  117. getsale();
  118. })
  119. function getsale(){
  120. team = $('#team_id').val();
  121. if(team=='0'){
  122. return false;
  123. }else{
  124. $.ajax({
  125. 'url':'/admin/order/teamAdmins/'+team,
  126. 'type': 'get',
  127. 'dataType':'json',
  128. 'success' : function(data){
  129. admin_id = '{{$admin_id}}';
  130. str = '<option value=\'0\'>-- 选择销售 --<\/option>';
  131. $.each(data, function(i, va){
  132. sele = '';
  133. if(va.id == admin_id){
  134. sele = 'selected';
  135. }
  136. str += '<option value="'+va.id+'" '+sele+'>' + va.realname +'<\/option>';
  137. })
  138. $('#admin_id').html(str);
  139. }
  140. });
  141. }
  142. }
  143. </script>
  144. </body>
  145. @endsection