|
|
|
@ -161,7 +161,7 @@ export default { |
|
|
|
}, |
|
|
|
// 重写子组件校验钩子方法,检查ZLSubPackage的表单验证 |
|
|
|
validateSubComponents() { |
|
|
|
const refs = [],qbRefs = []; |
|
|
|
const refs = []; |
|
|
|
// 遍历formConfig,找到所有type为zlfz的项 |
|
|
|
for (const item of this.formConfig) { |
|
|
|
if (item.config) { |
|
|
|
@ -179,10 +179,9 @@ export default { |
|
|
|
}else if(sItem.type === 'qb'){ |
|
|
|
const refName = `jcbComp_${key}`; |
|
|
|
const jcbCompRef = this.$refs[refName]; |
|
|
|
console.log(jcbCompRef,"jcbCompRef") |
|
|
|
// 检查ZLSubPackage组件的表单验证 |
|
|
|
if (jcbCompRef) { |
|
|
|
qbRefs.push(jcbCompRef); |
|
|
|
refs.push(jcbCompRef); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -190,8 +189,6 @@ export default { |
|
|
|
} |
|
|
|
if(refs.length === 0){ |
|
|
|
return {valid: true, error: ''}; |
|
|
|
}else if(qbRefs.length > 0){ |
|
|
|
return qbRefs[0][0].getFormData(); |
|
|
|
}else{//目前一个步骤只会有一个质量分装,所以不考虑多个的情况 |
|
|
|
return refs[0][0].validateFormData(); |
|
|
|
} |
|
|
|
|