Ei kuvausta

fanDay.blade.php 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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-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">&#xe600;</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="8%">日期</th>
  34. <th width="8%">当日投放金额</th>
  35. <th width="8%">当日公众号进粉</th>
  36. <th width="8%">当日进粉成本</th>
  37. <th width="8%">当日微信粉</th>
  38. <th width="8%">当日微信粉成本</th>
  39. <th width="8%">当日订单数</th>
  40. <th width="8%">当日销售额</th>
  41. <th width="8%">当日货品成本</th>
  42. <th width="8%">当日物流成本</th>
  43. <th width="8%">当日新粉回复量</th>
  44. <th width="8%">当日新粉回复率</th>
  45. <th width="8%">当日老粉主动咨询量</th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. @if($result)
  50. @foreach($result as $a)
  51. <tr class="text-c" style=" text-align:center;">
  52. <td>{{$a['dtime']}}</td>
  53. <td>{{$a['total_cost']}}</td>
  54. <td>{{$a['total_fan_add']}}</td>
  55. <td>{{$a['cost_fan']}}</td>
  56. <td>{{$a['wx_fan_add']}}</td>
  57. <td>{{$a['cost_wx_fan']}}</td>
  58. <td>{{$a['order_count']}}</td>
  59. <td>{{$a['order_amount']}}</td>
  60. <td>{{$a['goods_cost']}}</td>
  61. <td>{{$a['freight_cost']}}</td>
  62. <td>{{$a['total_new_reply']}}</td>
  63. <td>{{$a['new_reply_rate']}}</td>
  64. <td>{{$a['total_old_consult']}}</td>
  65. </tr>
  66. @endforeach
  67. @endif
  68. </tbody>
  69. </table>
  70. </div>
  71. <div id="page" class="page_div"></div>
  72. </div>
  73. <!--_footer 作为公共模版分离出去-->
  74. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  75. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  76. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  77. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  78. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  79. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  80. <!--/_footer 作为公共模版分离出去-->
  81. <!--/_footer 作为公共模版分离出去-->
  82. <script type="text/javascript">
  83. /*广告-添加*/
  84. function statistics_add(title){
  85. location.href="/admin/statistics/totalcreate";
  86. }
  87. /*广告-编辑*/
  88. function statistics_edit(title,id){
  89. location.href="/admin/statistics/totaledit/"+id;
  90. }
  91. /*广告-设为首页显示*/
  92. function up(obj,id){
  93. layer.confirm('确认要设为首页显示吗?',function(index){
  94. location.href='/admin/statistics/up/'+id;
  95. });
  96. }
  97. /*广告-移除*/
  98. function statistics_del(obj,id){
  99. layer.confirm('确认要删除吗?',function(index){
  100. location.href='/admin/statistics/totaldelete/'+id;
  101. });
  102. }
  103. /*广告-设为首页隐藏*/
  104. function down(obj,id){
  105. layer.confirm('确认要设为首页隐藏吗?',function(index){
  106. location.href='/admin/statistics/down/'+id;
  107. });
  108. }
  109. function user_search(){
  110. var stime = $('#stime').val();
  111. var etime = $('#etime').val();
  112. var team_id = $('#team_id').val();
  113. var admin_id = $('#admin_id').val();
  114. //var page = {{$page}};
  115. location.href = 'fanDay?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  116. }
  117. //导出
  118. function statistics_export(){
  119. var stime = $('#stime').val();
  120. var etime = $('#etime').val();
  121. var team_id = $('#team_id').val();
  122. var admin_id = $('#admin_id').val();
  123. location.href = '/admin/statistics/fanDay_export?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  124. }
  125. /*分页*/
  126. $("#page").paging({
  127. pageNo:{{$page}},
  128. totalPage: {{$pages}},
  129. totalSize: {{$count}},
  130. callback: function(num) {
  131. var stime = $('#stime').val();
  132. var etime = $('#etime').val();
  133. var team_id = $('#team_id').val();
  134. var admin_id = $('#admin_id').val();
  135. location.href='fanDay?page='+num+'&stime='+stime+'&etime='+etime+'&team_id='+team_id+'&admin_id='+admin_id;
  136. }
  137. })
  138. $(function(){
  139. getsale();
  140. })
  141. $('#team_id').change(function(){
  142. getsale();
  143. })
  144. function getsale(){
  145. team = $('#team_id').val();
  146. if(team=='0'){
  147. return false;
  148. }else{
  149. $.ajax({
  150. 'url':'/admin/order/teamAdmins/'+team,
  151. 'type': 'get',
  152. 'dataType':'json',
  153. 'success' : function(data){
  154. admin_id = '{{$admin_id}}';
  155. str = '<option value=\'0\'>-- 选择销售 --<\/option>';
  156. $.each(data, function(i, va){
  157. sele = '';
  158. if(va.id == admin_id){
  159. sele = 'selected';
  160. }
  161. str += '<option value="'+va.id+'" '+sele+'>' + va.realname +'<\/option>';
  162. })
  163. $('#admin_id').html(str);
  164. }
  165. });
  166. }
  167. }
  168. </script>
  169. </body>
  170. @endsection