import {BLUE, BLUE_LIGHT, GREEN, ORANGE, RED} from "@/config/color"; // -1已取消、0待付款、1待发货/配送中、2待收货、3已完成、4退款中、5退款成功、6退款失败 export const ORDER_STATUS_LIST = [ { label: '已取消', value: -1, color: '#BBB', }, { label: '待付款', value: 0, color: RED, }, { label: '配送中', value: 1, color: BLUE_LIGHT, }, { label: '待收货', value: 2, color: BLUE, }, { label: '已完成', value: 3, color: GREEN, }, { label: '退款中', value: 4, color: '#F9A8D4', }, { label: '退款成功', value: 5, color: '#DB2777', }, { label: '退款失败', value: 6, color: '#831843', }, ] export const EXPRESS_ORDER_STATUS_LIST = [ { label: '已取消', value: -1, color: '#BBB', }, { label: '待支付', value: 0, color: RED, }, { label: '待接单', value: 1, color: BLUE_LIGHT, }, { label: '配送中', value: 2, color: BLUE, }, { label: '待确认', value: 20, color: BLUE, }, { label: '已完成', value: 3, color: GREEN, }, { label: '退款中', value: 4, color: '#F9A8D4', }, { label: '退款成功', value: 5, color: '#DB2777', }, { label: '退款失败', value: 6, color: '#831843', }, ] export const getOrderStatusItem = (type, orderStatus) => { if ([1, 2, 3, 4, 5].includes(type)) return EXPRESS_ORDER_STATUS_LIST.filter(item => item.value === orderStatus)[0] else return ORDER_STATUS_LIST.filter(item => item.value === orderStatus)[0] }