diff --git a/src/views/payment/invoice-application.vue b/src/views/payment/invoice-application.vue index 4e7090b..c64e07f 100644 --- a/src/views/payment/invoice-application.vue +++ b/src/views/payment/invoice-application.vue @@ -385,8 +385,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 49ccb72..9980357 100644 --- a/src/views/payment/payment-application.vue +++ b/src/views/payment/payment-application.vue @@ -395,8 +395,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) {