Compare commits

..

2 Commits

Author SHA1 Message Date
853931625@qq.com 0d0f258c74 no message 2026-07-09 14:30:50 +08:00
853931625@qq.com a8826798fe 监管端 企业端 用户 部门 岗位可修改 2026-07-03 17:22:24 +08:00
10 changed files with 474 additions and 295 deletions

View File

@ -40,11 +40,6 @@ export const corpUserMiddlePage = declareRequest(
"enterpriseLoading", "enterpriseLoading",
"Post > @/basicInfo/corpInfo/corpUserMiddlePage", "Post > @/basicInfo/corpInfo/corpUserMiddlePage",
); );
export const userChangeRecordList = declareRequest(
"enterpriseLoading",
"Post > @/basicInfo/userChangeRecord/userCorpInfoList",
);
// 获取当前登录人信息 // 获取当前登录人信息
export const userGetInfo = declareRequest( export const userGetInfo = declareRequest(

View File

@ -90,23 +90,3 @@ export const getChangerRecordInfoById = declareRequest(
"userLoading", "userLoading",
"Post > @/basicInfo/userCorpRecord/getUserCorpRecordById", "Post > @/basicInfo/userCorpRecord/getUserCorpRecordById",
); );
export const pageByNopermission = declareRequest(
"enterpriseLoading",
"Post > @/basicInfo/user/pageByNopermission",
);
export const pageByNopermissionAll = declareRequest(
"enterpriseLoading",
"Post > @/basicInfo/user/pageByNopermissionAll",
);
export const userChangeRecordList = declareRequest(
"enterpriseLoading",
"Post > @/basicInfo/userChangeRecord/list",
);
export const userChangeRecordgGtRecordInfoById = declareRequest(
"enterpriseLoading",
"Post > @/basicInfo/userChangeRecord/getChangerRecordInfoById",
);
export const workChangeHandle = declareRequest(
"enterpriseLoading",
"Post > @/basicInfo/userChangeRecord/workChangeHandle",
);

View File

@ -1,7 +1,116 @@
import ListPage from "~/pages/Container/Supervision/EnterpriseMiddleground/ChangeList"; import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Form, Space } from "antd";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { NS_USER } from "~/enumerate/namespace";
const ENTERPRISE_TYPE = [
{
bianma: 0,
name: "普通企业",
},
{
bianma: 1,
name: "集团单位",
},
{
bianma: 6,
name: "物资中心",
},
];
function ChangeList(props) { function ChangeList(props) {
return (<ListPage {...props} />); const [form] = Form.useForm();
} const queryParams = useGetUrlQuery();
const { tableProps, getData } = useTable(props["userEmploymentLogAll"], {
form,
usePermission: false,
transform: (formData) => {
return {
...formData,
eqUserId: queryParams["id"],
};
},
});
return (
<div>
export default ChangeList; <Page headerTitle="变更记录列表">
<Search
form={form}
options={[
{
name: "name",
label: "公司名称",
},
{
name: "eqtype",
label: "企业类型",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: ENTERPRISE_TYPE,
},
]}
onFinish={getData}
/>
<Table
columns={[
{
title: "变更时间",
dataIndex: "updateTime",
},
{
title: "企业名称",
dataIndex: "corpinfoName",
},
{
title: "部门名称",
dataIndex: "departmentName",
},
{
title: "岗位名称",
dataIndex: "postName",
},
{
title: "员工",
dataIndex: "name",
render: (_, record) => (
<div>
{record.employmentFlag === 1
? "在职"
: record.employmentFlag === 1
? "离职"
: ""}
</div>
),
},
{
title: "操作",
width: 200,
hidden: !(props.permission("qyyhzt-bgjl-info")),
render: (_, record) => (
<Space>
<Button
type="link"
onClick={() =>
props.history.push(`./ChangeView?id=${record.id}&type=record`)}
>
查看
</Button>
</Space>
),
},
]}
{...tableProps}
/>
</Page>
</div>
);
}
export default Connect([NS_USER], true)(Permission(ChangeList));

View File

@ -1,7 +1,184 @@
import ViewPage from "~/pages/Container/Supervision/EnterpriseMiddleground/ChangeView"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Descriptions, Divider, message, Modal } from "antd";
import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page";
import Table from "zy-react-library/components/Table";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import { NS_ENTERPRISE, NS_USER } from "~/enumerate/namespace";
function ChangeView(props) { function ChangeView(props) {
return (<ViewPage {...props} />); const queryParams = useGetUrlQuery();
} const [info, setInfo] = useState({});
export default ChangeView; useEffect(() => {
props["getChangerRecordInfoById"]({ corpinfoId: queryParams["corpinfoId"], userId: queryParams["id"] }).then((res) => {
if (res.data) {
setInfo(res.data);
}
});
}, []);
const onSubmit = async () => {
Modal.confirm({
title: "提示",
content: "确认后,该名员工的信息将处于离职状态,涉及的待完成相关工作,可能会受到异常。",
onOk: () => {
props["reviewStatus"]({
corpinfoId: queryParams["corpinfoId"],
employmentFlag: queryParams["employmentFlag"],
reviewStatus: 2,
userId: queryParams["id"],
}).then((res) => {
if (res.success) {
message.success("审核成功");
window.history.back();
}
});
},
});
};
const handleReject = () => {
Modal.confirm({
title: "提示",
content: "确定驳回吗?",
onOk: () => {
props["reviewStatus"]({
corpinfoId: queryParams["corpinfoId"],
employmentFlag: queryParams["employmentFlag"],
reviewStatus: 3,
userId: queryParams["id"],
}).then((res) => {
if (res.success) {
message.success("驳回成功");
window.history.back();
}
});
},
});
};
const onGoBack = () => {
window.history.back();
};
return (
<div>
<Page
headerTitle="变更记录"
extraActionButtons={
queryParams["type"] === "disposal"
&& (
<div>
<Button key="reject" onClick={handleReject} style={{ marginRight: 20 }}>
驳回
</Button>
<Button
type="primary"
onClick={onSubmit}
>
通过
</Button>
</div>
)
}
>
<Divider orientation="left">变更前信息</Divider>
<Descriptions
bordered
items={[
{
label: "姓名",
children: info.username,
},
{
label: "企业名称",
children: info.corpinfoNameBefore,
},
{
label: "部门名称",
children: info.departmentNameBefore,
},
{
label: "岗位名称",
children: info.postNameBefore,
},
{
label: "员工状态",
children: info.userStatusBefore,
},
]}
column={2}
labelStyle={{
width: 200,
}}
/>
<Divider orientation="left">变更后信息</Divider>
<Descriptions
bordered
items={[
{
label: "姓名",
children: info.username,
},
{
label: "企业名称",
children: info.corpinfoNameAfter,
},
{
label: "部门名称",
children: info.departmentNameAfter,
},
{
label: "岗位名称",
children: info.postNameAfter,
},
{
label: "员工状态",
children: info.userStatusAfter,
},
{
label: "变更时间",
children: info.changeTime,
contentStyle: { display: queryParams["type"] === "disposal" ? "none" : "" },
labelStyle: { display: queryParams["type"] === "disposal" ? "none" : "" },
},
]}
column={2}
labelStyle={{
width: 200,
}}
/>
<Divider orientation="left">{queryParams["type"] === "disposal" ? "未完成工作" : "工作交接"}</Divider>
<Table
pagination={false}
columns={[
{
title: "工作项目",
dataIndex: "corpName",
},
{
title: "工作内容",
dataIndex: "type",
},
{
title: "处理人",
dataIndex: "departMentCount",
hidden: queryParams["type"] === "disposal",
},
]}
dataSource={info.userJobHandoverCOList}
/>
</Page>
</div>
);
}
export default Connect([NS_ENTERPRISE, NS_USER], true)(ChangeView);

View File

@ -16,24 +16,20 @@ import { UseDecodeIdCard } from "~/utils";
const USER_TYPE = [ const USER_TYPE = [
{ {
bianma: "1", bianma: 1,
name: "在职", name: "在职",
}, },
{ {
bianma: "0", bianma: 2,
name: "离职", name: "离职",
}, },
{
bianma: "2",
name: "信息变更中",
},
]; ];
function List(props) { function List(props) {
const [selectedNodeId, setSelectedNodeId] = useState(); const [selectedNodeId, setSelectedNodeId] = useState();
const [addModalOpen, setAddModalOpen] = useState(false); const [addModalOpen, setAddModalOpen] = useState(false);
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const [form] = Form.useForm(); const [form] = Form.useForm();
const { tableProps, getData } = useTable(props["pageByNopermissionAll"], { const { tableProps, getData } = useTable(props["userList"], {
form, form,
transform: (formData) => { transform: (formData) => {
return { return {
@ -77,7 +73,7 @@ function List(props) {
label: "姓名", label: "姓名",
}, },
{ {
name: "eqEmploymentFlag", name: "eqtype",
label: "人员状态", label: "人员状态",
render: FORM_ITEM_RENDER_ENUM.SELECT, render: FORM_ITEM_RENDER_ENUM.SELECT,
items: USER_TYPE, items: USER_TYPE,
@ -110,30 +106,23 @@ function List(props) {
title: "手机号", title: "手机号",
dataIndex: "phone", dataIndex: "phone",
}, },
// {
// title: "中台是否存在",
// dataIndex: "name",
// },
{ {
title: "人资系统是否存在", title: "状态",
dataIndex: "rzFlag", dataIndex: "name",
render: (_, record) => ( render: (_, record) => (
<div> <div>
{record.rzFlag === 1 {record.employmentFlag === 1
? "" ? "在职"
: record.rzFlag === 0 : record.employmentFlag === 1
? "" ? "离职"
: ""} : ""}
</div> </div>
), ),
}, },
{
title: "人员状态",
dataIndex: "employmentFlag",
render: (_, record) => (
<div>
{
getLabelName({ list: USER_TYPE, status: record.employmentFlag })
}
</div>
),
},
{ {
title: "操作", title: "操作",
width: 220, width: 220,
@ -163,13 +152,13 @@ function List(props) {
) )
} }
{ {
props.permission("qyd-quyhzt-disposal") && record.employmentFlag === 2 props.permission("qyd-qyyhzt-disposal")
&& ( && (
<Button <Button
type="link" type="link"
danger danger
onClick={() => onClick={() =>
props.history.push(`./ChangeView?userId=${record.id}&type=disposal&corpinfoId=${record.corpinfoId}`)} props.history.push(`./ChangeView?id=${record.id}&type=disposal`)}
> >
变更处置 变更处置
</Button> </Button>

View File

@ -291,8 +291,8 @@ function Add(props) {
name: "departmentId", name: "departmentId",
label: "所属部门", label: "所属部门",
render: ( render: (
// <DepartmentSelectTree onGetNodePaths={fnChoiceDepartment} disabled={queryParams["id"]} />
<DepartmentSelectTree onGetNodePaths={fnChoiceDepartment} /> <DepartmentSelectTree onGetNodePaths={fnChoiceDepartment} />
// <DepartmentSelectTree onGetNodePaths={fnChoiceDepartment} disabled={queryParams["id"]} />
), ),
}, },

View File

@ -2,60 +2,88 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Form, Space } from "antd"; import { Button, Form, Space } from "antd";
import Page from "zy-react-library/components/Page"; import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import Table from "zy-react-library/components/Table"; import Table from "zy-react-library/components/Table";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useTable from "zy-react-library/hooks/useTable"; import useTable from "zy-react-library/hooks/useTable";
import { NS_USER } from "~/enumerate/namespace"; import { NS_USER } from "~/enumerate/namespace";
const ENTERPRISE_TYPE = [
{
bianma: 0,
name: "普通企业",
},
{
bianma: 1,
name: "集团单位",
},
{
bianma: 6,
name: "物资中心",
},
];
function List(props) { function List(props) {
const [form] = Form.useForm(); const [form] = Form.useForm();
const queryParams = useGetUrlQuery(); const { tableProps, getData } = useTable(props["userEmploymentLogAll"], {
const { tableProps } = useTable(props["userChangeRecordList"], {
form, form,
usePermission: false, usePermission: false,
params: { eqUserId: queryParams.id }, transform: (formData) => {
return {
...formData,
};
},
}); });
return ( return (
<div> <div>
<Page <Page
headerTitle="变更列表" headerTitle="变更记录列表"
isShowFooter={false} isShowFooter={false}
> >
<Search
<Table form={form}
options={false} options={[
columns={[
{ {
title: "姓名", name: "name",
dataIndex: "userName", label: "公司名称",
}, },
{
name: "eqtype",
label: "企业类型",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: ENTERPRISE_TYPE,
},
]}
onFinish={getData}
/>
<Table
columns={[
{ {
title: "变更时间", title: "变更时间",
dataIndex: "changeTime", dataIndex: "updateTime",
}, },
{ {
title: "企业名称", title: "企业名称",
dataIndex: "corpinfoNameAfter", dataIndex: "corpinfoName",
}, },
{ {
title: "部门名称", title: "部门名称",
dataIndex: "departmentNameAfter", dataIndex: "departmentName",
}, },
{ {
title: "岗位名称", title: "岗位名称",
dataIndex: "postIdAfter", dataIndex: "postName",
}, },
{ {
title: "员工状态", title: "员工",
dataIndex: "status", dataIndex: "name",
render: (_, record) => ( render: (_, record) => (
<div> <div>
{record.status === 1 {record.employmentFlag === 1
? "待审批" ? "在职"
: record.status === 2 : record.employmentFlag === 1
? "通过" ? "离职"
: ""} : ""}
</div> </div>
), ),
@ -69,7 +97,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => onClick={() =>
props.history.push(`./ChangeView?id=${record.userChangeRecordId}&userId=${record.userId}`)} props.history.push(`./ChangeView?id=${record.id}&type=record`)}
> >
查看 查看
</Button> </Button>

View File

@ -1,98 +1,65 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Descriptions, Divider, Form, message, Modal, Space } from "antd"; import { Button, Descriptions, Divider, message, Modal } from "antd";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page"; import Page from "zy-react-library/components/Page";
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
import Table from "zy-react-library/components/Table"; import Table from "zy-react-library/components/Table";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import { getLabelName } from "zy-react-library/utils";
import { NS_ENTERPRISE, NS_USER } from "~/enumerate/namespace"; import { NS_ENTERPRISE, NS_USER } from "~/enumerate/namespace";
const USER_TYPE = [
{
bianma: "1",
name: "在职",
},
{
bianma: "0",
name: "离职",
},
{
bianma: "2",
name: "信息变更中",
},
{
bianma: "3",
name: "已退休",
},
{
bianma: "11",
name: "入职待审核",
},
{
bianma: "10",
name: "离职待审核",
},
];
function ChangeView(props) { function ChangeView(props) {
const queryParams = useGetUrlQuery(); const queryParams = useGetUrlQuery();
const [form] = Form.useForm();
const [info, setInfo] = useState({}); const [info, setInfo] = useState({});
const [handoverModalOpen, setHandoverModalOpen] = useState(false);
const [departmentId, setDepartmentId] = useState();
const [currentHandoverRecord, setCurrentHandoverRecord] = useState({});
const [handoverUserInfo, setHandoverUserInfo] = useState({});
const getRecordInfo = () => { useEffect(() => {
props["userChangeRecordgGtRecordInfoById"]({ userChangeRecordId: queryParams["id"], userId: queryParams["userId"] }).then((res) => { props["getChangerRecordInfoById"]({ corpinfoId: queryParams["corpinfoId"], userId: queryParams["id"] }).then((res) => {
if (res.data) { if (res.data) {
setInfo(res.data); setInfo(res.data);
} }
}); });
};
useEffect(() => {
getRecordInfo();
}, []); }, []);
const onOpenHandoverModal = (record) => { const onSubmit = async () => {
form.resetFields(); Modal.confirm({
setDepartmentId(); title: "提示",
setCurrentHandoverRecord(record || {}); content: "确认后,该名员工的信息将处于离职状态,涉及的待完成相关工作,可能会受到异常。",
setHandoverUserInfo({}); onOk: () => {
setHandoverModalOpen(true); props["reviewStatus"]({
}; corpinfoId: queryParams["corpinfoId"],
employmentFlag: queryParams["employmentFlag"],
const onCloseHandoverModal = () => { reviewStatus: 2,
form.resetFields(); userId: queryParams["id"],
setDepartmentId(); }).then((res) => {
setCurrentHandoverRecord({});
setHandoverUserInfo({});
setHandoverModalOpen(false);
};
const onSubmitHandover = (values) => {
const params = {
handoverCompanyId: handoverUserInfo.corpinfoId || handoverUserInfo.corpInfoId,
handoverCompanyName: handoverUserInfo.corpinfoName || handoverUserInfo.corpInfoName,
handoverDepartmentId: handoverUserInfo.departmentId,
handoverDepartmentName: handoverUserInfo.departmentName,
handoverPostId: handoverUserInfo.postId,
handoverPostName: handoverUserInfo.postName,
handoverUserId: handoverUserInfo.id || values.userId,
handoverUserName: handoverUserInfo.name,
id: currentHandoverRecord.id,
};
props["workChangeHandle"](params).then((res) => {
if (res.success) { if (res.success) {
message.success("交接成功"); message.success("审核成功");
onCloseHandoverModal(); window.history.back();
getRecordInfo();
} }
}); });
},
});
};
const handleReject = () => {
Modal.confirm({
title: "提示",
content: "确定驳回吗?",
onOk: () => {
props["reviewStatus"]({
corpinfoId: queryParams["corpinfoId"],
employmentFlag: queryParams["employmentFlag"],
reviewStatus: 3,
userId: queryParams["id"],
}).then((res) => {
if (res.success) {
message.success("驳回成功");
window.history.back();
}
});
},
});
};
const onGoBack = () => {
window.history.back();
}; };
return ( return (
@ -107,7 +74,7 @@ function ChangeView(props) {
items={[ items={[
{ {
label: "姓名", label: "姓名",
children: info.userNameBefore, children: info.username,
}, },
{ {
label: "企业名称", label: "企业名称",
@ -123,11 +90,7 @@ function ChangeView(props) {
}, },
{ {
label: "员工状态", label: "员工状态",
children: children: info.userStatusBefore,
getLabelName({
status: info.userStatusBefore,
list: USER_TYPE,
}),
}, },
]} ]}
@ -135,7 +98,6 @@ function ChangeView(props) {
labelStyle={{ labelStyle={{
width: 200, width: 200,
}} }}
contentStyle={{ width: 500 }}
/> />
<Divider orientation="left">变更后信息</Divider> <Divider orientation="left">变更后信息</Divider>
<Descriptions <Descriptions
@ -143,7 +105,7 @@ function ChangeView(props) {
items={[ items={[
{ {
label: "姓名", label: "姓名",
children: info.userNameAfter, children: info.username,
}, },
{ {
label: "企业名称", label: "企业名称",
@ -159,108 +121,67 @@ function ChangeView(props) {
}, },
{ {
label: "员工状态", label: "员工状态",
children: children: info.userStatusAfter,
getLabelName({
status: info.userStatusAfter,
list: USER_TYPE,
}),
}, },
{ {
label: "变更时间", label: "变更时间",
children: info.changeTime, children: info.changeTime,
contentStyle: { display: queryParams["type"] === "disposal" ? "none" : "" },
labelStyle: { display: queryParams["type"] === "disposal" ? "none" : "" },
}, },
]} ]}
column={2} column={2}
labelStyle={{ labelStyle={{
width: 200, width: 200,
}} }}
contentStyle={{ width: 500 }}
/> />
<Divider orientation="left">{queryParams["type"] === "disposal" ? "工作交接情况" : "交接信息"}</Divider> <Divider orientation="left">{queryParams["type"] === "disposal" ? "未完成工作" : "工作交接"}</Divider>
<Table <Table
pagination={false} pagination={false}
options={false}
columns={[ columns={[
{ {
title: "工作类别", title: "工作项目",
dataIndex: "workProject", dataIndex: "corpName",
}, },
{ {
title: "待办事项", title: "工作内容",
dataIndex: "workContent", dataIndex: "type",
}, },
{ {
title: "处理人", title: "处理人",
dataIndex: "handoverUserName", dataIndex: "departMentCount",
}, hidden: queryParams["type"] === "disposal",
{
title: "操作",
width: 200,
hidden: queryParams["type"] !== "disposal",
render: (_, record) => (
<Space>
<Button
type="link"
disabled={record.handoverStatus === 1}
onClick={() => onOpenHandoverModal(record)}
>
交接
</Button>
</Space>
),
}, },
]} ]}
dataSource={info.userJobHandoverCOList} dataSource={info.userJobHandoverCOList}
/> />
</Page> </Page>
<Modal {
maskClosable={false} queryParams["type"] === "disposal"
open={handoverModalOpen}
title="交接"
width={900}
confirmLoading={props.user?.enterpriseLoading}
onOk={() => form.submit()}
onCancel={onCloseHandoverModal}
>
<Form
form={form}
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
onFinish={onSubmitHandover}
>
<Form.Item
name="departmentId"
label="选择部门"
rules={[{ required: true, message: "请选择部门" }]}
>
<DepartmentSelectTree
isNeedCorpInfoId={true}
params={{ eqCorpinfoId: queryParams.corpinfoId }}
onChange={(value) => {
setDepartmentId(value);
setHandoverUserInfo({});
form.setFieldValue("userId", undefined);
}}
/>
</Form.Item>
<Form.Item
name="userId"
label="选择人员"
rules={[{ required: true, message: "请选择人员" }]}
>
<PersonnelSelect
onGetOption={(value) => { && (
setHandoverUserInfo(value || {}); <div style={{ textAlign: "center", height: 50, marginTop: 20 }} className="no-print">
}}
params={{ departmentId }} <Button style={{ marginRight: 20 }} onClick={onGoBack}>
placeholder="选择部门下人员、单选" 取消
/> </Button>
</Form.Item>
</Form> <Button key="reject" onClick={handleReject} style={{ marginRight: 20 }}>
</Modal> 驳回
</Button>
<Button
type="primary"
onClick={onSubmit}
>
通过
</Button>
</div>
)
}
</div> </div>

View File

@ -19,22 +19,6 @@ const ENTERPRISE_TYPE = [
bianma: 1, bianma: 1,
name: "集团单位", name: "集团单位",
}, },
{
bianma: 2,
name: "股份单位",
},
{
bianma: 3,
name: "普通企业",
},
{
bianma: 4,
name: "货主单位",
},
{
bianma: 5,
name: "驻港单位",
},
{ {
bianma: 6, bianma: 6,
name: "物资中心", name: "物资中心",
@ -42,11 +26,12 @@ const ENTERPRISE_TYPE = [
]; ];
function List(props) { function List(props) {
const [form] = Form.useForm(); const [form] = Form.useForm();
const { tableProps, getData } = useTable(props["userChangeRecordList"], { const { tableProps, getData } = useTable(props["corpUserMiddlePage"], {
form, form,
transform: (formData) => { transform: (formData) => {
return { return {
...formData, ...formData,
enterpriseType: 2,
}; };
}, },
}); });
@ -60,7 +45,12 @@ function List(props) {
name: "name", name: "name",
label: "公司名称", label: "公司名称",
}, },
{
name: "eqType",
label: "企业类型",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: ENTERPRISE_TYPE,
},
]} ]}
onFinish={getData} onFinish={getData}
/> />
@ -84,27 +74,27 @@ function List(props) {
}, },
{ {
title: "部门数", title: "部门数",
dataIndex: "departmentCount", dataIndex: "departMentCount",
}, },
{ {
title: "岗位数", title: "岗位数",
dataIndex: "postCount", dataIndex: "postCount",
}, },
{ {
title: "人员总数", title: "用户数",
dataIndex: "userCount", dataIndex: "userCount",
}, },
{ {
title: "人资存在数", title: "中台人员存在数",
dataIndex: "rzUserCount", dataIndex: "middleUserCount",
render: (_, record) => ( render: (_, record) => (
<div>{record.rzUserCount ?? 0}</div> <div>{record.middleUserCount ?? 0}</div>
), ),
}, },
{ {
title: "操作", title: "操作",
width: 200, width: 200,
hidden: !(props.permission("qyyhzt-info")), // hidden: !(props.permission("qyyhzt-info")),
render: (_, record) => ( render: (_, record) => (
<Space> <Space>

View File

@ -18,17 +18,13 @@ import { UseDecodeIdCard } from "~/utils";
const USER_TYPE = [ const USER_TYPE = [
{ {
bianma: "1", bianma: 1,
name: "在职", name: "在职",
}, },
{ {
bianma: "0", bianma: 2,
name: "离职", name: "离职",
}, },
{
bianma: "2",
name: "信息变更中",
},
]; ];
function List(props) { function List(props) {
const [selectedNodeId, setSelectedNodeId] = useState(); const [selectedNodeId, setSelectedNodeId] = useState();
@ -36,14 +32,14 @@ function List(props) {
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const queryParams = useGetUrlQuery(); const queryParams = useGetUrlQuery();
const [form] = Form.useForm(); const [form] = Form.useForm();
const { tableProps, getData } = useTable(props["pageByNopermissionAll"], { const { tableProps, getData } = useTable(props["userList"], {
form, form,
usePermission: false, usePermission: false,
transform: (formData) => { transform: (formData) => {
return { return {
...formData, ...formData,
eqDepartmentId: selectedNodeId, eqDepartmentId: selectedNodeId,
eqCorpinfoId: queryParams["id"], corpinfoId: queryParams["id"],
noMain: 1, noMain: 1,
}; };
@ -72,7 +68,7 @@ function List(props) {
return ( return (
<div> <div>
<Page <Page
headerTitle="人员列表" headerTitle="列表"
isShowFooter={false} isShowFooter={false}
> >
<div <div
@ -95,7 +91,7 @@ function List(props) {
label: "姓名", label: "姓名",
}, },
{ {
name: "eqEmploymentFlag", name: "eqtype",
label: "人员状态", label: "人员状态",
render: FORM_ITEM_RENDER_ENUM.SELECT, render: FORM_ITEM_RENDER_ENUM.SELECT,
items: USER_TYPE, items: USER_TYPE,
@ -129,26 +125,19 @@ function List(props) {
dataIndex: "phone", dataIndex: "phone",
}, },
{ {
title: "人资系统是否存在", title: "中台是否存在",
dataIndex: "rzFlag", dataIndex: "name",
render: (_, record) => (
<div>
{record.rzFlag === 1
? "是"
: record.rzFlag === 0
? "否"
: ""}
</div>
),
}, },
{ {
title: "人员状态", title: "状态",
dataIndex: "employmentFlag", dataIndex: "name",
render: (_, record) => ( render: (_, record) => (
<div> <div>
{ {record.employmentFlag === 1
getLabelName({ list: USER_TYPE, status: record.employmentFlag }) ? "在职"
} : record.employmentFlag === 1
? "离职"
: ""}
</div> </div>
), ),
}, },
@ -180,12 +169,13 @@ function List(props) {
) )
} }
{ {
props.permission("qyyuzt-info-disposal") && record.employmentFlag === 2 && ( props.permission("qyyuzt-info-disposal")
&& (
<Button <Button
type="link" type="link"
danger danger
onClick={() => onClick={() =>
props.history.push(`./ChangeView?userId=${record.id}&type=disposal&corpinfoId=${record.corpinfoId}`)} props.history.push(`./ChangeView?id=${record.id}&type=disposal`)}
> >
变更处置 变更处置
</Button> </Button>