Ei kuvausta

detaillist.blade.php 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. @extends('admin/master')
  2. @section('content')
  3. <body>
  4. <div class="page-container">
  5. <div>
  6. <div>
  7. <a class="btn btn-primary radius" onclick="custreport_add('新增', 0)" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 新增数据</a>
  8. @if($search_admin == 1)
  9. <input class="input-text" style="width:6%;text-align:center" type="text" value="所属团队"/>
  10. <select style="width:10%;text-align:center" id='team_id' name="team_id">
  11. <option value="0" @if($team_id=='') selected @endif>-- 选择团队 --</option>
  12. @foreach($teamlist as $v)
  13. <option value="{{$v['id']}}" @if($team_id==$v['id']) selected @endif>{{$v['name']}}</option>
  14. @endforeach
  15. </select>
  16. <input class="input-text" style="width:6%;text-align:center" type="text" value="所属销售"/>
  17. <select style="width:8%;text-align:center" id='admin_id' name="admin_id">
  18. <option value="0" @if($admin_id=='') selected @endif>-- 选择销售 --</option>
  19. @foreach($adminlist as $v)
  20. <option value="{{$v['id']}}" @if($admin_id==$v['id']) selected @endif>{{$v['realname']}}</option>
  21. @endforeach
  22. </select>
  23. @endif
  24. <input class="input-text" style="width:6%;text-align:center" type="text" value="开始时间"/>
  25. <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:''}}">
  26. <input class="input-text" style="width:6%;text-align:center" type="text" value="结束时间"/>
  27. <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:''}}">
  28. <a style="margin-left: 5px" class="btn btn-primary radius" onclick="user_search()" href="javascript:;">搜索</a>
  29. @if($self_role != '销售')
  30. <a style="margin-left: 5px" class="btn btn-danger radius" onclick="look_noreport()" href="javascript:;">查看未上报数据销售</a>
  31. @endif
  32. <a class="btn btn-primary radius" onclick="custreport_export()" href="javascript:;"> 导出</a>
  33. </div>
  34. </div>
  35. <div class="mt-20">
  36. <table class="table table-border table-bordered table-bg table-hover table-sort">
  37. <thead>
  38. <tr class="text-c">
  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="6%">操作</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['fan_add']}}</td>
  54. <td>{{$a['new_reply']}}</td>
  55. <td>{{$a['old_consult']}}</td>
  56. <td>{{$a['new_consult']}}</td>
  57. <td>{{$a['admin_name']}}</td>
  58. <td>
  59. <a style="text-decoration:none" onClick='custreport_edit("编辑","{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
  60. <a style="text-decoration:none" onClick='custreport_del("删除","{{$a['id']}}")' href="javascript:;" title="删除"><span class="btn btn-primary radius">删除</span></a>
  61. </td>
  62. </tr>
  63. @endforeach
  64. @endif
  65. </tbody>
  66. </table>
  67. </div>
  68. <!--弹出层 推入分组-->
  69. <div id="modal-demo1" class="modal fade" tabnonautomatic_index="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  70. <div class="modal-dialog" style="width:980px">
  71. <div class="modal-content radius" style="width:980px">
  72. <div class="modal-body" style="height:{{$no_height}}px">
  73. <div style="float:right">
  74. <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">关闭</button>
  75. </div>
  76. <div id="fa2">
  77. <div class="mt-20">
  78. <table class="table table-border table-bordered table-bg table-hover table-sort">
  79. <thead>
  80. <tr class="text-c">
  81. <th>日期</th>
  82. <th>未上报销售</th>
  83. </tr>
  84. </thead>
  85. <tbody>
  86. @if($noReportSaler)
  87. @foreach($noReportSaler as $date=>$saler)
  88. <tr class="text-c" style=" text-align:center;">
  89. <td>{{$date}}</td>
  90. <td>{{$saler}}</td>
  91. </tr>
  92. @endforeach
  93. @endif
  94. </tbody>
  95. </table>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <div id="page" class="page_div"></div>
  103. </div>
  104. <!--_footer 作为公共模版分离出去-->
  105. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  106. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  107. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  108. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  109. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  110. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  111. <!--/_footer 作为公共模版分离出去-->
  112. <!--/_footer 作为公共模版分离出去-->
  113. <script type="text/javascript">
  114. /*广告-添加*/
  115. function custreport_add(title){
  116. location.href="/admin/custreport/detailcreate";
  117. }
  118. /*广告-编辑*/
  119. function custreport_edit(title,id){
  120. location.href="/admin/custreport/detailedit/"+id;
  121. }
  122. /*广告-设为首页显示*/
  123. function up(obj,id){
  124. layer.confirm('确认要设为首页显示吗?',function(index){
  125. location.href='/admin/custreport/up/'+id;
  126. });
  127. }
  128. /*广告-移除*/
  129. function custreport_del(obj,id){
  130. layer.confirm('确认要删除吗?',function(index){
  131. location.href='/admin/custreport/detaildelete/'+id;
  132. });
  133. }
  134. /*广告-设为首页隐藏*/
  135. function down(obj,id){
  136. layer.confirm('确认要设为首页隐藏吗?',function(index){
  137. location.href='/admin/custreport/down/'+id;
  138. });
  139. }
  140. function user_search(){
  141. var admin_id = $('#admin_id').val();
  142. var stime = $('#stime').val();
  143. var etime = $('#etime').val();
  144. var team_id = $('#team_id').val();
  145. var page = {{$page}};
  146. location.href = 'detailindex?page='+page+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&team_id='+team_id;
  147. }
  148. //导出
  149. function custreport_export(){
  150. var admin_id = $('#admin_id').val();
  151. var stime = $('#stime').val();
  152. var etime = $('#etime').val();
  153. var team_id = $('#team_id').val();
  154. location.href = '/admin/custreport/detail_export?admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&team_id='+team_id;
  155. }
  156. /*弹出层-*/
  157. function look_noreport() {
  158. $("#modal-demo1").modal("show");
  159. }
  160. /*弹出层-关闭*/
  161. function hide_noreport() {
  162. alert(1);
  163. $("#modal-demo1").modal("hide");
  164. }
  165. /*分页*/
  166. $("#page").paging({
  167. pageNo:{{$page}},
  168. totalPage: {{$pages}},
  169. totalSize: {{$count}},
  170. callback: function(num) {
  171. var admin_id = $('#admin_id').val();
  172. var team_id = $('#team_id').val();
  173. var stime = $('#stime').val();
  174. var etime = $('#etime').val();
  175. location.href='detailindex?page='+num+'&admin_id='+admin_id+'&stime='+stime+'&etime='+etime+'&team_id='+team_id;
  176. }
  177. })
  178. $(function(){
  179. getsale();
  180. })
  181. $('#team_id').change(function(){
  182. getsale();
  183. })
  184. function getsale(){
  185. team = $('#team_id').val();
  186. if(team=='0'){
  187. return false;
  188. }else{
  189. $.ajax({
  190. 'url':'/admin/order/teamAdmins/'+team,
  191. 'type': 'get',
  192. 'dataType':'json',
  193. 'success' : function(data){
  194. admin_id = '{{$admin_id}}';
  195. str = '<option value=\'0\'>-- 选择销售 --<\/option>';
  196. $.each(data, function(i, va){
  197. sele = '';
  198. if(va.id == admin_id){
  199. sele = 'selected';
  200. }
  201. str += '<option value="'+va.id+'" '+sele+'>' + va.realname +'<\/option>';
  202. })
  203. $('#admin_id').html(str);
  204. }
  205. });
  206. }
  207. }
  208. </script>
  209. </body>
  210. @endsection