| | |
| | | } |
| | | } else if(approve === 'N'){ |
| | | //不通过的情况 |
| | | //根据在线文档34行,驳回'发送给'是禁用,但有默认选项 |
| | | //根据在线文档34行,'发送给'是禁用,但有默认选项 |
| | | this.optionApprove.column[1].disabled = true; |
| | | |
| | | //this.formApprove.assignee = '' |
| | | //if (["approveTask", 'seniorApproveTask','replaceApprove'].includes(row.taskDefinitionKey)) { |
| | | //数控程序审核(高师),是最后一个节点,不通过 都是禁用'发送给',直接给 校对人员 |
| | | //this.optionApprove.column[1].disabled = true; |
| | | //} |
| | | if(["cureProgramTask"].includes(row.taskDefinitionKey)) { |
| | | if (["approveTask", 'seniorApproveTask','replaceApprove'].includes(row.taskDefinitionKey)) { |
| | | //审批节点,上一步是校对 |
| | | this.formApprove.assignee = row.variables.checker; |
| | | }else if(["check", 'cureCheckTask','repalceCheckTask'].includes(row.taskDefinitionKey)){ |
| | | //校对节点,上一步是编程 |
| | | this.formApprove.assignee = row.variables.programmer; |
| | | }else if (["programmingTask"].includes(row.taskDefinitionKey)) { |
| | | // 编制节点,上一步是组长 |
| | | this.formApprove.assignee = row.variables.teamLeader; |
| | | }else if(["cureProgramTask"].includes(row.taskDefinitionKey)) { |
| | | //固化编制节点,不通过就结束了,assignee设置='' |
| | | this.formApprove.assignee = ''; |
| | | }else if(["confirmIsUseableTask"].includes(row.taskDefinitionKey)) { |
| | | //判断是否可用节点,不可用,给编制 |
| | | this.formApprove.assignee = row.variables.programmer; |
| | | }if(['teamLeaderTask'].includes(row.taskDefinitionKey)){ |
| | | this.formApprove.assignee = ''; |
| | | } |
| | | if(["teamLeaderTask" ,'repalceProgrammingTask'].includes(row.taskDefinitionKey)) { |
| | | //组长,替换流程的程序编制,禁用'发送给' |
| | | //this.optionApprove.column[1].disabled = true; |
| | | }else { |
| | | //除了组长,替换流程的编制,其他节点的不通过,都是给上一个步骤的处理人 |
| | | if(!["cureProgramTask"].includes(row.taskDefinitionKey)) { |
| | | //非固化编制节点,需要初始化默认处理人 |
| | | getPrevius({processInstanceId: row.processInstanceId}).then(res => { |
| | | console.log(res) |
| | | if(res.data.code === 200) { |
| | | this.formApprove.assignee = res.data.data // 如果是通过,则默认指派给自己 |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | }else if(approve === 'R'){ |
| | | //驳回,目前只有检查程序是否可用节点 |
| | | if(["confirmIsUseableTask"].includes(row.taskDefinitionKey)) { |
| | | //判断程序是否可用节点,驳回,给组长 |
| | | this.formApprove.assignee = row.variables.teamLeader; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | }, |