|
@@ -133,7 +133,10 @@
|
|
<el-link v-if="reportTimeType.type != 0 && user.companyId != yuzhongCompId && user.timeType.enableNewWeeklyfill != 1 && user.companyId != 3092" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">{{$t('textLink.fillInAWeek')}}</el-link>
|
|
<el-link v-if="reportTimeType.type != 0 && user.companyId != yuzhongCompId && user.timeType.enableNewWeeklyfill != 1 && user.companyId != 3092" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportss()">{{$t('textLink.fillInAWeek')}}</el-link>
|
|
<el-link v-if="user.timeType.enableNewWeeklyfill == 1" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报</el-link>
|
|
<el-link v-if="user.timeType.enableNewWeeklyfill == 1" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报</el-link>
|
|
<!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报</el-link> -->
|
|
<!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报</el-link> -->
|
|
- <el-link type="primary" v-if="permissions.reportsFillOut && user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,2)">{{$t('textLink.helpToFillIn')}}</el-link>
|
|
|
|
|
|
+ <el-link type="primary" v-if="user.companyId != 5978 && permissions.reportsFillOut && user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,2)">{{$t('textLink.helpToFillIn')}}</el-link>
|
|
|
|
+ <!-- 苏州景昱,按周填报的模式进行代填日报 -->
|
|
|
|
+ <el-link type="primary" v-if="user.companyId == 5978 && permissions.reportsFillOut && user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReportss();">{{$t('textLink.helpToFillIn')}}</el-link>
|
|
|
|
+
|
|
<el-link type="primary" v-if="permissions.reportBatch && user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,1)">{{$t('textLink.batchFillIn')}}</el-link>
|
|
<el-link type="primary" v-if="permissions.reportBatch && user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,1)">{{$t('textLink.batchFillIn')}}</el-link>
|
|
<el-link type="primary" v-if="user.companyId != yuzhongCompId && (permissions.importReport || user.manageDeptId != 0)" style="margin-right:10px;" :underline="false" @click="imports()">{{$t('textLink.workHoursImport')}}</el-link>
|
|
<el-link type="primary" v-if="user.companyId != yuzhongCompId && (permissions.importReport || user.manageDeptId != 0)" style="margin-right:10px;" :underline="false" @click="imports()">{{$t('textLink.workHoursImport')}}</el-link>
|
|
<el-link type="primary" style="margin-right:10px;" :underline="false" @click="showExportDialog" v-if="permissions.reportExport">{{$t('textLink.exportWork')}}</el-link>
|
|
<el-link type="primary" style="margin-right:10px;" :underline="false" @click="showExportDialog" v-if="permissions.reportExport">{{$t('textLink.exportWork')}}</el-link>
|
|
@@ -143,7 +146,6 @@
|
|
<el-link type="primary" v-if="user.timeType.pushReportData == 1 && user.companyId==3092 && permissions.reportPush" :underline="false" @click="pushWorkTimeLogDig=true,getPushWorkLogData()">工时推送日志</el-link>
|
|
<el-link type="primary" v-if="user.timeType.pushReportData == 1 && user.companyId==3092 && permissions.reportPush" :underline="false" @click="pushWorkTimeLogDig=true,getPushWorkLogData()">工时推送日志</el-link>
|
|
<el-link type="primary" v-if="user.roleName == '超级管理员' && user.companyId==839" :underline="false" @click="reportLogCheckDialog=true">日报审核修改</el-link>
|
|
<el-link type="primary" v-if="user.roleName == '超级管理员' && user.companyId==839" :underline="false" @click="reportLogCheckDialog=true">日报审核修改</el-link>
|
|
<!-- <el-button v-if="user.timeType.pushReportData == 1 && permissions.reportPush" style="margin-left:10px;" icon="iconfont firerock-icontuisong" size="mini" @click="pushWorkTime"></el-button> -->
|
|
<!-- <el-button v-if="user.timeType.pushReportData == 1 && permissions.reportPush" style="margin-left:10px;" icon="iconfont firerock-icontuisong" size="mini" @click="pushWorkTime"></el-button> -->
|
|
-
|
|
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div :style="'height:'+(tableHeight-50)+'px;overflow:scroll;padding-top:10px;'">
|
|
<div :style="'height:'+(tableHeight-50)+'px;overflow:scroll;padding-top:10px;'">
|
|
@@ -935,6 +937,7 @@
|
|
|
|
|
|
<!-- 按周填报 -->
|
|
<!-- 按周填报 -->
|
|
<el-dialog :title="$t('textLink.fillInAWeek')" :visible.sync="fillWeekDialogVisi" width="1200px" :close-on-click-modal="false" @closed="guanbi(),closeAddWeeklyReport()">
|
|
<el-dialog :title="$t('textLink.fillInAWeek')" :visible.sync="fillWeekDialogVisi" width="1200px" :close-on-click-modal="false" @closed="guanbi(),closeAddWeeklyReport()">
|
|
|
|
+
|
|
<!-- 按周填报-已填工时-点击 -->
|
|
<!-- 按周填报-已填工时-点击 -->
|
|
<el-dialog append-to-body :title="$t('lable.filledReport')" :visible.sync="weeklyFilledTimeDialog" width="50%" :close-on-click-modal="false">
|
|
<el-dialog append-to-body :title="$t('lable.filledReport')" :visible.sync="weeklyFilledTimeDialog" width="50%" :close-on-click-modal="false">
|
|
<el-table :data="weeklyFilledTimeList" v-loading="weeklyFilledTimeLoading">
|
|
<el-table :data="weeklyFilledTimeList" v-loading="weeklyFilledTimeLoading">
|
|
@@ -943,24 +946,33 @@
|
|
<el-table-column prop="state" :label="$t('state.states')">
|
|
<el-table-column prop="state" :label="$t('state.states')">
|
|
<template slot-scope="scope">{{workReportStateString[scope.row.state]}}</template>
|
|
<template slot-scope="scope">{{workReportStateString[scope.row.state]}}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <!-- <el-table-column label="操作">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button v-if="scope.row.state == 2 || scope.row.state == 3" size="small" @click="weeklyFilledTimeDelete(scope.row)">删除</el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column> -->
|
|
|
|
</el-table>
|
|
</el-table>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="weeklyFilledTimeDelete()" size="small" type="danger" v-if="weeklyFilledTimeCanDelete">{{$t('btn.delete')}}</el-button>
|
|
<el-button @click="weeklyFilledTimeDelete()" size="small" type="danger" v-if="weeklyFilledTimeCanDelete">{{$t('btn.delete')}}</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <el-form ref="WeekWorkForm" :model="workForm" :rules="workRules" label-width="100px">
|
|
|
|
|
|
+ <div v-if="isSubstitude && substitudeStep == 1" style="width:300px;margin:0 auto;" >
|
|
|
|
+ <el-input v-if="user.userNameNeedTranslate != 1" @focus="showChooseMembTree" v-model="workForm.userNames" size="small"
|
|
|
|
+ :placeholder="$t('defaultText.pleaseSelectAsubstitute')" ></el-input>
|
|
|
|
+ <div @click="showChooseMembTree" v-if="user.userNameNeedTranslate == 1" >
|
|
|
|
+ <span class="spnn" v-if="workForm.userNames">
|
|
|
|
+ <span v-for="(item, index) in workForm.userNames" :key="index">
|
|
|
|
+ <span><TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText></span>
|
|
|
|
+ <span v-if="index < workForm.userNames.length - 1">,</span>
|
|
|
|
+ </span>
|
|
|
|
+ </span>
|
|
|
|
+ <span class="spnn hover" v-else>
|
|
|
|
+ {{$t('defaultText.pleaseSelectAsubstitute')}}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+ <el-button @click="substitudeStep = 2; getCurrentWeek();" style="margin-top:10px;margin-left:100px" type="primary">下一步</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <el-form ref="WeekWorkForm" :model="workForm" :rules="workRules" label-width="100px" v-if="!isSubstitude || (substitudeStep == 2 && isSubstitude && workForm.userNames && workForm.userNames.length>0)">
|
|
<el-form-item style="height:30px;margin-top:-72px;">
|
|
<el-form-item style="height:30px;margin-top:-72px;">
|
|
<!-- <el-date-picker v-model="weekDateRange" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="initWeekFormData()" type="daterange" :range-separator="$t('other.to')" :start-placeholder="$t('time.startDate')" :end-placeholder="$t('time.endDate')" style="margin-right: 18px" :clearable="false"></el-date-picker> -->
|
|
<!-- <el-date-picker v-model="weekDateRange" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="initWeekFormData()" type="daterange" :range-separator="$t('other.to')" :start-placeholder="$t('time.startDate')" :end-placeholder="$t('time.endDate')" style="margin-right: 18px" :clearable="false"></el-date-picker> -->
|
|
<el-button @click="handleGetPrevWeek()" size="small"><<</el-button>
|
|
<el-button @click="handleGetPrevWeek()" size="small"><<</el-button>
|
|
<el-button @click="getCurrentWeek()" size="small">{{$t('time.thisWeek')}}</el-button>
|
|
<el-button @click="getCurrentWeek()" size="small">{{$t('time.thisWeek')}}</el-button>
|
|
<el-button @click="handleGetNextvWeek()" size="small">>></el-button>
|
|
<el-button @click="handleGetNextvWeek()" size="small">>></el-button>
|
|
- <!-- <el-button @click="newDates()" size="small">{{$t('time.addedDate')}}</el-button> -->
|
|
|
|
-
|
|
|
|
<el-select v-model="selCon" size="small" multiple :placeholder="$t('defaultText.pleaseChoose')" @change="onSelProjectChange()" filterable style="margin-right:50px;float:right;width:50%;" collapse-tags>
|
|
<el-select v-model="selCon" size="small" multiple :placeholder="$t('defaultText.pleaseChoose')" @change="onSelProjectChange()" filterable style="margin-right:50px;float:right;width:50%;" collapse-tags>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in fillProjectList"
|
|
v-for="item in fillProjectList"
|
|
@@ -1024,7 +1036,7 @@
|
|
</el-table>
|
|
</el-table>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
- <span slot="footer" class="dialog-footer" >
|
|
|
|
|
|
+ <span slot="footer" class="dialog-footer" v-if="!isSubstitude || substitudeStep == 2">
|
|
<!-- <el-button @click="zhoAddlast()" style="float:left;" class="el-icon-back">{{$t('defaultText.selectProject')}}</el-button> -->
|
|
<!-- <el-button @click="zhoAddlast()" style="float:left;" class="el-icon-back">{{$t('defaultText.selectProject')}}</el-button> -->
|
|
<el-button @click="closeAddWeeklyReport()" :loading="submitingReport">{{$t('btn.cancel')}}</el-button>
|
|
<el-button @click="closeAddWeeklyReport()" :loading="submitingReport">{{$t('btn.cancel')}}</el-button>
|
|
<el-button @click="submitWeekReport(1)" :loading="submitingReport" >{{$t('btn.temporaryStorage')}}</el-button>
|
|
<el-button @click="submitWeekReport(1)" :loading="submitingReport" >{{$t('btn.temporaryStorage')}}</el-button>
|
|
@@ -2173,6 +2185,7 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ substitudeStep: 1,
|
|
showHidden: false,
|
|
showHidden: false,
|
|
pageIndex: 0,
|
|
pageIndex: 0,
|
|
hasMore: true,
|
|
hasMore: true,
|
|
@@ -6615,8 +6628,14 @@
|
|
fillInReportss() {
|
|
fillInReportss() {
|
|
window.addEventListener('scroll', this.handleScroll, true)
|
|
window.addEventListener('scroll', this.handleScroll, true)
|
|
// this.jiazai()
|
|
// this.jiazai()
|
|
- this.fillWeekDialogVisi = true
|
|
|
|
- this.getCurrentWeek();
|
|
|
|
|
|
+ this.fillWeekDialogVisi = true;
|
|
|
|
+ if (this.isSubstitude) {
|
|
|
|
+ this.substitudeStep = 1;
|
|
|
|
+ this.getSubstitudeUserDeptList();
|
|
|
|
+ } else {
|
|
|
|
+ this.getCurrentWeek();
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!this.timeBasecostList || this.timeBasecostList.length == 0) {
|
|
if (!this.timeBasecostList || this.timeBasecostList.length == 0) {
|
|
//重新获取工时预警类型的预算项
|
|
//重新获取工时预警类型的预算项
|
|
this.http.post('/project-basecost-setting/getReportBasecostList', {
|
|
this.http.post('/project-basecost-setting/getReportBasecostList', {
|
|
@@ -6961,9 +6980,14 @@
|
|
for (var p in this.fillProjectList) {
|
|
for (var p in this.fillProjectList) {
|
|
this.fillProjectList[p].canCancel = 1;
|
|
this.fillProjectList[p].canCancel = 1;
|
|
}
|
|
}
|
|
- this.http.post('/report/getWeeklyReportData',{
|
|
|
|
|
|
+ var param = {
|
|
targetDate: util.formatDate.format(this.targetWeekDate, "yyyy-MM-dd")
|
|
targetDate: util.formatDate.format(this.targetWeekDate, "yyyy-MM-dd")
|
|
- },res => {
|
|
|
|
|
|
+ };
|
|
|
|
+ if (this.isSubstitude) {
|
|
|
|
+ //传代填人的userId
|
|
|
|
+ param.targetUserId = this.workForm.userId[0];
|
|
|
|
+ }
|
|
|
|
+ this.http.post('/report/getWeeklyReportData',param,res => {
|
|
this.weekDataLoading = false;
|
|
this.weekDataLoading = false;
|
|
if(res.code == 'ok'){
|
|
if(res.code == 'ok'){
|
|
let projectList = res.data.projectList;
|
|
let projectList = res.data.projectList;
|