Ei kuvausta

totallist.blade.php 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. <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. <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:''}}">
  17. <input class="input-text" style="width:6%;text-align:center" type="text" value="结束时间"/>
  18. <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:''}}">
  19. <a class="btn btn-primary radius" style="margin-left: 5px" onclick="user_search()" href="javascript:;">搜索</a>
  20. <!--a class="btn btn-primary radius" onclick="custreport_export()" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 导出数据</a-->
  21. </div>
  22. </div>
  23. <div class="mt-20">
  24. <table class="table table-border table-bordered table-bg table-hover table-sort">
  25. <thead>
  26. <tr class="text-c">
  27. <th width="8%">日期</th>
  28. <th width="8%">总加粉数</th>
  29. <th width="8%">总成本</th>
  30. <th width="8%">所属团队</th>
  31. <th width="6%">操作</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. @if($result)
  36. @foreach($result as $a)
  37. <tr class="text-c" style=" text-align:center;">
  38. <td>{{$a['dtime']}}</td>
  39. <td>{{$a['total_fan_add']}}</td>
  40. <td>{{$a['total_cost']}}</td>
  41. <td>{{$a['team_name']}}</td>
  42. <td>
  43. <a style="text-decoration:none" onClick='custreport_edit("编辑","{{$a['id']}}")' href="javascript:;" title="编辑"><span class="btn btn-primary radius">编辑</span></a>
  44. <a style="text-decoration:none" onClick='custreport_del("删除","{{$a['id']}}")' href="javascript:;" title="删除"><span class="btn btn-primary radius">删除</span></a>
  45. </td>
  46. </tr>
  47. @endforeach
  48. @endif
  49. </tbody>
  50. </table>
  51. </div>
  52. <div id="page" class="page_div"></div>
  53. </div>
  54. <!--_footer 作为公共模版分离出去-->
  55. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  56. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  57. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  58. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  59. <script type="text/javascript" src="/admin/lib/page/paging.js"></script>
  60. <script type="text/javascript" src="/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
  61. <!--/_footer 作为公共模版分离出去-->
  62. <!--/_footer 作为公共模版分离出去-->
  63. <script type="text/javascript">
  64. /*广告-添加*/
  65. function custreport_add(title){
  66. location.href="/admin/custreport/totalcreate";
  67. }
  68. /*广告-编辑*/
  69. function custreport_edit(title,id){
  70. location.href="/admin/custreport/totaledit/"+id;
  71. }
  72. /*广告-设为首页显示*/
  73. function up(obj,id){
  74. layer.confirm('确认要设为首页显示吗?',function(index){
  75. location.href='/admin/custreport/up/'+id;
  76. });
  77. }
  78. /*广告-移除*/
  79. function custreport_del(obj,id){
  80. layer.confirm('确认要删除吗?',function(index){
  81. location.href='/admin/custreport/totaldelete/'+id;
  82. });
  83. }
  84. /*广告-设为首页隐藏*/
  85. function down(obj,id){
  86. layer.confirm('确认要设为首页隐藏吗?',function(index){
  87. location.href='/admin/custreport/down/'+id;
  88. });
  89. }
  90. function user_search(){
  91. var stime = $('#stime').val();
  92. var etime = $('#etime').val();
  93. var team_id = $('#team_id').val();
  94. var page = {{$page}};
  95. location.href = 'totalindex?page='+page+'&stime='+stime+'&etime='+etime+'&team_id='+team_id;
  96. }
  97. //导出
  98. function custreport_export(){
  99. var stime = $('#stime').val();
  100. var etime = $('#etime').val();
  101. var team_id = $('#team_id').val();
  102. location.href = '/admin/custreport/total_export?stime='+stime+'&etime='+etime+'&team_id='+team_id;
  103. }
  104. /*分页*/
  105. $("#page").paging({
  106. pageNo:{{$page}},
  107. totalPage: {{$pages}},
  108. totalSize: {{$count}},
  109. callback: function(num) {
  110. var stime = $('#stime').val();
  111. var etime = $('#etime').val();
  112. var team_id = $('#team_id').val();
  113. location.href='totalindex?page='+num+'&stime='+stime+'&etime='+etime+'&team_id='+team_id;
  114. }
  115. })
  116. </script>
  117. </body>
  118. @endsection