|
@ -1,4 +1,4 @@ |
|
|
import React, { useEffect, useRef, useState } from 'react'; |
|
|
import React, { useEffect, useRef, useState, useMemo } from 'react'; |
|
|
import { connect } from 'react-redux'; |
|
|
import { connect } from 'react-redux'; |
|
|
import moment from 'moment' |
|
|
import moment from 'moment' |
|
|
import { Select, Input, Button, Popconfirm, Radio, Tooltip, Table, Pagination, Skeleton } from '@douyinfe/semi-ui'; |
|
|
import { Select, Input, Button, Popconfirm, Radio, Tooltip, Table, Pagination, Skeleton } from '@douyinfe/semi-ui'; |
|
@ -100,19 +100,19 @@ const PersonnelDistribution = (props) => { |
|
|
title: '序号', |
|
|
title: '序号', |
|
|
dataIndex: 'id', |
|
|
dataIndex: 'id', |
|
|
key: 'id', |
|
|
key: 'id', |
|
|
width: '5%', |
|
|
width: 60, |
|
|
render: (text, record, index) => index + 1 |
|
|
render: (text, record, index) => index + 1 |
|
|
}, { |
|
|
}, { |
|
|
title: starHeader('姓名'), |
|
|
title: starHeader('姓名'), |
|
|
dataIndex: 'name', |
|
|
dataIndex: 'name', |
|
|
key: 'name', |
|
|
key: 'name', |
|
|
width: '5%' |
|
|
width: 80 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: starHeader('部门名称'), |
|
|
title: starHeader('部门名称'), |
|
|
dataIndex: 'department', |
|
|
dataIndex: 'department', |
|
|
key: 'department', |
|
|
key: 'department', |
|
|
width: '18%', |
|
|
width: 200, |
|
|
render: (text, r, index) => { |
|
|
render: (text, r, index) => { |
|
|
let arrStr = text.map(t => t.name); |
|
|
let arrStr = text.map(t => t.name); |
|
|
return getMultis(arrStr); |
|
|
return getMultis(arrStr); |
|
@ -121,7 +121,7 @@ const PersonnelDistribution = (props) => { |
|
|
title: '销售区域(省/直辖市)', |
|
|
title: '销售区域(省/直辖市)', |
|
|
dataIndex: 'provinces', |
|
|
dataIndex: 'provinces', |
|
|
key: 'provinces', |
|
|
key: 'provinces', |
|
|
width: '15%', |
|
|
width: 160, |
|
|
render: (text, record, index) => { |
|
|
render: (text, record, index) => { |
|
|
return getMultis(text?.split('、') || []); |
|
|
return getMultis(text?.split('、') || []); |
|
|
} |
|
|
} |
|
@ -129,40 +129,48 @@ const PersonnelDistribution = (props) => { |
|
|
title: '销售区域(市)', |
|
|
title: '销售区域(市)', |
|
|
dataIndex: 'cities', |
|
|
dataIndex: 'cities', |
|
|
key: 'cities', |
|
|
key: 'cities', |
|
|
width: '15%', |
|
|
width: 160, |
|
|
render: (text, record, index) => { |
|
|
render: (text, record, index) => { |
|
|
return getMultis(text?.split('、') || []); |
|
|
return text ? getMultis(text?.split('、') || []) : '-'; |
|
|
|
|
|
} |
|
|
|
|
|
}, { |
|
|
|
|
|
title: '业务线', |
|
|
|
|
|
dataIndex: 'businessLines', |
|
|
|
|
|
key: 'businessLines', |
|
|
|
|
|
width: 120, |
|
|
|
|
|
render: (text, record, index) => { |
|
|
|
|
|
return text ? getMultis(text?.split('、') || []) : '-'; |
|
|
} |
|
|
} |
|
|
}, { |
|
|
}, { |
|
|
title: starHeader('岗位'), |
|
|
title: starHeader('岗位'), |
|
|
dataIndex: 'post', |
|
|
dataIndex: 'post', |
|
|
key: 'post', |
|
|
key: 'post', |
|
|
width: '11%', |
|
|
width: 120, |
|
|
render: (text, record) => <span>{text || '-'}</span> |
|
|
render: (text, record) => <span>{text || '-'}</span> |
|
|
}, { |
|
|
}, { |
|
|
title: starHeader('入职时间'), |
|
|
title: starHeader('入职时间'), |
|
|
dataIndex: 'hireDate', |
|
|
dataIndex: 'hireDate', |
|
|
key: 'hireDate', |
|
|
key: 'hireDate', |
|
|
width: '8%', |
|
|
width: 120, |
|
|
render: (text, record) => <span>{text || '-'}</span> |
|
|
render: (text, record) => <span>{text || '-'}</span> |
|
|
}, { |
|
|
}, { |
|
|
title: starHeader('转正时间'), |
|
|
title: starHeader('转正时间'), |
|
|
dataIndex: 'regularDate', |
|
|
dataIndex: 'regularDate', |
|
|
key: 'regularDate', |
|
|
key: 'regularDate', |
|
|
width: '8%', |
|
|
width: 120, |
|
|
render: (text, record) => <span>{text || '-'}</span> |
|
|
render: (text, record) => <span>{text || '-'}</span> |
|
|
}, { |
|
|
}, { |
|
|
title: starHeader('工龄'), |
|
|
title: starHeader('工龄'), |
|
|
dataIndex: 'workYears', |
|
|
dataIndex: 'workYears', |
|
|
key: 'workYears', |
|
|
key: 'workYears', |
|
|
width: '5%', |
|
|
width: 120, |
|
|
render: (_, r, index) => { |
|
|
render: (_, r, index) => { |
|
|
return (r.hireDate ? <span style={{ color: '#1890FF' }}>{String(moment(new Date()).diff(r.hireDate, 'years', true)).substring(0, 3) + '年'}</span> : '-') |
|
|
return (r.hireDate ? <span style={{ color: '#1890FF' }}>{String(moment(new Date()).diff(r.hireDate, 'years', true)).substring(0, 3) + '年'}</span> : '-') |
|
|
}, |
|
|
}, |
|
|
}, { |
|
|
}, { |
|
|
title: '操作', |
|
|
title: '操作', |
|
|
dataIndex: 'action', |
|
|
dataIndex: 'action', |
|
|
width: '10%', |
|
|
width: 120, |
|
|
render: (text, record) => { |
|
|
render: (text, record) => { |
|
|
return <div> |
|
|
return <div> |
|
|
<span style={{ color: '#1890FF', cursor: 'pointer' }} onClick={() => onEdit(record)}>编辑</span> |
|
|
<span style={{ color: '#1890FF', cursor: 'pointer' }} onClick={() => onEdit(record)}>编辑</span> |
|
@ -186,7 +194,7 @@ const PersonnelDistribution = (props) => { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
const scroll = useMemo(() => ({}), []); |
|
|
return (<div style={{ padding: '0px 12px' }}> |
|
|
return (<div style={{ padding: '0px 12px' }}> |
|
|
<div style={{ display: 'flex' }}> |
|
|
<div style={{ display: 'flex' }}> |
|
|
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>招聘</div> |
|
|
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>招聘</div> |
|
@ -294,6 +302,7 @@ const PersonnelDistribution = (props) => { |
|
|
justifyContent: "space-between", |
|
|
justifyContent: "space-between", |
|
|
padding: "20px 20px", |
|
|
padding: "20px 20px", |
|
|
}}> |
|
|
}}> |
|
|
|
|
|
<div></div> |
|
|
<div style={{ display: 'flex', }}> |
|
|
<div style={{ display: 'flex', }}> |
|
|
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}> |
|
|
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}> |
|
|
共{limits}条信息 |
|
|
共{limits}条信息 |
|
|