Нет описания

districtRoi.blade.php 10KB

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