|
|
@@ -1,11 +1,25 @@
|
|
|
@extends('layouts.app')
|
|
|
@section('title')
|
|
|
- 项目报表-客户管理
|
|
|
+ 绩效-人事管理
|
|
|
@endsection
|
|
|
@section('content')
|
|
|
- @component('customer.project.menu')@endcomponent
|
|
|
+ @component('personnel.menu')@endcomponent
|
|
|
<div class="container-fluid card d-none" id="container">
|
|
|
-
|
|
|
+ <div class="container-fluid nav3">
|
|
|
+ <div class="card menu-third" >
|
|
|
+ <ul class="nav nav-pills">
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link" style="cursor: pointer;" :class="type==0 ? 'active' : ''" @click="switchType(0)">项目部</a>
|
|
|
+ </li>
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link" style="cursor: pointer;" :class="type==1 ? 'active' : ''" @click="switchType(1)">销售部</a>
|
|
|
+ </li>
|
|
|
+ <li class="nav-item">
|
|
|
+ <a class="nav-link" style="cursor: pointer;" :class="type==2 ? 'active' : ''" @click="switchType(2)">仓库部</a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
@include("customer._selectedOwner")
|
|
|
|
|
|
<div id="form_div"></div>
|
|
|
@@ -27,10 +41,11 @@
|
|
|
<table class="d-none" id="headerRoll"></table>
|
|
|
<table class="table table-sm table-striped table-hover" id="headerParent">
|
|
|
<tr class="text-center">
|
|
|
- <td></td>
|
|
|
- <td colspan="7" class="bg-light-khaki">客户信息</td>
|
|
|
- <td colspan="4" class="bg-light-info">盘点信息</td>
|
|
|
- <td colspan="3" class="bg-light-cyanogen">账单信息</td>
|
|
|
+ <td colspan="2"></td>
|
|
|
+ <td colspan="2" class="bg-light-purple">日期信息</td>
|
|
|
+ <td :colspan="type==0 ? '8' : (type==1 ? '7' : '8')" class="bg-light-khaki">项目信息</td>
|
|
|
+ <td :colspan="type==0 ? '3' : (type==1 ? '3' : '3')" class="bg-light-info">盘点信息</td>
|
|
|
+ <td :colspan="type==0 ? '4' : (type==1 ? '2' : '3')" class="bg-light-cyanogen">账单信息</td>
|
|
|
</tr>
|
|
|
<tr class="text-nowrap" id="header"></tr>
|
|
|
<tr v-for="(report,i) in reports">
|
|
|
@@ -38,6 +53,8 @@
|
|
|
<label><input type="checkbox" :value="report.id" v-model="checkData"></label>
|
|
|
</td>
|
|
|
<td>@{{ i+1 }}</td>
|
|
|
+ <td></td>
|
|
|
+ <td></td>
|
|
|
<td>@{{ report.ownerGroupName }}</td>
|
|
|
<td>@{{ report.customerName }}</td>
|
|
|
<td>@{{ report.ownerName }}</td>
|
|
|
@@ -73,6 +90,10 @@
|
|
|
ownerGroupName : "{{$report->owner ? ($report->owner->userOwnerGroup ? $report->owner->userOwnerGroup->name : '') : ''}}",
|
|
|
customerName : "{{$report->owner ? ($report->owner->customer ? $report->owner->customer->name : '') : ''}}",
|
|
|
ownerName : "{{$report->owner ? $report->owner->name : ''}}",
|
|
|
+ warehouseName : "{{$report->owner->warehouse->name ?? ''}}",
|
|
|
+ userWorkGroupName : "{{$report->userWorkGroup->name ?? ''}}",
|
|
|
+ ownerGroupUserList:[],
|
|
|
+ userWorkGroupUserList:[],
|
|
|
ownerStatus : "{{$report->owner ? ($report->owner->deleted_at ? "冻结" : "激活") : ''}}",
|
|
|
ownerStorageDuration : "{{$report->owner ? ($report->owner->created_at ? ((new DateTime())->diff(new DateTime($report->owner->created_at))->days) : '') : ''}}",
|
|
|
ownerCreatedAt : "{{$report->owner ? $report->owner->created_at : ''}}",
|
|
|
@@ -82,6 +103,8 @@
|
|
|
currentMonthCountingArea : "{{$report->current_month_counting_area}}",
|
|
|
ownerBillReportInitialFee : "{{$report->ownerBillReport ? $report->ownerBillReport->initial_fee : ''}}",
|
|
|
ownerBillReportConfirmFee : "{{$report->ownerBillReport ? $report->ownerBillReport->confirm_fee : ''}}",
|
|
|
+ ownerBillReportWorkFee : "{{$report->ownerBillReport->work_fee ?? ''}}",
|
|
|
+ ownerAreaReportAccountingArea : "{{$report->owner->ownerAreaReport->accounting_area ?? ''}}",
|
|
|
ownerBillReportConfirmUpdatedAt : "{{$report->ownerBillReport ? $report->ownerBillReport->updated_at : ''}}",
|
|
|
},
|
|
|
@endforeach
|
|
|
@@ -109,6 +132,8 @@
|
|
|
checkData : [],
|
|
|
sum : Number("{{ $reports->total() }}"),
|
|
|
errors:[],
|
|
|
+ type:0,
|
|
|
+ header:"",
|
|
|
},
|
|
|
mounted(){
|
|
|
$('#container').removeClass('d-none');
|
|
|
@@ -129,36 +154,17 @@
|
|
|
condition:data,
|
|
|
});
|
|
|
this.form.init();
|
|
|
- let column = [
|
|
|
- {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
|
|
|
- dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
|
|
|
- {name:'index',value: '序号', neglect: true ,class:"bg-khaki"},
|
|
|
- {name:'ownerGroupName',value: '项目小组',class:"bg-khaki"},
|
|
|
- {name:'customerName',value: '客户',class:"bg-khaki"},
|
|
|
- {name:'ownerName',value: '子项目',class:"bg-khaki"},
|
|
|
- {name:'ownerStatus',value: '状态',class:"bg-khaki"},
|
|
|
- {name:'ownerCreatedAt',value: '创建日期',class:"bg-khaki"},
|
|
|
- {name:'ownerStorageDuration',value: '在库时长',class:"bg-khaki"},
|
|
|
- {name:'countingMonth',value: '结算月', class:"bg-info"},
|
|
|
- {name:'dailyAverageOrderAmount',value: '日均单量', neglect: true, class:"bg-info"},
|
|
|
- {name:'lastMonthCountingArea',value: '结算月上月盘点面积', neglect: true, class:"bg-info"},
|
|
|
- {name:'currentMonthCountingArea',value: '结算月盘点面积', neglect: true, class:"bg-info"},
|
|
|
- {name:'ownerBillReportInitialFee',value: '初始账单金额', neglect: true, class:"bg-cyanogen"},
|
|
|
- {name:'ownerBillReportConfirmFee',value: '确认账单金额', neglect: true, class:"bg-cyanogen"},
|
|
|
- {name:'ownerBillReportConfirmUpdatedAt',value: '确认日期', class:"bg-cyanogen"},
|
|
|
- ];
|
|
|
- let _this=this;
|
|
|
- setTimeout(function () {
|
|
|
- let header = new Header({
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.header = new Header({
|
|
|
el: "#header",
|
|
|
- column: column,
|
|
|
- data: _this.reports,
|
|
|
+ column: this._getRenderingHeader(),
|
|
|
+ data: this.reports,
|
|
|
restorationColumn: 'id',
|
|
|
fixedTop:($('#form_div').height())+2,
|
|
|
offset:0.5,
|
|
|
vue:vue
|
|
|
});
|
|
|
- header.init();
|
|
|
+ this.header.init();
|
|
|
},0);
|
|
|
},
|
|
|
watch:{
|
|
|
@@ -176,8 +182,66 @@
|
|
|
}
|
|
|
},
|
|
|
methods : {
|
|
|
+ _getRenderingHeader()
|
|
|
+ {
|
|
|
+ let column = [
|
|
|
+ {name:'cloneCheckAll',customization:true,type:'checkAll',column:'id',
|
|
|
+ dom:$('#cloneCheckAll').removeClass('d-none'), neglect: true},
|
|
|
+ {name:'index',value: '序号', neglect: true},
|
|
|
+ {name:'countingMonth',value: '结算月' ,class:"bg-purple"},
|
|
|
+ {name:'ownerStorageDuration',value: '入仓时长' ,class:"bg-purple"},
|
|
|
+ ];
|
|
|
+ switch (this.type) {
|
|
|
+ case 0:
|
|
|
+ column.push({name:'ownerGroupName',value: '项目小组',class:"bg-khaki"});
|
|
|
+ column.push({name:'ownerGroupUserList', neglect: true,value: '成员',class:"bg-khaki"});
|
|
|
+ column.push({name:'ownerName',value: '项目',class:"bg-khaki"});
|
|
|
+ column.push({name:'warehouseName',value: '所在仓库',class:"bg-khaki"});
|
|
|
+ column.push({name:'userWorkGroupName',value: '仓库小组',class:"bg-khaki"});
|
|
|
+ column.push({name:'sell',value: '销售', neglect: true,class:"bg-khaki"});
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ column.push({name:'sell',value: '销售', neglect: true,class:"bg-khaki"});
|
|
|
+ column.push({name:'ownerName',value: '项目',class:"bg-khaki"});
|
|
|
+ column.push({name:'warehouseName',value: '所在仓库',class:"bg-khaki"});
|
|
|
+ column.push({name:'userWorkGroupName',value: '仓库小组',class:"bg-khaki"});
|
|
|
+ column.push({name:'ownerGroupName',value: '项目小组',class:"bg-khaki"});
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ column.push({name:'userWorkGroupName',value: '仓库小组',class:"bg-khaki"});
|
|
|
+ column.push({name:'userWorkGroupUserList', neglect: true,value: '成员',class:"bg-khaki"});
|
|
|
+ column.push({name:'ownerName',value: '项目',class:"bg-khaki"});
|
|
|
+ column.push({name:'warehouseName',value: '所在仓库',class:"bg-khaki"});
|
|
|
+ column.push({name:'principal', neglect: true,value: '项目负责人',class:"bg-khaki"});
|
|
|
+ column.push({name:'sell',value: '销售', neglect: true,class:"bg-khaki"});
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ column.push({name:'ownerStatus',value: '状态',class:"bg-khaki"});
|
|
|
+ column.push({name:'ownerCreatedAt',value: '创建日期',class:"bg-khaki"});
|
|
|
+ column.push({name:'dailyAverageOrderAmount',value: '日均单量', neglect: true, class:"bg-info"});
|
|
|
+ column.push({name:'lastMonthCountingArea',value: '上月盘点面积', neglect: true, class:"bg-info"});
|
|
|
+ column.push({name:'currentMonthCountingArea',value: '本月盘点面积', neglect: true, class:"bg-info"});
|
|
|
+ switch (this.type) {
|
|
|
+ case 0:
|
|
|
+ column.push({name:'ownerBillReportInitialFee',value: '初始账单金额', neglect: true, class:"bg-cyanogen"});
|
|
|
+ column.push({name:'ownerBillReportConfirmFee',value: '确认账单金额', neglect: true, class:"bg-cyanogen"});
|
|
|
+ column.push({name:'ownerBillReportConfirmUpdatedAt',value: '确认日期', class:"bg-cyanogen"});
|
|
|
+ column.push({name:'timeOut',value: '超时', neglect: true,class:"bg-cyanogen"});
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ column.push({name:'ownerBillReportConfirmFee',value: '确认账单金额', neglect: true, class:"bg-cyanogen"});
|
|
|
+ column.push({name:'ownerBillReportConfirmUpdatedAt',value: '确认日期', class:"bg-cyanogen"});
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ column.push({name:'ownerBillReportWorkFee',value: '操作费账单金额', neglect: true, class:"bg-cyanogen"});
|
|
|
+ column.push({name:'ownerAreaReportAccountingArea',value: '结算面积', neglect: true, class:"bg-cyanogen"});
|
|
|
+ column.push({name:'ownerBillReportConfirmUpdatedAt',value: '确认日期', class:"bg-cyanogen"});
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return column;
|
|
|
+ },
|
|
|
reportExport(isAll){
|
|
|
- let url = '{{url('customer/project/report/export')}}';
|
|
|
+ let url = '{{url('personnel/report/export')}}';
|
|
|
let token='{{ csrf_token() }}';
|
|
|
//excelExport 定义在 js/queryForm/export.js
|
|
|
excelExport(isAll,this.checkData,url,this.sum,token);
|
|
|
@@ -217,6 +281,12 @@
|
|
|
return "已生成报表";
|
|
|
},true)
|
|
|
},
|
|
|
+ switchType(type){
|
|
|
+ this.type = type;
|
|
|
+ let obj = {columns:this._getRenderingHeader()};
|
|
|
+ if (type === 1)obj.offset = 7;
|
|
|
+ this.header.reset(obj);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
</script>
|