|
@@ -27,6 +27,7 @@
|
|
|
<el-menu-item index="1-5" v-if="permissions.reportBalance || permissions.reportAllBalance"><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>
|
|
|
<el-menu-item index="1-7" v-if="permissions.reportPhase || permissions.reportAllPhase"><p @click="ssl(5)">项目阶段工时表</p></el-menu-item>
|
|
|
+ <el-menu-item index="1-13" v-if="permissions.reportPhase || permissions.reportAllPhase"><p @click="ssl(12)">任务分组工时表</p></el-menu-item>
|
|
|
<el-menu-item index="1-8" v-if="permissions.reportAllOvertime || permissions.reportOvertime"><p @click="ssl(6)">加班情况统计表</p></el-menu-item>
|
|
|
|
|
|
<el-menu-item index="1-10" v-if="permissions.reportAllTimely || permissions.reportTimely"><p @click="ssl(9)">员工填报及时率</p></el-menu-item>
|
|
@@ -65,7 +66,7 @@
|
|
|
</el-select>
|
|
|
</template>
|
|
|
<!-- 时间段筛选 -->
|
|
|
- <template v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11">
|
|
|
+ <template v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 12">
|
|
|
<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:300px" :clearable="false" size="small"> </el-date-picker>
|
|
|
</template>
|
|
@@ -100,7 +101,7 @@
|
|
|
<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>
|
|
|
+ <p style="float: right;margin-right: 25px;" ><el-button type="primary" @click="exportExcel" size="mini" v-if="ins != 12">报表导出</el-button></p>
|
|
|
</div>
|
|
|
<div ref="staff" style="margin: 5px 0px 0px 10px; width: 98%">
|
|
|
<div class="staff" ref="tabless" :style="'width:'+(windowWidth - 410)+'px'">
|
|
@@ -345,6 +346,32 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
+ <!-- 任务分组工时表 -->
|
|
|
+ <el-table v-if="ins == 12" border :data="groupWorktimeList" key="12"
|
|
|
+ highlight-current-row v-loading="listLoading" :height="tableHeight"
|
|
|
+ style="width: 100%;" ref="table">
|
|
|
+ <el-table-column label="按任务分组统计" header-align="center">
|
|
|
+ <el-table-column prop="leftgroupName" label="分组名称" min-width="100"></el-table-column>
|
|
|
+ <el-table-column prop="leftworkingTime" label="工时(h)" min-width="50" align="right" header-align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span style="margin-right:20px">{{scope.row.leftworkingTime ? scope.row.leftworkingTime.toFixed(1) + '(h)' : ''}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="2" class-name="dividingLine" label-class-name="dividingLine"></el-table-column>
|
|
|
+ <el-table-column label="按项目统计" header-align="center">
|
|
|
+ <el-table-column prop="rightprojectCode" label="项目编号" min-width="100"></el-table-column>
|
|
|
+ <el-table-column prop="rightprojectName" label="项目名称" min-width="100"></el-table-column>
|
|
|
+ <el-table-column prop="rightgroupName" label="分组名称" min-width="100"></el-table-column>
|
|
|
+ <el-table-column prop="rightworkingTime" label="工时(h)" min-width="50" align="right" header-align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span style="margin-right:20px">{{scope.row.rightworkingTime ? scope.row.rightworkingTime.toFixed(1) + '(h)' : ''}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+
|
|
|
<!-- 项目加班情况统计报表 -->
|
|
|
<div v-if="ins == 6 || ins == 8">
|
|
|
|
|
@@ -703,6 +730,8 @@ export default {
|
|
|
defaultActive: '1-1',
|
|
|
|
|
|
personnelList: [], //'人员工时统计表'
|
|
|
+ groupWorktimeList: [], //任务分组工时表
|
|
|
+ groupWorktimeAll: []
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -959,6 +988,8 @@ export default {
|
|
|
this.getAuditRateList()
|
|
|
} else if(this.ins == 11) {
|
|
|
this.getPersonnelList()
|
|
|
+ }else if(this.ins == 12){
|
|
|
+ this.getGroupWorktimeList('picks')
|
|
|
}
|
|
|
},
|
|
|
exportExcel() {
|
|
@@ -1070,6 +1101,7 @@ export default {
|
|
|
this.reportTimelyList = []
|
|
|
this.auditRateList = []
|
|
|
this.departmentIdArray = []
|
|
|
+ this.groupWorktimeList = []
|
|
|
this.userId = null
|
|
|
this.selUserList = this.userList
|
|
|
this.getList();
|
|
@@ -1427,6 +1459,54 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ getGroupWorktimeList(sel){
|
|
|
+ let parameter = {
|
|
|
+ startDate: this.rangeDatas[0],
|
|
|
+ endDate: this.rangeDatas[1],
|
|
|
+ pageIndex: this.page,
|
|
|
+ pageSize: this.size
|
|
|
+ }
|
|
|
+ if(this.proJuctId && sel == 'selcts'){
|
|
|
+ parameter.projectId = this.proJuctId
|
|
|
+ }
|
|
|
+ this.listLoading = true
|
|
|
+ this.http.post('/project/getTimeCostByGroup',parameter,
|
|
|
+ res => {
|
|
|
+ this.listLoading = false
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.groupWorktimeList = []
|
|
|
+ this.total = res.data.total
|
|
|
+ // this.groupWorktimeList = res.data.records
|
|
|
+ if(sel == 'picks'){
|
|
|
+ this.groupWorktimeAll = res.data.records
|
|
|
+ }
|
|
|
+ let list = res.data.records
|
|
|
+ for(let i in this.groupWorktimeAll){
|
|
|
+ let item = {
|
|
|
+ leftgroupName: this.groupWorktimeAll[i].groupName,
|
|
|
+ leftworkingTime: this.groupWorktimeAll[i].workingTime,
|
|
|
+ rightprojectCode: i < list.length ? list[i].projectCode : null,
|
|
|
+ rightprojectName: i < list.length ? list[i].projectName : null,
|
|
|
+ rightgroupName: i < list.length ? list[i].groupName : null,
|
|
|
+ rightworkingTime: i < list.length ? list[i].workingTime : null
|
|
|
+ }
|
|
|
+ this.groupWorktimeList.push(item)
|
|
|
+ }
|
|
|
+ console.log('groupWorktimeList',this.groupWorktimeList);
|
|
|
+ }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)=>{
|
|
@@ -1595,6 +1675,10 @@ export default {
|
|
|
if(this.ins == 11){
|
|
|
this.getPersonnelList()
|
|
|
}
|
|
|
+ if(this.ins == 12){
|
|
|
+ this.proJuctId = ''
|
|
|
+ this.getGroupWorktimeList('picks')
|
|
|
+ }
|
|
|
},
|
|
|
// 日期
|
|
|
getCurrentRangeTime() {
|
|
@@ -1608,6 +1692,9 @@ export default {
|
|
|
return _this.gettime
|
|
|
},
|
|
|
selcts(e) {
|
|
|
+ if(this.ins == 12){
|
|
|
+ this.getGroupWorktimeList('selcts')
|
|
|
+ }else{
|
|
|
if(e == 9){
|
|
|
this.userId = null
|
|
|
if(this.departmentIdArray.length != 0){
|
|
@@ -1625,6 +1712,7 @@ export default {
|
|
|
}
|
|
|
// console.log(this.customerId);
|
|
|
this.getList()
|
|
|
+ }
|
|
|
},
|
|
|
// 成本查看明细
|
|
|
costBtn(item) {
|
|
@@ -1660,6 +1748,11 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
+<style>
|
|
|
+.dividingLine{
|
|
|
+ background-color: #999 !important;
|
|
|
+}
|
|
|
+</style>
|
|
|
<style scoped>
|
|
|
.headConCon {
|
|
|
position: fixed;
|