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