|
@@ -49,6 +49,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
|
|
|
search: null,
|
|
|
institutionID: null
|
|
|
},
|
|
|
+ title: '',
|
|
|
visible: false,
|
|
|
currentModalType: ModalType.ADD,
|
|
|
defaultFormData: {}
|
|
@@ -67,6 +68,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
|
|
|
...state,
|
|
|
visible: true,
|
|
|
currentModalType: ModalType.PREVIEW,
|
|
|
+ title: record.name,
|
|
|
defaultFormData: {
|
|
|
dataID: record.ID,
|
|
|
institutionID: record.institution.ID,
|
|
@@ -148,6 +150,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
|
|
|
...state,
|
|
|
visible: true,
|
|
|
currentModalType: ModalType.UPDATE,
|
|
|
+ title: record.name,
|
|
|
defaultFormData: {
|
|
|
dataID: record.ID,
|
|
|
institutionID: record.institution.ID,
|
|
@@ -205,6 +208,7 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
|
|
|
...state,
|
|
|
visible: true,
|
|
|
currentModalType: ModalType.ADD,
|
|
|
+ title: '',
|
|
|
defaultFormData: {
|
|
|
...state.defaultFormData,
|
|
|
dataID: null,
|
|
@@ -224,8 +228,8 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
|
|
|
title={
|
|
|
<>
|
|
|
{state.currentModalType === ModalType.ADD ? '新增账号' : null}
|
|
|
- {state.currentModalType === ModalType.UPDATE ? '编辑账号' : null}
|
|
|
- {state.currentModalType === ModalType.PREVIEW ? '员工详情' : null}
|
|
|
+ {state.currentModalType === ModalType.UPDATE ? `编辑账号(${state.title})` : null}
|
|
|
+ {state.currentModalType === ModalType.PREVIEW ? `员工详情(${state.title})` : null}
|
|
|
</>
|
|
|
}
|
|
|
visible={state.visible}
|