No Description

fanDaySaler.blade.php 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. <div class="page-container">
  5. <div>
  6. <div>
  7. @if($self_role != '销售' && $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. @else
  23. <!--input class="input-text" style="width:6%;text-align:center" type="text" value="当日数据"/>
  24. <select style="width:10%;text-align:center" id='is_self_team' name="is_self_team">
  25. <option value="0" @if($is_self_team==0) selected @endif>个人数据</option>
  26. <option value="1" @if($is_self_team==1) selected @endif>所属团队数据</option>
  27. </select-->
  28. @endif
  29. <input class="input-text" style="width:6%;text-align:center" type="text" value="开始时间"/>
  30. <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:''}}">
  31. <input class="input-text" style="width:6%;text-align:center" type="text" value="结束时间"/>
  32. <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:''}}">
  33. <a class="btn btn-primary radius" style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>
  34. <a class="btn btn-primary radius" onclick="statistics_export()" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 导出数据</a>
  35. </div>
  36. </div>
  37. <div class="mt-20">
  38. <table class="table table-border table-bordered table-bg table-hover table-sort">
  39. <thead>
  40. <tr class="text-c">
  41. <th width="6%">日期</th>
  42. <th width="6%">新粉增加量</th>
  43. <th width="6%">新粉回复</th>
  44. <th width="6%">新粉回复率</th>
  45. <th width="6%">新粉询价量</th>
  46. <th width="6%">新粉询价率</th>
  47. <th width="5%">新粉成交单量</th>
  48. <th width="6%">新粉成交额</th>
  49. <th width="6%">新粉成交转化率</th>
  50. <th width="6%">累计老粉量</th>
  51. <th width="6%">老粉询价量</th>
  52. <th width="6%">老粉询价率</th>
  53. <th width="5%">老粉成交单量</th>
  54. <th width="6%">老粉成交额</th>
  55. <th width="6%">老粉成交转化率</th>
  56. <th width="5%">当日单量</th>
  57. <th width="6%">当日销售额</th>
  58. </tr>
  59. </thead>
  60. <tbody>
  61. @if($result)
  62. @foreach($result as $a)
  63. <tr class="text-c" style=" text-align:center;">
  64. <td>{{$a['dtime']}}</td>
  65. <td>{{$a['wx_fan_add']}}</td>
  66. <td>{{$a['total_new_reply']}}</td>
  67. <td>{{$a['new_reply_rate']}}</td>
  68. <td>{{$a['total_new_consult']}}</td>
  69. <td>{{$a['new_consult_rate']}}</td>
  70. <td>{{$a['new_order_count']}}</td>
  71. <td>{{$a['new_order_amount']}}</td>
  72. <td>{{$a['new_order_rate']}}</td>
  73. <td>{{$a['wx_old_fan']}}</td>
  74. <td>{{$a['total_old_consult']}}</td>
  75. <td>{{$a['old_consult_rate']}}</td>
  76. <td>{{$a['old_order_count']}}</td>
  77. <td>{{$a['old_order_amount']}}</td>
  78. <td>{{$a['old_order_rate']}}</td>
  79. <td>{{$a['order_count']}}</td>
  80. <td>{{$a['order_amount']}}</td>
  81. </tr>
  82. @endforeach
  83. @endif
  84. </tbody>
  85. </table>
  86. </div>
  87. <div id="page" class="page_div"></div>
  88. </div>
  89. <!--_footer 作为公共模版分离出去-->
  90. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  91. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  92. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  93. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  94. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  95. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  96. <!--/_footer 作为公共模版分离出去-->
  97. <!--/_footer 作为公共模版分离出去-->
  98. <script type="text/javascript">
  99. /*广告-添加*/
  100. function statistics_add(title){
  101. location.href="/admin/statistics/totalcreate";
  102. }
  103. /*广告-编辑*/
  104. function statistics_edit(title,id){
  105. location.href="/admin/statistics/totaledit/"+id;
  106. }
  107. /*广告-设为首页显示*/
  108. function up(obj,id){
  109. layer.confirm('确认要设为首页显示吗?',function(index){
  110. location.href='/admin/statistics/up/'+id;
  111. });
  112. }
  113. /*广告-移除*/
  114. function statistics_del(obj,id){
  115. layer.confirm('确认要删除吗?',function(index){
  116. location.href='/admin/statistics/totaldelete/'+id;
  117. });
  118. }
  119. /*广告-设为首页隐藏*/
  120. function down(obj,id){
  121. layer.confirm('确认要设为首页隐藏吗?',function(index){
  122. location.href='/admin/statistics/down/'+id;
  123. });
  124. }
  125. function user_search(){
  126. var stime = $('#stime').val();
  127. var etime = $('#etime').val();
  128. var team_id = $('#team_id').val();
  129. var admin_id = $('#admin_id').val();
  130. var is_self_team = $('#is_self_team').val();
  131. location.href = 'fanDaySaler?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&is_self_team='+is_self_team+'&admin_id='+admin_id;
  132. }
  133. //导出
  134. function statistics_export(){
  135. var stime = $('#stime').val();
  136. var etime = $('#etime').val();
  137. var team_id = $('#team_id').val();
  138. var admin_id = $('#admin_id').val();
  139. var is_self_team = $('#is_self_team').val();
  140. location.href = '/admin/statistics/fanDaySaler_export?stime='+stime+'&etime='+etime+'&team_id='+team_id+'&is_self_team='+is_self_team+'&admin_id='+admin_id;
  141. }
  142. /*分页*/
  143. $("#page").paging({
  144. pageNo:{{$page}},
  145. totalPage: {{$pages}},
  146. totalSize: {{$count}},
  147. callback: function(num) {
  148. var stime = $('#stime').val();
  149. var etime = $('#etime').val();
  150. var team_id = $('#team_id').val();
  151. var admin_id = $('#admin_id').val();
  152. var is_self_team = $('#is_self_team').val();
  153. location.href='fanDaySaler?page='+num+'&stime='+stime+'&etime='+etime+'&team_id='+team_id+'&is_self_team='+is_self_team+'&admin_id='+admin_id;
  154. }
  155. })
  156. $(function(){
  157. getsale();
  158. })
  159. $('#team_id').change(function(){
  160. getsale();
  161. })
  162. function getsale(){
  163. team = $('#team_id').val();
  164. if(team=='0'){
  165. return false;
  166. }else{
  167. $.ajax({
  168. 'url':'/admin/order/teamAdmins/'+team,
  169. 'type': 'get',
  170. 'dataType':'json',
  171. 'success' : function(data){
  172. admin_id = '{{$admin_id}}';
  173. str = '<option value=\'0\'>-- 选择销售 --<\/option>';
  174. $.each(data, function(i, va){
  175. sele = '';
  176. if(va.id == admin_id){
  177. sele = 'selected';
  178. }
  179. str += '<option value="'+va.id+'" '+sele+'>' + va.realname +'<\/option>';
  180. })
  181. $('#admin_id').html(str);
  182. }
  183. });
  184. }
  185. }
  186. </script>
  187. </body>
  188. @endsection