|
@@ -20,6 +20,7 @@
|
|
|
<el-menu-item index="1-1" ><p @click="ssl(0)">项目报表</p></el-menu-item>
|
|
|
<el-menu-item index="1-2" v-if="permissions.reportTask"><p @click="ssl(1)">项目任务报表</p></el-menu-item>
|
|
|
<el-menu-item index="1-3" v-if="permissions.reportCostOf"><p @click="ssl(2)">项目成本报表</p></el-menu-item>
|
|
|
+ <el-menu-item index="1-9" v-if="permissions.reportCostWarning"><p @click="ssl(8)">人员工时分配表</p></el-menu-item>
|
|
|
<el-menu-item index="1-4" v-if="permissions.reportCostWarning"><p @click="ssl(7)">工时成本预警表</p></el-menu-item>
|
|
|
<el-menu-item index="1-5" v-if="permissions.reportBalance"><p @click="ssl(3)">项目收支平衡表</p></el-menu-item>
|
|
|
<el-menu-item index="1-6" v-if="user.company.packageCustomer == 1 && permissions.reportProfits"><p @click="ssl(4)">客户项目利润表</p></el-menu-item>
|
|
@@ -41,20 +42,20 @@
|
|
|
<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">
|
|
|
+ <div class="headScreen" v-if="ins != 6 && ins != 8">
|
|
|
<!-- 客户项目利润表的筛选 -->
|
|
|
- <template v-if="ins == 4">
|
|
|
- <el-select v-model="customerId" placeholder="请选择客户" clearable filterable size="small" @change="selcts(4)" style="margin-right:20px">
|
|
|
- <el-option v-for="(item) in customerList" :key="item.id" :label="item.customerName" :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="cusProJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()">
|
|
|
- <el-option v-for="(item) in cusProListOvertime" :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>
|
|
|
- </template>
|
|
|
+ <template v-if="ins == 4">
|
|
|
+ <el-select v-model="customerId" placeholder="请选择客户" clearable filterable size="small" @change="selcts(4)" style="margin-right:20px">
|
|
|
+ <el-option v-for="(item) in customerList" :key="item.id" :label="item.customerName" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select v-model="cusProJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()">
|
|
|
+ <el-option v-for="(item) in cusProListOvertime" :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>
|
|
|
+ </template>
|
|
|
|
|
|
<el-select v-if="ins != 4" v-model="proJuctId" placeholder="请选择项目" clearable filterable size="small" @change="selcts()">
|
|
|
<el-option v-for="(item) in proListOvertime" :key="item.id" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id">
|
|
@@ -68,7 +69,7 @@
|
|
|
<div ref="staff" style="margin: 5px 0px 0px 200px; width: 84%">
|
|
|
<div class="staff">
|
|
|
<!--项目报表 -->
|
|
|
- <el-table v-if="ins == 0" :key="ins" border :data="list0" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
+ <el-table v-if="ins == 0" key="0" border :data="list0" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
<el-table-column prop="projectCode" label="项目编号" width="120"></el-table-column>
|
|
|
<el-table-column prop="projectName" label="项目名称" width="200">
|
|
|
<template slot-scope="scope" >
|
|
@@ -108,7 +109,7 @@
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 项目任务报表 -->
|
|
|
- <el-table v-if="ins == 1" :key="ins" border :data="list1" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" :span-method="objectSpanMethod">
|
|
|
+ <el-table v-if="ins == 1" key="1" border :data="list1" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" :span-method="objectSpanMethod">
|
|
|
<el-table-column prop="project_code" label="项目编号" width="120"></el-table-column>
|
|
|
<el-table-column prop="project_name" label="项目名称" width="200">
|
|
|
<template slot-scope="scope" >
|
|
@@ -150,7 +151,7 @@
|
|
|
</el-table>
|
|
|
|
|
|
<!--项目成本报表 -->
|
|
|
- <el-table v-if="ins == 2" :key="ins" border :data="list2" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
+ <el-table v-if="ins == 2" key="2" border :data="list2" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
<el-table-column prop="projectCode" label="项目编号" width="120"></el-table-column>
|
|
|
<el-table-column prop="projectName" label="项目名称" >
|
|
|
<template slot-scope="scope" >
|
|
@@ -190,7 +191,7 @@
|
|
|
</el-table>
|
|
|
|
|
|
<!--项目收支平衡表 -->
|
|
|
- <el-table v-if="ins == 3" :key="ins" border :data="list3" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
+ <el-table v-if="ins == 3" key="3" border :data="list3" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
<el-table-column prop="projectCode" label="项目编号" width="120"></el-table-column>
|
|
|
<el-table-column prop="projectName" label="项目名称" >
|
|
|
<template slot-scope="scope" >
|
|
@@ -239,7 +240,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!--客户项目报表 -->
|
|
|
- <el-table v-if="ins == 4" border :data="list4" :key="ins"
|
|
|
+ <el-table v-if="ins == 4" border :data="list4" key="4"
|
|
|
highlight-current-row v-loading="listLoading" :height="tableHeight"
|
|
|
style="width: 100%;">
|
|
|
<el-table-column prop="customerName" label="客户名称" ></el-table-column>
|
|
@@ -290,7 +291,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<!--项目阶段汇总工时报表 -->
|
|
|
- <el-table v-if="ins == 5" border :data="list5" :key="ins"
|
|
|
+ <el-table v-if="ins == 5" border :data="list5" key="5"
|
|
|
highlight-current-row v-loading="listLoading" :height="tableHeight"
|
|
|
style="width: 100%;">
|
|
|
<el-table-column prop="projectCode" label="项目编号" width="120" fixed ></el-table-column>
|
|
@@ -309,14 +310,14 @@
|
|
|
</el-table>
|
|
|
|
|
|
<!-- 项目加班情况统计报表 -->
|
|
|
- <div v-if="ins == 6" style="padding: 0 20px">
|
|
|
+ <div v-if="ins == 6 || ins == 8" style="padding: 0 20px">
|
|
|
<div class="flsx">
|
|
|
- <div>
|
|
|
+ <div v-if="ins == 6">
|
|
|
<!-- <el-select v-model="proJuctId" placeholder="请选择项目" @change="selcts()" clearable filterable>
|
|
|
<el-option v-for="(item, index) in proList" :key="index" :label="item.projectName" :value="item.id" @change="selscts(item)"></el-option>
|
|
|
</el-select> -->
|
|
|
<el-select v-model="proJuctId" placeholder="请选择项目" @change="selcts()" clearable filterable>
|
|
|
- <el-option v-for="(item, index) in proListOvertime" :key="index" :label="item.projectName + (item.projectCode ? item.projectCode : '')" :value="item.id" @change="selscts(item)">
|
|
|
+ <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>
|
|
@@ -328,11 +329,11 @@
|
|
|
</div>
|
|
|
<div style="margin-left: 30px">
|
|
|
<el-select v-model="userId" placeholder="请选择人员" @change="selcts()" clearable filterable>
|
|
|
- <el-option v-for="(item, index) in userList" :key="index" :label="item.name" :value="item.id" @change="selscts(item)"></el-option>
|
|
|
+ <el-option v-for="(item, index) in userList" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table v-if="ins == 6" :key="ins" border :data="overTimeList" highlight-current-row v-loading="listLoading" :height="tableHeight - 30" style="width: 100%;">
|
|
|
+ <el-table v-if="ins == 6" key="6" border :data="overTimeList" highlight-current-row v-loading="listLoading" :height="tableHeight - 30" style="width: 100%;">
|
|
|
<el-table-column prop="projectCode" label="序号" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -362,10 +363,33 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+
|
|
|
+ <!-- 人员工时分配表 -->
|
|
|
+ <el-table v-if="ins == 8" key="8" border :data="userWorkHoursList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
+ <el-table-column prop="username" label="人员" width="150"></el-table-column>
|
|
|
+ <el-table-column prop="unPublic" label="普通项目工时" min-width="160" align="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.unPublic == null? 0 + 'h' : scope.row.unPublic.toFixed(1) + 'h'}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="isPublic" label="公共项目工时" min-width="160" align="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.isPublic == null? 0 + 'h' : scope.row.isPublic.toFixed(1) + 'h'}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="workingTime" label="总工时" min-width="160" align="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.workingTime == null? 0 + 'h' : scope.row.workingTime.toFixed(1) + 'h'}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="proportion" label="公共项目工时占比" min-width="130" align="right">
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
|
|
|
<!-- 工时成本预警表 -->
|
|
|
- <el-table v-if="ins == 7" :key="ins" border :data="baseCostList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
+ <el-table v-if="ins == 7" key="7" border :data="baseCostList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
|
<!-- 当前总预算,已发生工时成本,xxx成本预算,xxx已发生成本,xxx已发生占比, yyy成本预算,yyy已发生成本,yyy已发生占比。 -->
|
|
|
<el-table-column prop="projectCode" label="项目编号" width="120" fixed></el-table-column>
|
|
|
<el-table-column prop="projectName" label="项目名称" min-width="200" fixed></el-table-column>
|
|
@@ -401,6 +425,8 @@
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
<!--工具条-->
|
|
|
<el-col :span="24" class="toolbar" v-if="ins != 6">
|
|
|
<el-pagination
|
|
@@ -408,7 +434,7 @@
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="page"
|
|
|
:page-sizes="[20 , 50 , 80 , 100]"
|
|
|
- :page-size="20"
|
|
|
+ :page-size="size"
|
|
|
layout="total, sizes, prev, pager, next"
|
|
|
:total="total"
|
|
|
style="float:right;"
|
|
@@ -578,7 +604,7 @@ export default {
|
|
|
z : null,
|
|
|
value: null,
|
|
|
dialog: false, // 单据查看展示
|
|
|
- shuz: ["项目报表","项目任务报表","项目成本报表","项目收支平衡表(利润表)","客户项目利润报表","项目阶段工时表","加班情况统计表","工时成本预警表"],
|
|
|
+ shuz: ["项目报表","项目任务报表","项目成本报表","项目收支平衡表(利润表)","客户项目利润报表","项目阶段工时表","加班情况统计表","工时成本预警表","人员工时分配表"],
|
|
|
ins: 0,
|
|
|
user: JSON.parse(sessionStorage.user),
|
|
|
overTimeList: [], // 项目加班情况统计列表
|
|
@@ -599,6 +625,8 @@ export default {
|
|
|
cusProJuctId: '',
|
|
|
cusProListOvertime: [],
|
|
|
|
|
|
+ userWorkHoursList: []
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -768,6 +796,7 @@ export default {
|
|
|
|
|
|
handleSizeChange(val) {
|
|
|
this.size = val;
|
|
|
+ this.page = 1
|
|
|
this.getList();
|
|
|
},
|
|
|
getList() {
|
|
@@ -788,7 +817,9 @@ export default {
|
|
|
this.overTime()
|
|
|
} else if (this.ins == 7) {
|
|
|
this.getBaseCost()
|
|
|
- this.$refs.eltable7.doLayout()
|
|
|
+ // this.$refs.eltable7.doLayout()
|
|
|
+ } else if (this.ins == 8) {
|
|
|
+ this.getWorkHoursList()
|
|
|
}
|
|
|
},
|
|
|
exportExcel() {
|
|
@@ -822,6 +853,11 @@ export default {
|
|
|
} else if (this.ins == 7) {
|
|
|
fName = "工时成本预警表.xls";
|
|
|
url += "/exportBaseCostAndRealCost";
|
|
|
+ } else if (this.ins == 8) {
|
|
|
+ fName = "人员工时分配表.xls"
|
|
|
+ url += "/exportUserWorkingTimeList"
|
|
|
+ sl.startDate = this.rangeDatas[0]
|
|
|
+ sl.endDate = this.rangeDatas[1]
|
|
|
}
|
|
|
this.http.post(url, sl,
|
|
|
res => {
|
|
@@ -851,7 +887,7 @@ export default {
|
|
|
this.ins = index;
|
|
|
this.list = [];
|
|
|
this.page = 1;
|
|
|
- this.pageSize = 20;
|
|
|
+ this.size = 20;
|
|
|
this.customerId = ''
|
|
|
this.cusProJuctId = ''
|
|
|
this.$forceUpdate()
|
|
@@ -863,6 +899,7 @@ export default {
|
|
|
this.list5 = []
|
|
|
this.overTimeList = []
|
|
|
this.baseCostList = []
|
|
|
+ this.userWorkHoursList = []
|
|
|
this.getList();
|
|
|
},
|
|
|
getCustomerProjectInAndOut() {
|
|
@@ -1077,6 +1114,37 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ getWorkHoursList(){
|
|
|
+ let parameter = {
|
|
|
+ startDate: this.rangeDatas[0],
|
|
|
+ endDate: this.rangeDatas[1],
|
|
|
+ pageIndex: this.page,
|
|
|
+ pageSize: this.size
|
|
|
+ }
|
|
|
+ if(this.userId){
|
|
|
+ parameter.userId = this.userId
|
|
|
+ }
|
|
|
+ this.listLoading = true
|
|
|
+ this.http.post('project/getUserWorkingTimeList',parameter,
|
|
|
+ res => {
|
|
|
+ this.listLoading = false
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.userWorkHoursList = res.data.result
|
|
|
+ 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)=>{
|
|
@@ -1221,7 +1289,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
picks() {
|
|
|
- this.overTime()
|
|
|
+ if(this.ins == 6){
|
|
|
+ this.overTime()
|
|
|
+ }
|
|
|
+ if(this.ins == 8){
|
|
|
+ this.getWorkHoursList()
|
|
|
+ }
|
|
|
},
|
|
|
// 日期
|
|
|
getCurrentRangeTime() {
|