巴林闲侠 2 years ago
parent
commit
051b2aebf2
  1. 42
      web/client/src/sections/humanAffairs/actions/personnelFiles.js
  2. 154
      web/client/src/sections/humanAffairs/components/personnelModal.jsx
  3. 6
      web/client/src/sections/humanAffairs/containers/import-members-modal.js
  4. 110
      web/client/src/sections/humanAffairs/containers/personnelFiles.jsx
  5. 172
      web/client/src/sections/humanAffairs/containers/personnelFilesDetail.jsx
  6. 3
      web/client/src/utils/webapi.js

42
web/client/src/sections/humanAffairs/actions/personnelFiles.js

@ -80,3 +80,45 @@ export function getMemberOvertime(query) {//查询单个人员加班统计数据
reducer: { name: "MemberOvertime", params: { noClear: true } },
});
}
export function getMemberVacate(query) {//查询单个人员请假统计数据
return (dispatch) => basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_MemberVACATE",
query: query,
url: `${ApiTable.getMemberVacate}`,
msg: { option: "查询人员请假统计数据" },
reducer: { name: "MemberVacate", params: { noClear: true } },
});
}
export function getMemberExport(query) {//导出员工信息
return (dispatch) => basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_MemberEXPORT",
query: query,
url: `${ApiTable.getMemberExport}`,
msg: { option: "导出员工信息" },
reducer: { name: "MemberExport", params: { noClear: true } },
});
}
export function putMember (data) {//更新成员状态
let msg = ''
if (data) {
msg = data.msg
}
return (dispatch) =>
basicAction({
type: "put",
dispatch: dispatch,
data,
actionType: "PUT_MEMBER",
url: `${ApiTable.putMember}`,
msg: { option: msg }, //更新成员状态
reducer: {},
});
}

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

@ -1,6 +1,6 @@
import React, { useState, useRef, useEffect } from "react";
import { connect } from "react-redux";
import { Modal, Form, Button, Upload } from "@douyinfe/semi-ui";
import { Modal, Form, Button, Upload, Notification } from "@douyinfe/semi-ui";
import { IconAlertCircle } from '@douyinfe/semi-icons';
import cityData from './city.json';
import PerfectScrollbar from "perfect-scrollbar";
@ -48,18 +48,6 @@ function pushModal (props) {
}
}
setUsecityData(mycityData)
// if (editObj.id) {
// let departmentList = []
// for (let i = 0; i < pepList.length; i++) {
// if (pepList[i].id == editObj.departments[0].id) {
// departmentList = pepList[i].users
// }
// }
// setPeopleList(departmentList)
// setDepartmentId(editObj.departments[0].id)
// setPeopleId(editObj.pepUserId)
// setDisablePeople(false)
// }
}, []);
useEffect(() => {
@ -74,7 +62,7 @@ function pushModal (props) {
}
});
function memberSeach (id) {//
dispatch(humanAffairs.getMemberSearch({ keyword: id })).then((res) => {//
dispatch(humanAffairs.getMemberSearch({ code: id })).then((res) => {//
if (res.success) {
setPeoplePro(res.payload.data[0])
}
@ -105,31 +93,51 @@ function pushModal (props) {
form.current
.validate()
.then((values) => {
let obj = values
if (values.nativePlace) {
if (values.nativePlace.length > 1) {
obj.nativePlace = values.nativePlace.join('-')
}
else {
obj.nativePlace = values.nativePlace[0]
}
}
if (values.workPlace) {
if (values.workPlace.length > 1) {
obj.workPlace = values.workPlace.join('-')
if (peoplePro.userCode) {
if (values.userCode == peoplePro.userCode) {
let obj = values
if (values.nativePlace) {
if (values.nativePlace.length > 1) {
obj.nativePlace = values.nativePlace.join('-')
}
else {
obj.nativePlace = values.nativePlace[0]
}
}
if (values.workPlace) {
if (values.workPlace.length > 1) {
obj.workPlace = values.workPlace.join('-')
}
else {
obj.workPlace = values.workPlace[0]
}
}
if (adminEdit) {
dispatch(humanAffairs.putMember({ pepUserId: peoplePro.pepUserId, idPhoto: idPhoto, vitae: vitae, msg: '编辑档案', ...obj })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
}
else {
dispatch(humanAffairs.postMember({ pepUserId: peoplePro.pepUserId, idPhoto: idPhoto, vitae: vitae, msg: '新增档案', ...obj })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
}
}
else {
obj.workPlace = values.workPlace[0]
Notification.error({
content: '你填写的员工编号无对应的人员信息',
duration: 2,
})
}
}
if (adminEdit) {
}
else {
dispatch(humanAffairs.postMember({ idPhoto: idPhoto, vitae: vitae, msg: '新增档案', ...obj })).then((res) => {//(PEP)
if (res.success) {
close();
}
Notification.error({
content: '你填写的员工编号无对应的人员信息',
duration: 2,
})
}
})
@ -141,7 +149,7 @@ function pushModal (props) {
return (
<>
<Modal
title={editObj?.id ? '修改档案' : '新增档案'}
title={editObj?.pepUserId ? '修改档案' : '新增档案'}
okText="确定"
cancelText="取消"
visible={visible}
@ -158,26 +166,6 @@ function pushModal (props) {
labelWidth="98px"
onValueChange={(values, field) => {
console.log('values', values);
// for (var key in field) {
// if (key == 'department') {
// if (values.department >= 0) {
// let departmentList = []
// for (let i = 0; i < pepList.length; i++) {
// if (pepList[i].id == values.department) {
// departmentList = pepList[i].users
// }
// }
// setPeopleList(departmentList)
// setDisablePeople(false)
// form.current.setValue('pepUserId', undefined);
// }
// else {
// setPeopleList([])
// setDisablePeople(true)
// form.current.setValue('pepUserId', undefined);
// }
// }
// }
}}
getFormApi={(formApi) => (form.current = formApi)}
>
@ -190,16 +178,16 @@ function pushModal (props) {
<div style={{ padding: '20px 30px' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<Form.Input
field="pepUserId"
field="userCode"
label='人员编号:'
style={{ width: 425 }}
initValue={'' || ""}
initValue={editObj?.userCode || ""}
placeholder="请输入人员编号"
showClear
rules={[{ required: true, message: "请输入人员编号" }]} />
<div style={{ marginLeft: 12, color: '#005ABD', cursor: "pointer", fontSize: 14 }} onClick={() => {
let formList = form.current.getValues()
memberSeach(formList.pepUserId)
memberSeach(formList.userCode)
}}>
搜索
</div>
@ -227,7 +215,7 @@ function pushModal (props) {
员工编号
</div>
<div style={{ color: '#4A4A4A', fontSize: 12 }}>
{peoplePro.pepUserId}
{peoplePro.userCode}
</div>
</div>
<div style={{ display: 'flex', alignItems: 'center' }}>
@ -278,10 +266,11 @@ function pushModal (props) {
field="idNumber"
label='证件号:'
style={{ width: 364 }}
initValue={'' || ""}
maxLength="18"
initValue={editObj?.idNumber || ""}
placeholder="请输入证件号"
showClear
// rules={[{ required: true, message: "" }]}
rules={[{ pattern: "^([1-9][0-9]{14})([0-9]{2}[0-9xX])$", message: "请输入正确的证件号" },]}
/>
</div>
{/* idPhoto */}
@ -311,7 +300,7 @@ function pushModal (props) {
field="gender"
placeholder="请选择性别"
style={{ width: 122 }}
initValue={departmentId || ""}
initValue={editObj?.gender || ""}
showClear
>
<Form.Select.Option value='男'>
@ -328,7 +317,7 @@ function pushModal (props) {
label='出生年月:'
placeholder="请选择出生年月"
style={{ width: 184 }}
// initValue={new Date()}
initValue={editObj?.birthday || ""}
/>
</div>
<div>
@ -339,6 +328,7 @@ function pushModal (props) {
label='籍贯:'
showClear
style={{ width: 184 }}
initValue={editObj?.nativePlace.split('-') || ""}
>
</Form.Cascader>
</div>
@ -350,7 +340,7 @@ function pushModal (props) {
field="politicsStatus"
placeholder="请选择政治面貌"
style={{ width: 122 }}
initValue={'' || ""}
initValue={editObj?.politicsStatus || ""}
showClear
>
<Form.Select.Option value='群众'>
@ -366,10 +356,12 @@ function pushModal (props) {
field="phoneNumber"
label='联系方式:'
style={{ width: 184 }}
initValue={'' || ""}
maxLength="11"
initValue={editObj?.phoneNumber || ""}
placeholder="请输入联系方式"
showClear
// rules={[{ required: true, message: "" }]}
rules={[{ pattern: "^1[3-9]{1}[0-9]{9}$", message: "请输入正确的联系方式" },]}
/>
</div>
<div>
@ -379,6 +371,7 @@ function pushModal (props) {
field='workPlace'
label='工作地点:'
showClear
initValue={editObj?.workPlace.split('-') || ""}
style={{ width: 184 }}
>
</Form.Cascader>
@ -391,7 +384,7 @@ function pushModal (props) {
field="marital"
placeholder="请选择婚育状态"
style={{ width: 122 }}
initValue={'' || ""}
initValue={editObj?.marital || ""}
showClear
>
<Form.Select.Option value='已婚已育'>
@ -421,10 +414,10 @@ function pushModal (props) {
field="graduatedFrom"
label='毕业院校:'
style={{ width: 288 }}
initValue={'' || ""}
maxLength="20"
initValue={editObj?.graduatedFrom || ""}
placeholder="请输入毕业院校"
showClear
// rules={[{ required: true, message: "" }]}
/>
</div>
<div>
@ -433,7 +426,7 @@ function pushModal (props) {
field="educationBackground"
placeholder="小学/初中/高中/大专/本科/研究生/博士"
style={{ width: 300 }}
initValue={'' || ""}
initValue={editObj?.educationBackground || ""}
showClear
>
<Form.Select.Option value='小学'>
@ -466,10 +459,10 @@ function pushModal (props) {
field="specialty"
label='专业:'
style={{ width: 288 }}
initValue={'' || ""}
maxLength="20"
initValue={editObj?.specialty || ""}
placeholder="请输入专业"
showClear
// rules={[{ required: true, message: "" }]}
/>
</div>
<div>
@ -478,7 +471,7 @@ function pushModal (props) {
label='毕业时间:'
placeholder="请选择毕业时间"
style={{ width: 300 }}
// initValue={new Date()}
initValue={editObj?.graduationDate || ""}
/>
</div>
</div>
@ -498,7 +491,7 @@ function pushModal (props) {
label='入职时间:'
placeholder="请选择入职时间"
style={{ width: 288 }}
// initValue={new Date()} .
initValue={editObj?.hiredate || ""}
/>
</div>
<div>
@ -508,7 +501,7 @@ function pushModal (props) {
placeholder="请选择转试用期时间"
labelWidth="110px"
style={{ width: 288 }}
// initValue={new Date()}
initValue={editObj?.turnProbationPeriod || ""}
/>
</div>
@ -523,7 +516,7 @@ function pushModal (props) {
label='转正时间:'
placeholder="请选择转正时间"
style={{ width: 288 }}
// initValue={new Date()}
initValue={editObj?.regularDate || ""}
/>
</div>
<div>
@ -533,7 +526,7 @@ function pushModal (props) {
placeholder="请选择离职时间"
style={{ width: 288 }}
labelWidth="110px"
// initValue={new Date()}
initValue={editObj?.dimissionDate || ""}
/>
</div>
</div>
@ -552,11 +545,12 @@ function pushModal (props) {
<Form.Input
field="experienceYear"
label='工作经验:'
maxLength="2"
style={{ width: 288 }}
initValue={'' || ""}
initValue={editObj?.experienceYear || ""}
placeholder="请输入工作经验,不超过2位数字"
showClear
// rules={[{ required: true, message: "" }]}
rules={[{ pattern: "^[0-9]*[1-9][0-9]*$", message: "请输入工作经验,不超过2位数字" },]}
/>
</div>
{/* vitae */}
@ -590,6 +584,8 @@ function pushModal (props) {
<Form.TextArea
field="occupationalHistory"
label='工作经历:'
maxLength="1000"
initValue={editObj?.occupationalHistory || ""}
placeholder="请输入工作经历"
style={{ width: 300 }} />
</div>

6
web/client/src/sections/humanAffairs/containers/import-members-modal.js

@ -238,9 +238,9 @@ const ImportMembersModal = props => {
error(`${i + 2}行人员编号为空,请填写`)
return
}
let xqExist = xqMembers.find(m => m.peopleCode == number);
let xqExist = xqMembers.find(m => m.userCode == number);
if (!xqExist) {
error(`${i + 2},项企中不存在该人员编号`)
error(`${i + 2}的人员编号无对应的员工信息`)
return
}
if (postData.some(p => p.number == number)) {//人员编号 唯一
@ -327,7 +327,7 @@ const ImportMembersModal = props => {
return
}
postData.push({//人员编号 待办todotodo
pepUserId: xqExist.id, name, idNumber, gender, birthday, nativePlace, marital,
pepUserId: xqExist.pepUserId, name, idNumber, gender, birthday, nativePlace, marital,
politicsStatus, phoneNumber, workPlace, graduatedFrom, educationBackground, specialty, graduationDate,
hiredate, turnProbationPeriod, regularDate, dimissionDate, experienceYear, occupationalHistory,
del: false, number

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

@ -1,60 +1,49 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Select, Input, Button, CheckboxGroup, Tooltip } from '@douyinfe/semi-ui';
import { Select, Input, Button, RadioGroup, Radio, Tooltip } from '@douyinfe/semi-ui';
import { IconSearch } from '@douyinfe/semi-icons';
import PersonnelModal from '../components/personnelModal';
import ImportMembersModal from './import-members-modal'
import '../style.less'
import moment from 'moment'
import { set } from 'nprogress';
const Rest = (props) => {
const { dispatch, actions, history, user, loading, socket, xqMembers } = props
const { humanAffairs } = actions;
let [departmentValue, setDepartmentValue] = useState('');
let [archivesList, setArchivesList] = useState([]);
const [personnelModal, setPersonnelModal] = useState(false);//
const [exportModalVs, setExportModalVs] = useState(false);
const options = [
{ label: '离职', value: 'abc' },
{ label: '请假', value: 'hotsoon' },
{ label: '放假', value: 'pipixia' },
{ label: '在岗', value: 'toutiao' },
{ label: '加班', value: 'jiaban' }
]
let [seachValue, setSeachValue] = useState('');
let [typeChoose, setTypeChoose] = useState([]);
const [keyword, setKeyword] = useState('');//
const [keywordTarget, setKeywordTarget] = useState('');//
const [downloadUrl, setDownloadUrl] = useState('')
const optionsList = {
dimission: '离职',
onJob: '在职',
vacate: '请假',
inOffice: '在岗',
dayoff: '放假',
}
let [typeChoose, setTypeChoose] = useState('');
useEffect(() => {
getMemberSearchList()
}, [])
}, [typeChoose])
function getMemberSearchList () {//
dispatch(humanAffairs.getMemberList()).then((res) => {//
dispatch(humanAffairs.getMemberList({ keywordTarget, keyword, state: typeChoose })).then((res) => {//
if (res.success) {
console.log('res.success', res.payload.data);
setArchivesList(res.payload.data)
// let mytableData = JSON.parse(JSON.stringify(res.payload.data.rows));
// let mytableKey = []
// for (let index = 0; index < mytableData.length; index++) {
// mytableData[index].key = mytableData[index].id
// mytableKey.push(mytableData[index].id)
// }
// setTableKey(mytableKey)
// setTableData(mytableData)
// setLimits(res.payload.data.count)
// mylimits.current = res.payload.data.rows.length
setArchivesList(res.payload?.data?.rows)
}
})
}
function typeOnChange (e) {//
console.log('e.target.value', e.target.value);
setTypeChoose(e.target.value);
}
function seachValueChange () {
function seachValueChange (value) {
setKeyword(value)
}
return (
<>
@ -96,22 +85,30 @@ const Rest = (props) => {
</div>
<div style={{ display: 'flex', marginTop: 16, marginBottom: 17 }}>
<div>
<Select value={departmentValue} onChange={setDepartmentValue} placeholder='部门' style={{ width: 200 }} showClear>
<Select.Option value='abc'>抖音</Select.Option>
<Select.Option value='ulikecam'>轻颜相机</Select.Option>
<Select.Option value='xigua'>西瓜视频</Select.Option>
<Select value={keywordTarget} onChange={setKeywordTarget} placeholder='请选择搜索类型' style={{ width: 200 }} showClear>
<Select.Option value='role'>职位</Select.Option>
<Select.Option value='dep'>部门</Select.Option>
<Select.Option value='number'>编号</Select.Option>
<Select.Option value='name'>姓名</Select.Option>
</Select>
</div>
<div style={{ marginLeft: 12, marginRight: 18 }}>
<Input suffix={<IconSearch />}
showClear
placeholder='请输入或选择关键词'
value={seachValue}
value={keyword}
style={{ width: 346 }}
onChange={seachValueChange}>
</Input>
</div>
<Button theme='solid' type='primary' style={{ width: 80, borderRadius: 2, height: 32, background: '#DBECFF', color: '#005ABD' }}>查询</Button>
<Button theme='solid' type='primary' style={{ width: 80, borderRadius: 2, height: 32, background: '#DBECFF', color: '#005ABD' }}
onClick={() => {
dispatch(humanAffairs.getMemberList({ keywordTarget, keyword, state: typeChoose })).then((res) => {//
if (res.success) {
setArchivesList(res.payload.data.rows)
}
})
}}>查询</Button>
</div>
<div style={{ borderBottom: '1px solid #F2F3F5', marginLeft: '-20px', marginBottom: 16 }}></div>
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 22 }}>
@ -120,7 +117,7 @@ const Rest = (props) => {
当前显示
</div>
<div style={{ color: '#005ABD', fontSize: 14, margin: '0px 10px' }}>
11
{archivesList.length || 0}
</div>
<div style={{ color: '#646566', fontSize: 14 }}>
结果
@ -131,21 +128,31 @@ const Rest = (props) => {
人员状态
</div>
<div>
<CheckboxGroup options={options} onChange={typeOnChange} value={typeChoose} direction='horizontal' aria-label="CheckboxGroup 示例" />
<RadioGroup onChange={typeOnChange} value={typeChoose} aria-label="单选组合示例" name="demo-radio-group">
<Radio value=''>全部</Radio>
<Radio value='dimission'>离职</Radio>
<Radio value='onJob'>在职</Radio>
</RadioGroup>
</div>
<div style={{ display: 'flex', marginLeft: 30, alignItems: 'center' }}>
<div style={{ display: 'flex', marginLeft: 30, alignItems: 'center', cursor: 'pointer' }} onClick={() => {
setDownloadUrl(`members/export?token=${user.token}&timestamp=${moment().valueOf()}`)
}}>
<div style={{ width: 20, height: 20 }}>
<img src="/assets/images/hrImg/export.png" alt="" style={{ width: '100%', height: '100%' }} />
</div>
<div style={{ marginLeft: 4, color: '#005ABD', fontSize: 13 }}>
<div style={{ marginLeft: 4, color: '#005ABD', fontSize: 13 }} >
导出
</div>
{
downloadUrl ? <iframe src={`/_api/${downloadUrl}`} style={{ display: 'none' }} /> : ''
}
</div>
</div>
</div>
<div style={{ display: 'flex', flexWrap: 'wrap', marginLeft: 30 }}>
{
archivesList.map((item, index) => {
archivesList?.rows?.map((item, index) => {
return (
<div key={index} style={{ display: 'flex', width: 368, border: '1px solid #F9F9F9', boxShadow: '0px 0px 4px 1px rgba(0,0,0,0.08)', padding: 10, marginRight: 40, marginBottom: 20 }}>
<div style={{ width: 128, height: 192 }}>
@ -192,8 +199,14 @@ const Rest = (props) => {
<div style={{ fontSize: 14, color: '#282828', marginLeft: 12, marginRight: 9 }}>
{item.userName}
</div>
<div style={{ background: '#FFFBE3', padding: '2px 6px 1px', color: '#D3A000', fontSize: 12, borderRadius: '8px 0px 8px 0px' }}>
请假中
<div style={{
background: item.state == 'dimission' ? '#FFDDDE' : item.state == 'onJob' ? '#EAF4FF' : item.state == 'vacate' ? '#FFFBE3' : item.state == 'inOffice' ? '#F0FFEA' : '#E4FEFF',
color: item.state == 'dimission' ? '#F62D30' : item.state == 'onJob' ? '#0F7EFB' : item.state == 'vacate' ? '#D3A000' : item.state == 'inOffice' ? '#58A61F' : '#00B6B9',
padding: '2px 6px 1px', fontSize: 12, borderRadius: '8px 0px 8px 0px'
}}>
{
optionsList[item.state]
}
</div>
</div>
<div style={{ color: 'rgba(0,0,0,0.65)', fontSize: 12 }}>
@ -254,23 +267,16 @@ const Rest = (props) => {
</div>
</div>
</div>
{//
{//
personnelModal ?
<PersonnelModal
visible={true}
// pepList={pepList}
// memberEdit={memberEdit}
// editObj={editObj}
// pomsList={pomsList}
// anxinDelete={anxinDelete}
// anxincloudArr={anxincloudArr}
cancel={() => {
setPersonnelModal(false);
getMemberSearchList()
}}
close={() => {
setPersonnelModal(false);
// getUserList()
getMemberSearchList()
}} >
</PersonnelModal> : ''
}
@ -282,7 +288,7 @@ const Rest = (props) => {
)
}
function mapStateToProps(state) {
function mapStateToProps (state) {
const { auth, global, MemberSearch, webSocket } = state;
return {
// loading: members.isRequesting,

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

@ -5,6 +5,8 @@ import { IconSearch } from '@douyinfe/semi-icons';
import ReactECharts from 'echarts-for-react';
import * as echarts from 'echarts';
import DeleteModal from '../components/deleteModal';
import PersonnelModal from '../components/personnelModal';
import moment from 'moment'
import '../style.less'
@ -18,7 +20,8 @@ const Rest = (props) => {
const [tableData, setTableData] = useState([{}, {}, {}, {}, {}, {}, {}]) //
const [leaveData, setLeaveData] = useState([{}, {}, {}, {}, {}, {}, {}]) //
const [deleteModal, setDeleteModal] = useState(false) //
const [deleteModal, setDeleteModal] = useState(false) //
const [personnelModal, setPersonnelModal] = useState(false);//
const [columns, setColumns] = useState([//
{
title: "实例号",
@ -125,35 +128,27 @@ const Rest = (props) => {
])
const [pepUserId, setPepUserId] = useState('');
const [pepObj, setPepObj] = useState({});
const scroll = useMemo(() => ({ y: 248 }), []);
const [startDate, setStartDate] = useState('');//
const [endDate, setEndDate] = useState('');//
useEffect(() => {
getMemberSearchList()
getWorkOption()//
getLeaveOption()//
setPepUserId(history?.location?.search.slice(1))
peopleDetail()
}, [])
function peopleDetail () {
dispatch(humanAffairs.getMemberList({keywordTarget:'number',keyword:history?.location?.search.slice(1)})).then((res) => {//
dispatch(humanAffairs.getMemberList({ keywordTarget: 'number', keyword: history?.location?.search.slice(1) })).then((res) => {//
if (res.success) {
console.log('res.success', res.payload.data);
// setArchivesList(res.payload.data)
// let mytableData = JSON.parse(JSON.stringify(res.payload.data.rows));
// let mytableKey = []
// for (let index = 0; index < mytableData.length; index++) {
// mytableData[index].key = mytableData[index].id
// mytableKey.push(mytableData[index].id)
// }
// setTableKey(mytableKey)
// setTableData(mytableData)
// setLimits(res.payload.data.count)
// mylimits.current = res.payload.data.rows.length
setPepObj(res.payload?.data?.rows[0])
}
})
}
function getWorkOption () {//线
dispatch(humanAffairs.getMemberOvertime({pepUserId:history?.location?.search.slice(1),startDate:'',endDate:''})).then((res) => {//
dispatch(humanAffairs.getMemberOvertime({ pepUserId: history?.location?.search.slice(1), startDate: startDate, endDate: endDate })).then((res) => {//
if (res.success) {
console.log('res.success', res.payload.data);
}
@ -244,6 +239,11 @@ const Rest = (props) => {
setOption(data)
}
function getLeaveOption () {//线
dispatch(humanAffairs.getMemberVacate({ pepUserId: history?.location?.search.slice(1), startDate: startDate, endDate: endDate })).then((res) => {//
if (res.success) {
console.log('res.success', res.payload.data);
}
})
var date = [];
date.push([2017, 6, 1].join("/"));
date.push([2017, 6, 2].join("/"));
@ -309,21 +309,10 @@ const Rest = (props) => {
}
setLeaveOption(data)
}
function getMemberSearchList () {//
dispatch(humanAffairs.getMemberSearch()).then((res) => {//
if (res.success) {
// let mytableData = JSON.parse(JSON.stringify(res.payload.data.rows));
// let mytableKey = []
// for (let index = 0; index < mytableData.length; index++) {
// mytableData[index].key = mytableData[index].id
// mytableKey.push(mytableData[index].id)
// }
// setTableKey(mytableKey)
// setTableData(mytableData)
// setLimits(res.payload.data.count)
// mylimits.current = res.payload.data.rows.length
}
})
function handleChange (date) {
setStartDate(moment(date[0]).format('YYYY-MM-DD'))
setEndDate(moment(date[1]).format('YYYY-MM-DD'))
}
return (
<>
@ -346,10 +335,14 @@ const Rest = (props) => {
<img src="/assets/images/hrImg/back.png" alt="" style={{ width: '100%', height: '100%' }} />
</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 }}>{pepObj.userName}的个人档案</div>
</div>
<div style={{ display: 'flex', marginRight: 20 }}>
<div style={{ padding: '6px 20px', background: '#0F7EFB', color: '#FFFFFF', fontSize: 14, cursor: "pointer" }}>
<div style={{ padding: '6px 20px', background: '#0F7EFB', color: '#FFFFFF', fontSize: 14, cursor: "pointer" }}
onClick={() => {
setPersonnelModal(true);
}}
>
编辑档案
</div>
<div style={{ padding: '6px 20px', background: '#FF5254', color: '#FFFFFF', fontSize: 14, cursor: "pointer", marginLeft: 20 }}
@ -362,7 +355,7 @@ const Rest = (props) => {
<div style={{ borderBottom: '1px solid #DCDEE0', margin: '16px 0px 16px -20px' }}></div>
<div style={{ display: 'flex', width: '100%' }}>
<div style={{ width: 160, height: 240, marginLeft: 17 }}>
<img src="/assets/images/hrImg/mc.png" alt="" style={{ width: '100%', height: '100%' }} />
<img src={pepObj.idPhoto ? '/_file-server/' + pepObj.idPhoto : '/assets/images/hrImg/defaultAvatar.png'} alt="" style={{ width: '100%', height: '100%' }} />
</div>
<div style={{ marginLeft: 40, marginTop: 8, width: '61.452%' }}>
<div style={{ display: 'flex' }}>
@ -377,7 +370,7 @@ const Rest = (props) => {
证件号
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
3211011290000022
{pepObj.idNumber || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '59.18%' }}>
@ -385,26 +378,26 @@ const Rest = (props) => {
联系方式
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
13221212211
{pepObj.phoneNumber || '暂无'}
</div>
</div>
</div>
<div style={{ display: 'flex', marginTop: 8 }}>
<div style={{ display: 'flex', width: '40.82%' }}>
<div style={{ display: 'flex', width: '52.57%' }}>
<div style={{ display: 'flex', width: '45.57%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 48, textAlign: 'end' }}>
姓名
</div>
<div style={{ color: '#005ABD', fontSize: 13 }}>
刘昊然
{pepObj.userName || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '47.43%' }}>
<div style={{ display: 'flex', width: '54.43%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 48, textAlign: 'end' }}>
性别
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
{pepObj.gender || '暂无'}
</div>
</div>
</div>
@ -414,7 +407,7 @@ const Rest = (props) => {
出生日期
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
1998年6月15日
{pepObj.birthday || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '46.834%' }}>
@ -422,27 +415,27 @@ const Rest = (props) => {
政治面貌
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
党员
{pepObj.politicsStatus || '暂无'}
</div>
</div>
</div>
</div>
<div style={{ display: 'flex', marginTop: 8 }}>
<div style={{ display: 'flex', width: '40.82%' }}>
<div style={{ display: 'flex', width: '52.57%' }}>
<div style={{ display: 'flex', width: '45.57%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 48, textAlign: 'end' }}>
年龄
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
22
{pepObj.birthday ? moment(new Date()).diff(pepObj.birthday, 'years') + '岁' : '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '47.43%' }}>
<div style={{ display: 'flex', width: '54.43%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 48, textAlign: 'end' }}>
籍贯
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
镇江
{pepObj.nativePlace || '暂无'}
</div>
</div>
</div>
@ -452,7 +445,7 @@ const Rest = (props) => {
婚育状态
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
已婚已育
{pepObj.marital || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '46.834%' }}>
@ -460,7 +453,7 @@ const Rest = (props) => {
工作地点
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
江西-南昌
{pepObj.workPlace || '暂无'}
</div>
</div>
</div>
@ -477,7 +470,7 @@ const Rest = (props) => {
毕业院校
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
江苏大学
{pepObj.graduatedFrom || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '56.95' }}>
@ -485,7 +478,7 @@ const Rest = (props) => {
毕业时间
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
2022年12月31日
{pepObj.graduationDate || '暂无'}
</div>
</div>
</div>
@ -495,7 +488,7 @@ const Rest = (props) => {
学历
</div>
<div style={{ color: '#005ABD', fontSize: 13 }}>
本科
{pepObj.educationBackground || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '56.95' }}>
@ -503,7 +496,7 @@ const Rest = (props) => {
专业
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
法学
{pepObj.specialty || '暂无'}
</div>
</div>
</div>
@ -520,16 +513,22 @@ const Rest = (props) => {
员工编号
</div>
<div style={{ color: '#005ABD', fontSize: 13 }}>
0001
{pepObj.userCode || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '85.285%' }}>
<div style={{ color: 'rgba(0, 0, 0,0.6)', fontSize: 12, width: 60 }}>
所属部门
</div>
<div style={{ color: '#FFFFFF', fontSize: 12, padding: '0px 4px 1px', background: 'rgba(0,90,189,0.8)' }}>
行业服务部
</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' }}>
@ -538,7 +537,7 @@ const Rest = (props) => {
员工职位
</div>
<div style={{ color: '#005ABD', fontSize: 13 }}>
产品经理
{pepObj.roleName || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '19.072%' }}>
@ -546,7 +545,7 @@ const Rest = (props) => {
入职时间
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
0001
{pepObj.hiredate || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '21.395%' }}>
@ -554,7 +553,7 @@ const Rest = (props) => {
转试用期时间
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
2022年12月31日
{pepObj.turnProbationPeriod || '暂无'}
</div>
</div>
<div style={{ display: 'flex', width: '' }}>
@ -562,7 +561,7 @@ const Rest = (props) => {
转正时间
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
2022年12月31日
{pepObj.regularDate || '暂无'}
</div>
</div>
</div>
@ -572,7 +571,7 @@ const Rest = (props) => {
工作经验
</div>
<div style={{ color: '#005ABD', fontSize: 13 }}>
10
{pepObj.experienceYear ? pepObj.experienceYear + '年' : '暂无'}
</div>
</div>
<div style={{ marginTop: 9, display: 'flex', width: '19.072%' }}>
@ -580,7 +579,7 @@ const Rest = (props) => {
入职年限
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
10
{pepObj.hiredate ? moment(new Date()).diff(pepObj.hiredate, 'years') + '年' : '暂无'}
</div>
</div>
<div style={{ marginTop: 9, display: 'flex', width: '39.4%' }}>
@ -588,17 +587,21 @@ const Rest = (props) => {
试用期
</div>
<div style={{ color: '#4A4A4A', fontSize: 13 }}>
3个月
</div>
</div>
<div style={{ display: 'flex', width: 139, height: 27, background: '#E5F2FF', borderRadius: 14, cursor: "pointer", alignItems: 'center', justifyContent: 'center' }}>
<div style={{ width: 18, height: 18 }}>
<img src="/assets/images/hrImg/resume.png" alt="" style={{ width: '100%', height: '100%' }} />
</div>
<div style={{ marginLeft: 10, fontSize: 13, color: '#4A4A4A' }}>
/她的简历
{pepObj.regularDate ? moment(pepObj.regularDate).diff(pepObj.hiredate, 'months', true) + '个月' : '暂无'}
</div>
</div>
{
pepObj.vitae ? (
<a href={`/_file-server/${pepObj.vitae}`}
style={{ display: 'flex', width: 139, height: 27, background: '#E5F2FF', borderRadius: 14, cursor: "pointer", alignItems: 'center', justifyContent: 'center' }}>
<div style={{ width: 18, height: 18 }}>
<img src="/assets/images/hrImg/resume.png" alt="" style={{ width: '100%', height: '100%' }} />
</div>
<div style={{ marginLeft: 10, fontSize: 13, color: '#4A4A4A' }}>
/她的简历
</div>
</a>) : ''
}
</div>
</div>
</div>
@ -608,7 +611,7 @@ const Rest = (props) => {
/她的历史工作经历与职务
</div>
<div style={{ marginTop: 12, fontSize: 13, display: 'flex', alignItems: 'center' }}>
<div style={{ width: 4, height: 4, borderRadius: '50%', marginRight: 6, background: '#005ABD' }}></div>2017年就职于XX公司担任总经理职务
<div style={{ width: 4, height: 4, borderRadius: '50%', marginRight: 6, background: '#005ABD' }}></div>{pepObj.occupationalHistory || '暂无'}
</div>
</div>
</div>
@ -618,7 +621,7 @@ const Rest = (props) => {
基础动作
</div>
<div style={{ color: '#4A4A4A', fontSize: 14, display: 'flex', alignItems: 'center' }}>
时间筛选<DatePicker type="dateRange" density="compact" style={{ width: 242 }} />
时间筛选<DatePicker onChange={handleChange} type="dateRange" density="compact" style={{ width: 242 }} />
</div>
<div style={{ display: 'flex', alignItems: 'center', margin: '5px 0px 12px' }}>
<div style={{ width: 18, height: 18 }}>
@ -769,24 +772,31 @@ const Rest = (props) => {
</div>
</div>
</div>
{//
personnelModal ?
<PersonnelModal
visible={true}
editObj={pepObj}
adminEdit={true}
cancel={() => {
setPersonnelModal(false);
}}
close={() => {
setPersonnelModal(false);
peopleDetail()
}} >
</PersonnelModal> : ''
}
{//
deleteModal ?
<DeleteModal
visible={true}
pepUserId={pepUserId}
// pepList={pepList}
// memberEdit={memberEdit}
// editObj={editObj}
// pomsList={pomsList}
// anxinDelete={anxinDelete}
// anxincloudArr={anxincloudArr}
cancel={() => {
setDeleteModal(false);
// getMemberSearchList()
}}
close={() => {
setDeleteModal(false);
// getUserList()
history.goBack()
}} >
</DeleteModal> : ''

3
web/client/src/utils/webapi.js

@ -22,7 +22,10 @@ export const ApiTable = {
postMember: 'member',//添加人员信息
getMemberList: 'member/list',//查询人员列表
delMember: 'member',//删除人员信息
putMember: 'member',//编辑人员信息
getMemberOvertime: 'member/overtime',//查询单个人员加班统计数据
getMemberVacate: 'member/vacate',//查询单个人员请假统计数据
getMemberExport: 'member/export',//导出员工信息
};
export const RouteTable = {

Loading…
Cancel
Save