From c3480a0a4a1379de0fb0b6d72e60ee21fea8800f Mon Sep 17 00:00:00 2001 From: sunqh <253801736@qq.com> Date: Wed, 28 Jan 2026 11:45:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BC=81=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../List/components/CompanyEditModal.tsx | 34 +++++++++++++++++-- src/pages/Company/List/index.tsx | 28 +++++++++++---- src/pages/User/List/index.tsx | 2 +- src/services/CompanyServices.ts | 1 + 4 files changed, 54 insertions(+), 11 deletions(-) diff --git a/src/pages/Company/List/components/CompanyEditModal.tsx b/src/pages/Company/List/components/CompanyEditModal.tsx index 1ba6f86..d50c25c 100644 --- a/src/pages/Company/List/components/CompanyEditModal.tsx +++ b/src/pages/Company/List/components/CompanyEditModal.tsx @@ -35,7 +35,7 @@ export const CompanyEditModal: React.FC = (props) => { } }; - //const { loading: addLoading, request: addRequest } = useRequest(CompanyServices.add, { onSuccess: success }); + const { loading: addLoading, request: addRequest } = useRequest(CompanyServices.add, { onSuccess: success }); const { loading: editLoading, request: editRequest } = useRequest(CompanyServices.edit, { onSuccess: success }); const save = async () => { @@ -52,7 +52,7 @@ export const CompanyEditModal: React.FC = (props) => { values.company_id = data.company_id; editRequest(stringify(values)); } else { - //addRequest(stringify(values)); + addRequest(stringify(values)); } } catch (error) { console.log('表单验证未通过', error); @@ -76,6 +76,9 @@ export const CompanyEditModal: React.FC = (props) => { }); } else { form.resetFields(); + form.setFieldsValue({ + company_state: '1', + }); } }, })); @@ -89,7 +92,7 @@ export const CompanyEditModal: React.FC = (props) => { , - , ]} @@ -108,6 +111,31 @@ export const CompanyEditModal: React.FC = (props) => { + {!data?.company_id && ( + <> + + + + + + + + + )} { */} - + + + {auth.SF_ADMIN_COMPANY_ADD && ( + + )} + + + { - {auth.SF_ADMIN_USER_ADD && ( + {auth.SF_ADMIN_USER_ADD_FALSE && (