diff --git a/web/src/views/user-management/user-list/UserDetailModal.vue b/web/src/views/user-management/user-list/UserDetailModal.vue index 582aa65..653d7de 100644 --- a/web/src/views/user-management/user-list/UserDetailModal.vue +++ b/web/src/views/user-management/user-list/UserDetailModal.vue @@ -34,6 +34,12 @@ const logPagination = ref({ itemCount: 0, }) +const invoicePagination = ref({ + page: 1, + pageSize: 5, + itemCount: 0, +}) + const invoiceColumns = [ { title: '公司名称', key: 'company_name', ellipsis: { tooltip: true } }, { title: '公司税号', key: 'tax_number', ellipsis: { tooltip: true } }, @@ -100,6 +106,7 @@ watch( invoiceList.value = [] logList.value = [] logPagination.value.page = 1 + invoicePagination.value.page = 1 } } ) @@ -117,12 +124,13 @@ watch(activeTab, (tab) => { async function fetchInvoices() { invoiceLoading.value = true try { - const { data = [] } = await api.getInvoiceHeaders({ + const { data = [], total = 0 } = await api.getInvoiceHeaders({ user_id: props.baseInfo.id, - page: 1, - page_size: 100 + page: invoicePagination.value.page, + page_size: invoicePagination.value.pageSize }) invoiceList.value = data + invoicePagination.value.itemCount = total } catch (error) { message.error(error?.message || '获取发票抬头失败') } finally { @@ -130,6 +138,11 @@ async function fetchInvoices() { } } +function handleInvoicePageChange(page) { + invoicePagination.value.page = page + fetchInvoices() +} + async function fetchLogs() { logLoading.value = true try { @@ -202,9 +215,11 @@ function handleClose() { class="section-table" :columns="invoiceColumns" :data="invoiceList" - :pagination="false" + :pagination="invoicePagination" + :remote="true" :bordered="false" :single-line="false" + @update:page="handleInvoicePageChange" >