diff --git a/src/views/modules/workRecord/weekrecordinfoDetail.vue b/src/views/modules/workRecord/weekrecordinfoDetail.vue index 8314f5be..f47547b3 100644 --- a/src/views/modules/workRecord/weekrecordinfoDetail.vue +++ b/src/views/modules/workRecord/weekrecordinfoDetail.vue @@ -333,7 +333,12 @@ export default { } // 表单提交后台 this.$refs['dataForm'].validate((valid) => { - if (!this.isFirst && res.code === 533) { + if (!valid) { + return false + } + this.isAble = true + this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/weekrecordinfo/', this.dataForm).then(({ data: res }) => { + if (!this.isFirst && res.code === 533) { // 不是第一次提交 并且 依然是违规内容 this.$confirm('您提交的内容再次被判定为违规, 是否继续提交?', '提示', { confirmButtonText: '是', @@ -351,12 +356,7 @@ export default { this.isFirst = false this.isAble = false return this.$message.error(res.msg) - } else if (!valid) { - return false - } - this.isAble = true - this.$http[!this.dataForm.id ? 'post' : 'put']('/workRecord/weekrecordinfo/', this.dataForm).then(({ data: res }) => { - if (res.code !== 0) { + } else if (res.code !== 0) { this.isAble = false return this.$message.error(res.msg) }