所有使用 ENTERPRISE_TYPE 的地方全部统一改成请求获取
parent
fece36bc25
commit
9f7d121693
|
|
@ -58,11 +58,6 @@ export const corpDepartlist = declareRequest(
|
||||||
"departmentLoading",
|
"departmentLoading",
|
||||||
"Post > @/basicInfo/corpInfo/corpDepartlist",
|
"Post > @/basicInfo/corpInfo/corpDepartlist",
|
||||||
);
|
);
|
||||||
export const tenantTypeConfigList = declareRequest(
|
|
||||||
"departmentLoading",
|
|
||||||
"Post > @/appmenu/tenantTypeConfig/list",
|
|
||||||
);
|
|
||||||
|
|
||||||
// 根据登录人密码查手机号
|
// 根据登录人密码查手机号
|
||||||
export const getEncryInfo = declareRequest(
|
export const getEncryInfo = declareRequest(
|
||||||
"departmentLoading",
|
"departmentLoading",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
export {};
|
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
|
export const tenantTypeConfigList = declareRequest(
|
||||||
|
"Post > @/appmenu/tenantTypeConfig/list",
|
||||||
|
);
|
||||||
|
|
||||||
// export const riskList = declareRequest(
|
// export const riskList = declareRequest(
|
||||||
// "loading",
|
// "loading",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Form, Space } from "antd";
|
import { Button, Form, Space } from "antd";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
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 Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
|
|
@ -8,24 +9,12 @@ import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_USER } from "~/enumerate/namespace";
|
import { NS_GLOBAL, NS_USER } from "~/enumerate/namespace";
|
||||||
|
import { getTenantTypeConfigList } from "~/utils";
|
||||||
|
|
||||||
const ENTERPRISE_TYPE = [
|
|
||||||
{
|
|
||||||
bianma: 0,
|
|
||||||
name: "普通企业",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 1,
|
|
||||||
name: "集团单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 6,
|
|
||||||
name: "物资中心",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
function ChangeList(props) {
|
function ChangeList(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
const queryParams = useGetUrlQuery();
|
const queryParams = useGetUrlQuery();
|
||||||
const { tableProps, getData } = useTable(props["userEmploymentLogAll"], {
|
const { tableProps, getData } = useTable(props["userEmploymentLogAll"], {
|
||||||
form,
|
form,
|
||||||
|
|
@ -37,6 +26,12 @@ function ChangeList(props) {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
useEffect(() => {
|
||||||
|
getTenantTypeConfigList({
|
||||||
|
request: props.tenantTypeConfigList,
|
||||||
|
menuPath: "/basicInfo/container/enterprise/enterpriseMiddleground/list",
|
||||||
|
}).then(setTenantTypeConfigList);
|
||||||
|
}, []);
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
|
|
@ -52,7 +47,8 @@ function ChangeList(props) {
|
||||||
name: "eqtype",
|
name: "eqtype",
|
||||||
label: "企业类型",
|
label: "企业类型",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_TYPE,
|
items: tenantTypeConfigList,
|
||||||
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -113,4 +109,4 @@ function ChangeList(props) {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default Connect([NS_USER], true)(Permission(ChangeList));
|
export default Connect([NS_USER, NS_GLOBAL], true)(Permission(ChangeList));
|
||||||
|
|
|
||||||
|
|
@ -7,34 +7,20 @@ import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||||
|
|
||||||
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 Search from "zy-react-library/components/Search";
|
||||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
|
||||||
// import AreaSelect from "zy-react-library/components/SelectTree/Area";
|
// import AreaSelect from "zy-react-library/components/SelectTree/Area";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
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 { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE, NS_GLOBAL } from "~/enumerate/namespace";
|
||||||
import { useDebounce } from "~/utils";
|
import { getTenantTypeConfigList, useDebounce } from "~/utils";
|
||||||
|
|
||||||
const ENTERPRISE_TYPE = [
|
|
||||||
{
|
|
||||||
bianma: 3,
|
|
||||||
name: "普通企业",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 4,
|
|
||||||
name: "货主单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 5,
|
|
||||||
name: "驻港单位",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
const [cityData, setCityData] = useState([]);
|
const [cityData, setCityData] = useState([]);
|
||||||
|
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
const { tableProps, getData } = useTable(props["corpInfoList"], {
|
const { tableProps, getData } = useTable(props["corpInfoList"], {
|
||||||
form,
|
form,
|
||||||
transform: (formData) => {
|
transform: (formData) => {
|
||||||
|
|
@ -54,6 +40,9 @@ function List(props) {
|
||||||
});
|
});
|
||||||
const [addModalOpen, setAddModalOpen] = useState(false);
|
const [addModalOpen, setAddModalOpen] = useState(false);
|
||||||
const [currentId, setCurrentId] = useState("");
|
const [currentId, setCurrentId] = useState("");
|
||||||
|
useEffect(() => {
|
||||||
|
getTenantTypeConfigList({ request: props.tenantTypeConfigList }).then(setTenantTypeConfigList);
|
||||||
|
}, []);
|
||||||
const onResetPassword = (id) => {
|
const onResetPassword = (id) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
|
|
@ -134,7 +123,8 @@ function List(props) {
|
||||||
name: "eqType",
|
name: "eqType",
|
||||||
label: "相关方类型",
|
label: "相关方类型",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_TYPE,
|
items: tenantTypeConfigList,
|
||||||
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// name: "cityRecord",
|
// name: "cityRecord",
|
||||||
|
|
@ -204,7 +194,9 @@ function List(props) {
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
getLabelName({
|
getLabelName({
|
||||||
status: record.type,
|
status: record.type,
|
||||||
list: ENTERPRISE_TYPE,
|
list: tenantTypeConfigList,
|
||||||
|
idKey: "code",
|
||||||
|
nameKey: "tenantTypeName",
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
@ -289,6 +281,7 @@ function List(props) {
|
||||||
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
||||||
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
||||||
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
||||||
|
tenantTypeConfigList={tenantTypeConfigList}
|
||||||
loading={props.enterprise.enterpriseLoading}
|
loading={props.enterprise.enterpriseLoading}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setAddModalOpen(false);
|
setAddModalOpen(false);
|
||||||
|
|
@ -476,7 +469,8 @@ function AddModalComponent(props) {
|
||||||
name: "type",
|
name: "type",
|
||||||
label: "相关方类型",
|
label: "相关方类型",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_TYPE,
|
items: props.tenantTypeConfigList,
|
||||||
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
componentProps: {
|
componentProps: {
|
||||||
disabled: props.currentId,
|
disabled: props.currentId,
|
||||||
},
|
},
|
||||||
|
|
@ -509,4 +503,4 @@ function AddModalComponent(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const AddModal = AddModalComponent;
|
const AddModal = AddModalComponent;
|
||||||
export default Connect([NS_ENTERPRISE], true)(Permission(List));
|
export default Connect([NS_ENTERPRISE, NS_GLOBAL], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -9,24 +9,12 @@ import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
|
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE, NS_GLOBAL } from "~/enumerate/namespace";
|
||||||
|
import { getTenantTypeConfigList } from "~/utils";
|
||||||
|
|
||||||
const ENTERPRISE_TYPE = [
|
|
||||||
{
|
|
||||||
bianma: 3,
|
|
||||||
name: "普通企业",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 4,
|
|
||||||
name: "货主单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 5,
|
|
||||||
name: "驻港单位",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
function View(props) {
|
function View(props) {
|
||||||
const [info, setInfo] = useState({});
|
const [info, setInfo] = useState({});
|
||||||
|
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { loading: getFileLoading, getFile } = useGetFile();
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
const [corpInfoQrCodeOpen, setCorpInfoQrCodeOpen] = useState(false);
|
const [corpInfoQrCodeOpen, setCorpInfoQrCodeOpen] = useState(false);
|
||||||
|
|
@ -61,6 +49,12 @@ function View(props) {
|
||||||
};
|
};
|
||||||
fetchData();
|
fetchData();
|
||||||
}, []);
|
}, []);
|
||||||
|
useEffect(() => {
|
||||||
|
getTenantTypeConfigList({
|
||||||
|
request: props.tenantTypeConfigList,
|
||||||
|
menuPath: "/basicInfo/container/enterprise/stakeholderUnit/accountManage/list",
|
||||||
|
}).then(setTenantTypeConfigList);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const handleOk = async () => {
|
const handleOk = async () => {
|
||||||
const values = await form.validateFields();
|
const values = await form.validateFields();
|
||||||
|
|
@ -217,12 +211,13 @@ function View(props) {
|
||||||
// children: info.totalAssets,
|
// children: info.totalAssets,
|
||||||
// },
|
// },
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
label: "相关方类型",
|
label: "相关方类型",
|
||||||
children: getLabelName({
|
children: getLabelName({
|
||||||
status: info.type,
|
status: info.type,
|
||||||
list: ENTERPRISE_TYPE,
|
list: tenantTypeConfigList,
|
||||||
|
idKey: "code",
|
||||||
|
nameKey: "tenantTypeName",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -361,4 +356,4 @@ const CorpInfoQrCode = (props) => {
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default Connect([NS_ENTERPRISE], true)(View);
|
export default Connect([NS_ENTERPRISE, NS_GLOBAL], true)(View);
|
||||||
|
|
|
||||||
|
|
@ -2,24 +2,18 @@ import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Form, Space } from "antd";
|
import { Button, Form, Space } from "antd";
|
||||||
|
|
||||||
import { 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 Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import AreaSelect from "zy-react-library/components/SelectTree/Area";
|
|
||||||
|
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
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 { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE, NS_GLOBAL } from "~/enumerate/namespace";
|
||||||
import { getAreaNamePath } from "~/utils";
|
import { getTenantTypeConfigList } from "~/utils";
|
||||||
// import { getLabelName } from "zy-react-library/utils";
|
// import { getLabelName } from "zy-react-library/utils";
|
||||||
|
|
||||||
const ENTERPRISE_TYPE = [
|
|
||||||
{ bianma: 3, name: "普通企业" },
|
|
||||||
{ bianma: 4, name: "货主单位" },
|
|
||||||
{ bianma: 5, name: "驻港单位" },
|
|
||||||
];
|
|
||||||
// const ENTERPRISE_STATUS = [
|
// const ENTERPRISE_STATUS = [
|
||||||
// { bianma: "filialstate01", name: "在产" },
|
// { bianma: "filialstate01", name: "在产" },
|
||||||
// { bianma: "filialstate02", name: "在建" },
|
// { bianma: "filialstate02", name: "在建" },
|
||||||
|
|
@ -31,6 +25,7 @@ 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 [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
const { tableProps, getData } = useTable(props["corpUserMiddlePage"], {
|
const { tableProps, getData } = useTable(props["corpUserMiddlePage"], {
|
||||||
form,
|
form,
|
||||||
transform: (formData) => {
|
transform: (formData) => {
|
||||||
|
|
@ -45,6 +40,9 @@ function List(props) {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
useEffect(() => {
|
||||||
|
getTenantTypeConfigList({ request: props.tenantTypeConfigList }).then(setTenantTypeConfigList);
|
||||||
|
}, []);
|
||||||
// const onFinish = async () => {
|
// const onFinish = async () => {
|
||||||
// // 处理属地查询
|
// // 处理属地查询
|
||||||
// const arr = [];
|
// const arr = [];
|
||||||
|
|
@ -82,7 +80,13 @@ function List(props) {
|
||||||
// />
|
// />
|
||||||
// ),
|
// ),
|
||||||
// },
|
// },
|
||||||
{ name: "eqType", label: "相关方类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_TYPE },
|
{
|
||||||
|
name: "eqType",
|
||||||
|
label: "相关方类型",
|
||||||
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
|
items: tenantTypeConfigList,
|
||||||
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// name: "cityRecord",
|
// name: "cityRecord",
|
||||||
// label: "属地",
|
// label: "属地",
|
||||||
|
|
@ -104,7 +108,9 @@ function List(props) {
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
getLabelName({
|
getLabelName({
|
||||||
status: record.type,
|
status: record.type,
|
||||||
list: ENTERPRISE_TYPE,
|
list: tenantTypeConfigList,
|
||||||
|
idKey: "code",
|
||||||
|
nameKey: "tenantTypeName",
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
width: 120,
|
width: 120,
|
||||||
|
|
@ -167,4 +173,4 @@ function List(props) {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default Connect([NS_ENTERPRISE], true)(Permission(List));
|
export default Connect([NS_ENTERPRISE, NS_GLOBAL], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ 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 { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE, NS_GLOBAL } from "~/enumerate/namespace";
|
||||||
import { useDebounce } from "~/utils";
|
import { getTenantTypeConfigList, useDebounce } from "~/utils";
|
||||||
|
|
||||||
const USER_FLAG = [
|
const USER_FLAG = [
|
||||||
{
|
{
|
||||||
|
|
@ -25,21 +25,6 @@ const USER_FLAG = [
|
||||||
name: "停用",
|
name: "停用",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const ENTERPRISE_TYPE = [
|
|
||||||
{
|
|
||||||
bianma: 0,
|
|
||||||
name: "普通企业",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 1,
|
|
||||||
name: "集团单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 6,
|
|
||||||
name: "物资中心",
|
|
||||||
},
|
|
||||||
|
|
||||||
];
|
|
||||||
const ENTERPRISE_STATUS = [
|
const ENTERPRISE_STATUS = [
|
||||||
{
|
{
|
||||||
bianma: "filialstate01",
|
bianma: "filialstate01",
|
||||||
|
|
@ -347,7 +332,7 @@ function List(props) {
|
||||||
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
||||||
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
||||||
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
||||||
tenantTypeConfigList={props["tenantTypeConfigList"]}
|
requestTenantTypeConfigList={props["tenantTypeConfigList"]}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setAddModalOpen(false);
|
setAddModalOpen(false);
|
||||||
setCurrentId("");
|
setCurrentId("");
|
||||||
|
|
@ -365,18 +350,8 @@ function AddModalComponent(props) {
|
||||||
const debouncedCode = useDebounce(codeValue, 600);
|
const debouncedCode = useDebounce(codeValue, 600);
|
||||||
const debouncedCorpName = useDebounce(corpNameValue, 600);
|
const debouncedCorpName = useDebounce(corpNameValue, 600);
|
||||||
|
|
||||||
const getTenantTypeConfigList = async () => {
|
|
||||||
let menuId = "";
|
|
||||||
if (window.__IN_BASE__) {
|
|
||||||
const res = await window.base.call.getMenuInfoByPath({ path: window.location.pathname });
|
|
||||||
menuId = res?.[0].menuCode;
|
|
||||||
}
|
|
||||||
const { data } = await props.tenantTypeConfigList({ menuId, pageIndex: 1, pageSize: 9999 });
|
|
||||||
setTenantTypeConfigList(data);
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getTenantTypeConfigList();
|
getTenantTypeConfigList({ request: props.requestTenantTypeConfigList }).then(setTenantTypeConfigList);
|
||||||
}, []);
|
}, []);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (props.currentId) {
|
if (props.currentId) {
|
||||||
|
|
@ -585,4 +560,4 @@ function AddModalComponent(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const AddModal = AddModalComponent;
|
const AddModal = AddModalComponent;
|
||||||
export default Connect([NS_ENTERPRISE], true)(Permission(List));
|
export default Connect([NS_ENTERPRISE, NS_GLOBAL], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -5,41 +5,13 @@ import Page from "zy-react-library/components/Page";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
|
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE, NS_GLOBAL } from "~/enumerate/namespace";
|
||||||
|
import { getTenantTypeConfigList } from "~/utils";
|
||||||
|
|
||||||
const ENTERPRISE_TYPE = [
|
|
||||||
{
|
|
||||||
bianma: 0,
|
|
||||||
name: "普通企业",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 1,
|
|
||||||
name: "集团单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 2,
|
|
||||||
name: "股份单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 3,
|
|
||||||
name: "普通企业",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 4,
|
|
||||||
name: "货主单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 5,
|
|
||||||
name: "驻港单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 6,
|
|
||||||
name: "物资中心",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
function View(props) {
|
function View(props) {
|
||||||
const queryParams = useGetUrlQuery();
|
const queryParams = useGetUrlQuery();
|
||||||
const [info, setInfo] = useState({});
|
const [info, setInfo] = useState({});
|
||||||
|
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
const res = await props.corpInfoDetails({
|
const res = await props.corpInfoDetails({
|
||||||
|
|
@ -50,6 +22,12 @@ function View(props) {
|
||||||
};
|
};
|
||||||
fetchData();
|
fetchData();
|
||||||
}, []);
|
}, []);
|
||||||
|
useEffect(() => {
|
||||||
|
getTenantTypeConfigList({
|
||||||
|
request: props.tenantTypeConfigList,
|
||||||
|
menuPath: "/basicInfo/container/supervision/branchCompany/accountManage/list",
|
||||||
|
}).then(setTenantTypeConfigList);
|
||||||
|
}, []);
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Page
|
<Page
|
||||||
|
|
@ -75,7 +53,9 @@ function View(props) {
|
||||||
<div>
|
<div>
|
||||||
{getLabelName({
|
{getLabelName({
|
||||||
status: info.type,
|
status: info.type,
|
||||||
list: ENTERPRISE_TYPE,
|
list: tenantTypeConfigList,
|
||||||
|
idKey: "code",
|
||||||
|
nameKey: "tenantTypeName",
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
|
@ -102,4 +82,4 @@ function View(props) {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default Connect([NS_ENTERPRISE], true)(View);
|
export default Connect([NS_ENTERPRISE, NS_GLOBAL], true)(View);
|
||||||
|
|
|
||||||
|
|
@ -9,20 +9,6 @@ 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_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
||||||
|
|
||||||
const ENTERPRISE_TYPE = [
|
|
||||||
{
|
|
||||||
bianma: 0,
|
|
||||||
name: "普通企业",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 1,
|
|
||||||
name: "集团单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 6,
|
|
||||||
name: "物资中心",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
const BRANCH_CONPANY_STATUS = [
|
const BRANCH_CONPANY_STATUS = [
|
||||||
{
|
{
|
||||||
bianma: "filialstate01",
|
bianma: "filialstate01",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Form, Space } from "antd";
|
import { Button, Form, Space } from "antd";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
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 Search from "zy-react-library/components/Search";
|
||||||
|
|
@ -7,24 +8,12 @@ import Table from "zy-react-library/components/Table";
|
||||||
|
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
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_GLOBAL, NS_USER } from "~/enumerate/namespace";
|
||||||
|
import { getTenantTypeConfigList } from "~/utils";
|
||||||
|
|
||||||
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 [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
const { tableProps, getData } = useTable(props["userEmploymentLogAll"], {
|
const { tableProps, getData } = useTable(props["userEmploymentLogAll"], {
|
||||||
form,
|
form,
|
||||||
usePermission: false,
|
usePermission: false,
|
||||||
|
|
@ -35,6 +24,12 @@ function List(props) {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
useEffect(() => {
|
||||||
|
getTenantTypeConfigList({
|
||||||
|
request: props.tenantTypeConfigList,
|
||||||
|
menuPath: "/basicInfo/container/supervision/enterpriseMiddleground/list",
|
||||||
|
}).then(setTenantTypeConfigList);
|
||||||
|
}, []);
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Page
|
<Page
|
||||||
|
|
@ -52,7 +47,8 @@ function List(props) {
|
||||||
name: "eqtype",
|
name: "eqtype",
|
||||||
label: "企业类型",
|
label: "企业类型",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_TYPE,
|
items: tenantTypeConfigList,
|
||||||
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -112,4 +108,4 @@ function List(props) {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default Connect([NS_USER], true)(List);
|
export default Connect([NS_USER, NS_GLOBAL], true)(List);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Form, Space } from "antd";
|
import { Button, Form, Space } from "antd";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
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 Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
|
|
@ -8,24 +9,12 @@ 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 { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE, NS_GLOBAL } from "~/enumerate/namespace";
|
||||||
|
import { getTenantTypeConfigList } from "~/utils";
|
||||||
|
|
||||||
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 [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
const { tableProps, getData } = useTable(props["corpUserMiddlePage"], {
|
const { tableProps, getData } = useTable(props["corpUserMiddlePage"], {
|
||||||
form,
|
form,
|
||||||
transform: (formData) => {
|
transform: (formData) => {
|
||||||
|
|
@ -35,6 +24,9 @@ function List(props) {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
useEffect(() => {
|
||||||
|
getTenantTypeConfigList({ request: props.tenantTypeConfigList }).then(setTenantTypeConfigList);
|
||||||
|
}, []);
|
||||||
return (
|
return (
|
||||||
|
|
||||||
<Page isShowAllAction={false}>
|
<Page isShowAllAction={false}>
|
||||||
|
|
@ -49,7 +41,8 @@ function List(props) {
|
||||||
name: "eqType",
|
name: "eqType",
|
||||||
label: "企业类型",
|
label: "企业类型",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_TYPE,
|
items: tenantTypeConfigList,
|
||||||
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -67,7 +60,9 @@ function List(props) {
|
||||||
<div>
|
<div>
|
||||||
{getLabelName({
|
{getLabelName({
|
||||||
status: record.type,
|
status: record.type,
|
||||||
list: ENTERPRISE_TYPE,
|
list: tenantTypeConfigList,
|
||||||
|
idKey: "code",
|
||||||
|
nameKey: "tenantTypeName",
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
|
@ -115,4 +110,4 @@ function List(props) {
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default Connect([NS_ENTERPRISE], true)(Permission(List));
|
export default Connect([NS_ENTERPRISE, NS_GLOBAL], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -12,25 +12,12 @@ import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
|
||||||
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
import { UNIFIED_SOCIAL_CREDIT_CODE } from "zy-react-library/regular";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE, NS_GLOBAL } from "~/enumerate/namespace";
|
||||||
import { useDebounce } from "~/utils";
|
import { getTenantTypeConfigList, useDebounce } from "~/utils";
|
||||||
|
|
||||||
const ENTERPRISE_TYPE = [
|
|
||||||
{
|
|
||||||
bianma: 3,
|
|
||||||
name: "普通企业",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 4,
|
|
||||||
name: "货主单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 5,
|
|
||||||
name: "驻港单位",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
// const [cityData, setCityData] = useState([]);
|
// const [cityData, setCityData] = useState([]);
|
||||||
const { tableProps, getData } = useTable(props["corpInfoList"], {
|
const { tableProps, getData } = useTable(props["corpInfoList"], {
|
||||||
form,
|
form,
|
||||||
|
|
@ -51,6 +38,9 @@ function List(props) {
|
||||||
});
|
});
|
||||||
const [addModalOpen, setAddModalOpen] = useState(false);
|
const [addModalOpen, setAddModalOpen] = useState(false);
|
||||||
const [currentId, setCurrentId] = useState("");
|
const [currentId, setCurrentId] = useState("");
|
||||||
|
useEffect(() => {
|
||||||
|
getTenantTypeConfigList({ request: props.tenantTypeConfigList }).then(setTenantTypeConfigList);
|
||||||
|
}, []);
|
||||||
const onResetPassword = (id) => {
|
const onResetPassword = (id) => {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
|
|
@ -141,7 +131,8 @@ function List(props) {
|
||||||
name: "eqType",
|
name: "eqType",
|
||||||
label: "相关方类型",
|
label: "相关方类型",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: ENTERPRISE_TYPE,
|
items: tenantTypeConfigList,
|
||||||
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// name: "cityRecord",
|
// name: "cityRecord",
|
||||||
|
|
@ -212,7 +203,9 @@ function List(props) {
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
getLabelName({
|
getLabelName({
|
||||||
status: record.type,
|
status: record.type,
|
||||||
list: ENTERPRISE_TYPE,
|
list: tenantTypeConfigList,
|
||||||
|
idKey: "code",
|
||||||
|
nameKey: "tenantTypeName",
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
@ -299,7 +292,7 @@ function List(props) {
|
||||||
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
requestChangeCompanyName={props["corpInfoChangeCompanyName"]}
|
||||||
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
requestCorplnfoCheckCorpcode={props["corplnfoCheckCorpcode"]}
|
||||||
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
requestCorplnfoCheckCorpName={props["corplnfoCheckCorpName"]}
|
||||||
tenantTypeConfigList={props["tenantTypeConfigList"]}
|
tenantTypeConfigList={tenantTypeConfigList}
|
||||||
loding={props.enterprise.userLoading}
|
loding={props.enterprise.userLoading}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setAddModalOpen(false);
|
setAddModalOpen(false);
|
||||||
|
|
@ -314,24 +307,9 @@ function AddModalComponent(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [codeValue, setCodeValue] = useState("");
|
const [codeValue, setCodeValue] = useState("");
|
||||||
const [corpNameValue, setCorpNameValue] = useState("");
|
const [corpNameValue, setCorpNameValue] = useState("");
|
||||||
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
|
||||||
const debouncedCode = useDebounce(codeValue, 600);
|
const debouncedCode = useDebounce(codeValue, 600);
|
||||||
const debouncedCorpName = useDebounce(corpNameValue, 600);
|
const debouncedCorpName = useDebounce(corpNameValue, 600);
|
||||||
// const [selectfromData, setSelectfromData] = useState([]);
|
// const [selectfromData, setSelectfromData] = useState([]);
|
||||||
|
|
||||||
const getTenantTypeConfigList = async () => {
|
|
||||||
let menuId = "";
|
|
||||||
if (window.__IN_BASE__) {
|
|
||||||
const res = await window.base.call.getMenuInfoByPath({ path: window.location.pathname });
|
|
||||||
menuId = res?.[0].menuCode;
|
|
||||||
}
|
|
||||||
const { data } = await props.tenantTypeConfigList({ menuId, pageIndex: 1, pageSize: 9999 });
|
|
||||||
setTenantTypeConfigList(data);
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
getTenantTypeConfigList();
|
|
||||||
}, []);
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (props.currentId) {
|
if (props.currentId) {
|
||||||
props
|
props
|
||||||
|
|
@ -496,7 +474,7 @@ function AddModalComponent(props) {
|
||||||
name: "type",
|
name: "type",
|
||||||
label: "相关方类型",
|
label: "相关方类型",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: tenantTypeConfigList,
|
items: props.tenantTypeConfigList,
|
||||||
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
componentProps: {
|
componentProps: {
|
||||||
disabled: props.currentId,
|
disabled: props.currentId,
|
||||||
|
|
@ -531,4 +509,4 @@ function AddModalComponent(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const AddModal = AddModalComponent;
|
const AddModal = AddModalComponent;
|
||||||
export default Connect([NS_ENTERPRISE], true)(Permission(List));
|
export default Connect([NS_ENTERPRISE, NS_GLOBAL], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -9,25 +9,13 @@ import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
|
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE, NS_GLOBAL } from "~/enumerate/namespace";
|
||||||
|
import { getTenantTypeConfigList } from "~/utils";
|
||||||
// import { getAreaNamePath, getCorpTypeNamePath } from "~/utils";
|
// import { getAreaNamePath, getCorpTypeNamePath } from "~/utils";
|
||||||
|
|
||||||
const ENTERPRISE_TYPE = [
|
|
||||||
{
|
|
||||||
bianma: 3,
|
|
||||||
name: "普通企业",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 4,
|
|
||||||
name: "货主单位",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
bianma: 5,
|
|
||||||
name: "驻港单位",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
function View(props) {
|
function View(props) {
|
||||||
const [info, setInfo] = useState({});
|
const [info, setInfo] = useState({});
|
||||||
|
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { loading: getFileLoading, getFile } = useGetFile();
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
const [corpInfoQrCodeOpen, setCorpInfoQrCodeOpen] = useState(false);
|
const [corpInfoQrCodeOpen, setCorpInfoQrCodeOpen] = useState(false);
|
||||||
|
|
@ -62,6 +50,12 @@ function View(props) {
|
||||||
};
|
};
|
||||||
fetchData();
|
fetchData();
|
||||||
}, []);
|
}, []);
|
||||||
|
useEffect(() => {
|
||||||
|
getTenantTypeConfigList({
|
||||||
|
request: props.tenantTypeConfigList,
|
||||||
|
menuPath: "/basicInfo/container/supervision/stakeholderUnit/accountManage/list",
|
||||||
|
}).then(setTenantTypeConfigList);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const handleOk = async () => {
|
const handleOk = async () => {
|
||||||
const values = await form.validateFields();
|
const values = await form.validateFields();
|
||||||
|
|
@ -222,7 +216,9 @@ function View(props) {
|
||||||
label: "相关方类型",
|
label: "相关方类型",
|
||||||
children: getLabelName({
|
children: getLabelName({
|
||||||
status: info.type,
|
status: info.type,
|
||||||
list: ENTERPRISE_TYPE,
|
list: tenantTypeConfigList,
|
||||||
|
idKey: "code",
|
||||||
|
nameKey: "tenantTypeName",
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -365,4 +361,4 @@ const CorpInfoQrCode = (props) => {
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default Connect([NS_ENTERPRISE], true)(View);
|
export default Connect([NS_ENTERPRISE, NS_GLOBAL], true)(View);
|
||||||
|
|
|
||||||
|
|
@ -2,24 +2,18 @@ import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Form, Space } from "antd";
|
import { Button, Form, Space } from "antd";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import AreaSelect from "zy-react-library/components/SelectTree/Area";
|
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
|
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
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 { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_ENTERPRISE } from "~/enumerate/namespace";
|
import { NS_ENTERPRISE, NS_GLOBAL } from "~/enumerate/namespace";
|
||||||
import { getAreaNamePath } from "~/utils";
|
import { getTenantTypeConfigList } from "~/utils";
|
||||||
|
|
||||||
// import { getLabelName } from "zy-react-library/utils";
|
// import { getLabelName } from "zy-react-library/utils";
|
||||||
|
|
||||||
const ENTERPRISE_TYPE = [
|
|
||||||
{ bianma: 3, name: "普通企业" },
|
|
||||||
{ bianma: 4, name: "货主单位" },
|
|
||||||
{ bianma: 5, name: "驻港单位" },
|
|
||||||
];
|
|
||||||
// const ENTERPRISE_STATUS = [
|
// const ENTERPRISE_STATUS = [
|
||||||
// { bianma: "filialstate01", name: "在产" },
|
// { bianma: "filialstate01", name: "在产" },
|
||||||
// { bianma: "filialstate02", name: "在建" },
|
// { bianma: "filialstate02", name: "在建" },
|
||||||
|
|
@ -30,6 +24,7 @@ const ENTERPRISE_TYPE = [
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
const [tenantTypeConfigList, setTenantTypeConfigList] = useState([]);
|
||||||
// const [cityData, setCityData] = useState([]);
|
// const [cityData, setCityData] = useState([]);
|
||||||
const { tableProps, getData } = useTable(props["corpUserMiddlePage"], {
|
const { tableProps, getData } = useTable(props["corpUserMiddlePage"], {
|
||||||
form,
|
form,
|
||||||
|
|
@ -45,6 +40,9 @@ function List(props) {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
useEffect(() => {
|
||||||
|
getTenantTypeConfigList({ request: props.tenantTypeConfigList }).then(setTenantTypeConfigList);
|
||||||
|
}, []);
|
||||||
// const onFinish = async () => {
|
// const onFinish = async () => {
|
||||||
// // 处理属地查询
|
// // 处理属地查询
|
||||||
// const arr = [];
|
// const arr = [];
|
||||||
|
|
@ -85,7 +83,13 @@ function List(props) {
|
||||||
// />
|
// />
|
||||||
// ),
|
// ),
|
||||||
// },
|
// },
|
||||||
{ name: "eqType", label: "相关方类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: ENTERPRISE_TYPE },
|
{
|
||||||
|
name: "eqType",
|
||||||
|
label: "相关方类型",
|
||||||
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
|
items: tenantTypeConfigList,
|
||||||
|
itemsField: { labelKey: "tenantTypeName", valueKey: "code" },
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// name: "cityRecord",
|
// name: "cityRecord",
|
||||||
// label: "属地",
|
// label: "属地",
|
||||||
|
|
@ -107,7 +111,9 @@ function List(props) {
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
getLabelName({
|
getLabelName({
|
||||||
status: record.type,
|
status: record.type,
|
||||||
list: ENTERPRISE_TYPE,
|
list: tenantTypeConfigList,
|
||||||
|
idKey: "code",
|
||||||
|
nameKey: "tenantTypeName",
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
width: 120,
|
width: 120,
|
||||||
|
|
@ -169,4 +175,4 @@ function List(props) {
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default Connect([NS_ENTERPRISE], true)(Permission(List));
|
export default Connect([NS_ENTERPRISE, NS_GLOBAL], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ export function isValidChineseIdCardFormat(idCard) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const value = idCard.trim();
|
const value = idCard.trim();
|
||||||
const pattern = /^[1-9][0-9]{5}(18|19|20)[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])[0-9]{3}[0-9Xx]$/;
|
const pattern = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[0-9X]$/i;
|
||||||
|
|
||||||
if (!pattern.test(value)) {
|
if (!pattern.test(value)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -57,7 +57,7 @@ export function getChineseIdCardInputErrorMessage(idCard) {
|
||||||
|
|
||||||
const value = idCard.trim();
|
const value = idCard.trim();
|
||||||
|
|
||||||
if (!/^[0-9Xx]*$/.test(value)) {
|
if (!/^[0-9X]*$/i.test(value)) {
|
||||||
return "身份证号只能输入数字或X";
|
return "身份证号只能输入数字或X";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -206,6 +206,22 @@ export function useDebounce(value, delay = 500) {
|
||||||
}, [value, delay]);
|
}, [value, delay]);
|
||||||
return debouncedValue;
|
return debouncedValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据菜单路由获取当前租户配置的企业类型列表。
|
||||||
|
* 子页面需要传入实际菜单入口路由,避免使用非菜单路由查询不到 menuId。
|
||||||
|
*/
|
||||||
|
export async function getTenantTypeConfigList({ request, menuPath = window.location.pathname }) {
|
||||||
|
let menuId = "";
|
||||||
|
|
||||||
|
if (window.__IN_BASE__) {
|
||||||
|
const menuInfo = await window.base.call.getMenuInfoByPath({ path: menuPath });
|
||||||
|
menuId = menuInfo?.[0]?.menuCode || "";
|
||||||
|
}
|
||||||
|
|
||||||
|
const res = await request({ menuId, pageIndex: 1, pageSize: 9999 });
|
||||||
|
return Array.isArray(res?.data) ? res.data : [];
|
||||||
|
}
|
||||||
// 手机号脱敏
|
// 手机号脱敏
|
||||||
export function maskPhone(phone) {
|
export function maskPhone(phone) {
|
||||||
if (!phone)
|
if (!phone)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue