修复:任务状态显示逻辑优化,审核通过的任务正确显示'待接单'或'进行中'

This commit is contained in:
Your Name 2026-01-21 14:07:08 +08:00
parent 492305a562
commit b88db53737
2 changed files with 7 additions and 9 deletions

Binary file not shown.

View File

@ -5911,8 +5911,10 @@ const getTaskStatusText = (status: string, task?: any) => {
return '待接单审核'
}
// 4. 流水线任务且已审核通过,根据是否有接收人显示不同状态
if (task.isPipeline === 1 && task.approvalStatus === 'approved') {
// 4. 已审核通过的任务,根据是否有接收人显示不同状态
// 注意:isPipeline 可能是 1、true 或 "1",需要兼容处理
const isPipelineTask = task.isPipeline === 1 || task.isPipeline === true || task.isPipeline === '1'
if (task.approvalStatus === 'approved') {
if (task.receiverId) {
return '进行中'
} else {
@ -5920,13 +5922,9 @@ const getTaskStatusText = (status: string, task?: any) => {
}
}
// 5. 普通任务已审核通过但status还是draft,修正显示
if (task.approvalStatus === 'approved' && status === 'draft') {
if (task.receiverId) {
return '进行中'
} else {
return '待接单'
}
// 5. 普通任务status是pending但没有approvalStatus(兼容旧数据)
if (status === 'pending' && !task.approvalStatus) {
return '待接单'
}
}