From 970cbffe008f016ca78c1a585bf7f981bde73d16 Mon Sep 17 00:00:00 2001 From: francis-fh Date: Fri, 24 Jul 2026 13:58:59 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Company/List/edit.tsx | 15 +++++++------ src/pages/Company/List/index.tsx | 34 +++++++++++++++++++++++++++++- src/pages/Management/List/edit.tsx | 11 ++++++++-- src/services/Management/list.ts | 6 ++++++ src/types/Management/list.d.ts | 1 + 5 files changed, 58 insertions(+), 9 deletions(-) diff --git a/src/pages/Company/List/edit.tsx b/src/pages/Company/List/edit.tsx index 0aad5fa..3c4aa34 100644 --- a/src/pages/Company/List/edit.tsx +++ b/src/pages/Company/List/edit.tsx @@ -40,13 +40,15 @@ const ListEdit: React.FC = (props) => { const [form] = Form.useForm(); useEffect(() => { - form.resetFields(); - if (props.values) { - form.setFieldsValue({ - ...props.values, - }); + if (props.open) { + form.resetFields(); + if (props.values) { + form.setFieldsValue({ + ...props.values, + }); + } } - }, [form, props]); + }, [form, props.values?.companyId, props.open]); const handleCancel = () => { props.onCancel(); @@ -55,6 +57,7 @@ const ListEdit: React.FC = (props) => { const handleFinish = async (values: Record) => { await props.onSubmit(values as API.CompanyList.Company); + return true; }; return ( diff --git a/src/pages/Company/List/index.tsx b/src/pages/Company/List/index.tsx index 40ee021..74ce0fd 100644 --- a/src/pages/Company/List/index.tsx +++ b/src/pages/Company/List/index.tsx @@ -146,8 +146,19 @@ function ManagementList() { { title: '公司行业', dataIndex: 'industry', - valueType: 'text', + valueType: 'treeSelect', align: 'center', + fieldProps: { + fieldNames: { label: 'label', value: 'id', children: 'children' }, + treeDefaultExpandAll: false, + showSearch: true, + allowClear: true, + placeholder: '请选择行业', + }, + request: async () => { + const res = await getCmsIndustryTreeList(); + return (res?.data || []) as any; + }, render: (_, record) => { return ; }, @@ -170,6 +181,24 @@ function ManagementList() { valueEnum: companyNatureEnum, render: (_, record) => , }, + { + title: '法定代表人', + dataIndex: 'legalPerson', + valueType: 'text', + align: 'center', + }, + { + title: '联系人', + dataIndex: 'contactPerson', + valueType: 'text', + align: 'center', + }, + { + title: '联系电话', + dataIndex: 'contactPersonPhone', + valueType: 'text', + align: 'center', + }, { title: '公司位置', dataIndex: 'location', @@ -329,6 +358,9 @@ function ManagementList() { }; }) } + search={{ + defaultCollapsed: false, + }} toolBarRender={() => [