|
@@ -524,42 +524,23 @@
|
|
|
},
|
|
|
// 切换星期
|
|
|
switchWeek(item,index){
|
|
|
- if(this.user.timeType.notAllowedNoAttendance == 1){
|
|
|
- let havework = false
|
|
|
- let cleardomain = [{
|
|
|
- id: null,
|
|
|
- projectId: "",
|
|
|
- projectName: "",
|
|
|
- workingTime: this.user.timeType.allday,
|
|
|
- content: "",
|
|
|
- progress: 100,
|
|
|
- state: 2,
|
|
|
- multiWorktime:0,
|
|
|
- worktimeList:[{}],
|
|
|
- degreeId: '',
|
|
|
-
|
|
|
- auditorFirst: {name:'',id:''},
|
|
|
- auditorSec: {name:'',id:''},
|
|
|
- auditorThird: {name:'',id:''},
|
|
|
- ccUserid: {name:'',id:''}
|
|
|
- }]
|
|
|
- for(let i in this.currentForm.domains){
|
|
|
- if(this.currentForm.domains[i].projectId){
|
|
|
- havework = true
|
|
|
- }
|
|
|
- }
|
|
|
- if(havework){
|
|
|
- if(this.kaoqinText){
|
|
|
- if(this.currentForm.cardtime == 0){
|
|
|
- this.$toast.fail('无考勤记录' + this.weekArr[this.inbtn] +'不可填报')
|
|
|
- this.currentForm.domains = cleardomain
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.$toast.fail('无考勤记录' + this.weekArr[this.inbtn] +'不可填报')
|
|
|
- this.currentForm.domains = cleardomain
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // if(this.user.timeType.notAllowedNoAttendance == 1){
|
|
|
+ // let havework = false
|
|
|
+ // for(let i in this.currentForm.domains){
|
|
|
+ // if(this.currentForm.domains[i].projectId){
|
|
|
+ // havework = true
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if(havework){
|
|
|
+ // if(this.kaoqinText){
|
|
|
+ // if(this.currentForm.cardtime == 0){
|
|
|
+ // this.$toast.fail('无考勤记录' + this.weekArr[this.inbtn] +'不可填报')
|
|
|
+ // }
|
|
|
+ // }else{
|
|
|
+ // this.$toast.fail('无考勤记录' + this.weekArr[this.inbtn] +'不可填报')
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
this.form[this.inbtn] = this.currentForm
|
|
|
this.inbtn = index
|
|
|
this.currentForm = this.form[this.inbtn]
|
|
@@ -1532,47 +1513,31 @@
|
|
|
|
|
|
// 提交日报
|
|
|
submitReport() {
|
|
|
- if(this.user.timeType.notAllowedNoAttendance == 1){
|
|
|
- let havework = false
|
|
|
- let cleardomain = [{
|
|
|
- id: null,
|
|
|
- projectId: "",
|
|
|
- projectName: "",
|
|
|
- workingTime: this.user.timeType.allday,
|
|
|
- content: "",
|
|
|
- progress: 100,
|
|
|
- state: 2,
|
|
|
- multiWorktime:0,
|
|
|
- worktimeList:[{}],
|
|
|
- degreeId: '',
|
|
|
+ this.form[this.inbtn] = this.currentForm
|
|
|
|
|
|
- auditorFirst: {name:'',id:''},
|
|
|
- auditorSec: {name:'',id:''},
|
|
|
- auditorThird: {name:'',id:''},
|
|
|
- ccUserid: {name:'',id:''}
|
|
|
- }]
|
|
|
- for(let i in this.currentForm.domains){
|
|
|
- if(this.currentForm.domains[i].projectId){
|
|
|
- havework = true
|
|
|
+
|
|
|
+ if(this.user.timeType.notAllowedNoAttendance == 1){
|
|
|
+ let toast = ''
|
|
|
+ for(let i in this.form){
|
|
|
+ let havework = false
|
|
|
+ for(let m in this.form[i].domains){
|
|
|
+ if(this.form[i].domains[m].projectId){
|
|
|
+ havework = true
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- if(havework){
|
|
|
- if(this.kaoqinText){
|
|
|
- if(this.currentForm.cardtime == 0){
|
|
|
- this.$toast.fail('无考勤记录' + this.weekArr[this.inbtn] +'不可填报')
|
|
|
- this.currentForm.domains = cleardomain
|
|
|
- return
|
|
|
+ if(havework){
|
|
|
+ if(!this.form[i].cardtime){
|
|
|
+ toast += this.weekArr[i] + '、'
|
|
|
}
|
|
|
- }else{
|
|
|
- this.$toast.fail('无考勤记录' + this.weekArr[this.inbtn] +'不可填报')
|
|
|
- this.currentForm.domains = cleardomain
|
|
|
- return
|
|
|
}
|
|
|
}
|
|
|
+ if(toast){
|
|
|
+ toast = toast.substring(0,toast.length - 1)
|
|
|
+ this.$toast.fail('[' + toast +']无考勤记录不可填报')
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- this.form[this.inbtn] = this.currentForm
|
|
|
if((this.user.timeType.showDdCardtime == 1 || this.user.timeType.showCorpwxCardtime == 1) && this.reportTimeType.type == 1){
|
|
|
let tips = ''
|
|
|
for(let m in this.form){
|
|
@@ -1595,6 +1560,9 @@
|
|
|
|
|
|
let formData = new URLSearchParams()
|
|
|
for(let formIndex=0;formIndex<this.form.length;formIndex++){
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
this.dateAr = []
|
|
|
let alp = []
|
|
|
if(this.user.timeType.multiWorktime == 1) {
|
|
@@ -1958,6 +1926,7 @@
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
+ this.user.timeType.notAllowedNoAttendance = 1
|
|
|
this.timeRange = []
|
|
|
for(let i=0.5; i<=20; i+=0.5){
|
|
|
this.timeRange.push(i)
|