[update] 修改bug87824
This commit is contained in:
+7
-1
@@ -590,10 +590,16 @@ export default {
|
||||
await this.$refs.ruleForm.validate(async valid => {
|
||||
if (valid) {
|
||||
if (this.formInline.distributeFlag === YesOrNoEnum.YES.value) {
|
||||
// 校验是否至少选了一个设计工程师
|
||||
const hasErr = this.dataSource.every(item => !item.designEngineer)
|
||||
// 排查任务是否下发选了是
|
||||
if (valid) {
|
||||
if (valid && !hasErr) {
|
||||
data.standardInfo = Object.assign({}, this.formInline)
|
||||
data.detailInfoList = JSON.parse(JSON.stringify(this.dataSource))
|
||||
} else if (hasErr) {
|
||||
// 提示选择一条数据的设计工程师
|
||||
this.$message.warning(this.$t('workCenter.regulatoryComplianceCheckProcess.atLeastSelectOneDesignEngineer'))
|
||||
data = false
|
||||
} else {
|
||||
data = false
|
||||
}
|
||||
|
||||
+11
-3
@@ -156,9 +156,17 @@ export default {
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
async getDataValidate () {
|
||||
const data = {}
|
||||
data.standardInfo = Object.assign({}, this.formInline)
|
||||
data.detailInfoList = JSON.parse(JSON.stringify(this.dataSource))
|
||||
let data = {}
|
||||
// 校验是否至少选了一个设计工程师
|
||||
const hasErr = this.dataSource.every(item => !item.designEngineer)
|
||||
if (!hasErr) {
|
||||
data.standardInfo = Object.assign({}, this.formInline)
|
||||
data.detailInfoList = JSON.parse(JSON.stringify(this.dataSource))
|
||||
} else {
|
||||
// 提示选择一条数据的设计工程师
|
||||
this.$message.warning(this.$t('workCenter.regulatoryComplianceCheckProcess.atLeastSelectOneDesignEngineer'))
|
||||
data = false
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 表格选中
|
||||
|
||||
Reference in New Issue
Block a user