- import type { TagType } from '@/utils/status-tag-registry'
- /** 生产结论 cg=成功 sb=失败 */
- export function productionConclusionLabel(code?: string | null): string {
- const c = (code || '').trim()
- if (c === 'cg') return '成功'
- if (c === 'sb') return '失败'
- return c || '—'
- }
- export function productionConclusionTagType(code?: string | null): TagType | undefined {
- const c = (code || '').trim()
- if (c === 'cg') return 'success'
- if (c === 'sb') return 'danger'
- return undefined
- }
|