周沫沫历险记 2 years ago
parent
commit
a03dc7d572
  1. 6
      web/client/src/sections/business/containers/performanceReport/performanceSummary.jsx

6
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)
}

Loading…
Cancel
Save