|
@@ -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) {
|