import type {INumberValueTagStyle} from "@/interface/app/ITagStyle.ts";

export default class ConveyTaskTypeFormatter {

    taskType: INumberValueTagStyle[] = [
        {value: 1, label: '捡选任务', type: 'success'},
        {value: 2, label: '复核任务', type: 'warning'},
        {value: 3, label: '发货任务', type: 'primary'},
        {value: 4, label: '补货任务', type: 'info'},
    ];

    conveyTaskTypeFormatter(value: any): INumberValueTagStyle {
        const findResult = this.taskType.find(f => f.value == value);
        if (findResult) {
            return findResult;
        }
        return {value: value.toString(), label: '？' + value.toString(), type: 'danger'};
    }
}