Browse Source

工作时长增加判断

Lijy 3 years ago
parent
commit
b2ede197c5

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -3601,7 +3601,7 @@
                                 time: this.report.time
                             }
                             if(this.user.timeType.type == 1) {
-                                    this.workForm.domains[0].workingTime = this.user.timeType.allday+'.0'
+                                    this.workForm.domains[0].workingTime = (this.user.timeType.allday.length > 1 ? this.user.timeType.allday : this.user.timeType.allday+'.0')
                                 }
                             if (this.timeBasecostList && this.timeBasecostList.length > 0) {
                                 //默认给第一个,必填字段
@@ -3685,7 +3685,7 @@
                                 }],
                             }
                             if(this.user.timeType.type == 1) {
-                                this.workForm.domains[0].workingTime = this.user.timeType.allday+'.0'
+                                this.workForm.domains[0].workingTime = (this.user.timeType.allday.length > 1 ? this.user.timeType.allday : this.user.timeType.allday+'.0')
                             }
                             // console.log(this.workForm)
                     if (this.timeBasecostList&&this.timeBasecostList.length>0) {

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -943,7 +943,7 @@
                                 projectId: "",
                                 projectName: "",
                                 // workingTime: t.type==3?(t.allday).toFixed(1):"8.0",
-                                workingTime: t.type==3?(t.allday).toFixed(1):this.user.timeType.allday+'.0',
+                                workingTime: t.type==3?(t.allday).toFixed(1):(this.user.timeType.allday.length > 1 ? this.user.timeType.allday : this.user.timeType.allday + '.0'),
                                 content: "",
                                 state: 2,
                                 progress:100,