修复:任务状态显示逻辑优化,审核通过的任务正确显示'待接单'或'进行中'
This commit is contained in:
parent
492305a562
commit
b88db53737
Binary file not shown.
@ -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 '待接单'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user