performance.blade.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. @extends('layouts.app')
  2. @section('title')订单管理-问题件-绩效统计@endsection
  3. @section('content')
  4. @component("order.issue.menu")@endcomponent
  5. <div class="container-fluid none" id="performance_div">
  6. <div style="min-width: 2000px;">
  7. <div id="form_div" style="min-width: 1950px;" class="bg-white"></div>
  8. <div class="form-inline mt-1 ">
  9. <span class="dropdown">
  10. <button type="button"
  11. class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
  12. :class="[checkData.length>0?'btn-dark text-light':'']"
  13. data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">导出Excel
  14. </button>
  15. <div class="dropdown-menu">
  16. <a class="dropdown-item" @click="exportAll()" href="javascript:">导出所有页</a>
  17. </div>
  18. </span>
  19. </div>
  20. <table class="table table-sm table-striped table-bordered table-hover card-body mt-2 ">
  21. <tr>
  22. <th>
  23. <input type="checkbox" id="all" @click="checkAll($event)">
  24. </th>
  25. <th>序号</th>
  26. <th>客服</th>
  27. <th>客户</th>
  28. <th>创建数</th>
  29. <th>处理数</th>
  30. <th>完结数</th>
  31. <th>总数</th>
  32. </tr>
  33. <tr v-for="(performance,index) in performance.data">
  34. <td>
  35. <input type="checkbox" v-model="checkData" :value="index+1">
  36. </td>
  37. <td>@{{ index+1 }}</td>
  38. <td>@{{ performance.user }}</td>
  39. <td>@{{ performance.owner }}</td>
  40. <td>@{{ performance.createCount }}</td>
  41. <td>@{{ performance.treatmentCount }}</td>
  42. <td>@{{ performance.endCount }}</td>
  43. <td>@{{ performance.sum }}</td>
  44. </tr>
  45. </table>
  46. <a :href="performance.prev_page_url" class="btn btn-sm" :class="performance.current_page === 1 ?'':'btn-outline-primary'"
  47. :disabled="performance.current_page === 1">上一页</a>
  48. <a :href="performance.next_page_url" class="btn btn-sm"
  49. :class="performance.current_page === performance.last_page ?'':'btn-outline-primary'"
  50. :disabled="performance.current_page === performance.lastPage">下一页</a>
  51. <input @keyup.enter="pageTurning($event)" class="form-control-sm ml-3 tooltipTarget"
  52. :placeholder="'当前页数:'+performance.current_page+'/'+performance.last_page" title="去往指定页">
  53. <span class="text-muted m-1">共 @{{performance.total}} 条 </span>
  54. </div>
  55. </div>
  56. @endsection
  57. @section('lastScript')
  58. <script type="text/javascript" src="{{asset('js/queryForm/queryForm200828a.js')}}"></script>
  59. <script type="text/javascript" src="{{asset('js/queryForm/export200818a.js')}}"></script>
  60. <script>
  61. let performance_vue = new Vue({
  62. el:'#performance_div',
  63. data:{
  64. performance:{!! $performance->toJson() !!},
  65. option:{
  66. timeFrame:'{{$options['timeFrame']}}',
  67. create_start:'{{$options['create_start']}}',
  68. create_end:'{{$options['create_end']}}',
  69. },
  70. checkData:[],
  71. },
  72. mounted:function(){
  73. $('#performance_div').removeClass("d-none");
  74. let data =[
  75. [{name:'create_start',type:'dateTime',tip:'统计时段开始',placeholder:'统计时段开始',killings:['timeFrame']},
  76. {name:'create_end',type:'dateTime',tip:'统计时段结束',placeholder:'统计时段结束',killings:['timeFrame']},
  77. {name:'timeFrame',type:'select',tip:'',placeholder:'选择时段',
  78. data:[{name:"day",value:'当天'},{name:'yesterday',value:'昨日'},{name:"week",value:'本周'},{name:"month",value:'本月'}],
  79. killings:['create_start','create_end'],
  80. }]
  81. ];
  82. let queryForm = new query({
  83. el:'#form_div',
  84. condition:data,
  85. })
  86. queryForm.init();
  87. },
  88. methods: {
  89. pageTurning(e){
  90. let page = $(e.target).val();
  91. if(page){
  92. window.location = this.performance.path+'?page='+page;
  93. }
  94. },
  95. exportAll:function(){
  96. let search = '?timeFrame='+this.option.timeFrame+'&create_start='+this.option.create_start+'&create_end='+this.option.create_end;
  97. let url = '{{url('orderIssuePerformance/export')}}'+search;
  98. let token='{{ csrf_token() }}';
  99. excelExport(false,'',url,null,token);
  100. },
  101. checkAll(e) {
  102. if (e.target.checked) {
  103. this.performance.data.forEach((el, i) => {
  104. if (this.checkData.indexOf(el.id) == '-1') {
  105. this.checkData.push(el.id);
  106. }
  107. });
  108. } else {
  109. this.checkData = [];
  110. }
  111. },
  112. },
  113. });
  114. </script>
  115. @endsection