diff --git a/src/views/payment/invoice-application.vue b/src/views/payment/invoice-application.vue index 186f7c8..3e16563 100644 --- a/src/views/payment/invoice-application.vue +++ b/src/views/payment/invoice-application.vue @@ -377,8 +377,13 @@ export default { }, async handleApprove(row) { await this.$confirm('确认审批通过该开票申请?', '提示', { type: 'warning' }); - await api.approve({ id: row.id }); - this.$message.success('审批通过'); + 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 || '审批通过'); + } this.loadTable(); }, async handleReturn(row) { diff --git a/src/views/payment/invoice-receipt.vue b/src/views/payment/invoice-receipt.vue index d84cb58..4f75bb0 100644 --- a/src/views/payment/invoice-receipt.vue +++ b/src/views/payment/invoice-receipt.vue @@ -342,8 +342,13 @@ export default { }, async handleApprove(row) { await this.$confirm('确认审批通过该收票登记?', '提示', { type: 'warning' }); - await api.approve({ id: row.id }); - this.$message.success('审批通过'); + 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 || '审批通过'); + } this.loadTable(); }, async handleReturn(row) { diff --git a/src/views/payment/payment-application.vue b/src/views/payment/payment-application.vue index 94b65ad..d592238 100644 --- a/src/views/payment/payment-application.vue +++ b/src/views/payment/payment-application.vue @@ -387,8 +387,13 @@ export default { this.loadTable(); }, async handleApprove(row) { - await api.approve({ id: row.id }); - this.$message.success('审批通过'); + 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 || '审批通过'); + } this.loadTable(); }, handleMkAudit(row) { diff --git a/src/views/settlement/formal-settlement.vue b/src/views/settlement/formal-settlement.vue index 6177649..3330254 100644 --- a/src/views/settlement/formal-settlement.vue +++ b/src/views/settlement/formal-settlement.vue @@ -387,8 +387,13 @@ export default { '提示', { type: 'warning' } ); - await api.approve({ id: row.id }); - this.$message.success('审批通过'); + 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 || '审批通过'); + } this.loadTable(); }, async handleReturn(row) {