|
@@ -33,7 +33,8 @@ const Staff: React.FC<ListProps> = ({ schema, dataID, dispatch, accountTypeList
|
|
}, [])
|
|
}, [])
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
params: {
|
|
params: {
|
|
- search: null
|
|
|
|
|
|
+ search: null,
|
|
|
|
+ accountType: '1'
|
|
},
|
|
},
|
|
visible: false,
|
|
visible: false,
|
|
currentModalType: ModalType.ADD,
|
|
currentModalType: ModalType.ADD,
|
|
@@ -78,7 +79,8 @@ const Staff: React.FC<ListProps> = ({ schema, dataID, dispatch, accountTypeList
|
|
visible: true,
|
|
visible: true,
|
|
currentModalType: ModalType.UPDATE,
|
|
currentModalType: ModalType.UPDATE,
|
|
defaultFormData: {
|
|
defaultFormData: {
|
|
- // ...record,
|
|
|
|
|
|
+ ...record,
|
|
|
|
+ institution: null,
|
|
institutionID: record.ID,
|
|
institutionID: record.ID,
|
|
accountType: record.accountType,
|
|
accountType: record.accountType,
|
|
dataID: record.institution.ID
|
|
dataID: record.institution.ID
|
|
@@ -129,7 +131,7 @@ const Staff: React.FC<ListProps> = ({ schema, dataID, dispatch, accountTypeList
|
|
visible={state.visible}
|
|
visible={state.visible}
|
|
setVisible={(visible: boolean) => setState({ ...state, visible })}
|
|
setVisible={(visible: boolean) => setState({ ...state, visible })}
|
|
type={state.currentModalType}
|
|
type={state.currentModalType}
|
|
- defaultFormData={state.defaultFormData}
|
|
|
|
|
|
+ defaultFormData={{ ...state.defaultFormData, dataID }}
|
|
accountTypeList={accountTypeList}
|
|
accountTypeList={accountTypeList}
|
|
reload={() => tRef.current?.reload()}
|
|
reload={() => tRef.current?.reload()}
|
|
/>
|
|
/>
|