更新部分功能

This commit is contained in:
孙景学
2025-07-03 10:24:33 +08:00
parent cf8e9d0820
commit e15c97d741
26 changed files with 199 additions and 114 deletions

View File

@ -15,8 +15,12 @@ interface Contact {
email: string;
updateTime: string;
}
const ContactsInfoTab: React.FC = () => {
interface Props {
viewType?: boolean;
record?: string;
}
const ContactsInfoTab: React.FC<Props> = (props) => {
const { viewType = false, record = '' } = props;
const intl = useIntl();
const [data, setData] = useState<Contact[]>([]);
const [pagination, setPagination] = useState<TablePaginationConfig>({
@ -28,28 +32,11 @@ const ContactsInfoTab: React.FC = () => {
const fetchContacts = async (page: number = 1, pageSize: number = 10) => {
coscoSupplierBase().then((res) => {
coscoSupplierBase(record).then((res) => {
if(res.code == 200) {
setData([res.data.coscoSupplierBase])
}
})
// setLoading(true);
// try {
// const res = await coscoSupplier(page);
// if (res.code === 200) {
// setData(res.contacts || []);
// setPagination({
// current: page,
// pageSize,
// total: res.totalContacts || (res.contacts?.length || 0),
// });
// }
// } finally {
// setLoading(false);
// }
};
useEffect(() => {