From 9e821e1bd26a9c3a6619cd828c099ae2b3ab1684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wei=5F=E4=BD=B3?= Date: Mon, 24 Nov 2025 16:40:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=A8=A1=E6=80=81=E6=A1=86=E5=8F=91=E7=A5=A8=E6=8A=AC=E5=A4=B4?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=96=B0=E5=A2=9E=E5=88=86=E9=A1=B5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user-list/UserDetailModal.vue | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) 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" >