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

/**
 * 电子标签货位类型
 */
export default class EtagLocationTypeFormatter {

    etagLocationType: INumberValueTagStyle[] = [
        {value: 0, label: '捡货', type: 'primary'},
        {value: 1, label: '补货', type: 'success'}
    ];

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