|
|
@@ -126,7 +126,7 @@
|
|
|
</el-select>
|
|
|
</span>
|
|
|
</template>
|
|
|
- <template v-if="ins == 6 && overtimeTabActive != 'project' && user.companyId != 8555">
|
|
|
+ <template v-if="ins == 6 && overtimeTabActive != 'project' && user.companyId != 8555 && user.companyId != 5792">
|
|
|
<el-select v-model="writeOffStatus" :placeholder="$t('defaultText.pleaseChoose')" @change="picks()" size="small" clearable>
|
|
|
<el-option label="正常" :value="0" ></el-option>
|
|
|
<el-option label="已核销" :value="1" ></el-option>
|
|
|
@@ -149,7 +149,7 @@
|
|
|
<el-option v-for="(item) in projectMainIdList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
|
|
|
- <el-select v-if="!screeningCondition.project.includes(ins) && !(ins == 6 && overtimeTabActive === 'project')" v-model="proJuctId" :placeholder="$t('defaultText.pleaseSelectSnItem')" :clearable="ins != 32" filterable size="small" @change="projectChange()" style="margin-left:10px">
|
|
|
+ <el-select v-if="!screeningCondition.project.includes(ins) && !(ins == 6 && overtimeTabActive === 'project') && !(ins == 6 && (user.companyId == 8555 || user.companyId ==5792 ))" v-model="proJuctId" :placeholder="$t('defaultText.pleaseSelectSnItem')" :clearable="ins != 32" filterable size="small" @change="projectChange()" 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>
|
|
|
@@ -718,10 +718,15 @@
|
|
|
|
|
|
<!-- 项目加班情况统计报表 -->
|
|
|
<div v-if="ins == 6 || ins == 8">
|
|
|
-
|
|
|
<div v-if="ins == 6">
|
|
|
- <template v-if="user.companyId == 8555 || user.companyId == 10">
|
|
|
- <el-table key="36" border :data="mealAllowanceList" highlight-current-row v-loading="mealAllowanceLoading" :height="+tableHeight" style="width: 100%;" :max-height="+tableHeight + 50">
|
|
|
+ <template v-if="(user.companyId == 8555 || user.companyId ==5792 ) || user.companyId == 10">
|
|
|
+ <div style="margin-bottom: 15px;">
|
|
|
+ <el-tabs v-model="overtimeTabActive" @tab-click="handleOvertimeTabClick">
|
|
|
+ <el-tab-pane label="每日加班明细" name="detail"></el-tab-pane>
|
|
|
+ <el-tab-pane label="按人员统计" name="member"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ <el-table key="36" v-if="overtimeTabActive === 'detail'" border :data="mealAllowanceList" highlight-current-row v-loading="mealAllowanceLoading" :height="+tableHeight-60" style="width: 100%;" :max-height="+tableHeight">
|
|
|
<el-table-column prop="userName" align="center" label="姓名" width="120" fixed>
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="user.userNameNeedTranslate == '1'">
|
|
|
@@ -777,6 +782,50 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <!--按人员统计-->
|
|
|
+ <el-table v-if="overtimeTabActive === 'member'" key="6-member" border :data="membOvertimeList" highlight-current-row v-loading="mealAllowanceLoading" :height="+tableHeight-60" style="width: 100%;" :max-height="+tableHeight">
|
|
|
+ <el-table-column prop="userName" align="center" label="姓名" width="120" fixed>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="user.userNameNeedTranslate == '1'">
|
|
|
+ <TranslationOpenDataText type='userName' :openid='scope.row.corpwxUserid'></TranslationOpenDataText>
|
|
|
+ </span>
|
|
|
+ <span v-if="user.userNameNeedTranslate != '1'">
|
|
|
+ {{scope.row.userName}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="jobNumber" align="center" label="工号" width="100"></el-table-column>
|
|
|
+ <el-table-column prop="departmentName" align="center" label="部门" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="user.userNameNeedTranslate == '1'">
|
|
|
+ <TranslationOpenDataText type='departmentName' :openid='scope.row.departmentName'></TranslationOpenDataText>
|
|
|
+ </span>
|
|
|
+ <span v-if="user.userNameNeedTranslate != '1'">
|
|
|
+ {{scope.row.departmentName}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="workHours" align="center" label="有效工作时长(h)" width="140">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.workHours ? scope.row.workHours.toFixed(1) : '-'}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="overtimeDuration" align="center" label="考勤加班时长(h)" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.overtimeDuration ? scope.row.overtimeDuration.toFixed(1) : '-'}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="applyOvertimeDuration" align="center" label="申请加班时长(h)" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{(scope.row.applyOvertimeDuration ? scope.row.applyOvertimeDuration.toFixed(1) : '0.0')}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="applyOvertimeDuration" align="center" label="有效加班时长(h)" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{(scope.row.applyOvertimeDuration ? (scope.row.applyOvertimeDuration < scope.row.overtimeDuration?'需补加班申请':scope.row.overtimeDuration): '需补加班申请')}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<div style="margin-bottom: 15px;">
|
|
|
@@ -2164,49 +2213,8 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</template>
|
|
|
-
|
|
|
- <!-- 施工进度表 -->
|
|
|
- <!-- <template v-if="ins == 42">
|
|
|
- <el-table key="42" border :data="constructionStageList" highlight-current-row v-loading="constructionStageLoading" :height="+tableHeight" style="width: 100%;" >
|
|
|
- <el-table-column prop="name" align="center" label="一级工程分类" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <b v-if="scope.row.mainId == null">{{scope.row.name}}</b>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="name" align="center" label="分项工程" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <span v-if="scope.row.mainId != null">{{scope.row.name}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="percent" align="center" label="权重" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <b v-if="scope.row.mainId == null">{{scope.row.percent}} %</b>
|
|
|
- <span v-else>{{scope.row.percent}} %</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="designNumber" align="center" label="设计量" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <b v-if="scope.row.mainId == null">{{scope.row.designNumber}}</b>
|
|
|
- <span v-else>{{scope.row.designNumber}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="finishNumber" align="center" label="累计完成" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <b v-if="scope.row.mainId == null">{{scope.row.finishNumber}}</b>
|
|
|
- <span v-else>{{scope.row.finishNumber}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="finishRate" align="center" label="完成比例" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <b v-if="scope.row.mainId == null">{{scope.row.finishRate}} %</b>
|
|
|
- <span v-else>{{scope.row.finishRate}} %</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </template> -->
|
|
|
-
|
|
|
<!--工具条-->
|
|
|
- <el-col :span="24" class="toolbar" v-if="(ins != 6 || (ins == 6 && user.companyId == 8555)) && ins != 20 && ins != 21 && tabPosition==0 && tabsType == 'all' && ins != 31 && ins != 32 && ins != 33 && ins != 40 && ins != 41 && ins != 42">
|
|
|
+ <el-col :span="24" class="toolbar" v-if="(ins != 6 || (ins == 6 && (user.companyId == 8555 || user.companyId ==5792 ) && overtimeTabActive != 'member')) && ins != 20 && ins != 21 && tabPosition==0 && tabsType == 'all' && ins != 31 && ins != 32 && ins != 33 && ins != 40 && ins != 41 && ins != 42">
|
|
|
<el-pagination
|
|
|
v-if="ins == 12"
|
|
|
@size-change="groupSizeChange"
|
|
|
@@ -2227,7 +2235,7 @@
|
|
|
layout="total, sizes, prev, pager, next"
|
|
|
:total="total"
|
|
|
style="float:right;"
|
|
|
- ></el-pagination>{{ins}}
|
|
|
+ ></el-pagination>
|
|
|
</el-col>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -2936,7 +2944,7 @@ export default {
|
|
|
// 餐补表
|
|
|
mealAllowanceList: [],
|
|
|
mealAllowanceLoading: false,
|
|
|
-
|
|
|
+ membOvertimeList: [],
|
|
|
// 工时日报表
|
|
|
dailyWorkHoursList: [],
|
|
|
dailyWorkHoursLoading: false,
|
|
|
@@ -3502,10 +3510,17 @@ export default {
|
|
|
},
|
|
|
handleOvertimeTabClick(tab) {
|
|
|
if (tab.name === 'detail') {
|
|
|
- this.getOvertimeDetailData();
|
|
|
+ if (this.user.companyId == 10 || (this.user.companyId == 8555 || this.user.companyId ==5792 )) {
|
|
|
+ this.getMealAllowance(false);
|
|
|
+ } else {
|
|
|
+ this.getOvertimeDetailData();
|
|
|
+ }
|
|
|
} else if (tab.name === 'project') {
|
|
|
//每次切换到项目统计tab都重新获取完整的统计数据
|
|
|
this.getProjectOvertimeData();
|
|
|
+ } else if (tab.name === 'member') {
|
|
|
+ //每次切换到人员统计tab都重新获取完整的统计数据
|
|
|
+ this.getMembOvertimeData(false);
|
|
|
}
|
|
|
},
|
|
|
//分页
|
|
|
@@ -3578,8 +3593,8 @@ export default {
|
|
|
} else if (this.ins == 5) {
|
|
|
this.getProjectStages();
|
|
|
} else if (this.ins == 6) {
|
|
|
- if (this.user.companyId == 8555 || this.user.companyId == 10) {
|
|
|
- this.getMealAllowance()
|
|
|
+ if ((this.user.companyId == 8555 || this.user.companyId ==5792 ) || this.user.companyId == 10) {
|
|
|
+ this.getMealAllowance(false)
|
|
|
} else {
|
|
|
this.overTime()
|
|
|
}
|
|
|
@@ -3745,8 +3760,14 @@ export default {
|
|
|
}
|
|
|
} else if (this.ins == 6) {
|
|
|
fName = this.$t('statisticalreportofovertimework') + '.xlsx';
|
|
|
- if (this.user.companyId == 8555 || this.user.companyId == 10) {
|
|
|
- url = "/overtime-allowance/export";
|
|
|
+ if ((this.user.companyId == 8555 || this.user.companyId ==5792 ) || this.user.companyId == 10) {
|
|
|
+ if (this.overtimeTabActive == 'detail') {
|
|
|
+ fName = '加班明细表.xlsx';
|
|
|
+ url = "/overtime-allowance/export";
|
|
|
+ } else {
|
|
|
+ url = "/overtime-allowance/exportSummaryList";
|
|
|
+ fName = '员工加班情况汇总.xlsx';
|
|
|
+ }
|
|
|
sl.isAllowance = false;//非补贴类型,就是考勤加班的数据
|
|
|
} else {
|
|
|
url += "/exportOvertimeList";
|
|
|
@@ -4609,7 +4630,6 @@ export default {
|
|
|
startDate: this.rangeDatas[0],
|
|
|
endDate: this.rangeDatas[1],
|
|
|
}
|
|
|
- console.log(this.userId, '人员')
|
|
|
if(this.userId) {
|
|
|
obj.userId = this.userId
|
|
|
}
|
|
|
@@ -5268,8 +5288,13 @@ export default {
|
|
|
},
|
|
|
picks() {
|
|
|
if(this.ins == 6){
|
|
|
- if (this.user.companyId == 8555) {
|
|
|
- this.getMealAllowance();
|
|
|
+ if ((this.user.companyId == 8555 || this.user.companyId ==5792 )) {
|
|
|
+ if (this.overtimeTabActive === 'detail') {
|
|
|
+ this.getMealAllowance(false);
|
|
|
+ } else {
|
|
|
+ this.getMembOvertimeData(false);
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
if (this.overtimeTabActive === 'detail') {
|
|
|
this.overTime();
|
|
|
@@ -5533,11 +5558,15 @@ export default {
|
|
|
}else if(this.ins == 15){
|
|
|
this.getDepartmentsInvolved()
|
|
|
}else if(this.ins == 6){
|
|
|
- // if (this.overtimeTabActive === 'detail') {
|
|
|
- this.overTime();
|
|
|
- // } else {
|
|
|
- // this.processProjectOvertimeData();
|
|
|
- // }
|
|
|
+ if ((this.user.companyId == 8555 || this.user.companyId ==5792 )) {
|
|
|
+ if (this.overtimeTabActive === 'detail') {
|
|
|
+ this.getMealAllowance(false);
|
|
|
+ } else {
|
|
|
+ this.getMembOvertimeData(false);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.overTime();
|
|
|
+ }
|
|
|
}else{
|
|
|
if(e == 9){
|
|
|
console.log(this.departmentIdArray);
|
|
|
@@ -6309,6 +6338,26 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ getMembOvertimeData(isAllowance) {
|
|
|
+ this.mealAllowanceLoading = true
|
|
|
+ let parameter = {
|
|
|
+ startDate: this.rangeDatas[0],
|
|
|
+ endDate: this.rangeDatas[1],
|
|
|
+ isAllowance: isAllowance
|
|
|
+ }
|
|
|
+ if(this.userId) {
|
|
|
+ parameter.userId = this.userId
|
|
|
+ }
|
|
|
+ if(this.departmentIdArray.length != 0){
|
|
|
+ parameter.departmentId = this.departmentIdArray[this.departmentIdArray.length - 1]
|
|
|
+ }
|
|
|
+ this.postData(`/overtime-allowance/getSummaryList`, parameter).then(res => {
|
|
|
+ this.membOvertimeList = res.data|| []
|
|
|
+ }).finally(() => {
|
|
|
+ this.mealAllowanceLoading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 获取工时日报表
|
|
|
getDailyWorkHours() {
|
|
|
this.dailyWorkHoursLoading = true
|