diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue index bcce856..adf2c47 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue @@ -264,19 +264,23 @@ export default { obj._flag = true this.$message.warn(this.$t('workCenter.standardInterpretationProcess.pleaseSelectTheNextStep')) } else { + // 只要下一步了,对新增的部分进行校验 // 是否重新分发节点 const isReDistribute = this.currentNodeId === StandardInterpretationNodes.standardInterpreterReDistribution.value - // 只要下一步了,对新增的部分进行校验 obj.clauseData = this.$refs.interpretationClauseTable.getData() - // 至少一条条款数据(重新分发节点可以删了代表不分发) - if (!obj.clauseData.length && !isReDistribute) { + // 至少一条条款数据,重新分发节点可以删除不分发,不做校验(上面没有校验失败的 && 条款没有数据 && 不是重新分发节点) + if (!obj._flag && !obj.clauseData.length && !isReDistribute) { this.$message.warn(this.$t('addAtLeastOneRowOfData')) obj._flag = true - } else if (obj.clauseData.length && this.isDistribute && !obj.clauseData.some(item => item.interpretPersonIds)) { + } + // 分发时有数据就至少一条数据填写解读人(上面没有校验失败的 && 有条款数据 && 选择的分发 && 所有条款数据没有选择解读人) + if (!obj._flag && obj.clauseData.length && this.isDistribute && !obj.clauseData.some(item => item.interpretPersonIds)) { // 有数据且选分发时候校验 至少一条数据选择解读人 this.$message.warn(this.$t('workCenter.standardInterpretationProcess.pleaseSelectInterpreter')) obj._flag = true - } else if (!this.isDistribute) { + } + // 不分发时,校验增加的表单(上面没有校验失败的 && 选择的不分发) + if (!obj._flag && !this.isDistribute) { // 有数据且不分发时校验用户表单 const userFormObj = await this.validateFormPromise(this.userForm) if (userFormObj.err) { obj._flag = true }