diff --git a/src/pages/Container/BranchCompany/Qualification/Apply/Add/index.js b/src/pages/Container/BranchCompany/Qualification/Apply/Add/index.js index f8fa506..046e63c 100644 --- a/src/pages/Container/BranchCompany/Qualification/Apply/Add/index.js +++ b/src/pages/Container/BranchCompany/Qualification/Apply/Add/index.js @@ -121,20 +121,28 @@ const StepOneComponent = (props) => { setQualificationsListAll(data); }; - const getCorpInfoList = async (type) => { - const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, eqType: type || 1 }); + const getCorpInfoList = async (type, exCludeSelf) => { + const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, eqType: type || 1, exCludeSelf: exCludeSelf || 1 }); setCorpInfoList(data); }; useEffect(() => { - getCorpInfoList(1); + getCorpInfoList(1,0); form.setFieldsValue(props.formValues); }, []); useEffect(() => { - if (qualificationsTypeId && stakeholderLevel) + if (qualificationsTypeId && stakeholderLevel) { + if (stakeholderLevel === 'two-level') { + getCorpInfoList(1,1); + }else { + getCorpInfoList(1,0); + } getQualificationsListAll(); - else setQualificationsListAll([]); + } + else { + setQualificationsListAll([]); + } }, [qualificationsTypeId, stakeholderLevel]); useEffect(() => {