| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- @extends('layouts.app')
- @section('title')绩效统计-问题件-订单管理@endsection
- @section('content')
- <div class="container-fluid none" id="performance_div">
- <div style="min-width: 2000px;">
- <div id="form_div" style="min-width: 1950px;" class="bg-white"></div>
- <div class="form-inline mt-1 ">
- <span class="dropdown">
- <button type="button"
- class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget"
- :class="[checkData.length>0?'btn-dark text-light':'']"
- data-toggle="dropdown" title="导出所有页将会以搜索条件得到的筛选结果,将其全部记录(每一页)导出">导出Excel
- </button>
- <div class="dropdown-menu">
- <a class="dropdown-item" @click="exportAll()" href="javascript:">导出所有页</a>
- </div>
- </span>
- </div>
- <table class="table table-sm table-striped table-bordered table-hover card-body mt-2 ">
- <tr>
- <th>
- <input type="checkbox" id="all" @click="checkAll($event)">
- </th>
- <th>序号</th>
- <th>客服</th>
- <th>客户</th>
- <th>创建数</th>
- <th>处理数</th>
- <th>完结数</th>
- <th>总数</th>
- </tr>
- <tr v-for="(performance,index) in performance.data">
- <td>
- <input type="checkbox" v-model="checkData" :value="index+1">
- </td>
- <td>@{{ Number(index)+1 }}</td>
- <td>@{{ performance.userName }}</td>
- <td>@{{ performance.ownerName }}</td>
- <td>@{{ performance.created }}</td>
- <td>@{{ performance.processed }}</td>
- <td>@{{ performance.end }}</td>
- <td>@{{ performance.sumNumber }}</td>
- </tr>
- </table>
- <button class="btn btn-sm" :class="performance.current_page <= 1 ?'':'btn-outline-primary'"
- @click="goPage(performance.current_page - 1)"
- :disabled="performance.from === 1">上一页
- </button>
- <button class="btn btn-sm"
- @click="goPage(performance.current_page + 1)"
- :class="performance.current_page === performance.last_page ?'':'btn-outline-primary'"
- :disabled="performance.current_page === performance.last_page">下一页
- </button>
- <input @keyup.enter="pageTurning($event)" class="form-control-sm ml-3 tooltipTarget"
- :placeholder="'当前页数:'+performance.current_page+'/'+performance.last_page" title="去往指定页">
- <span class="text-muted m-1">共 @{{performance.total}} 条 </span>
- </div>
- </div>
- @endsection
- @section('lastScript')
- <script type="text/javascript" src="{{mix('js/queryForm/queryForm.js')}}"></script>
- <script type="text/javascript" src="{{mix('js/queryForm/export.js')}}"></script>
- <script>
- let performance_vue = new Vue({
- el:'#performance_div',
- data:{
- performance:{!! $performance->toJson() !!},
- option:{
- timeFrame:'{{$options['timeFrame']}}',
- create_start:'{{$options['create_start']}}',
- create_end:'{{$options['create_end']}}',
- },
- checkData:[],
- },
- mounted:function(){
- $('#performance_div').removeClass("d-none");
- console.log(this.performance);
- let data =[
- [{name:'create_start',type:'dateTime',tip:'统计时段开始',placeholder:'统计时段开始',killings:['timeFrame']},
- {name:'create_end',type:'dateTime',tip:'统计时段结束',placeholder:'统计时段结束',killings:['timeFrame']},
- {name:'timeFrame',type:'select',tip:'',placeholder:'选择时段',
- data:[{name:"day",value:'当天'},{name:'yesterday',value:'昨日'},{name:"week",value:'本周'},{name:"month",value:'本月'}],
- killings:['create_start','create_end'],
- }]
- ];
- let queryForm = new query({
- el:'#form_div',
- condition:data,
- })
- queryForm.init();
- },
- methods: {
- exportAll:function(){
- let search = '?timeFrame='+this.option.timeFrame+'&create_start='+this.option.create_start+'&create_end='+this.option.create_end;
- let url = '{{url('order/issue/orderIssuePerformance/export')}}'+search;
- let token='{{ csrf_token() }}';
- excelExport(false,'',url,null,token);
- },
- checkAll(e) {
- if (e.target.checked) {
- this.performance.data.forEach((el, i) => {
- if (this.checkData.indexOf(el.id) == '-1') {
- this.checkData.push(el.id);
- }
- });
- } else {
- this.checkData = [];
- }
- },
- pageTurning(e){
- let page = $(e.target).val();
- if (page > this.performance.last_page) {
- return;
- }
- this.goPage(page);
- },
- goPage(page){
- let href = window.location.href;
- if(href.indexOf('?')==-1){
- href+='?'
- }
- if(href.indexOf('page=')!==-1){
- href = href.replace('page='+this.performance.current_page,'page='+page);
- }else{
- href+='&page='+page;
- }
- window.location = href;
- }
- },
- });
- </script>
- @endsection
|