|
@@ -26,6 +26,8 @@
|
|
|
<el-menu-item index="1-6" v-if="user.company.packageCustomer == 1 && permissions.reportProfits"><p @click="ssl(4)">客户项目利润表</p></el-menu-item>
|
|
|
<el-menu-item index="1-7" v-if="permissions.reportPhase"><p @click="ssl(5)">项目阶段工时表</p></el-menu-item>
|
|
|
<el-menu-item index="1-8" v-if="permissions.reportOvertime"><p @click="ssl(6)">加班情况统计表</p></el-menu-item>
|
|
|
+
|
|
|
+ <el-menu-item index="1-10" v-if="permissions.reportTimely"><p @click="ssl(9)">员工填报及时率</p></el-menu-item>
|
|
|
</el-submenu>
|
|
|
</el-menu>
|
|
|
</el-col>
|
|
@@ -42,7 +44,7 @@
|
|
|
<div class="contents">
|
|
|
<div class="headine" ref="headine">
|
|
|
<h3 ref="headHe" style="padding-left: 210px">{{shuz[ins]}}</h3>
|
|
|
- <div class="headScreen" v-if="ins != 6 && ins != 8">
|
|
|
+ <div class="headScreen">
|
|
|
<!-- 客户项目利润表的筛选 -->
|
|
|
<template v-if="ins == 4">
|
|
|
<el-select v-model="customerId" placeholder="请选择客户" clearable filterable size="small" @change="selcts(4)" style="margin-right:20px">
|
|
@@ -56,25 +58,29 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
-
|
|
|
- <el-select v-if="ins != 4" v-model="proJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()">
|
|
|
+ <!-- 时间段筛选 -->
|
|
|
+ <template v-if="ins == 6 || ins == 8 || ins == 9">
|
|
|
+ <span class="demonstration" style="color:#999;padding:0 10px">时间段</span>
|
|
|
+ <el-date-picker v-model="rangeDatas" type="daterange" value-format="yyyy-MM-dd" placeholder="选择开始日期" @change="picks()" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width:350px" :clearable="false" size="small"> </el-date-picker>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 项目筛选 -->
|
|
|
+ <el-select v-if="ins != 4 && ins != 8 && ins != 9" v-model="proJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()" style="margin-left:10px">
|
|
|
<el-option v-for="(item) in proListOvertime" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
|
|
|
<span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
|
|
|
<span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- </div>
|
|
|
- <div v-if="ins == 6 || ins == 8" class="headScreen">
|
|
|
- <el-select v-if="ins == 6" v-model="proJuctId" placeholder="请选择项目" @change="selcts()" clearable filterable size="small">
|
|
|
- <el-option v-for="(item, index) in proListOvertime" :key="index" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
|
|
|
- <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
|
|
|
- <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <span class="demonstration" style="color:#999;padding:0 10px">时间段</span>
|
|
|
- <el-date-picker v-model="rangeDatas" type="daterange" value-format="yyyy-MM-dd" placeholder="选择开始日期" @change="picks()" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width:350px" :clearable="false" size="small"> </el-date-picker>
|
|
|
- <el-select v-model="userId" placeholder="请选择人员" @change="selcts()" clearable filterable size="small" style="margin-left:10px">
|
|
|
- <el-option v-for="(item, index) in userList" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+
|
|
|
+ <!-- 部门筛选 -->
|
|
|
+ <el-cascader v-if="ins == 9" v-model="departmentIdArray" :options="departmentList" placeholder="请选择部门"
|
|
|
+ :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable
|
|
|
+ @change="selcts(9)" size="small" style="margin-left:10px"
|
|
|
+ ></el-cascader>
|
|
|
+
|
|
|
+ <!-- 人员筛选 -->
|
|
|
+ <el-select v-if="ins == 6 || ins == 8 || ins == 9" v-model="userId" placeholder="请选择人员" @change="selcts()" clearable filterable size="small" style="margin-left:10px">
|
|
|
+ <el-option v-for="(item, index) in selUserList" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<p style="float: right;margin-right: 25px;" ><el-button type="primary" @click="exportExcel" size="mini">报表导出</el-button></p>
|
|
@@ -417,6 +423,12 @@
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
+ <el-table v-if="ins == 9" key="9" border :data="timelyCostList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
+ <el-table-column prop="userName" label="人员" min-width="200" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="departmentName" label="所属部门" min-width="200" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="timelinessRate" label="填报及时率" min-width="200" align="center"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
|
|
|
|
|
|
<!--工具条-->
|
|
@@ -596,7 +608,10 @@ export default {
|
|
|
z : null,
|
|
|
value: null,
|
|
|
dialog: false, // 单据查看展示
|
|
|
- shuz: ["项目报表","项目任务报表","项目成本报表","项目收支平衡表(利润表)","客户项目利润报表","项目阶段工时表","加班情况统计表","工时成本预警表","人员工时分配表"],
|
|
|
+ shuz: ["项目报表","项目任务报表","项目成本报表",
|
|
|
+ "项目收支平衡表(利润表)","客户项目利润报表","项目阶段工时表",
|
|
|
+ "加班情况统计表","工时成本预警表","人员工时分配表",
|
|
|
+ "员工填报及时率报表"],
|
|
|
ins: 0,
|
|
|
user: JSON.parse(sessionStorage.user),
|
|
|
overTimeList: [], // 项目加班情况统计列表
|
|
@@ -617,7 +632,11 @@ export default {
|
|
|
cusProJuctId: '',
|
|
|
cusProListOvertime: [],
|
|
|
|
|
|
- userWorkHoursList: []
|
|
|
+ userWorkHoursList: [],
|
|
|
+ timelyCostList: [],
|
|
|
+ departmentList: [],
|
|
|
+ departmentIdArray: [],
|
|
|
+ selUserList: []
|
|
|
|
|
|
};
|
|
|
},
|
|
@@ -636,6 +655,7 @@ export default {
|
|
|
this.getProjectListOvertime()
|
|
|
this.getProjectList();
|
|
|
this.getUserList()
|
|
|
+ this.getDepartmentList()
|
|
|
this.getcustomerList()
|
|
|
this.getcusProjectList()
|
|
|
},
|
|
@@ -702,6 +722,7 @@ export default {
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.userList = res.data.records;
|
|
|
+ this.selUserList = this.userList
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -716,6 +737,45 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ getDepartmentList() {
|
|
|
+ this.http.post( this.port.manage.depList, {},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ let dptlist = JSON.parse(JSON.stringify(res.data));
|
|
|
+ this.departmentList = this.changeArr(dptlist);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ changeArr(arr) {
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
+ if(arr[i].id != -1 && arr[i].id != 0) {
|
|
|
+ if (arr[i].children != null && arr[i].children.length>0) {
|
|
|
+ arr[i].children = this.changeArr(arr[i].children);
|
|
|
+ }
|
|
|
+ arr[i].id && (arr[i].value = arr[i].id);
|
|
|
+ delete arr[i].id;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(var i in arr) {
|
|
|
+ if(arr[i].id == -1 || arr[i].id == 0) {
|
|
|
+ arr.splice(i,1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return arr;
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
getSummaries(param) {
|
|
|
const { columns, data } = param;
|
|
|
const sums = [];
|
|
@@ -812,6 +872,8 @@ export default {
|
|
|
// this.$refs.eltable7.doLayout()
|
|
|
} else if (this.ins == 8) {
|
|
|
this.getWorkHoursList()
|
|
|
+ } else if (this.ins == 9) {
|
|
|
+ this.getTimelyCostList()
|
|
|
}
|
|
|
},
|
|
|
exportExcel() {
|
|
@@ -850,6 +912,11 @@ export default {
|
|
|
url += "/exportUserWorkingTimeList"
|
|
|
sl.startDate = this.rangeDatas[0]
|
|
|
sl.endDate = this.rangeDatas[1]
|
|
|
+ } else if (this.ins == 9) {
|
|
|
+ fName = "人员填报及时率统计.xls"
|
|
|
+ url += "/exportReportTimelinessRate"
|
|
|
+ sl.startDate = this.rangeDatas[0]
|
|
|
+ sl.endDate = this.rangeDatas[1]
|
|
|
}
|
|
|
this.http.post(url, sl,
|
|
|
res => {
|
|
@@ -892,6 +959,9 @@ export default {
|
|
|
this.overTimeList = []
|
|
|
this.baseCostList = []
|
|
|
this.userWorkHoursList = []
|
|
|
+ this.timelyCostList = []
|
|
|
+ this.departmentIdArray = [],
|
|
|
+ this.userId = null
|
|
|
this.getList();
|
|
|
},
|
|
|
getCustomerProjectInAndOut() {
|
|
@@ -1137,6 +1207,40 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ getTimelyCostList(){
|
|
|
+ let parameter = {
|
|
|
+ startDate: this.rangeDatas[0],
|
|
|
+ endDate: this.rangeDatas[1],
|
|
|
+ pageIndex: this.page,
|
|
|
+ pageSize: this.size,
|
|
|
+ }
|
|
|
+ if(this.userId){
|
|
|
+ parameter.userId = this.userId
|
|
|
+ }
|
|
|
+ if(this.departmentIdArray.length != 0){
|
|
|
+ parameter.departmentId = this.departmentIdArray[this.departmentIdArray.length - 1]
|
|
|
+ }
|
|
|
+ this.listLoading = true
|
|
|
+ this.http.post('/project/getUserReportTimelinessRate',parameter,
|
|
|
+ res => {
|
|
|
+ this.listLoading = false
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.timelyCostList = res.data.list
|
|
|
+ this.total = res.data.total
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err => {
|
|
|
+ this.listLoading = false
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
budgetFilter(emList,eId){
|
|
|
let emItem = emList.filter((em)=>{
|
|
@@ -1291,17 +1395,31 @@ export default {
|
|
|
if(this.ins == 8){
|
|
|
this.getWorkHoursList()
|
|
|
}
|
|
|
+ if(this.ins == 9){
|
|
|
+ this.getTimelyCostList()
|
|
|
+ }
|
|
|
},
|
|
|
// 日期
|
|
|
getCurrentRangeTime() {
|
|
|
var _this = this;
|
|
|
- let yy = new Date().getFullYear();
|
|
|
- let mm = new Date().getMonth()+1;
|
|
|
- let dd = new Date().getDate();
|
|
|
- _this.gettime = [yy+'-'+mm+'-'+'01' , yy +'-'+ mm +'-'+ dd];
|
|
|
- return _this.gettime
|
|
|
+ let yy = new Date().getFullYear();
|
|
|
+ let mm = new Date().getMonth()+1;
|
|
|
+ let dd = new Date().getDate();
|
|
|
+ let time1 = yy + '-' + (mm < 10 ? '0' + mm : mm) + '-' + '01'
|
|
|
+ let time2 = yy + '-' + (mm < 10 ? '0' + mm : mm) + '-' + (dd < 10 ? '0' + dd : dd)
|
|
|
+ _this.gettime = [time1 , time2];
|
|
|
+ return _this.gettime
|
|
|
},
|
|
|
- selcts() {
|
|
|
+ selcts(e) {
|
|
|
+ if(e == 9){
|
|
|
+ this.userId = null
|
|
|
+ if(this.departmentIdArray.length != 0){
|
|
|
+ let deptid = this.departmentIdArray[this.departmentIdArray.length - 1]
|
|
|
+ this.selUserList = this.userList.filter(item => item.departmentId == deptid)
|
|
|
+ }else{
|
|
|
+ this.selUserList = this.userList
|
|
|
+ }
|
|
|
+ }
|
|
|
// console.log(this.customerId);
|
|
|
this.getList()
|
|
|
},
|