[update] 修改企标流程人员校验在基本信息校验之后
This commit is contained in:
+6
-6
@@ -505,12 +505,6 @@ export default {
|
|||||||
// 节点一时候的提交,发起变更
|
// 节点一时候的提交,发起变更
|
||||||
handleStart () {
|
handleStart () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
// 人员信息的数据, 处理成对象
|
|
||||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
|
||||||
if (!personnelObj) {
|
|
||||||
this.switchValue = 'user'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 流程信息校验
|
// 流程信息校验
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
// 流程审批信息校验
|
// 流程审批信息校验
|
||||||
@@ -518,6 +512,12 @@ export default {
|
|||||||
// 需要校验业务基本信息中的表单
|
// 需要校验业务基本信息中的表单
|
||||||
const data = await this.$refs.baseInfoFormRef.getDataValidate()
|
const data = await this.$refs.baseInfoFormRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
|
if (!personnelObj) {
|
||||||
|
this.switchValue = 'user'
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const param = {} // 需要给后端的参数
|
const param = {} // 需要给后端的参数
|
||||||
param.common = { ...values, ...approvalValues, ...data.formInline }
|
param.common = { ...values, ...approvalValues, ...data.formInline }
|
||||||
|
|||||||
+6
-6
@@ -409,16 +409,16 @@ export default {
|
|||||||
// 节点一时候的提交,发起变更
|
// 节点一时候的提交,发起变更
|
||||||
handleStart () {
|
handleStart () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
// 人员信息的数据, 处理成对象
|
|
||||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
|
||||||
if (!personnelObj) {
|
|
||||||
this.switchValue = 'user'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||||
const data = this.$refs.baseInfoRef.getDataValidate()
|
const data = this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
|
if (!personnelObj) {
|
||||||
|
this.switchValue = 'user'
|
||||||
|
return
|
||||||
|
}
|
||||||
const param = {} // 传给后端的数据
|
const param = {} // 传给后端的数据
|
||||||
param.common = { ...values, ...approvalValues }
|
param.common = { ...values, ...approvalValues }
|
||||||
param.dataList = data.dataSource
|
param.dataList = data.dataSource
|
||||||
|
|||||||
@@ -361,18 +361,18 @@ export default {
|
|||||||
// 节点一时候的提交
|
// 节点一时候的提交
|
||||||
handleStart () {
|
handleStart () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
// 人员信息的数据, 处理成对象
|
|
||||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
|
||||||
if (!personnelObj) {
|
|
||||||
this.switchValue = 'user'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 流程信息的校验
|
// 流程信息的校验
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
// 流程审批信息的校验
|
// 流程审批信息的校验
|
||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
|
if (!personnelObj) {
|
||||||
|
this.switchValue = 'user'
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const paramObj = {} // 需要传给后端的数据
|
const paramObj = {} // 需要传给后端的数据
|
||||||
paramObj.common = { ...values, ...approvalValues }
|
paramObj.common = { ...values, ...approvalValues }
|
||||||
|
|||||||
@@ -373,18 +373,18 @@ export default {
|
|||||||
// 节点一时候的提交
|
// 节点一时候的提交
|
||||||
handleStart () {
|
handleStart () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
// 人员信息的数据, 处理成对象
|
|
||||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
|
||||||
if (!personnelObj) {
|
|
||||||
this.switchValue = 'user'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 流程信息的校验
|
// 流程信息的校验
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
// 流程审批信息的校验
|
// 流程审批信息的校验
|
||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
|
if (!personnelObj) {
|
||||||
|
this.switchValue = 'user'
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const param = {} // 需要传给后端的数据
|
const param = {} // 需要传给后端的数据
|
||||||
param.common = { ...values, ...approvalValues }
|
param.common = { ...values, ...approvalValues }
|
||||||
|
|||||||
@@ -816,13 +816,6 @@ export default {
|
|||||||
// 节点一时候的提交,发起立项变更申请,有taskId就是驳回后的提交
|
// 节点一时候的提交,发起立项变更申请,有taskId就是驳回后的提交
|
||||||
handleStart () {
|
handleStart () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
// 人员信息的数据, 处理成对象
|
|
||||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
|
||||||
// 校验是否填了所有能填的人员信息
|
|
||||||
if (!personnelObj) {
|
|
||||||
this.switchValue = 'user'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
console.log(this.formInline)
|
console.log(this.formInline)
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
@@ -834,7 +827,6 @@ export default {
|
|||||||
// 是立项
|
// 是立项
|
||||||
this.$refs.approvalBaseInfo.$refs.ruleForm.validate(approvalBaseValid => {
|
this.$refs.approvalBaseInfo.$refs.ruleForm.validate(approvalBaseValid => {
|
||||||
if (valid && approvalBaseValid && !err && !approvalErr) {
|
if (valid && approvalBaseValid && !err && !approvalErr) {
|
||||||
this.loading = true
|
|
||||||
const param = Object.assign({}, this.formInline, this.$refs.approvalBaseInfo.formInline)
|
const param = Object.assign({}, this.formInline, this.$refs.approvalBaseInfo.formInline)
|
||||||
// 企标体系处理成逗号分隔
|
// 企标体系处理成逗号分隔
|
||||||
param.enStandardSystem = param.enStandardSystem.map(item => item.value).join(',')
|
param.enStandardSystem = param.enStandardSystem.map(item => item.value).join(',')
|
||||||
@@ -848,7 +840,6 @@ export default {
|
|||||||
this.formInline.projectType === ProjectType.WORK_TERMINATE.value) {
|
this.formInline.projectType === ProjectType.WORK_TERMINATE.value) {
|
||||||
// 是变更-完成时间 或者 变更-工作终止变更
|
// 是变更-完成时间 或者 变更-工作终止变更
|
||||||
if (valid && !err && !approvalErr && this.$refs.changeBaseInfo && this.$refs.changeBaseInfo.dataSource.length > 0) {
|
if (valid && !err && !approvalErr && this.$refs.changeBaseInfo && this.$refs.changeBaseInfo.dataSource.length > 0) {
|
||||||
this.loading = true
|
|
||||||
arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...this.formInline } })
|
arr = this.$refs.changeBaseInfo.dataSource.map(item => { return { ...item, ...this.formInline } })
|
||||||
haveErr = false
|
haveErr = false
|
||||||
} else if (valid && !err && !approvalErr && this.$refs.changeBaseInfo) {
|
} else if (valid && !err && !approvalErr && this.$refs.changeBaseInfo) {
|
||||||
@@ -863,7 +854,6 @@ export default {
|
|||||||
// 是变更-责任部门变更
|
// 是变更-责任部门变更
|
||||||
this.$refs.changeBaseInfo.$refs.ruleForm.validate(changeBaseValid => {
|
this.$refs.changeBaseInfo.$refs.ruleForm.validate(changeBaseValid => {
|
||||||
if (valid && changeBaseValid && !err && !approvalErr) {
|
if (valid && changeBaseValid && !err && !approvalErr) {
|
||||||
this.loading = true
|
|
||||||
const param = Object.assign({}, this.formInline, this.$refs.changeBaseInfo.formInline)
|
const param = Object.assign({}, this.formInline, this.$refs.changeBaseInfo.formInline)
|
||||||
arr.push(param)
|
arr.push(param)
|
||||||
haveErr = false
|
haveErr = false
|
||||||
@@ -875,14 +865,12 @@ export default {
|
|||||||
// 是变更-合并
|
// 是变更-合并
|
||||||
this.$refs.changeBaseInfo.$refs.ruleForm.validate(changeBaseValid => {
|
this.$refs.changeBaseInfo.$refs.ruleForm.validate(changeBaseValid => {
|
||||||
if (valid && changeBaseValid && !err && !approvalErr) {
|
if (valid && changeBaseValid && !err && !approvalErr) {
|
||||||
this.loading = true
|
|
||||||
const changeBaseInfo = this.$refs.changeBaseInfo.formInline
|
const changeBaseInfo = this.$refs.changeBaseInfo.formInline
|
||||||
if (changeBaseInfo.projectTypeOne !== changeBaseInfo.projectTypeTwo) {
|
if (changeBaseInfo.projectTypeOne !== changeBaseInfo.projectTypeTwo) {
|
||||||
// 合并时候的两个计划需要限定修订+修订,或者制定+制定
|
// 合并时候的两个计划需要限定修订+修订,或者制定+制定
|
||||||
this.$message.warning(this.$t('workCenter.enterpriseInitChangePlan.pleaseSelectTwoSameProjectTypePlan'))
|
this.$message.warning(this.$t('workCenter.enterpriseInitChangePlan.pleaseSelectTwoSameProjectTypePlan'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.loading = true
|
|
||||||
const param = Object.assign({}, this.formInline, this.$refs.changeBaseInfo.formInline)
|
const param = Object.assign({}, this.formInline, this.$refs.changeBaseInfo.formInline)
|
||||||
// 企标体系处理成逗号分隔
|
// 企标体系处理成逗号分隔
|
||||||
param.enStandardSystem = param.enStandardSystem.map(item => item.value).join(',')
|
param.enStandardSystem = param.enStandardSystem.map(item => item.value).join(',')
|
||||||
@@ -897,6 +885,14 @@ export default {
|
|||||||
this.switchValue = 'base'
|
this.switchValue = 'base'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
|
// 校验是否填了所有能填的人员信息
|
||||||
|
if (!personnelObj) {
|
||||||
|
this.switchValue = 'user'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.loading = true
|
||||||
const param = {} // 需要传给后端的数据
|
const param = {} // 需要传给后端的数据
|
||||||
param.common = { ...values, ...approvalValues } // 流程信息和流程审批信息
|
param.common = { ...values, ...approvalValues } // 流程信息和流程审批信息
|
||||||
param.dataList = arr
|
param.dataList = arr
|
||||||
|
|||||||
@@ -418,18 +418,18 @@ export default {
|
|||||||
// 节点一时候的提交
|
// 节点一时候的提交
|
||||||
handleStart () {
|
handleStart () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
// 人员信息的数据, 处理成对象
|
|
||||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
|
||||||
if (!personnelObj) {
|
|
||||||
this.switchValue = 'user'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 流程信息的校验
|
// 流程信息的校验
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
// 流程审批信息的校验
|
// 流程审批信息的校验
|
||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
|
if (!personnelObj) {
|
||||||
|
this.switchValue = 'user'
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const paramObj = {} // 需要传给后端的数据
|
const paramObj = {} // 需要传给后端的数据
|
||||||
paramObj.common = { ...values, ...approvalValues }
|
paramObj.common = { ...values, ...approvalValues }
|
||||||
|
|||||||
@@ -520,16 +520,16 @@ export default {
|
|||||||
// 节点一时候的提交,发起变更
|
// 节点一时候的提交,发起变更
|
||||||
handleStart () {
|
handleStart () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
// 人员信息的数据, 处理成对象
|
|
||||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
|
||||||
if (!personnelObj) {
|
|
||||||
this.switchValue = 'user'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
|
if (!personnelObj) {
|
||||||
|
this.switchValue = 'user'
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const param = {} // 需要传给后端的数据
|
const param = {} // 需要传给后端的数据
|
||||||
param.common = { ...values, ...approvalValues }
|
param.common = { ...values, ...approvalValues }
|
||||||
|
|||||||
@@ -363,18 +363,18 @@ export default {
|
|||||||
// 节点一时候的提交
|
// 节点一时候的提交
|
||||||
handleStart () {
|
handleStart () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
// 人员信息的数据, 处理成对象
|
|
||||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
|
||||||
if (!personnelObj) {
|
|
||||||
this.switchValue = 'user'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 流程信息的校验
|
// 流程信息的校验
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
// 流程审批信息的校验
|
// 流程审批信息的校验
|
||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
|
if (!personnelObj) {
|
||||||
|
this.switchValue = 'user'
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const paramObj = {} // 需要传给后端的数据
|
const paramObj = {} // 需要传给后端的数据
|
||||||
paramObj.common = { ...values, ...approvalValues }
|
paramObj.common = { ...values, ...approvalValues }
|
||||||
|
|||||||
@@ -361,18 +361,18 @@ export default {
|
|||||||
// 节点一时候的提交
|
// 节点一时候的提交
|
||||||
handleStart () {
|
handleStart () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
// 人员信息的数据, 处理成对象
|
|
||||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
|
||||||
if (!personnelObj) {
|
|
||||||
this.switchValue = 'user'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 流程信息的校验
|
// 流程信息的校验
|
||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
// 流程审批信息的校验
|
// 流程审批信息的校验
|
||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
|
// 人员信息的数据, 处理成对象
|
||||||
|
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
|
if (!personnelObj) {
|
||||||
|
this.switchValue = 'user'
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const paramObj = {} // 需要传给后端的数据
|
const paramObj = {} // 需要传给后端的数据
|
||||||
paramObj.common = { ...values, ...approvalValues }
|
paramObj.common = { ...values, ...approvalValues }
|
||||||
|
|||||||
Reference in New Issue
Block a user