Browse Source

入职年限修改

master
deartibers 2 years ago
parent
commit
02e754b8eb
  1. 2
      web/client/src/sections/humanAffairs/containers/employeeInformation.jsx
  2. 4
      web/client/src/sections/humanAffairs/containers/personnelFiles.jsx
  3. 2
      web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx

2
web/client/src/sections/humanAffairs/containers/employeeInformation.jsx

@ -380,7 +380,7 @@ const employeeInformation = (props) => {
key: "employmentLife", key: "employmentLife",
sorter: (a, b) => { }, sorter: (a, b) => { },
render: (_, r, index) => { render: (_, r, index) => {
return (r.hiredate ? <span style={{ color: '#1890FF' }}>{moment(new Date()).diff(r.hiredate, 'years') + '年'}</span> : '-') return (r.hiredate ? <span style={{ color: '#1890FF' }}>{String(moment(new Date()).diff(r.hiredate, 'years', true)).substring(0, 3) + '年'}</span> : '-')
}, },
}, { }, {
title: '试用期时间', title: '试用期时间',

4
web/client/src/sections/humanAffairs/containers/personnelFiles.jsx

@ -241,7 +241,7 @@ const Rest = (props) => {
return ( return (
<div key={idx} style={{ display: 'flex', alignItems: 'center' }}> <div key={idx} style={{ display: 'flex', alignItems: 'center' }}>
{idx == 0 ? {idx == 0 ?
(ite.name.substring(0,6)) : ('') (ite.name.substring(0, 6)) : ('')
} }
{ {
item.role.length > 1 && idx == 1 ? ( item.role.length > 1 && idx == 1 ? (
@ -268,7 +268,7 @@ const Rest = (props) => {
<img src="/assets/images/hrImg/year.png" alt="" style={{ width: '100%', height: '100%' }} /> <img src="/assets/images/hrImg/year.png" alt="" style={{ width: '100%', height: '100%' }} />
</div> </div>
<div style={{ fontSize: 14, color: '#282828', marginLeft: 12, marginRight: 9 }}> <div style={{ fontSize: 14, color: '#282828', marginLeft: 12, marginRight: 9 }}>
{item.hiredate ? '入职' + moment(new Date()).diff(item.hiredate, 'years') + '年' : '暂无'} {item.hiredate ? '入职' + String(moment(new Date()).diff(item.hiredate, 'years', true)).substring(0, 3) + '年' : '暂无'}
</div> </div>
</div> </div>
<div style={{ color: 'rgba(0,0,0,0.65)', fontSize: 12 }}> <div style={{ color: 'rgba(0,0,0,0.65)', fontSize: 12 }}>

2
web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx

@ -719,7 +719,7 @@ const Rest = (props) => {
入职年限 入职年限
</div> </div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}> <div style={{ color: '#4A4A4A', fontSize: 13 }}>
{pepObj.hiredate ? moment(new Date()).diff(pepObj.hiredate, 'years') + '年' : '暂无'} {pepObj.hiredate ? String(moment(new Date()).diff(pepObj.hiredate, 'years',true)).substring(0,3) + '年' : '暂无'}
</div> </div>
</div> </div>
<div style={{ marginTop: 9, display: 'flex', width: '39.4%' }}> <div style={{ marginTop: 9, display: 'flex', width: '39.4%' }}>

Loading…
Cancel
Save