diff --git a/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx b/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx index e391c87..0b7e954 100644 --- a/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx +++ b/web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx @@ -80,20 +80,20 @@ const AchievementDetails = (props) => { title: '入职日期', dataIndex: 'hiredate', width: 130, - render: (text, record, index) => moment(text).format('YYYY-MM-DD') + render: (text, record, index) => text ? moment(text).format('YYYY-MM-DD') : '' }, { title: '转正日期', dataIndex: 'regularDate', width: 130, - render: (text, record, index) => moment(text).format('YYYY-MM-DD') + render: (text, record, index) => text ? moment(text).format('YYYY-MM-DD') : '' }, { title: '工龄', dataIndex: 'workingYears', width: 130, render: (text, record, index) => { - let days = moment().diff(moment(record.hiredate).format('YYYY-MM-DD'), 'days') + let days = record.hiredate ? moment().diff(moment(record.hiredate).format('YYYY-MM-DD'), 'days') : 0 let day = days / 365 return day.toFixed(1) }