
// 出库单状态
export const orderOutEnum = {
    creat: {
        value: 0,
        label: '待出库',
        color: 'info'
    },
    running: {
        value: 1,
        label: '出库中',
        color: 'primary'
    },
    error: {
        value: 9,
        label: '执行异常',
        color: 'danger'
    }
}

export function  formatterOrderOutEnum(value) {
    switch (parseInt(value)){
        case orderOutEnum.creat.value:
            return {label: orderOutEnum.creat.label, type: orderOutEnum.creat.color};
        case orderOutEnum.running.value:
            return {label: orderOutEnum.running.label, type: orderOutEnum.running.color};
        case orderOutEnum.error.value:
            return {label: orderOutEnum.error.label, type: orderOutEnum.error.color};
        default:
            return {label: `未知类型：${value}`, type: 'danger'};
    }
}