|
@@ -20,7 +20,7 @@
|
|
</van-field>
|
|
</van-field>
|
|
<template #right-icon>
|
|
<template #right-icon>
|
|
<!--先开放几家,试一下-->
|
|
<!--先开放几家,试一下-->
|
|
- <span style="color:#20a0ff;" @click="getAIReport()" v-if="!hasWrittenReport && (user.companyId==10||user.companyId==7||user.companyId==7030)">智能填报</span>
|
|
|
|
|
|
+ <span style="color:#20a0ff;" @click="getAIReport()" v-if="!substitute && !hasWrittenReport && (user.companyId==10||user.companyId==7||user.companyId==7030)">智能填报</span>
|
|
</template>
|
|
</template>
|
|
</van-cell>
|
|
</van-cell>
|
|
|
|
|
|
@@ -806,8 +806,8 @@ export default {
|
|
}).catch(err => { })
|
|
}).catch(err => { })
|
|
},
|
|
},
|
|
|
|
|
|
- getRecentlyProject() {
|
|
|
|
- this.$axios.post('/project/nearProject', {})
|
|
|
|
|
|
+ getRecentlyProject(userId) {
|
|
|
|
+ this.$axios.post('/project/nearProject', {userId: userId})
|
|
.then(res => {
|
|
.then(res => {
|
|
if (res.code == 'ok') {
|
|
if (res.code == 'ok') {
|
|
this.integrationProjectList = res.data;
|
|
this.integrationProjectList = res.data;
|
|
@@ -901,12 +901,12 @@ export default {
|
|
if(!this.substitute) {
|
|
if(!this.substitute) {
|
|
this.form.domains[this.auditor.index][this.auditor.auditorIndex] = this.auditor.item
|
|
this.form.domains[this.auditor.index][this.auditor.auditorIndex] = this.auditor.item
|
|
}
|
|
}
|
|
|
|
+ this.auditorShow = false
|
|
if(this.substitute) {
|
|
if(this.substitute) {
|
|
const { id, name } = this.auditor.item
|
|
const { id, name } = this.auditor.item
|
|
this.fillingAgent = { id, name }
|
|
this.fillingAgent = { id, name }
|
|
|
|
+ this.getProject(this.fillingAgent.id);
|
|
}
|
|
}
|
|
- this.auditorShow = false
|
|
|
|
- console.log('searchAuditor');
|
|
|
|
},
|
|
},
|
|
getAllUsersList() {
|
|
getAllUsersList() {
|
|
this.$axios.post('/user/getSimpleActiveUserList', {})
|
|
this.$axios.post('/user/getSimpleActiveUserList', {})
|
|
@@ -958,8 +958,8 @@ export default {
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
},
|
|
},
|
|
// 获取项目
|
|
// 获取项目
|
|
- getPeoject() {
|
|
|
|
- this.$axios.post("/project/getProjectList", { forReport: 1 })
|
|
|
|
|
|
+ getProject(userId) {
|
|
|
|
+ this.$axios.post("/project/getProjectList", { forReport: 1, userId: userId})
|
|
.then(res => {
|
|
.then(res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
for (var i in res.data) {
|
|
for (var i in res.data) {
|
|
@@ -971,7 +971,7 @@ export default {
|
|
this.project = res.data;
|
|
this.project = res.data;
|
|
this.projectss = this.projectss.filter(p => p.status == 1 || p.status == 4);
|
|
this.projectss = this.projectss.filter(p => p.status == 1 || p.status == 4);
|
|
this.proads = res.data
|
|
this.proads = res.data
|
|
- this.getRecentlyProject()
|
|
|
|
|
|
+ this.getRecentlyProject(userId)
|
|
} else {
|
|
} else {
|
|
this.$toast.fail('获取失败:' + res.msg);
|
|
this.$toast.fail('获取失败:' + res.msg);
|
|
}
|
|
}
|
|
@@ -1485,29 +1485,6 @@ export default {
|
|
for (var i = 0; i < len; i++) { s = '0' + s; }
|
|
for (var i = 0; i < len; i++) { s = '0' + s; }
|
|
return s;
|
|
return s;
|
|
},
|
|
},
|
|
-
|
|
|
|
- // 获取项目
|
|
|
|
- getProject() {
|
|
|
|
- const toast = this.$toast.loading({
|
|
|
|
- forbidClick: true,
|
|
|
|
- duration: 0
|
|
|
|
- });
|
|
|
|
- this.$axios.post("/project/getProjectList", {})
|
|
|
|
- .then(res => {
|
|
|
|
- if (res.code == "ok") {
|
|
|
|
- this.$toast.clear();
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- // if (this.project.length > 0) {
|
|
|
|
- // console.log('this.project[0].id=='+this.project[0].id);
|
|
|
|
- // this.getTaskList(this.project[0].id);
|
|
|
|
- // }
|
|
|
|
- } else {
|
|
|
|
- this.$toast.clear();
|
|
|
|
- this.$toast.fail('获取失败:' + res.msg);
|
|
|
|
- }
|
|
|
|
- }).catch(err => { this.$toast.clear(); });
|
|
|
|
- },
|
|
|
|
getAIReport(createDate) {
|
|
getAIReport(createDate) {
|
|
const toast = this.$toast.loading({
|
|
const toast = this.$toast.loading({
|
|
forbidClick: true,
|
|
forbidClick: true,
|
|
@@ -2306,8 +2283,6 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.dateAr = alp
|
|
this.dateAr = alp
|
|
- console.log(this.reportTimeType, this.dateAr, '<=== this.reportTimeType')
|
|
|
|
-
|
|
|
|
const { timeCanOverlap } = this.reportTimeType // timeCanOverlap 为零时校验不允许重叠
|
|
const { timeCanOverlap } = this.reportTimeType // timeCanOverlap 为零时校验不允许重叠
|
|
if (this.dateAr.length > 0 && timeCanOverlap == 0) {
|
|
if (this.dateAr.length > 0 && timeCanOverlap == 0) {
|
|
let trus = this.fns()
|
|
let trus = this.fns()
|
|
@@ -2397,7 +2372,8 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.user.timeType.notAllowedNoAttendance == 1 && this.isDraft == 0) {
|
|
|
|
|
|
+ //非代填情况下要校验考勤
|
|
|
|
+ if (!this.substitute && this.user.timeType.notAllowedNoAttendance == 1 && this.isDraft == 0) {
|
|
if (this.report.time) {
|
|
if (this.report.time) {
|
|
if (this.report.time.workHours == 0) {
|
|
if (this.report.time.workHours == 0) {
|
|
this.$toast.fail('无考勤记录不可填报')
|
|
this.$toast.fail('无考勤记录不可填报')
|
|
@@ -2409,7 +2385,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//针对凡己,不校验考勤时长
|
|
//针对凡己,不校验考勤时长
|
|
- if (this.user.companyId != 3918 && this.user.companyId != 5978 && this.user.companyId != 4281 && this.reportTimeType.type == 1 && this.report.time) {
|
|
|
|
|
|
+ if (!this.substitute && this.user.companyId != 3918 && this.user.companyId != 5978 && this.user.companyId != 4281 && this.reportTimeType.type == 1 && this.report.time) {
|
|
var totalTime = 0;
|
|
var totalTime = 0;
|
|
for (var t = 0; t < this.form.domains.length; t++) {
|
|
for (var t = 0; t < this.form.domains.length; t++) {
|
|
totalTime += parseFloat(this.form.domains[t].workingTime);
|
|
totalTime += parseFloat(this.form.domains[t].workingTime);
|
|
@@ -2797,8 +2773,7 @@ export default {
|
|
} else if (ua.indexOf("micromessenger") > 0) {
|
|
} else if (ua.indexOf("micromessenger") > 0) {
|
|
this.isWX = true;
|
|
this.isWX = true;
|
|
}
|
|
}
|
|
- this.getPeoject() // 获取项目
|
|
|
|
- // console.log('mounted');
|
|
|
|
|
|
+ this.getProject() //获取项目
|
|
this.getReportBasecostList()
|
|
this.getReportBasecostList()
|
|
//获取传递过来的日期
|
|
//获取传递过来的日期
|
|
var passDate = this.$route.query.date;
|
|
var passDate = this.$route.query.date;
|
|
@@ -2806,7 +2781,6 @@ export default {
|
|
this.form.createDate = this.$route.query.date;
|
|
this.form.createDate = this.$route.query.date;
|
|
}
|
|
}
|
|
|
|
|
|
- // this.getProject();
|
|
|
|
this.getReport();
|
|
this.getReport();
|
|
this.getAllUsersList()
|
|
this.getAllUsersList()
|
|
this.getTimeType();
|
|
this.getTimeType();
|