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

export default class StockComposeTaskTypeFormatter {

    taskTypeTagStyle: INumberValueTagStyle[] = [
        {value: 0, label: '自动', type: 'info'},
        {value: 1, label: '入库', type: 'success'},
        {value: 2, label: '出库', type: 'warning'},
        {value: 9, label: '移库', type: 'primary'},
        {value: 3, label: '输送搬运', type: 'info'}
    ];

    stockComposeTaskTypeFormatter(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'};
    }

}