From 5a6b804b09a00ef3d296702453274f654cf5aad4 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期四, 10 七月 2025 14:25:29 +0800
Subject: [PATCH] fix: 修复来票登记,关闭展开栏的报错
---
src/views/procurementManagement/invoiceEntry/index.vue | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/views/procurementManagement/invoiceEntry/index.vue b/src/views/procurementManagement/invoiceEntry/index.vue
index c8ece35..191813c 100644
--- a/src/views/procurementManagement/invoiceEntry/index.vue
+++ b/src/views/procurementManagement/invoiceEntry/index.vue
@@ -42,7 +42,7 @@
:expand-row-keys="expandRowKeys"
@expand-change="expandChange"
@selection-change="handleSelectionChange"
- @pagination="onCurrentChange"
+ @pagination="changePage"
>
<template #expand="{ row }">
<ExpandTable ref="expandTableRef" />
@@ -178,8 +178,15 @@
const handleDelete = () => {};
const expandChange = async (row, expandedRows) => {
- await nextTick();
- expandTableRef.value.getList(row.id);
+ if (expandedRows.length > 0) {
+ await nextTick();
+ expandTableRef.value.getList(row.id);
+ }
+};
+
+const changePage = ({ page }) => {
+ pagination.currentPage = page;
+ onCurrentChange(page);
};
onMounted(() => {
--
Gitblit v1.9.3