13075 未做限制,应该里边的数据删除后才可以删除外边的。
parent
ba894bd4f3
commit
c6bacc5cff
|
@ -241,18 +241,37 @@ export default {
|
||||||
this.$confirm(`确定要删除当前承诺书吗?`, {
|
this.$confirm(`确定要删除当前承诺书吗?`, {
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: 'Loading',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
})
|
||||||
requestFN(
|
requestFN(
|
||||||
'/corppromise/delete',
|
'/corppromise/peopledetails?showCount=10¤tPage=1',
|
||||||
{
|
{ PROMISE_ID: PROMISE_ID }
|
||||||
PROMISE_ID
|
|
||||||
}
|
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
this.listQuery.limit = this.listQuery.limit
|
if ((!data.varList) || data.varList.length > 0) {
|
||||||
this.listQuery.page = this.listQuery.page
|
this.$message.error('当前承诺书已经被使用,不能删除')
|
||||||
this.$message.success('操作成功')
|
loading.close()
|
||||||
this.getList()
|
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) => {
|
}).catch((e) => {
|
||||||
this.$message.success('操作失败')
|
loading.close()
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue