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