Lijy hace 1 mes
padre
commit
1fb7cbc257

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

@@ -6545,6 +6545,32 @@
                                 time: this.report.time,
                                 showRefresh: list.showRefresh
                             }
+                            // businessTrips 有数据的情况下
+                            const businessTrips = res.data.businessTrips || []
+                            if(businessTrips.length > 0) {
+                                this.workForm.domains = businessTrips.map((item, index) => {
+                                    return {
+                                        id: null,
+                                        projectId: item.projectId,
+                                        workingTime: this.reportTimeType.type==2?"":(this.reportTimeType.allday).toFixed(1),
+                                        content: "",
+                                        progress:100,
+                                        state: 2,
+                                        timeType:0,
+                                        multiWorktime: this.reportTimeType.multiWorktime,
+                                        worktimeList:[{}],
+                                        canEdit: true,
+                                        auditorFirst: '',
+                                        auditorSec: '',
+                                        auditorThird: '',
+                                        ccUserid: ''
+                                    }
+                                })
+
+                                for(let domainsIndex in this.workForm.domains) {
+                                    this.selectProject(this.workForm.domains[domainsIndex], domainsIndex)
+                                }
+                            }
                             if(this.isWeekend && this.user.timeType.lockWorktime != 1){
                                 this.$set(this.workForm.domains[0],'isOvertime',true)
                                 if(this.reportTimeType.type != 2){
@@ -6860,7 +6886,7 @@
                     if(this.user.timeType.reportExtraField4Name || this.user.timeType.reportExtraField5Name) {
                         setTimeout(() => {
                             this.weekGetInfoByProjectId(sss)
-                        }, 500)
+                        }, 1000)
                     }
                 }
             },

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

@@ -1956,6 +1956,42 @@ export default {
                                 auditorThird: { name: '', id: '' },
                                 ccUserid: { name: '', id: '' }
                             }]
+                             // businessTrips 有数据的情况下
+                             const businessTrips = res.data.businessTrips || []
+                            if(businessTrips.length > 0) {
+                                this.form.domains = businessTrips.map((item, index) => {
+                                    const projectItens = this.projectss.find(pro => pro.id == item.projectId) || {}
+                                    return {
+                                        id: null,
+                                        projectId: projectItens.id,
+                                        projectName: projectItens.projectName,
+                                        // workingTime: t.type==3?(t.allday).toFixed(1):"8.0",
+                                        workingTime: t.type == 3 ? (t.allday).toFixed(1) : shuzhi.indexOf('.') == '-1' ? shuzhi + '.0' : shuzhi,
+                                        content: "",
+                                        state: 2,
+                                        progress: 100,
+                                        isOvertime: false,
+                                        professionProgress: [],
+                                        multiWorktime: t.multiWorktime,
+                                        worktimeList: [{}],
+                                        canEdit: true,
+
+                                        auditorFirst: { name: '', id: '' },
+                                        auditorSec: { name: '', id: '' },
+                                        auditorThird: { name: '', id: '' },
+                                        ccUserid: { name: '', id: '' }
+                                    }
+                                })
+                                const { reportExtraField4Name, reportExtraField5Name } = this.user.timeType
+                                for(let domainsIndex in this.form.domains) {
+                                    const projectItens = this.projectss.find(pro => pro.id == this.form.domains[domainsIndex].projectId) || {}
+                                    this.fZr(projectItens, domainsIndex, true)
+                                    if(reportExtraField4Name || reportExtraField5Name) {
+                                        this.getInfoByProjectId(projectItens.projectCode, domainsIndex, false)
+                                    }
+                                }
+                            }
+                            console.log(this.form.domains, '<===== this.form.domains')
                             if (this.isWeekend && this.user.timeType.lockWorktime != 1) {
                                 this.$set(this.form.domains[0], 'isOvertime', true)
                                 if (t.type != 2 && t.type != 0) {