|
@@ -139,7 +139,7 @@
|
|
<el-link v-if="user.timeType.enableNewWeeklyfill == 1" type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">{{ $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()">{{ $t('textLink.fillInAWeek') }}</el-link>
|
|
<!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报123</el-link> -->
|
|
<!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReportCustom()">按周填报123</el-link> -->
|
|
<el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;weekIndex++,fillWeekDialogVisiCustomTwo=true" v-if="user.timeType.enableNewWeeklyfill==2">按周填报</el-link>
|
|
<el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;weekIndex++,fillWeekDialogVisiCustomTwo=true" v-if="user.timeType.enableNewWeeklyfill==2">按周填报</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; fillInReport(-1,0)">{{$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="user.companyId == 5978 && permissions.reportsFillOut && user.timeType.enableNewWeeklyfill != 1" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReportss();">{{$t('textLink.helpToFillIn')}}</el-link>
|
|
|
|
|
|
@@ -383,8 +383,8 @@
|
|
<el-form ref="workForm" :model="workForm" :rules="workRules" label-width="120px">
|
|
<el-form ref="workForm" :model="workForm" :rules="workRules" label-width="120px">
|
|
<el-form-item :label="$t('screening.selectPeople')" v-if="isSubstitude">
|
|
<el-form-item :label="$t('screening.selectPeople')" v-if="isSubstitude">
|
|
<el-input v-if="user.userNameNeedTranslate != 1" @focus="showChooseMembTree" v-model="workForm.userNames"
|
|
<el-input v-if="user.userNameNeedTranslate != 1" @focus="showChooseMembTree" v-model="workForm.userNames"
|
|
- :placeholder="$t('defaultText.pleaseSelectAsubstitute')" ></el-input>
|
|
|
|
- <div class="daitianrbao" @click="showChooseMembTree" v-if="user.userNameNeedTranslate == 1">
|
|
|
|
|
|
+ :placeholder="$t('defaultText.pleaseSelectAsubstitute')" style="width:200px;"></el-input>
|
|
|
|
+ <div class="daitianrbao" @click="showChooseMembTree" v-if="user.userNameNeedTranslate == 1" style="width:200px;">
|
|
<span class="spnn" v-if="workForm.userNames">
|
|
<span class="spnn" v-if="workForm.userNames">
|
|
<span v-for="(item, index) in workForm.userNames" :key="index">
|
|
<span v-for="(item, index) in workForm.userNames" :key="index">
|
|
<span><TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText></span>
|
|
<span><TranslationOpenDataText type='userName' :openid='item'></TranslationOpenDataText></span>
|
|
@@ -418,7 +418,7 @@
|
|
<span v-if="workForm.time.askLeaveTime">| {{ $t('other.AskForLeave') }}{{ workForm.time.askLeaveTime }}{{$t('time.hour')}}</span>
|
|
<span v-if="workForm.time.askLeaveTime">| {{ $t('other.AskForLeave') }}{{ workForm.time.askLeaveTime }}{{$t('time.hour')}}</span>
|
|
<span v-if="workForm.time.otTime" style="color:#FFA500;">| 加班{{ workForm.time.otTime }}{{$t('time.hour')}}</span>
|
|
<span v-if="workForm.time.otTime" style="color:#FFA500;">| 加班{{ workForm.time.otTime }}{{$t('time.hour')}}</span>
|
|
</span>
|
|
</span>
|
|
- <!--批量填报和批量代填不显示考勤记录-->
|
|
|
|
|
|
+ <!--批量填报不显示考勤记录-->
|
|
<span v-if="!isBatch && (user.timeType.syncDingding==1 || user.timeType.syncCorpwxTime==1)&&!workForm.time" >{{$t('other.noAttendanceRecord')}}</span>
|
|
<span v-if="!isBatch && (user.timeType.syncDingding==1 || user.timeType.syncCorpwxTime==1)&&!workForm.time" >{{$t('other.noAttendanceRecord')}}</span>
|
|
<!--针对明夷,批量填报(不含代填)情况下显示考勤时长-->
|
|
<!--针对明夷,批量填报(不含代填)情况下显示考勤时长-->
|
|
<span v-if="!isSubstitude && isBatch && user.company.companyName === mingyiName">,{{ $t('workAttendance') }}:{{this.workTimeForMinYi}}{{$t('time.hour')}}</span>
|
|
<span v-if="!isSubstitude && isBatch && user.company.companyName === mingyiName">,{{ $t('workAttendance') }}:{{this.workTimeForMinYi}}{{$t('time.hour')}}</span>
|
|
@@ -3836,7 +3836,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
seleChn(e,domain) {
|
|
seleChn(e,domain) {
|
|
-
|
|
|
|
|
|
+ console.log('===========修改时间==========');
|
|
if(e == 1) {
|
|
if(e == 1) {
|
|
for(var i in this.workForm.domains) {
|
|
for(var i in this.workForm.domains) {
|
|
if(this.workForm.domains[i].timeType == 0) {
|
|
if(this.workForm.domains[i].timeType == 0) {
|
|
@@ -3848,12 +3848,15 @@
|
|
}
|
|
}
|
|
var quanbu = 0
|
|
var quanbu = 0
|
|
var spl = this.workForm.domains
|
|
var spl = this.workForm.domains
|
|
|
|
+ console.log(spl)
|
|
var zhi = ''
|
|
var zhi = ''
|
|
for(var i in spl) {
|
|
for(var i in spl) {
|
|
var sp = +spl[i].workingTime + 0
|
|
var sp = +spl[i].workingTime + 0
|
|
|
|
+ console.log('this.jsDay==='+this.jsDay);
|
|
zhi = this.jsDay * sp
|
|
zhi = this.jsDay * sp
|
|
quanbu = +quanbu + zhi
|
|
quanbu = +quanbu + zhi
|
|
}
|
|
}
|
|
|
|
+ console.log('quanbu========'+quanbu);
|
|
this.jsTime = quanbu
|
|
this.jsTime = quanbu
|
|
this.totalReportHours = quanbu
|
|
this.totalReportHours = quanbu
|
|
let worktime = this.jsTime
|
|
let worktime = this.jsTime
|
|
@@ -3914,7 +3917,6 @@
|
|
this.$set(spl[di],'overtimeHours',null)
|
|
this.$set(spl[di],'overtimeHours',null)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
iptChang() {
|
|
iptChang() {
|
|
@@ -3923,30 +3925,9 @@
|
|
for(var i in sl) {
|
|
for(var i in sl) {
|
|
if(sl[i].startTime && sl[i].endTime) {
|
|
if(sl[i].startTime && sl[i].endTime) {
|
|
timeArr.push({startTime: sl[i].startTime, endTime: sl[i].endTime})
|
|
timeArr.push({startTime: sl[i].startTime, endTime: sl[i].endTime})
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
this.getTimeHours(timeArr)
|
|
this.getTimeHours(timeArr)
|
|
-
|
|
|
|
- // for(let j in arrNum) {
|
|
|
|
- // this.timeJsonStr += arrNum[j]
|
|
|
|
- // if(flg) {
|
|
|
|
- // this.$set(this.workForm.domains[j],'isOvertime', true)
|
|
|
|
- // this.$set(this.workForm.domains[j],'overtimeHours', this.timeJsonStr / this.jsDay)
|
|
|
|
- // }
|
|
|
|
- // if(this.timeJsonStr > (this.user.timeType.allday * this.jsDay) && !flg) {
|
|
|
|
- // flg = true
|
|
|
|
- // this.$set(this.workForm.domains[j],'isOvertime', true)
|
|
|
|
- // this.$set(this.workForm.domains[j],'overtimeHours', (this.timeJsonStr - (this.user.timeType.allday * this.jsDay)) / this.jsDay)
|
|
|
|
- // // this.$set(this.workForm.domains[j],'overtimeHours', zhizhang / this.jsDay)
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- // if(this.timeJsonStr < (this.user.timeType.allday * this.jsDay) && !flg) {
|
|
|
|
- // this.$set(this.workForm.domains[j],'isOvertime', false)
|
|
|
|
- // this.$set(this.workForm.domains[j],'overtimeHours', '')
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
},
|
|
},
|
|
iptChangs() {
|
|
iptChangs() {
|
|
var sl = this.workForm.domains
|
|
var sl = this.workForm.domains
|
|
@@ -4639,8 +4620,31 @@
|
|
if (this.workForm.userId.length > 0) {
|
|
if (this.workForm.userId.length > 0) {
|
|
this.getSubUsersFillProjectList(this.workForm.userId[0]);
|
|
this.getSubUsersFillProjectList(this.workForm.userId[0]);
|
|
}
|
|
}
|
|
|
|
+ //打通企业微信考勤的情况,获取考勤
|
|
|
|
+ if (this.user.timeType.showCorpwxCardtime) {
|
|
|
|
+ this.getTargetUserCardTime();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ getTargetUserCardTime() {
|
|
|
|
+ if (this.workForm.createDate && this.workForm.userId && this.workForm.userId.length > 0) {
|
|
|
|
+ this.http.post('/user-corpwx-time/getUserCardTime',{
|
|
|
|
+ userId: this.workForm.userId[0], date: this.workForm.createDate,
|
|
|
|
+ },
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.$set(this.workForm,'time', res.data);
|
|
|
|
+ console.log(res.data);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ }
|
|
},
|
|
},
|
|
-
|
|
|
|
notifySel(sel){
|
|
notifySel(sel){
|
|
// console.log(sel);
|
|
// console.log(sel);
|
|
this.notifySelList = sel
|
|
this.notifySelList = sel
|
|
@@ -6518,6 +6522,7 @@
|
|
} else {
|
|
} else {
|
|
this.falsss = true
|
|
this.falsss = true
|
|
}
|
|
}
|
|
|
|
+ console.log('this.isSubstitude=='+this.isSubstitude);
|
|
if (this.isSubstitude) {
|
|
if (this.isSubstitude) {
|
|
this.getSubstitudeUserDeptList();
|
|
this.getSubstitudeUserDeptList();
|
|
} else {
|
|
} else {
|
|
@@ -6544,7 +6549,6 @@
|
|
}
|
|
}
|
|
this.getReport(i);
|
|
this.getReport(i);
|
|
} else {
|
|
} else {
|
|
- // console.log('执行到了这里')
|
|
|
|
this.jsTime = 0
|
|
this.jsTime = 0
|
|
this.jsDay = 0
|
|
this.jsDay = 0
|
|
this.workForm = {
|
|
this.workForm = {
|
|
@@ -6567,15 +6571,20 @@
|
|
// console.log('执行二次')
|
|
// console.log('执行二次')
|
|
this.workForm.domains[0].workingTime = shuzhi.indexOf('.') == '-1' ? shuzhi + '.0' : shuzhi
|
|
this.workForm.domains[0].workingTime = shuzhi.indexOf('.') == '-1' ? shuzhi + '.0' : shuzhi
|
|
}
|
|
}
|
|
- // console.log(this.workForm)
|
|
|
|
|
|
+ if (this.isSubstitude && this.user.timeType.showCorpwxCardtime) {
|
|
|
|
+ this.workForm.showRefresh = true;
|
|
|
|
+ }
|
|
if (this.timeBasecostList&&this.timeBasecostList.length>0) {
|
|
if (this.timeBasecostList&&this.timeBasecostList.length>0) {
|
|
this.workForm.domains[0].basecostId = this.timeBasecostList[0].id;
|
|
this.workForm.domains[0].basecostId = this.timeBasecostList[0].id;
|
|
}
|
|
}
|
|
this.canEdit = true;
|
|
this.canEdit = true;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if (this.isSubstitude) {
|
|
|
|
+ //代填情况,默认计算合计工时
|
|
|
|
+ this.jsDay = 1
|
|
|
|
+ this.seleChn();
|
|
|
|
+ }
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
//按周填报的弹窗口中编辑单项目相关数据
|
|
//按周填报的弹窗口中编辑单项目相关数据
|
|
@@ -7962,6 +7971,11 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.getReport()
|
|
this.getReport()
|
|
|
|
+ } else {
|
|
|
|
+ //获取代填人员的考勤
|
|
|
|
+ if (this.user.timeType.showCorpwxCardtime == 1) {
|
|
|
|
+ this.getTargetUserCardTime();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
if(this.user.timeType.fillAhead == 0){
|
|
if(this.user.timeType.fillAhead == 0){
|
|
@@ -8077,6 +8091,21 @@
|
|
type: "error"
|
|
type: "error"
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+ } else if (this.user.companyId == 7) {
|
|
|
|
+ //试点,针对赛元微电子校验考勤工时
|
|
|
|
+ if (this.workForm.time.workHours) {
|
|
|
|
+ if (this.totalReportHours > this.workForm.time.workHours) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '填报工时不得超过考勤时长',
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ } else if (this.totalReportHours < this.workForm.time.workHours) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '还剩余'+(this.workForm.time.workHours-this.totalReportHours).toFixed(1)+'h考勤时长尚未分配',
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
if(this.totalReportHours < this.user.timeType.allday){
|
|
if(this.totalReportHours < this.user.timeType.allday){
|
|
this.$confirm(this.$t('dangRiGongShiBuZu') + this.user.timeType.allday.toFixed(1) + this.$t('xiaoShiShiFouQueDingTiJiao'), this.$t('other.prompts'), {
|
|
this.$confirm(this.$t('dangRiGongShiBuZu') + this.user.timeType.allday.toFixed(1) + this.$t('xiaoShiShiFouQueDingTiJiao'), this.$t('other.prompts'), {
|