From c6bacc5cff243ce2bf10295b55331af78ae14c19 Mon Sep 17 00:00:00 2001 From: liujun Date: Thu, 4 Jan 2024 10:56:23 +0800 Subject: [PATCH] =?UTF-8?q?13075=20=E6=9C=AA=E5=81=9A=E9=99=90=E5=88=B6?= =?UTF-8?q?=EF=BC=8C=E5=BA=94=E8=AF=A5=E9=87=8C=E8=BE=B9=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=88=A0=E9=99=A4=E5=90=8E=E6=89=8D=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=96=E8=BE=B9=E7=9A=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promise_book/components/list.vue | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/src/views/security_commitment/promise_book/components/list.vue b/src/views/security_commitment/promise_book/components/list.vue index 1c80b01..97b0068 100644 --- a/src/views/security_commitment/promise_book/components/list.vue +++ b/src/views/security_commitment/promise_book/components/list.vue @@ -241,18 +241,37 @@ export default { this.$confirm(`确定要删除当前承诺书吗?`, { type: 'warning' }).then(() => { + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) requestFN( - '/corppromise/delete', - { - PROMISE_ID - } + '/corppromise/peopledetails?showCount=10¤tPage=1', + { PROMISE_ID: PROMISE_ID } ).then((data) => { - this.listQuery.limit = this.listQuery.limit - this.listQuery.page = this.listQuery.page - this.$message.success('操作成功') - this.getList() + if ((!data.varList) || data.varList.length > 0) { + this.$message.error('当前承诺书已经被使用,不能删除') + loading.close() + return + } + requestFN( + '/corppromise/delete', + { + PROMISE_ID + } + ).then((data) => { + this.listQuery.limit = this.listQuery.limit + this.listQuery.page = this.listQuery.page + this.$message.success('操作成功') + this.getList() + }).catch((e) => { + this.$message.success('操作失败') + }) + loading.close() }).catch((e) => { - this.$message.success('操作失败') + loading.close() }) }).catch(() => {}) }