diff --git a/src/views/quality/supervise/analysis/index.vue b/src/views/quality/supervise/analysis/index.vue index 7f0bd09..b049dd4 100644 --- a/src/views/quality/supervise/analysis/index.vue +++ b/src/views/quality/supervise/analysis/index.vue @@ -201,6 +201,21 @@ fetchData() }) } +const handlingSuggestions = ref('处理意见') +const handlingSuggestionsFun = (row: any) => { + fetchApproval(row.processId).then(res => { + if (!res.data.length) { + handlingSuggestions.value = '处理意见' + return + } + if (res.data[res.data.length - 1].filter((item: any) => item.taskName.includes('质量负责人'))) { + handlingSuggestions.value = '对问题的分析确认及处理意见' + } + else { + handlingSuggestions.value = '处理意见' + } + }) +} const handleEdit = (row: IlistType | any, type: string) => { if (type === 'update' || type === 'detail' || type === 'create') { // 编辑、详情 $router.push({ @@ -216,6 +231,7 @@ }) } else if (type === '同意') { + handlingSuggestionsFun(row) // fetchApproval(row.processId).then((res) => { // if (res.data.length === 2 && res.data[1][0]?.taskName === '质量负责人填写问题') { approvalDialog.value.initDialog('agree', row.taskId, row.id, row.processId) @@ -223,9 +239,11 @@ // }) } else if (type === '驳回') { + handlingSuggestionsFun(row) approvalDialog.value.initDialog('reject', row.taskId, row.id, row.processId) } else if (type === '拒绝') { + handlingSuggestionsFun(row) approvalDialog.value.initDialog('refuse', row.taskId, row.id, row.processId) } else if (type === '取消') { @@ -376,31 +394,22 @@