Prechádzať zdrojové kódy

2022.9.6 移动端已填工时校验

ggooalice 2 rokov pred
rodič
commit
85a1be1e89

+ 15 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -351,7 +351,7 @@
                                 content: "",
                                 state: 2,
                                 multiWorktime:0,
-                                worktimeList:{},
+                                worktimeList:[{}],
                                 degreeId: ''
                             }],
                         },
@@ -432,6 +432,7 @@
                     this.currentForm.domains[0].basecostId = this.reportBasecostList[0].id;
                     this.currentForm.domains[0].basecostName = this.reportBasecostList[0].name;
                 }
+                console.log(this.form);
                 this.getKaoqin()
                 this.getWorkTime()
             },
@@ -466,6 +467,8 @@
                     if(res.code == 'ok'){
                         if(res.data.length != 0){
                             this.workTimeText = res.data[0].workingTime
+
+                            this.currentForm.reportTimes = res.data[0].startTime
                         }else{
                             this.workTimeText = false
                         }
@@ -527,7 +530,7 @@
                                 progress: 100,
                                 state: 2,
                                 multiWorktime:0,
-                                worktimeList:{},
+                                worktimeList:[{}],
                                 degreeId: ''
                             }],
                         }
@@ -1380,7 +1383,7 @@
                                 content: "",
                                 state: 2,
                                 multiWorktime:0,
-                                worktimeList:{},
+                                worktimeList:[{}],
                                 degreeId: ''
                             }]
                 // console.log(this.currentForm);
@@ -1425,6 +1428,15 @@
                                 }
                             }
                         }
+                        if(this.form[formIndex].reportTimes){
+                                let timearr = this.form[formIndex].reportTimes.split(',')
+                                for(let i in timearr){
+                                    let objs = {}
+                                    objs.s = timearr[i].split('-')[0]
+                                    objs.e = timearr[i].split('-')[1]
+                                    alp.push(objs)
+                                }
+                        }
                         this.dateAr = alp
                         if(this.dateAr.length > 0) {
                             let trus = this.fns()