Browse Source

问题修改

master
deartibers 2 years ago
parent
commit
43a590e305
  1. 85
      web/client/src/sections/humanAffairs/components/personnelModal.jsx
  2. 59
      web/client/src/sections/humanAffairs/containers/employeeInformation.jsx
  3. 44
      web/client/src/sections/humanAffairs/containers/leaveStatistics.jsx
  4. 46
      web/client/src/sections/humanAffairs/containers/overtimeStatistics.jsx
  5. 33
      web/client/src/sections/humanAffairs/containers/personnelFiles.jsx
  6. 105
      web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx

85
web/client/src/sections/humanAffairs/components/personnelModal.jsx

@ -1,6 +1,6 @@
import React, { useState, useRef, useEffect } from "react"; import React, { useState, useRef, useEffect } from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { Modal, Form, Button, Upload, Notification } from "@douyinfe/semi-ui"; import { Modal, Form, Button, Upload, Notification, Tooltip } from "@douyinfe/semi-ui";
import { IconAlertCircle } from '@douyinfe/semi-icons'; import { IconAlertCircle } from '@douyinfe/semi-icons';
import cityData from './city.json'; import cityData from './city.json';
import PerfectScrollbar from "perfect-scrollbar"; import PerfectScrollbar from "perfect-scrollbar";
@ -48,6 +48,15 @@ function pushModal (props) {
} }
} }
setUsecityData(mycityData) setUsecityData(mycityData)
if (editObj?.userCode) {
memberSeach(editObj?.userCode)
}
if (editObj?.idPhoto) {
setIdPhotoBtn(false)
}
if (editObj?.vitae) {
setVitaeBtn(false)
}
}, []); }, []);
useEffect(() => { useEffect(() => {
@ -70,7 +79,7 @@ function pushModal (props) {
} }
function uploadOnChange (fileList, currentFile, event) {// function uploadOnChange (fileList, currentFile, event) {//
if (fileList.currentFile.status == "success") { if (fileList.currentFile.status == "success") {
setIdPhoto(fileList.currentFile.response.key) setIdPhoto(fileList.currentFile?.response?.key)
setIdPhotoBtn(false) setIdPhotoBtn(false)
} }
if (fileList.fileList.length == 0) { if (fileList.fileList.length == 0) {
@ -80,7 +89,7 @@ function pushModal (props) {
} }
function uploadPdfOnChange (fileList, currentFile, event) {// function uploadPdfOnChange (fileList, currentFile, event) {//
if (fileList.currentFile.status == "success") { if (fileList.currentFile.status == "success") {
setVitae(fileList.currentFile.response.key) setVitae(fileList.currentFile?.response?.key)
setVitaeBtn(false) setVitaeBtn(false)
} }
if (fileList.fileList.length == 0) { if (fileList.fileList.length == 0) {
@ -227,8 +236,31 @@ function pushModal (props) {
<div style={{ color: 'rgba(0,0,0,0.6)', fontSize: 12 }}> <div style={{ color: 'rgba(0,0,0,0.6)', fontSize: 12 }}>
职位 职位
</div> </div>
<div style={{ color: '#4A4A4A', fontSize: 12 }}> <div style={{ color: '#4A4A4A', fontSize: 12, display: 'flex', alignItems: 'center' }}>
{peoplePro.role[0]?.name} {
peoplePro.role.map((ite, idx) => {
let roleArr = []
for (let i = 0; i < peoplePro.role.length; i++) {
roleArr.push(peoplePro.role[i].name)
}
return (
<div key={idx} style={{ display: 'flex', alignItems: 'center' }}>
{idx == 0 ?
(ite.name) : ('')
}
{
peoplePro.role.length > 1 && idx == 1 ? (
<Tooltip content={roleArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
+{peoplePro.role.length - 1}
</div>
</Tooltip>
) : ('')
}
</div>
)
})
}
</div> </div>
</div> </div>
</div> </div>
@ -241,9 +273,26 @@ function pushModal (props) {
</div> </div>
{ {
peoplePro.departmrnt?.map((item, index) => { peoplePro.departmrnt?.map((item, index) => {
let departmentsArr = []
for (let i = 0; i < peoplePro.departmrnt.length; i++) {
departmentsArr.push(peoplePro.departmrnt[i].name)
}
return ( return (
<div key={index} style={{ color: '#FFFFFF', fontSize: 12, padding: '0px 4px 1px', background: 'rgba(0,90,189,0.8)', marginRight: 4 }}> <div key={index}>
{index < 3 ?
(<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4 }}>
{item.name} {item.name}
</div>) : ('')
}
{
peoplePro.departmrnt.length > 3 && index == 3 ? (
<Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ padding: '0px 4px 1px 4px ', color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
+{peoplePro.departmrnt.length - 3}
</div>
</Tooltip>
) : ('')
}
</div> </div>
) )
}) })
@ -282,6 +331,18 @@ function pushModal (props) {
</div> </div>
<div> <div>
<Upload action={apiRoot + '/attachments/idPhoto?token=' + user.token} limit={1} accept="image/*" maxSize={10240} <Upload action={apiRoot + '/attachments/idPhoto?token=' + user.token} limit={1} accept="image/*" maxSize={10240}
defaultFileList={
editObj?.idPhoto ? [
{
uid: '1',
name: '证件照.png',
status: 'success',
size: '',
preview: true,
url: '/_file-server/' + editObj.idPhoto,
}
] : []
}
onSizeError={(file, fileList) => Toast.error(`${file.name} 超过10M`)} onSizeError={(file, fileList) => Toast.error(`${file.name} 超过10M`)}
onChange={uploadOnChange} onChange={uploadOnChange}
> >
@ -561,6 +622,18 @@ function pushModal (props) {
上传简历: 上传简历:
</div> </div>
<Upload action={apiRoot + '/attachments/vitae?token=' + user.token} limit={1} accept=".pdf" maxSize={10240} <Upload action={apiRoot + '/attachments/vitae?token=' + user.token} limit={1} accept=".pdf" maxSize={10240}
defaultFileList={
editObj?.vitae ? [
{
uid: '1',
name: '简历.pdf',
status: 'success',
size: '',
preview: true,
url: '/_file-server/' + editObj.vitae,
}
] : []
}
onSizeError={(file, fileList) => Toast.error(`${file.name} 超过10M`)} onSizeError={(file, fileList) => Toast.error(`${file.name} 超过10M`)}
onChange={uploadPdfOnChange} onChange={uploadPdfOnChange}
> >

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

@ -41,6 +41,7 @@ const employeeInformation = (props) => {
{ name: "政治面貌", value: "politicsStatus" }, { name: "政治面貌", value: "politicsStatus" },
{ name: "联系方式", value: "phoneNumber" }, { name: "联系方式", value: "phoneNumber" },
{ name: "工作地点", value: "workPlace" }, { name: "工作地点", value: "workPlace" },
{ name: "年龄", value: "age" },
] ]
}, { }, {
title: '学历信息', title: '学历信息',
@ -75,10 +76,8 @@ const employeeInformation = (props) => {
localStorage.getItem(EMPLOYEEINFORMATION) == null localStorage.getItem(EMPLOYEEINFORMATION) == null
? localStorage.setItem( ? localStorage.setItem(
EMPLOYEEINFORMATION, EMPLOYEEINFORMATION,
JSON.stringify(['userName', 'departmrnt', 'roleName', 'idNumber', 'gender', 'nativePlace', 'birthday', 'marital', 'politicsStatus', 'phoneNumber', 'workPlace', JSON.stringify(['userName', 'departmrnt', 'roleName', 'hiredate', 'age', 'phoneNumber', 'marital', 'politicsStatus', 'educationBackground',
'graduatedFrom', 'educationBackground', 'specialty', 'graduationDate', 'graduatedFrom', 'employmentLife', 'occupationalHistory'])
'hiredate', 'regularDate', 'turnProbationPeriod', 'dimissionDate', 'employmentLife', 'probationPeriodDate', 'experienceYear',
'occupationalHistory', 'vitae'])
) )
: ""; : "";
attribute(); attribute();
@ -184,8 +183,8 @@ const employeeInformation = (props) => {
{ {
r.departmrnt.length > 1 && idx == 1 ? ( r.departmrnt.length > 1 && idx == 1 ? (
<Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}> <Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4, cursor: "pointer", }}> <div style={{ padding: '0px 4px 1px 4px ', color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
... +{r.departmrnt.length - 1}
</div> </div>
</Tooltip> </Tooltip>
) : ('') ) : ('')
@ -207,7 +206,33 @@ const employeeInformation = (props) => {
dataIndex: "roleName", dataIndex: "roleName",
key: "roleName", key: "roleName",
render: (_, r, index) => { render: (_, r, index) => {
return (r.roleName ? r.roleName : '-'); return (
<div style={{ color: '#4A4A4A', fontSize: 12, display: 'flex', alignItems: 'center' }}>
{
r.role.map((ite, idx) => {
let roleArr = []
for (let i = 0; i < r.role.length; i++) {
roleArr.push(r.role[i].name)
}
return (
<div key={idx} style={{ display: 'flex', alignItems: 'center' }}>
{idx == 0 ?
(ite.name) : ('')
}
{
r.role.length > 1 && idx == 1 ? (
<Tooltip content={roleArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
+{r.role.length - 1}
</div>
</Tooltip>
) : ('')
}
</div>
)
})
}
</div>);
}, },
}, { }, {
title: '证件号', title: '证件号',
@ -238,7 +263,6 @@ const employeeInformation = (props) => {
width: 120, width: 120,
dataIndex: "birthday", dataIndex: "birthday",
key: "birthday", key: "birthday",
sorter: (a, b) => { },
render: (_, r, index) => { render: (_, r, index) => {
return (r.birthday ? r.birthday : '-'); return (r.birthday ? r.birthday : '-');
}, },
@ -274,6 +298,15 @@ const employeeInformation = (props) => {
render: (_, r, index) => { render: (_, r, index) => {
return (r.workPlace ? r.workPlace : '-'); 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: '毕业院校', title: '毕业院校',
width: 200, width: 200,
@ -420,9 +453,9 @@ const employeeInformation = (props) => {
<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>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14, margin: '0px 8px' }}>/</div> <div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>档案中心</div> <div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>员工关系</div>
<div style={{ color: '#033C9A', fontSize: 14, margin: '0px 8px' }}>/</div> <div style={{ color: '#033C9A', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: '#033C9A', fontSize: 14 }}>人员档案</div> <div style={{ color: '#033C9A', fontSize: 14 }}>员工信息</div>
</div> </div>
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px 0px 20px 19px ', marginTop: 12 }}> <div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px 0px 20px 19px ', marginTop: 12 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
@ -581,11 +614,11 @@ const employeeInformation = (props) => {
} else { } else {
setOrder({ orderBy: 'code', orderDirection: 'ASC' }) setOrder({ orderBy: 'code', orderDirection: 'ASC' })
} }
} else if (sorter.key == 'birthday') { } else if (sorter.key == 'age') {
if (sorter.sortOrder == 'descend') { if (sorter.sortOrder == 'descend') {
setOrder({ orderBy: 'hiredate', orderDirection: 'DESC' }) setOrder({ orderBy: 'age', orderDirection: 'DESC' })
} else { } else {
setOrder({ orderBy: 'hiredate', orderDirection: 'ASC' }) setOrder({ orderBy: 'age', orderDirection: 'ASC' })
} }
} else { } else {
if (sorter.sortOrder == 'descend') { if (sorter.sortOrder == 'descend') {

44
web/client/src/sections/humanAffairs/containers/leaveStatistics.jsx

@ -90,6 +90,7 @@ const leaveStatistics = (props) => {
width: 200, width: 200,
dataIndex: "userCode", dataIndex: "userCode",
key: "userCode", key: "userCode",
sorter: (a, b) => { },
render: (_, r, index) => { render: (_, r, index) => {
return (r.userCode ? r.userCode : '-'); return (r.userCode ? r.userCode : '-');
}, },
@ -143,8 +144,8 @@ const leaveStatistics = (props) => {
{ {
r.departmrnt.length > 1 && idx == 1 ? ( r.departmrnt.length > 1 && idx == 1 ? (
<Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}> <Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4, cursor: "pointer", }}> <div style={{ padding: '0px 4px 1px 4px ', color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
... +{r.departmrnt.length - 1}
</div> </div>
</Tooltip> </Tooltip>
) : ('') ) : ('')
@ -166,7 +167,33 @@ const leaveStatistics = (props) => {
dataIndex: "roleName", dataIndex: "roleName",
key: "roleName", key: "roleName",
render: (_, r, index) => { render: (_, r, index) => {
return (r.roleName ? r.roleName : '-'); return (
<div style={{ color: '#4A4A4A', fontSize: 12, display: 'flex', alignItems: 'center' }}>
{
r.role.map((ite, idx) => {
let roleArr = []
for (let i = 0; i < r.role.length; i++) {
roleArr.push(r.role[i].name)
}
return (
<div key={idx} style={{ display: 'flex', alignItems: 'center' }}>
{idx == 0 ?
(ite.name) : ('')
}
{
r.role.length > 1 && idx == 1 ? (
<Tooltip content={roleArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
+{r.role.length - 1}
</div>
</Tooltip>
) : ('')
}
</div>
)
})
}
</div>);
}, },
}, },
]; ];
@ -233,16 +260,16 @@ const leaveStatistics = (props) => {
<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>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14, margin: '0px 8px' }}>/</div> <div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>档案中心</div> <div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>假勤管理</div>
<div style={{ color: '#033C9A', fontSize: 14, margin: '0px 8px' }}>/</div> <div style={{ color: '#033C9A', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: '#033C9A', fontSize: 14 }}>人员档案</div> <div style={{ color: '#033C9A', fontSize: 14 }}>请假统计</div>
</div> </div>
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px 0px 20px 19px ', marginTop: 12 }}> <div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px 0px 20px 19px ', marginTop: 12 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'baseline' }}> <div style={{ display: 'flex', alignItems: 'baseline' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #0F7EFB', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div> <div style={{ width: 0, height: 20, borderLeft: '3px solid #0F7EFB', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#033C9A', marginLeft: 8 }}>员工信息</div> <div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#033C9A', marginLeft: 8 }}>请假统计</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>EMPLOYEE INFORMATION</div> <div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>LEAVE STATISTICS</div>
</div> </div>
</div> </div>
<div style={{ marginRight: 20, marginTop: 18 }}> <div style={{ marginRight: 20, marginTop: 18 }}>
@ -281,6 +308,7 @@ const leaveStatistics = (props) => {
<Form.DatePicker <Form.DatePicker
label='时间范围:' label='时间范围:'
initValue={[moment(new Date()).add(-1, 'y').format('YYYY-MM-DD'), moment(new Date()).format('YYYY-MM-DD')]}
field='entryTime' type="dateRange" density="compact" showClear style={{ width: 370, color: "#F9F9F9" }} /> field='entryTime' type="dateRange" density="compact" showClear style={{ width: 370, color: "#F9F9F9" }} />
</div> </div>
@ -392,7 +420,7 @@ const leaveStatistics = (props) => {
<Setup <Setup
tableType={LEAVESTATISTICS} tableType={LEAVESTATISTICS}
tableList={tableList} tableList={tableList}
length={15} length={5 + mytypeList.length}
close={() => { close={() => {
setSetup(false); setSetup(false);
attribute(mytypeList); attribute(mytypeList);

46
web/client/src/sections/humanAffairs/containers/overtimeStatistics.jsx

@ -85,6 +85,7 @@ const overtimeStatistics = (props) => {
width: 200, width: 200,
dataIndex: "userCode", dataIndex: "userCode",
key: "userCode", key: "userCode",
sorter: (a, b) => { },
render: (_, r, index) => { render: (_, r, index) => {
return (r.userCode ? r.userCode : '-'); return (r.userCode ? r.userCode : '-');
}, },
@ -138,8 +139,8 @@ const overtimeStatistics = (props) => {
{ {
r.departmrnt.length > 1 && idx == 1 ? ( r.departmrnt.length > 1 && idx == 1 ? (
<Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}> <Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4, cursor: "pointer", }}> <div style={{ padding: '0px 4px 1px 4px ', color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
... +{r.departmrnt.length - 1}
</div> </div>
</Tooltip> </Tooltip>
) : ('') ) : ('')
@ -161,7 +162,33 @@ const overtimeStatistics = (props) => {
dataIndex: "roleName", dataIndex: "roleName",
key: "roleName", key: "roleName",
render: (_, r, index) => { render: (_, r, index) => {
return (r.roleName ? r.roleName : '-'); return (
<div style={{ color: '#4A4A4A', fontSize: 12, display: 'flex', alignItems: 'center' }}>
{
r.role.map((ite, idx) => {
let roleArr = []
for (let i = 0; i < r.role.length; i++) {
roleArr.push(r.role[i].name)
}
return (
<div key={idx} style={{ display: 'flex', alignItems: 'center' }}>
{idx == 0 ?
(ite.name) : ('')
}
{
r.role.length > 1 && idx == 1 ? (
<Tooltip content={roleArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
+{r.role.length - 1}
</div>
</Tooltip>
) : ('')
}
</div>
)
})
}
</div>);
}, },
}, { }, {
title: '工作日-调休/h', title: '工作日-调休/h',
@ -328,16 +355,16 @@ const overtimeStatistics = (props) => {
<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>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14, margin: '0px 8px' }}>/</div> <div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>档案中心</div> <div style={{ color: 'rgba(0,0,0,0.45)', fontSize: 14 }}>假勤管理</div>
<div style={{ color: '#033C9A', fontSize: 14, margin: '0px 8px' }}>/</div> <div style={{ color: '#033C9A', fontSize: 14, margin: '0px 8px' }}>/</div>
<div style={{ color: '#033C9A', fontSize: 14 }}>人员档案</div> <div style={{ color: '#033C9A', fontSize: 14 }}>加班统计</div>
</div> </div>
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px 0px 20px 19px ', marginTop: 12 }}> <div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, padding: '20px 0px 20px 19px ', marginTop: 12 }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'baseline' }}> <div style={{ display: 'flex', alignItems: 'baseline' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #0F7EFB', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div> <div style={{ width: 0, height: 20, borderLeft: '3px solid #0F7EFB', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#033C9A', marginLeft: 8 }}>员工信息</div> <div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#033C9A', marginLeft: 8 }}>加班统计</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>EMPLOYEE INFORMATION</div> <div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>OVERTIME STATISTICS</div>
</div> </div>
</div> </div>
<div style={{ marginRight: 20, marginTop: 18 }}> <div style={{ marginRight: 20, marginTop: 18 }}>
@ -376,6 +403,7 @@ const overtimeStatistics = (props) => {
<Form.DatePicker <Form.DatePicker
label='时间范围:' label='时间范围:'
initValue={[moment(new Date()).add(-1, 'y').format('YYYY-MM-DD'), moment(new Date()).format('YYYY-MM-DD')]}
field='entryTime' type="dateRange" density="compact" showClear style={{ width: 370, color: "#F9F9F9" }} /> field='entryTime' type="dateRange" density="compact" showClear style={{ width: 370, color: "#F9F9F9" }} />
</div> </div>
@ -430,9 +458,9 @@ const overtimeStatistics = (props) => {
pagination={false} pagination={false}
onChange={({ sorter }) => { onChange={({ sorter }) => {
if (sorter.sortOrder == 'descend') { if (sorter.sortOrder == 'descend') {
setOrder({ orderBy: sorter.key, orderDirection: 'DESC' }) setOrder({ orderBy: sorter.key == 'userCode' ? 'code' : sorter.key, orderDirection: 'DESC' })
} else { } else {
setOrder({ orderBy: sorter.key, orderDirection: 'ASC' }) setOrder({ orderBy: sorter.key == 'userCode' ? 'code' : sorter.key, orderDirection: 'ASC' })
} }
}} }}
onRow={handleRow} onRow={handleRow}

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

@ -170,7 +170,7 @@ const Rest = (props) => {
departmentsArr.push(item.departmrnt[i].name) departmentsArr.push(item.departmrnt[i].name)
} }
return ( return (
<div key={idx} style={{ display: 'flex' }}> <div key={idx} style={{ display: 'flex', alignItems: 'center' }}>
{idx == 0 ? {idx == 0 ?
(<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4 }}> (<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4 }}>
{ite.name} {ite.name}
@ -180,8 +180,8 @@ const Rest = (props) => {
{ {
item.departmrnt.length > 1 && idx == 1 ? ( item.departmrnt.length > 1 && idx == 1 ? (
<Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}> <Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4, cursor: "pointer", }}> <div style={{ padding: '0px 4px 1px 4px ', color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
... +{item.departmrnt.length - 1}
</div> </div>
</Tooltip> </Tooltip>
) : ('') ) : ('')
@ -231,8 +231,31 @@ const Rest = (props) => {
<div style={{ width: 20, height: 20 }}> <div style={{ width: 20, height: 20 }}>
<img src="/assets/images/hrImg/post.png" alt="" style={{ width: '100%', height: '100%' }} /> <img src="/assets/images/hrImg/post.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, display: 'flex', }}>
{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 (
<div key={idx} style={{ display: 'flex', alignItems: 'center' }}>
{idx == 0 ?
(ite.name.substring(0,6)) : ('')
}
{
item.role.length > 1 && idx == 1 ? (
<Tooltip content={roleArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
+{item.role.length - 1}
</div>
</Tooltip>
) : ('')
}
</div>
)
})
}
</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 }}>

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

@ -1,6 +1,6 @@
import React, { useEffect, useState, useMemo } from 'react'; import React, { useEffect, useState, useMemo } from 'react';
import { connect } from 'react-redux'; 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 { IconSearch } from '@douyinfe/semi-icons';
import ReactECharts from 'echarts-for-react'; import ReactECharts from 'echarts-for-react';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
@ -164,14 +164,14 @@ const Rest = (props) => {
let textdate = []; let textdate = [];
for (let i = 0; i < res.payload?.data?.dayStatisticData?.length; i++) { for (let i = 0; i < res.payload?.data?.dayStatisticData?.length; i++) {
if (textdate.findIndex((ev) => { 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) { }) !== -1) {
textdate[textdate.findIndex((ev) => { 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 })].num
= =
textdate[textdate.findIndex((ev) => { 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 })].num + res.payload.data.dayStatisticData[i].duration / 3600
} }
else { else {
@ -183,7 +183,6 @@ const Rest = (props) => {
} }
} }
console.log('textdate', textdate);
for (let l = 0; l < textdate.length; l++) { for (let l = 0; l < textdate.length; l++) {
if (textdate[l].compensate == '调休') { if (textdate[l].compensate == '调休') {
showdate.push([textdate[l].time, textdate[l].num]) showdate.push([textdate[l].time, textdate[l].num])
@ -613,30 +612,6 @@ const Rest = (props) => {
{pepObj.userCode || '暂无'} {pepObj.userCode || '暂无'}
</div> </div>
</div> </div>
<div style={{ display: 'flex', width: '85.285%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 60 }}>
所属部门
</div>
{
pepObj.departmrnt?.map((ite, idx) => {
return (
<div key={idx} style={{ color: '#FFFFFF', fontSize: 12, padding: '0px 4px 1px', background: 'rgba(0,90,189,0.8)', marginRight: 4 }}>
{ite.name}
</div>
)
})
}
</div>
</div>
<div style={{ marginTop: 9, display: 'flex' }}>
<div style={{ display: 'flex', width: '14.715%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 60 }}>
员工职位
</div>
<div style={{ color: '#005ABD', fontSize: 13 }}>
{pepObj.roleName || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '19.072%' }}> <div style={{ display: 'flex', width: '19.072%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 60 }}> <div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 60 }}>
入职时间 入职时间
@ -662,6 +637,74 @@ const Rest = (props) => {
</div> </div>
</div> </div>
</div> </div>
<div style={{ marginTop: 9, display: 'flex' }}>
<div style={{ display: 'flex', width: '33.787%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 60 }}>
员工职位
</div>
<div style={{ color: '#005ABD', fontSize: 13, display: 'flex', alignItems: 'center' }}>
{
pepObj?.role?.map((item, index) => {
let roleArr = []
for (let i = 0; i < pepObj.role.length; i++) {
roleArr.push(pepObj.role[i].name)
}
return (
<div key={index} style={{ display: 'flex', alignItems: 'center' }}>
{index < 2 ?
(item.name) : ('')
}
{
pepObj.role.length > 1 && index == 0 ?
(',') : ('')
}
{
pepObj.role.length > 2 && index == 2 ? (
<Tooltip content={roleArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
+{pepObj.role.length - 2}
</div>
</Tooltip>
) : ('')
}
</div>
)
})
}
</div>
</div>
<div style={{ display: 'flex', width: '66.213%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 84, textAlign: 'end' }}>
所属部门
</div>
{
pepObj.departmrnt?.map((ite, idx) => {
let departmentsArr = []
for (let i = 0; i < pepObj.departmrnt.length; i++) {
departmentsArr.push(pepObj.departmrnt[i].name)
}
return (
<div key={idx}>
{idx < 3 ?
(<div style={{ padding: '0px 4px 1px 4px ', color: '#FFFFFF', fontSize: 12, background: 'rgba(0,90,189,0.8)', borderRadius: 2, marginRight: 4 }}>
{ite.name}
</div>) : ('')
}
{
pepObj.departmrnt.length > 3 && idx == 3 ? (
<Tooltip content={departmentsArr.join(',')} trigger="click" style={{ lineHeight: 2 }}>
<div style={{ padding: '0px 4px 1px 4px ', color: 'rgba(0,90,189,0.8)', fontSize: 12, marginRight: 4, cursor: "pointer", }}>
+{pepObj.departmrnt.length - 3}
</div>
</Tooltip>
) : ('')
}
</div>
)
})
}
</div>
</div>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<div style={{ marginTop: 9, display: 'flex', width: '14.715%' }}> <div style={{ marginTop: 9, display: 'flex', width: '14.715%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 60 }}> <div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 60 }}>
@ -753,7 +796,7 @@ const Rest = (props) => {
工作日 工作日
</div> </div>
<div style={{ fontSize: 14, color: '#005ABD', marginLeft: 5 }}> <div style={{ fontSize: 14, color: '#005ABD', marginLeft: 5 }}>
{tableStatistic.sumPayWorkday / 3600 + tableStatistic.sumTakeRestWorkday /3600 || 0}小时 {tableStatistic.sumPayWorkday / 3600 + tableStatistic.sumTakeRestWorkday / 3600 || 0}小时
</div> </div>
</div> </div>
<div style={{ display: 'flex', alignItems: 'center', width: '19.87%' }}> <div style={{ display: 'flex', alignItems: 'center', width: '19.87%' }}>
@ -777,7 +820,7 @@ const Rest = (props) => {
累计加班时长 累计加班时长
</div> </div>
<div style={{ fontSize: 14, color: '#005ABD', marginLeft: 5 }}> <div style={{ fontSize: 14, color: '#005ABD', marginLeft: 5 }}>
{(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}小时
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save