|
@@ -524,6 +524,42 @@
|
|
|
},
|
|
|
// 切换星期
|
|
|
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
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
this.form[this.inbtn] = this.currentForm
|
|
|
this.inbtn = index
|
|
|
this.currentForm = this.form[this.inbtn]
|
|
@@ -535,6 +571,7 @@
|
|
|
this.getKaoqin()
|
|
|
this.getWorkTime()
|
|
|
},
|
|
|
+
|
|
|
// 获取日考勤记录
|
|
|
getKaoqin(){
|
|
|
this.$axios.post('/report/getCardTime',{
|
|
@@ -1495,6 +1532,46 @@
|
|
|
|
|
|
// 提交日报
|
|
|
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: '',
|
|
|
+
|
|
|
+ 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
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$toast.fail('无考勤记录' + this.weekArr[this.inbtn] +'不可填报')
|
|
|
+ this.currentForm.domains = cleardomain
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
this.form[this.inbtn] = this.currentForm
|
|
|
if((this.user.timeType.showDdCardtime == 1 || this.user.timeType.showCorpwxCardtime == 1) && this.reportTimeType.type == 1){
|
|
|
let tips = ''
|
|
@@ -1881,6 +1958,7 @@
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
+ this.user.timeType.notAllowedNoAttendance = 1
|
|
|
this.timeRange = []
|
|
|
for(let i=0.5; i<=20; i+=0.5){
|
|
|
this.timeRange.push(i)
|