修改 83406,标准跟踪清单--流程下发后--不允许删除

This commit is contained in:
baoyu
2024-04-10 11:01:45 +08:00
parent 39b5b303e3
commit 41d4c1482b
@@ -275,6 +275,7 @@ export default {
processDistributionForm,
processDistributionRules,
processDistributionLoading: false,
selectedListDel: []
}
},
created () {
@@ -310,8 +311,10 @@ export default {
},
selectionChange (data) {
this.selectedList = []
this.selectedListDel = []
for (let i = 0; i < data.length; i++) {
this.selectedList.push(data[i].id)
this.selectedListDel.push( { id: data[i].id, processStatus: data[i].processStatus } )
}
},
sortChange ({ column, prop, order }) {
@@ -374,7 +377,19 @@ export default {
this.$message.warning('请选择要删除的数据')
return
}
const ids = this.selectedList.join(',')
let ids = []
let underWayFlag = false
this.selectedListDel.forEach(item => {
if (item.processStatus === 1) {
underWayFlag = true
}
ids.push(item.id)
})
if (underWayFlag) {
this.$message.warning('进行中的数据不能删除,请重新选择')
return
}
ids = ids.join(',')
this.$confirm('确认删除这些数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@@ -386,6 +401,8 @@ export default {
if (res.ok) {
this.$message.success('删除成功')
this.getData()
}else {
this.$message.warning(res.message)
}
})
})