// 操作栏 编辑按钮 export const editTextBtn = (applyStatus: string) => { switch (applyStatus) { case '全部': return true break case '已审批': return false break case '待审批': return false break case '审批': return false break case '草稿箱': return false break case '审批中': return false break case '已通过': return false break case '未通过': return false break case '已取消': return false break } } // 编辑栏删除按钮 export const delTextBtn = (applyStatus: string) => { switch (applyStatus) { case '全部': return false break case '已审批': return false break case '待审批': return false break case '审批': return false break case '草稿箱': return true break case '审批中': return false break case '已通过': return false break case '未通过': return false break case '已取消': return true break } } // 编辑页面中编辑按钮 export const editBtn = (applyStatus: string, type: string) => { if (applyStatus === '审批' && type === 'detail') { return false } else if (applyStatus === '草稿箱' && type === 'detail') { return true } else if (applyStatus === '未通过' && type === 'detail') { return true } else if (applyStatus === '已取消' && type === 'detail') { return true } else { return false } } // 编辑页面中提交保存按钮 export const submitBtn = (applyStatus: string, type: string) => { if (applyStatus === '全部' && type !== 'detail') { return true } else if (applyStatus === '草稿箱' && type === 'update') { return true } else if (applyStatus === '未通过' && type === 'update') { return true } else if (applyStatus === '已取消' && type === 'update') { return true } else { return false } }