|
@ -80,20 +80,20 @@ const AchievementDetails = (props) => { |
|
|
title: '入职日期', |
|
|
title: '入职日期', |
|
|
dataIndex: 'hiredate', |
|
|
dataIndex: 'hiredate', |
|
|
width: 130, |
|
|
width: 130, |
|
|
render: (text, record, index) => moment(text).format('YYYY-MM-DD') |
|
|
render: (text, record, index) => text ? moment(text).format('YYYY-MM-DD') : '' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '转正日期', |
|
|
title: '转正日期', |
|
|
dataIndex: 'regularDate', |
|
|
dataIndex: 'regularDate', |
|
|
width: 130, |
|
|
width: 130, |
|
|
render: (text, record, index) => moment(text).format('YYYY-MM-DD') |
|
|
render: (text, record, index) => text ? moment(text).format('YYYY-MM-DD') : '' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '工龄', |
|
|
title: '工龄', |
|
|
dataIndex: 'workingYears', |
|
|
dataIndex: 'workingYears', |
|
|
width: 130, |
|
|
width: 130, |
|
|
render: (text, record, index) => { |
|
|
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 |
|
|
let day = days / 365 |
|
|
return day.toFixed(1) |
|
|
return day.toFixed(1) |
|
|
} |
|
|
} |
|
|