diff --git a/src/components/Process/submitVerify.vue b/src/components/Process/submitVerify.vue index 5f484d5..ce856b2 100644 --- a/src/components/Process/submitVerify.vue +++ b/src/components/Process/submitVerify.vue @@ -188,8 +188,7 @@ const nickName = ref({}); //节点编码 const nodeCode = ref(''); const buttonObj = ref({ - code: undefined, - show: false, + pop: false, trust: false, transfer: false, addSign: false, @@ -276,7 +275,23 @@ const emits = defineEmits(['submitCallback', 'cancelCallback']); const handleCompleteTask = async () => { form.value.taskId = taskId.value; form.value.taskVariables = props.taskVariables; - if (!buttonObj.value.pop) { + let verify = false; + if (buttonObj.value.pop && nestNodeList.value && nestNodeList.value.length > 0) { + nestNodeList.value.forEach((e) => { + if ( + Object.keys(form.value.assigneeMap).length === 0 || + form.value.assigneeMap[e.nodeCode] === '' || + form.value.assigneeMap[e.nodeCode] === null || + form.value.assigneeMap[e.nodeCode] === undefined + ) { + verify = true; + } + }); + if (verify) { + proxy?.$modal.msgWarning('请选择审批人!'); + return false; + } + } else { form.value.assigneeMap = {}; } if (selectCopyUserList.value && selectCopyUserList.value.length > 0) { @@ -338,6 +353,8 @@ const handleBackProcess = async () => { const cancel = async () => { dialog.visible = false; buttonDisabled.value = false; + nickName.value = {}; + form.value.assigneeMap = {}; emits('cancelCallback'); }; //打开抄送人员