- ...
+
+ +{r.departmrnt.length - 1}
) : ('')
@@ -207,7 +206,33 @@ const employeeInformation = (props) => {
dataIndex: "roleName",
key: "roleName",
render: (_, r, index) => {
- return (r.roleName ? r.roleName : '-');
+ return (
+
+ {
+ r.role.map((ite, idx) => {
+ let roleArr = []
+ for (let i = 0; i < r.role.length; i++) {
+ roleArr.push(r.role[i].name)
+ }
+ return (
+
+ {idx == 0 ?
+ (ite.name) : ('')
+ }
+ {
+ r.role.length > 1 && idx == 1 ? (
+
+
+ +{r.role.length - 1}
+
+
+ ) : ('')
+ }
+
+ )
+ })
+ }
+
);
},
}, {
title: '证件号',
@@ -238,7 +263,6 @@ const employeeInformation = (props) => {
width: 120,
dataIndex: "birthday",
key: "birthday",
- sorter: (a, b) => { },
render: (_, r, index) => {
return (r.birthday ? r.birthday : '-');
},
@@ -274,6 +298,15 @@ const employeeInformation = (props) => {
render: (_, r, index) => {
return (r.workPlace ? r.workPlace : '-');
},
+ }, {
+ title: '年龄',
+ width: 100,
+ dataIndex: "age",
+ key: "age",
+ sorter: (a, b) => { },
+ render: (_, r, index) => {
+ return (r.birthday ? moment(new Date()).diff(r.birthday, 'years') + '岁' : '-');
+ },
}, {
title: '毕业院校',
width: 200,
@@ -420,9 +453,9 @@ const employeeInformation = (props) => {
人事管理
/
-
档案中心
+
员工关系
/
-
人员档案
+
员工信息
@@ -581,11 +614,11 @@ const employeeInformation = (props) => {
} else {
setOrder({ orderBy: 'code', orderDirection: 'ASC' })
}
- } else if (sorter.key == 'birthday') {
+ } else if (sorter.key == 'age') {
if (sorter.sortOrder == 'descend') {
- setOrder({ orderBy: 'hiredate', orderDirection: 'DESC' })
+ setOrder({ orderBy: 'age', orderDirection: 'DESC' })
} else {
- setOrder({ orderBy: 'hiredate', orderDirection: 'ASC' })
+ setOrder({ orderBy: 'age', orderDirection: 'ASC' })
}
} else {
if (sorter.sortOrder == 'descend') {
diff --git a/web/client/src/sections/humanAffairs/containers/leaveStatistics.jsx b/web/client/src/sections/humanAffairs/containers/leaveStatistics.jsx
index 3109ec0..d56c8f6 100644
--- a/web/client/src/sections/humanAffairs/containers/leaveStatistics.jsx
+++ b/web/client/src/sections/humanAffairs/containers/leaveStatistics.jsx
@@ -90,6 +90,7 @@ const leaveStatistics = (props) => {
width: 200,
dataIndex: "userCode",
key: "userCode",
+ sorter: (a, b) => { },
render: (_, r, index) => {
return (r.userCode ? r.userCode : '-');
},
@@ -143,8 +144,8 @@ const leaveStatistics = (props) => {
{
r.departmrnt.length > 1 && idx == 1 ? (
-
- ...
+
+ +{r.departmrnt.length - 1}
) : ('')
@@ -166,7 +167,33 @@ const leaveStatistics = (props) => {
dataIndex: "roleName",
key: "roleName",
render: (_, r, index) => {
- return (r.roleName ? r.roleName : '-');
+ return (
+
+ {
+ r.role.map((ite, idx) => {
+ let roleArr = []
+ for (let i = 0; i < r.role.length; i++) {
+ roleArr.push(r.role[i].name)
+ }
+ return (
+
+ {idx == 0 ?
+ (ite.name) : ('')
+ }
+ {
+ r.role.length > 1 && idx == 1 ? (
+
+
+ +{r.role.length - 1}
+
+
+ ) : ('')
+ }
+
+ )
+ })
+ }
+
);
},
},
];
@@ -233,16 +260,16 @@ const leaveStatistics = (props) => {
人事管理
/
-
档案中心
+
假勤管理
/
-
人员档案
+
请假统计
-
员工信息
-
EMPLOYEE INFORMATION
+
请假统计
+
LEAVE STATISTICS
@@ -281,6 +308,7 @@ const leaveStatistics = (props) => {
@@ -392,7 +420,7 @@ const leaveStatistics = (props) => {
{
setSetup(false);
attribute(mytypeList);
diff --git a/web/client/src/sections/humanAffairs/containers/overtimeStatistics.jsx b/web/client/src/sections/humanAffairs/containers/overtimeStatistics.jsx
index 4199939..a37b2bd 100644
--- a/web/client/src/sections/humanAffairs/containers/overtimeStatistics.jsx
+++ b/web/client/src/sections/humanAffairs/containers/overtimeStatistics.jsx
@@ -85,6 +85,7 @@ const overtimeStatistics = (props) => {
width: 200,
dataIndex: "userCode",
key: "userCode",
+ sorter: (a, b) => { },
render: (_, r, index) => {
return (r.userCode ? r.userCode : '-');
},
@@ -138,8 +139,8 @@ const overtimeStatistics = (props) => {
{
r.departmrnt.length > 1 && idx == 1 ? (
-
- ...
+
+ +{r.departmrnt.length - 1}
) : ('')
@@ -161,7 +162,33 @@ const overtimeStatistics = (props) => {
dataIndex: "roleName",
key: "roleName",
render: (_, r, index) => {
- return (r.roleName ? r.roleName : '-');
+ return (
+
+ {
+ r.role.map((ite, idx) => {
+ let roleArr = []
+ for (let i = 0; i < r.role.length; i++) {
+ roleArr.push(r.role[i].name)
+ }
+ return (
+
+ {idx == 0 ?
+ (ite.name) : ('')
+ }
+ {
+ r.role.length > 1 && idx == 1 ? (
+
+
+ +{r.role.length - 1}
+
+
+ ) : ('')
+ }
+
+ )
+ })
+ }
+
);
},
}, {
title: '工作日-调休/h',
@@ -328,16 +355,16 @@ const overtimeStatistics = (props) => {
人事管理
/
-
档案中心
+
假勤管理
/
-
人员档案
+
加班统计
-
员工信息
-
EMPLOYEE INFORMATION
+
加班统计
+
OVERTIME STATISTICS
@@ -376,6 +403,7 @@ const overtimeStatistics = (props) => {
@@ -430,9 +458,9 @@ const overtimeStatistics = (props) => {
pagination={false}
onChange={({ sorter }) => {
if (sorter.sortOrder == 'descend') {
- setOrder({ orderBy: sorter.key, orderDirection: 'DESC' })
+ setOrder({ orderBy: sorter.key == 'userCode' ? 'code' : sorter.key, orderDirection: 'DESC' })
} else {
- setOrder({ orderBy: sorter.key, orderDirection: 'ASC' })
+ setOrder({ orderBy: sorter.key == 'userCode' ? 'code' : sorter.key, orderDirection: 'ASC' })
}
}}
onRow={handleRow}
diff --git a/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx b/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx
index 3ddcf64..c02c95b 100644
--- a/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx
+++ b/web/client/src/sections/humanAffairs/containers/personnelFiles.jsx
@@ -170,7 +170,7 @@ const Rest = (props) => {
departmentsArr.push(item.departmrnt[i].name)
}
return (
-
+
{idx == 0 ?
(
{ite.name}
@@ -180,8 +180,8 @@ const Rest = (props) => {
{
item.departmrnt.length > 1 && idx == 1 ? (
-
- ...
+
+ +{item.departmrnt.length - 1}
) : ('')
@@ -231,8 +231,31 @@ const Rest = (props) => {
-
- {item.roleName || '暂无'}
+
+ {
+ item.role.map((ite, idx) => {
+ let roleArr = []
+ for (let i = 0; i < item.role.length; i++) {
+ roleArr.push(item.role[i].name)
+ }
+ return (
+
+ {idx == 0 ?
+ (ite.name.substring(0,6)) : ('')
+ }
+ {
+ item.role.length > 1 && idx == 1 ? (
+
+
+ +{item.role.length - 1}
+
+
+ ) : ('')
+ }
+
+ )
+ })
+ }
diff --git a/web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx b/web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx
index 33acee3..e3a6e13 100644
--- a/web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx
+++ b/web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx
@@ -1,6 +1,6 @@
import React, { useEffect, useState, useMemo } from 'react';
import { connect } from 'react-redux';
-import { Select, Input, Button, CheckboxGroup, DatePicker, Table } from '@douyinfe/semi-ui';
+import { Select, Input, Button, Tooltip, DatePicker, Table } from '@douyinfe/semi-ui';
import { IconSearch } from '@douyinfe/semi-icons';
import ReactECharts from 'echarts-for-react';
import * as echarts from 'echarts';
@@ -133,7 +133,7 @@ const Rest = (props) => {
const [pepUserId, setPepUserId] = useState('');
const [pepObj, setPepObj] = useState({});
const scroll = useMemo(() => ({ y: 248 }), []);
-
+
const [startDate, setStartDate] = useState('');//开始时间
const [endDate, setEndDate] = useState('');//结束时间
@@ -164,14 +164,14 @@ const Rest = (props) => {
let textdate = [];
for (let i = 0; i < res.payload?.data?.dayStatisticData?.length; i++) {
if (textdate.findIndex((ev) => {
- return ev.time == moment(res.payload.data.dayStatisticData[i].day).format('YYYY/MM')&&ev.compensate == res.payload.data.dayStatisticData[i].compensate
+ return ev.time == moment(res.payload.data.dayStatisticData[i].day).format('YYYY/MM') && ev.compensate == res.payload.data.dayStatisticData[i].compensate
}) !== -1) {
textdate[textdate.findIndex((ev) => {
- return ev.time == moment(res.payload.data.dayStatisticData[i].day).format('YYYY/MM')&&ev.compensate == res.payload.data.dayStatisticData[i].compensate
+ return ev.time == moment(res.payload.data.dayStatisticData[i].day).format('YYYY/MM') && ev.compensate == res.payload.data.dayStatisticData[i].compensate
})].num
=
textdate[textdate.findIndex((ev) => {
- return ev.time == moment(res.payload.data.dayStatisticData[i].day).format('YYYY/MM')&&ev.compensate == res.payload.data.dayStatisticData[i].compensate
+ return ev.time == moment(res.payload.data.dayStatisticData[i].day).format('YYYY/MM') && ev.compensate == res.payload.data.dayStatisticData[i].compensate
})].num + res.payload.data.dayStatisticData[i].duration / 3600
}
else {
@@ -183,7 +183,6 @@ const Rest = (props) => {
}
}
- console.log('textdate', textdate);
for (let l = 0; l < textdate.length; l++) {
if (textdate[l].compensate == '调休') {
showdate.push([textdate[l].time, textdate[l].num])
@@ -613,30 +612,6 @@ const Rest = (props) => {
{pepObj.userCode || '暂无'}
-
-
- 所属部门:
-
- {
- pepObj.departmrnt?.map((ite, idx) => {
- return (
-
- {ite.name}
-
- )
- })
- }
-
-
-
-
-
- 员工职位:
-
-
- {pepObj.roleName || '暂无'}
-
-
入职时间:
@@ -662,6 +637,74 @@ const Rest = (props) => {
+
+
+
+ 员工职位:
+
+
+ {
+ pepObj?.role?.map((item, index) => {
+ let roleArr = []
+ for (let i = 0; i < pepObj.role.length; i++) {
+ roleArr.push(pepObj.role[i].name)
+ }
+ return (
+
+ {index < 2 ?
+ (item.name) : ('')
+ }
+ {
+ pepObj.role.length > 1 && index == 0 ?
+ (',') : ('')
+ }
+ {
+ pepObj.role.length > 2 && index == 2 ? (
+
+
+ +{pepObj.role.length - 2}
+
+
+ ) : ('')
+ }
+
+ )
+ })
+ }
+
+
+
+
+ 所属部门:
+
+ {
+ pepObj.departmrnt?.map((ite, idx) => {
+ let departmentsArr = []
+ for (let i = 0; i < pepObj.departmrnt.length; i++) {
+ departmentsArr.push(pepObj.departmrnt[i].name)
+ }
+ return (
+
+ {idx < 3 ?
+ (
+ {ite.name}
+
) : ('')
+ }
+ {
+ pepObj.departmrnt.length > 3 && idx == 3 ? (
+
+
+ +{pepObj.departmrnt.length - 3}
+
+
+ ) : ('')
+ }
+
+ )
+ })
+ }
+
+
@@ -753,7 +796,7 @@ const Rest = (props) => {
工作日:
- {tableStatistic.sumPayWorkday / 3600 + tableStatistic.sumTakeRestWorkday /3600 || 0}小时
+ {tableStatistic.sumPayWorkday / 3600 + tableStatistic.sumTakeRestWorkday / 3600 || 0}小时
@@ -777,7 +820,7 @@ const Rest = (props) => {
累计加班时长:
- {(tableStatistic.sumPayWorkday / 3600 + tableStatistic.sumTakeRestWorkday / 3600 + tableStatistic.sumTakeRestDayoff / 3600 + tableStatistic.sumPayDayoff /3600 + tableStatistic.sumPayFestivals / 3600 + tableStatistic.sumTakeRestFestivals / 3600) || 0}小时
+ {(tableStatistic.sumPayWorkday / 3600 + tableStatistic.sumTakeRestWorkday / 3600 + tableStatistic.sumTakeRestDayoff / 3600 + tableStatistic.sumPayDayoff / 3600 + tableStatistic.sumPayFestivals / 3600 + tableStatistic.sumTakeRestFestivals / 3600) || 0}小时