暫無描述

districtRoi.blade.php 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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='data_type' name="data_type">
  9. <option value="0" >7日roi明细</option>
  10. <option value="1">7日roi汇总</option>
  11. <option value="2" selected>每日roi明细</option>
  12. <option value="5">15日roi明细</option>
  13. <option value="6">15日roi汇总</option>
  14. <option value="3">30日roi明细</option>
  15. <option value="4">30日roi汇总</option>
  16. <option value="7">45日roi明细</option>
  17. <option value="8">45日roi汇总</option>
  18. <option value="9">所有时段roi汇总</option>
  19. <option value="10">单独roi列汇总</option>
  20. </select>
  21. <input class="input-text" style="width:5%;text-align:center" type="text" value="所属城市"/>
  22. <input id="city" type="text" class="input-text" style="width:6%;text-align:center" name="city" value="{{$city?$city:''}}">
  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" 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" 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. <br>
  32. <table class="table table-border table-bordered table-bg table-hover table-sort">
  33. <tr>
  34. <th width="5%">汇总信息</th>
  35. <th>
  36. <ul>
  37. <li>总投放成本:&yen;{{$total_data['cost']}}&nbsp;&nbsp;&nbsp;&nbsp;
  38. 总加粉数:{{$total_data['conversion_times']}}&nbsp;&nbsp;&nbsp;&nbsp;
  39. 总下单人数:{{$total_data['fan_count']}}&nbsp;&nbsp;&nbsp;&nbsp;
  40. 新粉成单数:{{$total_data['new_order_count']}}&nbsp;&nbsp;&nbsp;&nbsp;
  41. 新粉收入:&yen;{{$total_data['new_order_amount']}}&nbsp;&nbsp;&nbsp;&nbsp;
  42. 新粉ROI:{{$total_data['new_roi']}}&nbsp;&nbsp;&nbsp;&nbsp;
  43. 总成单数:{{$total_data['order_count']}}&nbsp;&nbsp;&nbsp;&nbsp;
  44. 总收入:&yen;{{$total_data['order_amount']}}&nbsp;&nbsp;&nbsp;&nbsp;
  45. 总计ROI:{{$total_data['roi']}}</li>
  46. </ul>
  47. </th>
  48. </tr>
  49. </table>
  50. <div class="mt-20">
  51. <table class="table table-border table-bordered table-bg table-hover table-sort">
  52. <thead>
  53. <tr class="text-c">
  54. <th width="5%">日期</th>
  55. <th width="5%">城市</th>
  56. <th width="5%">投放成本</th>
  57. <th width="5%">加粉数</th>
  58. <th width="5%">下单人数</th>
  59. <th width="5%">新粉成单数</th>
  60. <th width="5%">新粉收入</th>
  61. <th width="5%">新粉ROI</th>
  62. <th width="5%">累计成单数</th>
  63. <th width="5%">累计收入</th>
  64. <th width="5%">累计ROI</th>
  65. </tr>
  66. </thead>
  67. <tbody>
  68. @if($result)
  69. @foreach($result as $a)
  70. <tr class="text-c" style=" text-align:center;">
  71. <td>{{$a['ad_time']}}</td>
  72. <td>{{$a['city']}}</td>
  73. <td>{{$a['total_cost']}}</td>
  74. <td>{{$a['conversion_times']}}</td>
  75. <td>{{$a['new_fan_count']}}</td>
  76. <td>{{$a['new_order_count']}}</td>
  77. <td>{{$a['new_order_amount']}}</td>
  78. <td>{{$a['new_roi']}}</td>
  79. <td>{{$a['order_count']}}</td>
  80. <td>{{$a['order_amount']}}</td>
  81. <td>{{$a['total_roi']}}</td>
  82. </tr>
  83. @endforeach
  84. @endif
  85. </tbody>
  86. </table>
  87. </div>
  88. <div id="page" class="page_div"></div>
  89. </div>
  90. <!--_footer 作为公共模版分离出去-->
  91. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  92. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  93. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  94. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  95. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  96. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  97. <!--/_footer 作为公共模版分离出去-->
  98. <!--/_footer 作为公共模版分离出去-->
  99. <script type="text/javascript">
  100. /*广告-添加*/
  101. function statistics_add(title){
  102. location.href="/admin/statistics/totalcreate";
  103. }
  104. /*广告-编辑*/
  105. function statistics_edit(title,id){
  106. location.href="/admin/statistics/totaledit/"+id;
  107. }
  108. /*广告-设为首页显示*/
  109. function up(obj,id){
  110. layer.confirm('确认要设为首页显示吗?',function(index){
  111. location.href='/admin/statistics/up/'+id;
  112. });
  113. }
  114. /*广告-移除*/
  115. function statistics_del(obj,id){
  116. layer.confirm('确认要删除吗?',function(index){
  117. location.href='/admin/statistics/totaldelete/'+id;
  118. });
  119. }
  120. /*广告-设为首页隐藏*/
  121. function down(obj,id){
  122. layer.confirm('确认要设为首页隐藏吗?',function(index){
  123. location.href='/admin/statistics/down/'+id;
  124. });
  125. }
  126. function user_search(){
  127. var stime = $('#stime').val();
  128. var etime = $('#etime').val();
  129. var city = $('#city').val();
  130. //var page = {{$page}};
  131. location.href = 'districtRoi?stime='+stime+'&etime='+etime+'&city='+city;
  132. }
  133. //导出
  134. function statistics_export(){
  135. var stime = $('#stime').val();
  136. var etime = $('#etime').val();
  137. var city = $('#city').val();
  138. location.href = '/admin/statistics/districtRoi_export?stime='+stime+'&etime='+etime+'&city='+city;
  139. }
  140. $("#data_type").change(function(){
  141. var date_type = $(this).val();
  142. if(date_type == 0){
  143. location.href='districtRoi7day';
  144. }
  145. else if(date_type == 1){
  146. location.href='districtRoi7dayTotal';
  147. }
  148. else if(date_type == 2){
  149. location.href='districtRoi';
  150. }
  151. else if(date_type == 3){
  152. location.href='districtRoi30day';
  153. }
  154. else if(date_type == 4){
  155. location.href='districtRoi30dayTotal';
  156. }
  157. else if(date_type == 5){
  158. location.href='districtRoi15day';
  159. }
  160. else if(date_type == 6){
  161. location.href='districtRoi15dayTotal';
  162. }
  163. else if(date_type == 7){
  164. location.href='districtRoi45day';
  165. }
  166. else if(date_type == 8){
  167. location.href='districtRoi45dayTotal';
  168. }
  169. else if(date_type == 9){
  170. location.href='districtRoiAllTotal';
  171. }
  172. else if(date_type == 10){
  173. location.href='districtRoiAllTotal?only_roi=1';
  174. }
  175. })
  176. /*分页*/
  177. $("#page").paging({
  178. pageNo:{{$page}},
  179. totalPage: {{$pages}},
  180. totalSize: {{$count}},
  181. callback: function(num) {
  182. var stime = $('#stime').val();
  183. var etime = $('#etime').val();
  184. var city = $('#city').val();
  185. location.href='districtRoi?page='+num+'&stime='+stime+'&etime='+etime+'&city='+city;
  186. }
  187. })
  188. </script>
  189. </body>
  190. @endsection