添加 物资中心选项 添加点击空白弹窗不再关闭

master
853931625@qq.com 2026-01-08 17:36:37 +08:00
parent e5909ef864
commit b91899d3ea
43 changed files with 130 additions and 49 deletions

View File

@ -32,7 +32,7 @@
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"relation-graph": "^2.2.11", "relation-graph": "^2.2.11",
"zy-react-library": "^1.1.10" "zy-react-library": "^1.1.24"
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^5.4.1", "@antfu/eslint-config": "^5.4.1",

View File

@ -2,7 +2,7 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const corpInfoList = declareRequest( export const corpInfoList = declareRequest(
"enterpriseLoading", "enterpriseLoading",
"Post > @/basicInfo/corpInfo/list", "Post > @/basicInfo/corpInfo/basicList",
); );
export const corpInfoDetails = declareRequest( export const corpInfoDetails = declareRequest(
"enterpriseLoading", "enterpriseLoading",

View File

@ -3,7 +3,7 @@ import RelationGraph from "relation-graph/react";
import { MySwitch } from "./RGDemoComponents/MyUIComponents"; import { MySwitch } from "./RGDemoComponents/MyUIComponents";
const ExpandAnimation = (departmentData) => { const ExpandAnimation = (departmentData) => {
console.log(departmentData);
const graphRef = useRef(null); const graphRef = useRef(null);
const [relayout, setRelayout] = useState(true); const [relayout, setRelayout] = useState(true);

View File

@ -181,6 +181,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}

View File

@ -275,6 +275,7 @@ function Info(props) {
{isModalOpen {isModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
title="查看" title="查看"
open={isModalOpen} open={isModalOpen}
onOk={handleOk} onOk={handleOk}

View File

@ -277,7 +277,7 @@ function Update(props) {
whetherLiquidammoniaFlag: 0, whetherLiquidammoniaFlag: 0,
whetherPipelineFlag: 0, whetherPipelineFlag: 0,
}} }}
confirmLoading={ loading={
deleteFileLoading deleteFileLoading
|| uploadFileLoading || uploadFileLoading
|| getFileLoading || getFileLoading

View File

@ -19,6 +19,10 @@ const ENTERPRISE_TYPE = [
bianma: 1, bianma: 1,
name: "集团单位", name: "集团单位",
}, },
{
bianma: 6,
name: "物资中心",
},
]; ];
function ChangeList(props) { function ChangeList(props) {
const [form] = Form.useForm(); const [form] = Form.useForm();

View File

@ -217,6 +217,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="查看" title="查看"
cancelText="关闭" cancelText="关闭"

View File

@ -272,6 +272,7 @@ function AddModalComponent(props) {
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}

View File

@ -222,6 +222,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}

View File

@ -181,7 +181,7 @@ function List(props) {
}, },
{ {
title: "创建单位", title: "创建单位",
dataIndex: "createName", dataIndex: "tenantName",
}, },
{ {
title: "开户人", title: "开户人",
@ -408,6 +408,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}
@ -420,7 +421,7 @@ function AddModalComponent(props) {
form={form} form={form}
span={24} span={24}
confirmLoading={props.loading} loading={props.loading}
options={[ options={[
{ {
name: "corpName", name: "corpName",

View File

@ -277,6 +277,7 @@ function View(props) {
{isModalOpen {isModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
title="查看" title="查看"
open={isModalOpen} open={isModalOpen}
onOk={handleOk} onOk={handleOk}
@ -325,6 +326,7 @@ const CorpInfoQrCode = (props) => {
return ( return (
<Modal <Modal
open={props.open} open={props.open}
maskClosable={false}
title="企业二维码" title="企业二维码"
footer={[ footer={[
<Button <Button

View File

@ -244,6 +244,7 @@ function AddModalComponent(props) {
return ( return (
<> <>
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="查看" title="查看"
width={1200} width={1200}
@ -385,6 +386,7 @@ function AddModalComponent(props) {
{isModalOpen {isModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
title="查看" title="查看"
open={isModalOpen} open={isModalOpen}
onOk={handleOk} onOk={handleOk}

View File

@ -275,7 +275,7 @@ function Add(props) {
values={{ values={{
departmentLeaderFlag: 0, departmentLeaderFlag: 0,
}} }}
confirmLoading={uploadFileLoading || props.user.userLoading} loading={uploadFileLoading || props.user.userLoading}
options={[ options={[
{ {
name: "roleId", name: "roleId",

View File

@ -372,6 +372,7 @@ function AddModalComponent(props) {
return ( return (
<> <>
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="查看" title="查看"
cancelText="关闭" cancelText="关闭"
@ -507,6 +508,7 @@ function AddModalComponent(props) {
{isModalOpen {isModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
title="查看" title="查看"
open={isModalOpen} open={isModalOpen}
onOk={handleOk} onOk={handleOk}

View File

@ -184,6 +184,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}

View File

@ -127,6 +127,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}
@ -168,6 +169,7 @@ function AddModalComponent(props) {
function PreviewModalComponent(props) { function PreviewModalComponent(props) {
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="预览" title="预览"
footer={[ footer={[

View File

@ -289,7 +289,7 @@ function CorpInfo(props) {
<FormBuilder <FormBuilder
showCancelButton={false} showCancelButton={false}
form={form} form={form}
confirmLoading={ loading={
deleteFileLoading deleteFileLoading
|| uploadFileLoading || uploadFileLoading
|| getFileLoading || getFileLoading
@ -509,6 +509,7 @@ function CorpInfo(props) {
const CorpInfoQrCode = (props) => { const CorpInfoQrCode = (props) => {
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="企业二维码" title="企业二维码"
footer={[ footer={[

View File

@ -309,6 +309,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}

View File

@ -281,7 +281,7 @@ function Add(props) {
> >
<FormBuilder <FormBuilder
form={form} form={form}
confirmLoading={ loading={
deleteFileLoading deleteFileLoading
|| uploadFileLoading || uploadFileLoading
|| getFileLoading || getFileLoading

View File

@ -18,7 +18,13 @@ import { UseDecodeIdCard } from "~/utils";
const JOB_STATUS = { const JOB_STATUS = {
1: "在职", 1: "在职",
0: "离职", 0: "离职",
3: "离职", 2: "信息变更中",
3: "未入职",
4: "实习生",
5: "实习结束",
6: "退休",
7: "劳务派遣",
8: "劳务派遣结束",
11: "入职待审核", 11: "入职待审核",
10: "离职待审核", 10: "离职待审核",
}; };
@ -389,6 +395,7 @@ function AddModalComponent(props) {
return ( return (
<> <>
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.modalType === "see" ? "查看" : "审核"} title={props.modalType === "see" ? "查看" : "审核"}
width={1200} width={1200}
@ -539,6 +546,7 @@ function AddModalComponent(props) {
{isModalOpen {isModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
title="查看" title="查看"
open={isModalOpen} open={isModalOpen}
onOk={handleOk} onOk={handleOk}

View File

@ -6,12 +6,6 @@ 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 { NS_USER } from "~/enumerate/namespace"; import { NS_USER } from "~/enumerate/namespace";
const JOB_STATUS = {
1: "在职",
0: "离职",
11: "入职待审核",
10: "离职待审核",
};
function ResignationReview(props) { function ResignationReview(props) {
const queryParams = useGetUrlQuery(); const queryParams = useGetUrlQuery();
const [info, setInfo] = useState({}); const [info, setInfo] = useState({});

View File

@ -313,6 +313,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}

View File

@ -347,6 +347,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}

View File

@ -34,6 +34,7 @@ const ENTERPRISE_TYPE = [
bianma: 1, bianma: 1,
name: "集团单位", name: "集团单位",
}, },
]; ];
const ENTERPRISE_STATUS = [ const ENTERPRISE_STATUS = [
{ {
@ -229,23 +230,23 @@ function List(props) {
width: 500, width: 500,
render: (_, record) => ( render: (_, record) => (
<Space> <Space>
{" "}
{
props.permission("zgszhgl-edit")
&& (
<Button {/* { */}
type="link" {/* props.permission("zgszhgl-edit") */}
onClick={() => { {/* && ( */}
setAddModalOpen(true);
setCurrentId(record.id); {/* <Button */}
setOpenType("edit"); {/* type="link" */}
}} {/* onClick={() => { */}
> {/* setAddModalOpen(true); */}
编辑 {/* setCurrentId(record.id); */}
</Button> {/* setOpenType("edit"); */}
) {/* }} */}
} {/* > */}
{/* 编辑 */}
{/* </Button> */}
{/* ) */}
{/* } */}
{ {
props.permission("zgszhgl-editName") props.permission("zgszhgl-editName")
&& ( && (
@ -373,19 +374,32 @@ function AddModalComponent(props) {
const onSubmit = async (values) => { const onSubmit = async (values) => {
if (props.openType === "editName") { if (props.openType === "editName") {
values.id = props.currentId; values.id = props.currentId;
await props.requestChangeCompanyName(values); await props.requestChangeCompanyName(values).then((res) => {
if (res.success) {
message.success("修改成功");
onCancel();
props.getData();
}
});
} }
if (props.openType === "edit") { if (props.openType === "edit") {
values.id = props.currentId; values.id = props.currentId;
await props.requestEdit(values).then(() => { await props.requestEdit(values).then((res) => {
onCancel(); if (res.success) {
props.getData(); message.success("编辑成功");
onCancel();
props.getData();
}
}); });
} }
if (props.openType === "add") { if (props.openType === "add") {
await props.requestAdd(values).then(() => { await props.requestAdd(values).then((res) => {
onCancel(); if (res.success) {
props.getData(); message.success("新增成功");
onCancel();
props.getData();
}
}); });
} }
}; };
@ -452,6 +466,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}
@ -463,7 +478,7 @@ function AddModalComponent(props) {
<FormBuilder <FormBuilder
form={form} form={form}
span={24} span={24}
confirmLoading={props.loading} loading={props.loading}
options={[ options={[
{ {
name: "corpName", name: "corpName",

View File

@ -32,6 +32,10 @@ const ENTERPRISE_TYPE = [
bianma: 5, bianma: 5,
name: "驻港单位", name: "驻港单位",
}, },
{
bianma: 6,
name: "物资中心",
},
]; ];
function View(props) { function View(props) {
const queryParams = useGetUrlQuery(); const queryParams = useGetUrlQuery();

View File

@ -18,6 +18,10 @@ const ENTERPRISE_TYPE = [
bianma: 1, bianma: 1,
name: "集团单位", name: "集团单位",
}, },
{
bianma: 6,
name: "物资中心",
},
]; ];
const BRANCH_CONPANY_STATUS = [ const BRANCH_CONPANY_STATUS = [
{ {

View File

@ -124,6 +124,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="查看" title="查看"
width={800} width={800}

View File

@ -81,7 +81,6 @@ function List(props) {
message.success("定位成功!"); message.success("定位成功!");
} }
}); });
// props.
}; };
return ( return (
<Page isShowAllAction={false}> <Page isShowAllAction={false}>

View File

@ -299,6 +299,7 @@ function View(props) {
{isModalOpen {isModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
title="查看" title="查看"
open={isModalOpen} open={isModalOpen}
onOk={handleOk} onOk={handleOk}

View File

@ -155,6 +155,7 @@ function AddModalComponent(props) {
return ( return (
<> <>
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="查看" title="查看"
width={1200} width={1200}
@ -294,6 +295,7 @@ function AddModalComponent(props) {
{isModalOpen {isModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
title="查看" title="查看"
open={isModalOpen} open={isModalOpen}
onOk={handleOk} onOk={handleOk}

View File

@ -18,6 +18,10 @@ const ENTERPRISE_TYPE = [
bianma: 1, bianma: 1,
name: "集团单位", name: "集团单位",
}, },
{
bianma: 6,
name: "物资中心",
},
]; ];
function List(props) { function List(props) {
const [form] = Form.useForm(); const [form] = Form.useForm();

View File

@ -19,6 +19,10 @@ const ENTERPRISE_TYPE = [
bianma: 1, bianma: 1,
name: "集团单位", name: "集团单位",
}, },
{
bianma: 6,
name: "物资中心",
},
]; ];
function List(props) { function List(props) {
const [form] = Form.useForm(); const [form] = Form.useForm();

View File

@ -234,6 +234,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="查看" title="查看"
cancelText="关闭" cancelText="关闭"

View File

@ -33,7 +33,6 @@ const ENTERPRISE_TYPE = [
]; ];
function List(props) { function List(props) {
const [form] = Form.useForm(); const [form] = Form.useForm();
const [cityData, setCityData] = useState([]); const [cityData, setCityData] = useState([]);
const { tableProps, getData } = useTable(props["corpInfoList"], { const { tableProps, getData } = useTable(props["corpInfoList"], {
form, form,
@ -279,6 +278,8 @@ function List(props) {
requestChangeCompanyName={props["corpInfoChangeCompanyName"]} requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]} requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]} requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
loding={props.enterprise.userLoading}
onCancel={() => { onCancel={() => {
setAddModalOpen(false); setAddModalOpen(false);
setCurrentId(""); setCurrentId("");
@ -405,11 +406,14 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}
onOk={form.submit} onOk={form.submit}
onCancel={onCancel} onCancel={onCancel}
loading={props.loading}
> >
<FormBuilder <FormBuilder
form={form} form={form}
@ -451,6 +455,9 @@ function AddModalComponent(props) {
label: "相关方类型", label: "相关方类型",
render: FORM_ITEM_RENDER_ENUM.SELECT, render: FORM_ITEM_RENDER_ENUM.SELECT,
items: ENTERPRISE_TYPE, items: ENTERPRISE_TYPE,
componentProps: {
disabled: props.currentId,
},
}, },
{ {
name: "selectfromList", name: "selectfromList",

View File

@ -277,6 +277,8 @@ function View(props) {
{isModalOpen {isModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
title="查看" title="查看"
open={isModalOpen} open={isModalOpen}
onOk={handleOk} onOk={handleOk}
@ -324,6 +326,7 @@ function View(props) {
const CorpInfoQrCode = (props) => { const CorpInfoQrCode = (props) => {
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="企业二维码" title="企业二维码"
footer={[ footer={[

View File

@ -287,6 +287,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}

View File

@ -315,6 +315,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}

View File

@ -38,11 +38,11 @@ function List(props) {
const FLOW_USER_TYPE = [ const FLOW_USER_TYPE = [
{ {
name: "流动人员", name: "流动人员",
bianma: 1, bianma: "1",
}, },
{ {
name: "非流动人员", name: "非流动人员",
bianma: 0, bianma: "0",
}, },
]; ];
@ -109,7 +109,7 @@ function List(props) {
label: "姓名", label: "姓名",
}, },
{ {
name: "eqEmploymentFlag", name: "eqFlowFlag",
label: "人员类型", label: "人员类型",
render: FORM_ITEM_RENDER_ENUM.SELECT, render: FORM_ITEM_RENDER_ENUM.SELECT,
items: FLOW_USER_TYPE, items: FLOW_USER_TYPE,
@ -133,7 +133,11 @@ function List(props) {
}, },
{ {
title: "人员类型", title: "人员类型",
dataIndex: "personnelTypeName", dataIndex: "flowFlag",
render: (_, record) => (
record.flowFlag === 1 ? "流动人员" : record.flowFlag === 0 ? "非流动人员" : ""
),
}, },
{ {
@ -243,6 +247,7 @@ function AddModalComponent(props) {
return ( return (
<> <>
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="查看" title="查看"
cancelText="关闭" cancelText="关闭"
@ -384,6 +389,7 @@ function AddModalComponent(props) {
{isModalOpen {isModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
title="查看" title="查看"
open={isModalOpen} open={isModalOpen}
onOk={handleOk} onOk={handleOk}

View File

@ -132,7 +132,7 @@ function Update(props) {
<FormBuilder <FormBuilder
form={form} form={form}
confirmLoading={ loading={
props.enterprise.enterpriseLoading props.enterprise.enterpriseLoading
} }

View File

@ -269,6 +269,7 @@ function Department(props) {
{chartModalOpen {chartModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
open={chartModalOpen} open={chartModalOpen}
title="组织架构图" title="组织架构图"
width="80%" width="80%"
@ -327,6 +328,7 @@ function AddModalComponent(props) {
}; };
return ( return (
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title={props.currentId ? "编辑" : "新增"} title={props.currentId ? "编辑" : "新增"}
width={800} width={800}

View File

@ -270,7 +270,7 @@ function Add(props) {
values={{ values={{
departmentLeaderFlag: 0, departmentLeaderFlag: 0,
}} }}
confirmLoading={uploadFileLoading || props.user.userLoading} loading={uploadFileLoading || props.user.userLoading}
options={[ options={[
{ {
name: "roleId", name: "roleId",

View File

@ -292,7 +292,6 @@ function List(props) {
render: (_, record) => ( render: (_, record) => (
<div> <div>
{ {
getLabelName({ getLabelName({
status: String(record.employmentFlag), status: String(record.employmentFlag),
list: employmentFlagData, list: employmentFlagData,
@ -442,6 +441,7 @@ function AddModalComponent(props) {
<> <>
<Modal <Modal
maskClosable={false}
open={props.open} open={props.open}
title="查看" title="查看"
width={1200} width={1200}
@ -580,6 +580,7 @@ function AddModalComponent(props) {
{isModalOpen {isModalOpen
&& ( && (
<Modal <Modal
maskClosable={false}
title="查看" title="查看"
open={isModalOpen} open={isModalOpen}
onOk={handleOk} onOk={handleOk}