update 表格删除增加提示、稽查流程完善
This commit is contained in:
@@ -301,6 +301,7 @@ export default {
|
|||||||
this.delIds.push(...this.selectedRowKeys.filter(item => !item.includes(tempIdPrefix)))
|
this.delIds.push(...this.selectedRowKeys.filter(item => !item.includes(tempIdPrefix)))
|
||||||
this.dataSource = this.dataSource.filter((item) => !this.selectedRowKeys.includes(item.id))
|
this.dataSource = this.dataSource.filter((item) => !this.selectedRowKeys.includes(item.id))
|
||||||
this.onClearSelected()
|
this.onClearSelected()
|
||||||
|
this.$message.success(this.$t('operationSuccessful'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -318,6 +319,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.dataSource.splice(index, 1)
|
this.dataSource.splice(index, 1)
|
||||||
this.onClearSelected()
|
this.onClearSelected()
|
||||||
|
this.$message.success(this.$t('operationSuccessful'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+2
@@ -168,6 +168,8 @@ export default {
|
|||||||
if (this.ipagination.current > 1 && ((this.ipagination.current - 1) * this.ipagination.pageSize) + 1 === this.ipagination.total) {
|
if (this.ipagination.current > 1 && ((this.ipagination.current - 1) * this.ipagination.pageSize) + 1 === this.ipagination.total) {
|
||||||
this.ipagination.current -= 1
|
this.ipagination.current -= 1
|
||||||
}
|
}
|
||||||
|
this.onClearSelected()
|
||||||
|
this.$message.success(this.$t('operationSuccessful'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+2
@@ -219,6 +219,8 @@ export default {
|
|||||||
if (this.ipagination.current > 1 && ((this.ipagination.current - 1) * this.ipagination.pageSize) + 1 === this.ipagination.total) {
|
if (this.ipagination.current > 1 && ((this.ipagination.current - 1) * this.ipagination.pageSize) + 1 === this.ipagination.total) {
|
||||||
this.ipagination.current -= 1
|
this.ipagination.current -= 1
|
||||||
}
|
}
|
||||||
|
this.onClearSelected()
|
||||||
|
this.$message.success(this.$t('operationSuccessful'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+10
-1
@@ -247,6 +247,11 @@ export default {
|
|||||||
handleOk () {
|
handleOk () {
|
||||||
this.$refs.form.validate(valid => {
|
this.$refs.form.validate(valid => {
|
||||||
if (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)
|
const params = Object.assign({}, this.model, this.form)
|
||||||
if (!params.processEsInspectId) {
|
if (!params.processEsInspectId) {
|
||||||
params.processEsInspectId = this.data.id
|
params.processEsInspectId = this.data.id
|
||||||
@@ -358,7 +363,11 @@ export default {
|
|||||||
const contentList = this.data.enterpriseStandardInspectContentList || []
|
const contentList = this.data.enterpriseStandardInspectContentList || []
|
||||||
const reportList = this.data.enterpriseStandardInspectReportList || []
|
const reportList = this.data.enterpriseStandardInspectReportList || []
|
||||||
const content = contentList.find(item => item.id === val) || {}
|
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.inspectReportId = report.id
|
||||||
this.form.standardRequire = content.requirement
|
this.form.standardRequire = content.requirement
|
||||||
this.form.executionStatus = report.executionStatus
|
this.form.executionStatus = report.executionStatus
|
||||||
|
|||||||
+8
@@ -194,6 +194,12 @@ export default {
|
|||||||
title: this.$t('confirmDeletion'),
|
title: this.$t('confirmDeletion'),
|
||||||
content: this.$t('areYouSure'),
|
content: this.$t('areYouSure'),
|
||||||
onOk: () => {
|
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) {
|
if (this.dataSource[index].id) {
|
||||||
this.delIds.push(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) {
|
if (this.ipagination.current > 1 && ((this.ipagination.current - 1) * this.ipagination.pageSize) + 1 === this.ipagination.total) {
|
||||||
this.ipagination.current -= 1
|
this.ipagination.current -= 1
|
||||||
}
|
}
|
||||||
|
this.onClearSelected()
|
||||||
|
this.$message.success(this.$t('operationSuccessful'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+2
@@ -345,6 +345,8 @@ export default {
|
|||||||
this.delIds.push(this.dataSource[index].id)
|
this.delIds.push(this.dataSource[index].id)
|
||||||
}
|
}
|
||||||
this.dataSource.splice(index, 1)
|
this.dataSource.splice(index, 1)
|
||||||
|
this.onClearSelected()
|
||||||
|
this.$message.success(this.$t('operationSuccessful'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+2
@@ -233,6 +233,8 @@ export default {
|
|||||||
this.delIds.push(this.dataSource[index].id)
|
this.delIds.push(this.dataSource[index].id)
|
||||||
}
|
}
|
||||||
this.dataSource.splice(index, 1)
|
this.dataSource.splice(index, 1)
|
||||||
|
this.onClearSelected()
|
||||||
|
this.$message.success(this.$t('operationSuccessful'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ export default {
|
|||||||
content: this.$t('areYouSure'),
|
content: this.$t('areYouSure'),
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
this.dataSource.splice(index, 1)
|
this.dataSource.splice(index, 1)
|
||||||
|
this.$message.success(this.$t('operationSuccessful'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user