From f5735e6bad1da531bd4814e2b55c6c95905ed970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B3=89=E4=BD=B3?= <1107186916@qq.com> Date: Mon, 2 Nov 2026 16:36:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B6=E7=A5=A8=E7=99=BB=E8=AE=B0?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=BF=94=E5=9B=9E=E5=88=97=E8=A1=A8=E5=90=8E?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E5=88=97=E8=A1=A8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/payment/invoice-receipt-form.vue | 4 ++++ src/views/payment/invoice-receipt.vue | 25 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/views/payment/invoice-receipt-form.vue b/src/views/payment/invoice-receipt-form.vue index fe6d8b8..b9e6538 100644 --- a/src/views/payment/invoice-receipt-form.vue +++ b/src/views/payment/invoice-receipt-form.vue @@ -227,6 +227,9 @@ import VehicleAttachmentTable from '@/components/vehicle-attachment-table/main.v import { getMkPublicDetail } from '@/api/mk-process'; import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval'; +// 提交成功后带标记返回,列表页(keep-alive)据此重新拉取 +const invoiceReceiptListRefreshKey = 'invoice-receipt-list-refresh'; + const emptyForm = () => ({ id: null, invoiceNo: '', @@ -555,6 +558,7 @@ export default { mkEnabled: await loadMkEnabled().catch(() => false), }); this.$message.success('提交成功'); + sessionStorage.setItem(invoiceReceiptListRefreshKey, '1'); this.goBack(); }, async syncReferenceData() { diff --git a/src/views/payment/invoice-receipt.vue b/src/views/payment/invoice-receipt.vue index aed1115..0a15cd8 100644 --- a/src/views/payment/invoice-receipt.vue +++ b/src/views/payment/invoice-receipt.vue @@ -223,6 +223,10 @@ import organizationSearch from '@/mixins/organization-search'; import { getMKApprovalUrl } from '@/api/system/business-process'; import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval'; +// 表单提交成功后带标记返回,keep-alive 缓存的列表页据此重新拉取 +const invoiceReceiptListRefreshKey = 'invoice-receipt-list-refresh'; +const invoiceReceiptListRoute = '/payment/invoice-receipt'; + const emptyQuery = () => ({ invoiceNo: '', invoiceDate: '', @@ -281,7 +285,28 @@ export default { this.mkEnabled = false; }); }, + activated() { + this.consumeListRefreshFlag(); + }, + watch: { + $route(to, from) { + if ( + to.path === invoiceReceiptListRoute && + from?.path?.includes('/invoice-receipt/form') + ) { + this.consumeListRefreshFlag(); + } + }, + }, methods: { + /** 表单提交成功后带标记返回时,重新拉取列表 */ + consumeListRefreshFlag() { + if (!sessionStorage.getItem(invoiceReceiptListRefreshKey)) { + return; + } + sessionStorage.removeItem(invoiceReceiptListRefreshKey); + this.loadTable(); + }, hasPermission(code) { return this.permission?.[code] !== false; },