13075 未做限制,应该里边的数据删除后才可以删除外边的。

2024年1月19日V01.00.51
liujun 2024-01-04 10:56:23 +08:00
parent ba894bd4f3
commit c6bacc5cff
1 changed files with 28 additions and 9 deletions

View File

@ -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&currentPage=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(() => {})
}