update 表格删除增加提示、稽查流程完善

This commit is contained in:
danshihao
2024-01-23 11:35:05 +08:00
parent 05f60ca800
commit 0f79ee5422
8 changed files with 29 additions and 1 deletions
@@ -168,6 +168,8 @@ export default {
if (this.ipagination.current > 1 && ((this.ipagination.current - 1) * this.ipagination.pageSize) + 1 === this.ipagination.total) {
this.ipagination.current -= 1
}
this.onClearSelected()
this.$message.success(this.$t('operationSuccessful'))
}
})
},
@@ -219,6 +219,8 @@ export default {
if (this.ipagination.current > 1 && ((this.ipagination.current - 1) * this.ipagination.pageSize) + 1 === this.ipagination.total) {
this.ipagination.current -= 1
}
this.onClearSelected()
this.$message.success(this.$t('operationSuccessful'))
}
})
},
@@ -247,6 +247,11 @@ export default {
handleOk () {
this.$refs.form.validate(valid => {
if (valid) {
// 如果没有稽查报告id,就提示
if (!this.form.inspectReportId) {
this.$message.warning(this.$t('workCenter.esInspectionProcess.noInspectionReportAvailable'))
return
}
const params = Object.assign({}, this.model, this.form)
if (!params.processEsInspectId) {
params.processEsInspectId = this.data.id
@@ -358,7 +363,11 @@ export default {
const contentList = this.data.enterpriseStandardInspectContentList || []
const reportList = this.data.enterpriseStandardInspectReportList || []
const content = contentList.find(item => item.id === val) || {}
const report = reportList.find(item => item.inspectContentId === val) || {}
const report = reportList.find(item => item.inspectContentId === val) || {
inspectContentId: content.id,
baseClause: content.clause,
standardRequire: content.requirement
}
this.form.inspectReportId = report.id
this.form.standardRequire = content.requirement
this.form.executionStatus = report.executionStatus
@@ -194,6 +194,12 @@ export default {
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
// 如果整改计划已经关联,那就不可以删除该稽查报告
const rectifyPlanList = this.model.enterpriseStandardInspectRectifyPlanList
if (rectifyPlanList && rectifyPlanList.some(item => item.inspectReportId === this.dataSource[index].id)) {
this.$message.warning(this.$t('workCenter.esInspectionProcess.contentLinkRectificationPlan'))
return
}
if (this.dataSource[index].id) {
this.delIds.push(this.dataSource[index].id)
}
@@ -202,6 +208,8 @@ export default {
if (this.ipagination.current > 1 && ((this.ipagination.current - 1) * this.ipagination.pageSize) + 1 === this.ipagination.total) {
this.ipagination.current -= 1
}
this.onClearSelected()
this.$message.success(this.$t('operationSuccessful'))
}
})
},
@@ -345,6 +345,8 @@ export default {
this.delIds.push(this.dataSource[index].id)
}
this.dataSource.splice(index, 1)
this.onClearSelected()
this.$message.success(this.$t('operationSuccessful'))
}
})
},