From 4199318aa94cbb55c91db1305e51b4a48c397e00 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, 19 Oct 2026 20:08:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B6=E7=A5=A8=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E5=BC=80=E7=A5=A8=E7=AE=A1=E7=90=86/=E6=AD=A3=E5=BC=8F?= =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=8D=95/=E9=A2=84=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E5=8D=95/=E7=BB=93=E7=AE=97=E8=B0=83=E6=95=B4=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E6=8C=89=E9=92=AE=E5=A2=9E=E5=8A=A0=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E9=81=AE=E7=BD=A9=E9=98=B2=E9=87=8D=E5=A4=8D=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/payment/invoice-application.vue | 21 ++++++++++++------- src/views/payment/invoice-receipt.vue | 21 ++++++++++++------- src/views/settlement/formal-settlement.vue | 21 ++++++++++++------- src/views/settlement/pre-settlement.vue | 13 +++++++++--- .../settlement/settlement-adjustment.vue | 17 ++++++++++----- 5 files changed, 64 insertions(+), 29 deletions(-) diff --git a/src/views/payment/invoice-application.vue b/src/views/payment/invoice-application.vue index 969c41a..ea66bd8 100644 --- a/src/views/payment/invoice-application.vue +++ b/src/views/payment/invoice-application.vue @@ -409,14 +409,21 @@ export default { }, async handleApprove(row) { await this.$confirm('确认审批通过该开票申请?', '提示', { type: 'warning' }); - const res = await api.approve({ id: row.id }); - // data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因 - if (res.data.data === false) { - this.$message.warning(res.data.msg); - } else { - this.$message.success(res.data.msg || '审批通过'); + // 防止重复点击:请求期间表格遮罩,后续点击直接忽略 + if (this.loading) return; + this.loading = true; + try { + const res = await api.approve({ id: row.id }); + // data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因 + if (res.data.data === false) { + this.$message.warning(res.data.msg); + } else { + this.$message.success(res.data.msg || '审批通过'); + } + await this.loadTable(); + } finally { + this.loading = false; } - this.loadTable(); }, async handleReturn(row) { const { value } = await this.$prompt('请输入驳回原因', '审批驳回'); diff --git a/src/views/payment/invoice-receipt.vue b/src/views/payment/invoice-receipt.vue index 8710449..a6a2af8 100644 --- a/src/views/payment/invoice-receipt.vue +++ b/src/views/payment/invoice-receipt.vue @@ -366,14 +366,21 @@ export default { }, async handleApprove(row) { await this.$confirm('确认审批通过该收票登记?', '提示', { type: 'warning' }); - const res = await api.approve({ id: row.id }); - // data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因 - if (res.data.data === false) { - this.$message.warning(res.data.msg); - } else { - this.$message.success(res.data.msg || '审批通过'); + // 防止重复点击:请求期间表格遮罩,后续点击直接忽略 + if (this.loading) return; + this.loading = true; + try { + const res = await api.approve({ id: row.id }); + // data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因 + if (res.data.data === false) { + this.$message.warning(res.data.msg); + } else { + this.$message.success(res.data.msg || '审批通过'); + } + await this.loadTable(); + } finally { + this.loading = false; } - this.loadTable(); }, async handleReturn(row) { const { value } = await this.$prompt('请输入驳回原因', '审批驳回'); diff --git a/src/views/settlement/formal-settlement.vue b/src/views/settlement/formal-settlement.vue index 1033caa..fd35e62 100644 --- a/src/views/settlement/formal-settlement.vue +++ b/src/views/settlement/formal-settlement.vue @@ -458,14 +458,21 @@ export default { '提示', { type: 'warning' } ); - const res = await api.approve({ id: row.id }); - // data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因 - if (res.data.data === false) { - this.$message.warning(res.data.msg); - } else { - this.$message.success(res.data.msg || '审批通过'); + // 防止重复点击:请求期间表格遮罩,后续点击直接忽略 + if (this.loading) return; + this.loading = true; + try { + const res = await api.approve({ id: row.id }); + // data=false 表示审批已通过但自动同步金蝶失败,msg 带具体原因 + if (res.data.data === false) { + this.$message.warning(res.data.msg); + } else { + this.$message.success(res.data.msg || '审批通过'); + } + await this.loadTable(); + } finally { + this.loading = false; } - this.loadTable(); }, async handleReturn(row) { const { value } = await this.$prompt('请输入驳回原因', '审批驳回', { diff --git a/src/views/settlement/pre-settlement.vue b/src/views/settlement/pre-settlement.vue index dda0871..a7adbb5 100644 --- a/src/views/settlement/pre-settlement.vue +++ b/src/views/settlement/pre-settlement.vue @@ -692,9 +692,16 @@ export default { }, async handleApprove(row) { await this.$confirm('确认审批通过该预付结算单?', '提示', { type: 'warning' }); - await approve({ id: row.id }); - this.$message.success('审批通过'); - this.loadTable(); + // 防止重复点击:请求期间表格遮罩,后续点击直接忽略 + if (this.loading) return; + this.loading = true; + try { + await approve({ id: row.id }); + this.$message.success('审批通过'); + await this.loadTable(); + } finally { + this.loading = false; + } }, async handleReturn(row) { const { value } = await this.$prompt('请输入驳回原因', '审批驳回', { diff --git a/src/views/settlement/settlement-adjustment.vue b/src/views/settlement/settlement-adjustment.vue index 629f8c1..3d99e0c 100644 --- a/src/views/settlement/settlement-adjustment.vue +++ b/src/views/settlement/settlement-adjustment.vue @@ -317,11 +317,18 @@ export default { }, async handleApprove(row) { await this.$confirm('审批通过后将更新关联正式结算单,确认继续?', '提示'); - const res = await api.approve(row.id); - // data=false:自动同步金蝶失败;data=true 且 msg 带已推送场景的手工冲销提示 - if (res.data.data === true || res.data.data === false) this.$message.warning(res.data.msg); - else this.$message.success(res.data.msg || '审批通过'); - this.loadTable(); + // 防止重复点击:请求期间表格遮罩,后续点击直接忽略 + if (this.loading) return; + this.loading = true; + try { + const res = await api.approve(row.id); + // data=false:自动同步金蝶失败;data=true 且 msg 带已推送场景的手工冲销提示 + if (res.data.data === true || res.data.data === false) this.$message.warning(res.data.msg); + else this.$message.success(res.data.msg || '审批通过'); + await this.loadTable(); + } finally { + this.loading = false; + } }, async handleReturn(row) { const { value } = await this.$prompt('请输入驳回原因', '驳回', {