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

export default class StockSingleTaskTypeFormatter {

    taskTypeTagStyle: INumberValueTagStyle[] = [
        {value: 0, label: '自动', type: 'info'},
        {value: 1, label: '入库', type: 'success'},
        {value: 2, label: '出库', type: 'warning'},
        {value: 9, label: '移库', type: 'primary'},
        {value: 4, label: '输送入库', type: 'info'},
        {value: 5, label: '输送出库', type: 'info'},
        {value: 6, label: '输送移动', type: 'info'},
        {value: 7, label: '输送线捡选', type: 'info'},
        {value: 8, label: '输送线复核', type: 'info'},
        {value: 11, label: 'AGV搬运', type: 'info'},
        {value: 10, label: '穿梭车任务', type: 'info'}


    ];

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