|
@@ -7,7 +7,7 @@
|
|
|
<div class="jjk" style="display:inline-block;position:absolute;top:15px;background:#fff;left:0px;z-index: 10;margin-top: -10px;padding-top: 10px;height: 42px;">
|
|
|
<el-date-picker size="small" v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM"
|
|
|
style="width:190px;"
|
|
|
- @change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份" :picker-options="getPickerOptions"></el-date-picker>
|
|
|
+ @change="changeMonthOut" :clearable="false" type="month" :placeholder="$t('Selectmonth')" :picker-options="getPickerOptions"></el-date-picker>
|
|
|
<el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini" @click="showWorkTime"></el-button>
|
|
|
</div>
|
|
|
<div slot="header" class="clearfix" id="clearfix" style="padding-left: 255px;">
|
|
@@ -31,7 +31,7 @@
|
|
|
|
|
|
</div> -->
|
|
|
<div style="width: 100%;box-sizing: border-box;padding-right: 10px;">
|
|
|
- <el-input placeholder="请输入姓名" v-if="user.userNameNeedTranslate != 1" size="small" v-model="seluserText" style="width:100%;margin-bottom:10px" clearable>
|
|
|
+ <el-input :placeholder="$t('defaultText.PleaseEnterYourName')" v-if="user.userNameNeedTranslate != 1" size="small" v-model="seluserText" style="width:100%;margin-bottom:10px" clearable>
|
|
|
<el-button slot="append" icon="el-icon-search" @click="seluserforText()"></el-button>
|
|
|
</el-input>
|
|
|
<el-select v-model="selectState" size="small" @change="stateChange" style="width:100%">
|
|
@@ -287,7 +287,7 @@
|
|
|
<p>{{$t('other.matters')}}:<span v-html="item2.content"></span></p>
|
|
|
</div>
|
|
|
<div v-if="item2.multiWorktime==1" >
|
|
|
- <p>{{$t('other.projectDuration')}}:{{item2.time.toFixed(1)}}h <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">加班<span v-if="item2.overtimeHours">{{item2.overtimeHours.toFixed(1)}}h</span></el-tag></p>
|
|
|
+ <p>{{$t('other.projectDuration')}}:{{item2.time.toFixed(1)}}h <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">{{ $t('other.WorkOvertime') }}<span v-if="item2.overtimeHours">{{item2.overtimeHours.toFixed(1)}}h</span></el-tag></p>
|
|
|
<div v-for="(timeItem, tIndex) in item2.worktimeList" :key="tIndex"
|
|
|
style="border: 0.5px #ddd solid;margin-bottom:5px;padding:5px;">
|
|
|
<p style="display: inline-block;">{{$t('time.duration')}}:
|
|
@@ -486,25 +486,25 @@
|
|
|
</el-form-item>
|
|
|
<!-- 111111 -->
|
|
|
<el-form-item :label="$t('other.reviewer')" v-if="user.timeType.reportAuditType == 3">
|
|
|
- <el-select v-model="domain.auditorFirst" placeholder="第一审核人" :disabled="!domain.canEdit" style="width:200px;">
|
|
|
+ <el-select v-model="domain.auditorFirst" :placeholder="$t('di-yi-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
|
|
|
<el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
|
|
|
<template v-if="user.timeType.auditLevel > 1">
|
|
|
<i class="el-icon-right"></i>
|
|
|
- <el-select v-model="domain.auditorSec" placeholder="第二审核人" :disabled="!domain.canEdit" style="width:200px;">
|
|
|
+ <el-select v-model="domain.auditorSec" :placeholder="$t('di-er-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
|
|
|
<el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
|
|
|
<template v-if="user.timeType.auditLevel > 2">
|
|
|
<i class="el-icon-right"></i>
|
|
|
- <el-select v-model="domain.auditorThird" placeholder="第三审核人" :disabled="!domain.canEdit" style="width:200px;">
|
|
|
+ <el-select v-model="domain.auditorThird" :placeholder="$t('di-san-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
|
|
|
<el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="抄送人" v-if="user.timeType.reportAuditType == 3">
|
|
|
+ <el-form-item :label="$t('chao-song-ren')" v-if="user.timeType.reportAuditType == 3">
|
|
|
<el-select v-model="domain.ccUserid" clearable :disabled="!domain.canEdit" style="width:200px;">
|
|
|
<el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
@@ -880,26 +880,26 @@
|
|
|
|
|
|
<template v-if="user.timeType.reportAuditType == 3">
|
|
|
<div class="zhoFel">
|
|
|
- <p>第一审核人</p>
|
|
|
- <el-select v-model="zhoBao.auditorFirst" placeholder="第一审核人" style="width: 355px">
|
|
|
+ <p>{{ $t('di-yi-shen-he-ren') }}</p>
|
|
|
+ <el-select v-model="zhoBao.auditorFirst" :placeholder="$t('di-yi-shen-he-ren')" style="width: 355px">
|
|
|
<el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="zhoFel">
|
|
|
- <p>第二审核人</p>
|
|
|
- <el-select v-model="zhoBao.auditorSec" placeholder="第二审核人" style="width: 355px">
|
|
|
+ <p>{{ $t('di-er-shen-he-ren') }}</p>
|
|
|
+ <el-select v-model="zhoBao.auditorSec" :placeholder="$t('di-er-shen-he-ren')" style="width: 355px">
|
|
|
<el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="zhoFel">
|
|
|
- <p>第三审核人</p>
|
|
|
- <el-select v-model="zhoBao.auditorThird" placeholder="第三审核人" style="width: 355px">
|
|
|
+ <p>{{ $t('di-san-shen-he-ren') }}</p>
|
|
|
+ <el-select v-model="zhoBao.auditorThird" :placeholder="$t('di-san-shen-he-ren')" style="width: 355px">
|
|
|
<el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
|
|
|
<div class="zhoFel">
|
|
|
- <p>抄送人</p>
|
|
|
+ <p>{{ $t('chao-song-ren') }}</p>
|
|
|
<el-select v-model="zhoBao.ccUserid" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px">
|
|
|
<el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
@@ -1921,9 +1921,32 @@
|
|
|
},
|
|
|
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ var now = new Date();
|
|
|
+ var t = util.formatDate.format(now, 'yyyy-MM-dd');
|
|
|
+ var startStr = util.formatDate.format(new Date(), 'yyyy-MM') + "-01";
|
|
|
+ this.exportParam.dateRange = [startStr,t];
|
|
|
+ this.getAllDate(1);
|
|
|
+ this.getReportList();
|
|
|
+ this.getProjectList();
|
|
|
+ this.getFillProjectList();
|
|
|
+ this.getTimeType();
|
|
|
+ this.getDepartment();
|
|
|
+ this.scrollFunction()
|
|
|
+ this.userssHu();
|
|
|
+ if(this.user.timeType.reportAuditType == 3){
|
|
|
+ this.getAllUsersList()
|
|
|
+ }
|
|
|
+ if (this.user.company.packageProject == 1) {
|
|
|
+ this.getBasecostItemList();
|
|
|
+ }
|
|
|
+ if(this.user.timeType.lockWorktime){
|
|
|
+ this.timeRange = this.timeRange.filter(item => {return item <= this.user.timeType.allday})
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
test(){
|
|
|
- console.log('test',this.depData,this.data[0].membCount,this.reportList.length);
|
|
|
+ // console.log('test',this.depData,this.data[0].membCount,this.reportList.length);
|
|
|
},
|
|
|
weeklyFilledTimeClick(parameterDate){ //按周填报-已填工时-点击
|
|
|
this.weeklyFilledTimeDialog = true
|
|
@@ -3501,7 +3524,7 @@
|
|
|
}
|
|
|
},
|
|
|
stateChange() {
|
|
|
- console.log(this.allData,'alldate');
|
|
|
+ // console.log(this.allData,'alldate');
|
|
|
this.membCount = 0;
|
|
|
if (this.selectState == -1) {
|
|
|
//全部状态
|
|
@@ -3991,7 +4014,7 @@
|
|
|
let monthdate = new Date(sessionStorage.msg)
|
|
|
this.choseDay = monthdate.getDate() - 1
|
|
|
this.curDate = (monthdate.getMonth() + 1) + this.$t('weekDay.month') + monthdate.getDate() + this.$t('weekDay.day')
|
|
|
- console.log('choseday',sessionStorage.msg,this.choseDay,monthdate.getDate());
|
|
|
+ // console.log('choseday',sessionStorage.msg,this.choseDay,monthdate.getDate());
|
|
|
}
|
|
|
}else{
|
|
|
this.choseDay = parseInt(sessionStorage.msg.split('-')[2]) - 1
|
|
@@ -4444,14 +4467,14 @@
|
|
|
if(this.zhoData[i].corpTime){
|
|
|
if(this.zhoData[i].corpTime.workHours == 0){
|
|
|
this.$message({
|
|
|
- message: '无考勤记录不可填报',
|
|
|
+ message: this.$t('wu-kao-qin-ji-lu-bu-ke-tian-bao'),
|
|
|
type: 'error'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
}else{
|
|
|
this.$message({
|
|
|
- message: '无考勤记录不可填报',
|
|
|
+ message: this.$t('wu-kao-qin-ji-lu-bu-ke-tian-bao'),
|
|
|
type: 'error'
|
|
|
})
|
|
|
return
|
|
@@ -4532,13 +4555,13 @@
|
|
|
}
|
|
|
if(this.user.timeType.reportAuditType == 3){
|
|
|
let auditTips = ''
|
|
|
- if(!this.zhoBao.auditorFirst){ auditTips += '第一、' }
|
|
|
+ if(!this.zhoBao.auditorFirst){ auditTips += this.$t('di-yi') }
|
|
|
// if(!this.zhoBao.auditorSec && this.user.timeType.auditLevel > 1){ auditTips += '第二、' }
|
|
|
// if(!this.zhoBao.auditorThird && this.user.timeType.auditLevel > 2){ auditTips += '第三、' }
|
|
|
if(auditTips){
|
|
|
auditTips = auditTips.substring(0,auditTips.length - 1)
|
|
|
this.$message({
|
|
|
- message: '请选择' + auditTips + '审核人',
|
|
|
+ message: this.$t('defaultText.pleaseChoose') + auditTips + this.$t('other.reviewer'),
|
|
|
type: 'warning'
|
|
|
})
|
|
|
return
|
|
@@ -4704,14 +4727,14 @@
|
|
|
},
|
|
|
// 减去时间
|
|
|
dateChange(num = 1,date = false) {
|
|
|
- if (!date) {
|
|
|
- date = new Date();//没有传入值时,默认是当前日期
|
|
|
- date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
|
|
|
- }
|
|
|
- date += " 00:00:00";//设置为当天凌晨12点
|
|
|
- date = Date.parse(new Date(date))/1000;//转换为时间戳
|
|
|
- date += (86400) * num;//修改后的时间戳
|
|
|
- var newDate = new Date(parseInt(date) * 1000);//转换为时间
|
|
|
+ if (!date) {
|
|
|
+ date = new Date();//没有传入值时,默认是当前日期
|
|
|
+ date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
|
|
|
+ }
|
|
|
+ date += " 00:00:00";//设置为当天凌晨12点
|
|
|
+ date = Date.parse(new Date(date))/1000;//转换为时间戳
|
|
|
+ date += (86400) * num;//修改后的时间戳
|
|
|
+ var newDate = new Date(parseInt(date) * 1000);//转换为时间
|
|
|
var nian = newDate.getFullYear()
|
|
|
var yue = ''
|
|
|
var ri = ''
|
|
@@ -5664,14 +5687,14 @@
|
|
|
if (this.workForm.time){
|
|
|
if (this.workForm.time.workHours == 0){
|
|
|
this.$message({
|
|
|
- message: '无考勤记录不可填报',
|
|
|
+ message: this.$t('wu-kao-qin-ji-lu-bu-ke-tian-bao'),
|
|
|
type: 'error'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
}else{
|
|
|
this.$message({
|
|
|
- message: '无考勤记录不可填报',
|
|
|
+ message: this.$t('wu-kao-qin-ji-lu-bu-ke-tian-bao'),
|
|
|
type: 'error'
|
|
|
})
|
|
|
return
|
|
@@ -5695,7 +5718,7 @@
|
|
|
audItem.reportId = this.workForm.domains[i].id
|
|
|
}
|
|
|
if(this.user.timeType.auditLevel > 0){
|
|
|
- if(!this.workForm.domains[i].auditorFirst){ auditRule += '第一、' }
|
|
|
+ if(!this.workForm.domains[i].auditorFirst){ auditRule += this.$t('di-yi') }
|
|
|
audItem.auditorFirst = this.workForm.domains[i].auditorFirst
|
|
|
}
|
|
|
if(this.user.timeType.auditLevel > 1){
|
|
@@ -5712,7 +5735,7 @@
|
|
|
if(auditRule){
|
|
|
auditRule = auditRule.substring(0,auditRule.length - 1)
|
|
|
this.$message({
|
|
|
- message: '请指定' + auditRule + '审核人',
|
|
|
+ message: this.$t('qing-zhi-ding') + auditRule + this.$t('other.reviewer'),
|
|
|
type: 'error'
|
|
|
})
|
|
|
return
|
|
@@ -5870,12 +5893,12 @@
|
|
|
} else {
|
|
|
formData.append("stage", "-");
|
|
|
}
|
|
|
- console.log(this.workForm.domains[i].projectAuditorId, '审核人的id')
|
|
|
+ // console.log(this.workForm.domains[i].projectAuditorId, '审核人的id')
|
|
|
if (this.workForm.domains[i].projectAuditorId) {
|
|
|
formData.append("projectAuditorId", this.workForm.domains[i].projectAuditorId);
|
|
|
} else {
|
|
|
- console.log('执行到了这里')
|
|
|
- console.log(this.user.timeType.reportAuditType)
|
|
|
+ // console.log('执行到了这里')
|
|
|
+ // console.log(this.user.timeType.reportAuditType)
|
|
|
if (this.user.timeType.reportAuditType == 0) {
|
|
|
this.$message({
|
|
|
message: this.$t('message.Pleasespecifyaprojectreviewer'),
|
|
@@ -6003,7 +6026,7 @@
|
|
|
|
|
|
//撤回日报
|
|
|
cancel(item,e) {
|
|
|
- console.log('can can need',item);
|
|
|
+ // console.log('can can need',item);
|
|
|
this.logining = true;
|
|
|
|
|
|
var ids = '';
|
|
@@ -6058,7 +6081,7 @@
|
|
|
this.logining = false;
|
|
|
if (res.code == "ok") {
|
|
|
this.$message({
|
|
|
- message: this.denyForm.i==0?"驳回成功":"撤销成功",
|
|
|
+ message: this.denyForm.i==0?this.$t('message.rejectedsuccessfully'):this.$t('Revocationofsuccess'),
|
|
|
type: "success"
|
|
|
});
|
|
|
this.getReportList();
|
|
@@ -6104,12 +6127,12 @@
|
|
|
},
|
|
|
// 触发 selectCat 组件更改他的值
|
|
|
selectCatCli(obj) {
|
|
|
- console.log(obj, '看看')
|
|
|
+ // console.log(obj, '看看')
|
|
|
// obj.id 是 选中人员的id, obj.idx 是 当前的索引
|
|
|
this.workForm.domains[obj.idx].projectAuditorId = obj.id
|
|
|
},
|
|
|
vueCasader(obj) {
|
|
|
- console.log(obj, '看看值')
|
|
|
+ // console.log(obj, '看看值')
|
|
|
if(obj.distinction == 1) {
|
|
|
let arr = []
|
|
|
arr.push(obj.item.id)
|
|
@@ -6191,29 +6214,6 @@
|
|
|
},
|
|
|
]);
|
|
|
},
|
|
|
- mounted() {
|
|
|
- var now = new Date();
|
|
|
- var t = util.formatDate.format(now, 'yyyy-MM-dd');
|
|
|
- var startStr = util.formatDate.format(new Date(), 'yyyy-MM') + "-01";
|
|
|
- this.exportParam.dateRange = [startStr,t];
|
|
|
- this.getAllDate(1);
|
|
|
- this.getReportList();
|
|
|
- this.getProjectList();
|
|
|
- this.getFillProjectList();
|
|
|
- this.getTimeType();
|
|
|
- this.getDepartment();
|
|
|
- this.scrollFunction()
|
|
|
- this.userssHu();
|
|
|
- if(this.user.timeType.reportAuditType == 3){
|
|
|
- this.getAllUsersList()
|
|
|
- }
|
|
|
- if (this.user.company.packageProject == 1) {
|
|
|
- this.getBasecostItemList();
|
|
|
- }
|
|
|
- if(this.user.timeType.lockWorktime){
|
|
|
- this.timeRange = this.timeRange.filter(item => {return item <= this.user.timeType.allday})
|
|
|
- }
|
|
|
- }
|
|
|
};
|
|
|
</script>
|
|
|
|