| | |
| | | } |
| | | }) |
| | | const detailDemandStatus = inject('detailDemandStatus') |
| | | const reasonForRejection = inject('reasonForRejection') |
| | | // 步骤条数据 |
| | | const steps = ref([ |
| | | { title: '需求申请', person: '', time: '' }, |
| | |
| | | try { |
| | | const res = await gdSupplyDemandAuditListApi({ demandId }) |
| | | const auditRecords = res?.data?.data ?? [] |
| | | |
| | | // 查找拒绝原因(auditStatus为2的记录的auditOpinion) |
| | | const rejectedRecord = auditRecords.find(record => record.auditStatus === '2') |
| | | reasonForRejection.value = rejectedRecord?.auditOpinion || '' |
| | | console.log('reasonForRejection', reasonForRejection.value) |
| | | |
| | | // 处理审核记录为步骤格式 |
| | | processAuditRecords(auditRecords) |
| | |
| | | console.error('加载审核记录失败:', error) |
| | | // 保持默认步骤 |
| | | activeStep.value = 0 |
| | | reasonForRejection.value = '' |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | // 添加审核意见(如果有) |
| | | if (latestRecord.auditOpinion) { |
| | | steps.value[1].title += ` - ${latestRecord.auditOpinion}` |
| | | steps.value[1].title |
| | | } |
| | | |
| | | // 更新审核步骤的信息 |