Commit 1cccad9e authored by jingnan's avatar jingnan 👀

合并产品【12542】单个签审任务处理选中驳回后完成任务会触发审批对象里的表单校验,实际不需要<2>

parent 59353bf0
...@@ -766,6 +766,7 @@ export default { ...@@ -766,6 +766,7 @@ export default {
}, },
// 路由切换 // 路由切换
routeSelect(val) { routeSelect(val) {
this.clearApprovalFormValidateStatus()
this.getBizForm(val) this.getBizForm(val)
}, },
// 获取业务表单 // 获取业务表单
...@@ -779,7 +780,8 @@ export default { ...@@ -779,7 +780,8 @@ export default {
finishTask(flag, params, callback, errCallBack) { finishTask(flag, params, callback, errCallBack) {
this.$nextTick(function() { this.$nextTick(function() {
const validateArray = [] const validateArray = []
// 审批对象表单 // 审批对象表单,路由选择驳回的情况下不校验审批对象表单
if (params.routerSelect !== 'reject') {
this.approvalObject.forEach(item => { this.approvalObject.forEach(item => {
const refCom = this.$refs[item.refKey] const refCom = this.$refs[item.refKey]
if (!refCom || !refCom[0]) return if (!refCom || !refCom[0]) return
...@@ -792,6 +794,7 @@ export default { ...@@ -792,6 +794,7 @@ export default {
validateArray.push(vm.$refs.asCom.$refs.deeForm.validate()) validateArray.push(vm.$refs.asCom.$refs.deeForm.validate())
} }
}) })
}
// 任务处理 // 任务处理
this.dynamicComponents.forEach(item => { this.dynamicComponents.forEach(item => {
if (this.$refs.hasOwnProperty(item.configName)) { if (this.$refs.hasOwnProperty(item.configName)) {
...@@ -868,6 +871,21 @@ export default { ...@@ -868,6 +871,21 @@ export default {
}) })
} }
}) })
},
// 清理审批表单校验状态
clearApprovalFormValidateStatus() {
this.approvalObject.forEach(item => {
const refCom = this.$refs[item.refKey]
if (!refCom || !refCom[0]) return
const vm = refCom[0]
if (vm.hasOwnProperty('clearValidate')) {
vm.clearValidate()
} else if (vm.$refs.asCom && vm.$refs.asCom.hasOwnProperty('clearValidate')) {
vm.$refs.asCom.clearValidate()
} else if (vm.$refs.asCom && vm.$refs.asCom.$refs && vm.$refs.asCom.$refs.deeForm && vm.$refs.asCom.$refs.deeForm.hasOwnProperty('clearValidate')) {
vm.$refs.asCom.$refs.deeForm.clearValidate()
}
})
} }
}, },
filter: {} filter: {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment