export default {
    type: {
        NORMAL: 1,
        WORKER_PRICE: 2,
        CUSTOM_PRICE: 3,
    },
    state: {
        // 订单关闭
        ORDER_CLOSE: -2,
        // 未支付
        NO_PAY: -1,
        // 等待师傅报价
        NO_PRICE: 0,
        // 等待您选择师傅
        NO_SELECT_WORKER: 1,
        // 等待师傅上门
        NO_SERVICE: 2,
        // 完成订单
        NO_APPRAISE: 3,
        // 服务完结
        ALL_FINISH: 4,
        // 已申请退款
        APPLY_REFUND: 6,
        // 已退款
        REFUNDED: 7,
        // 无法退款
        CAN_NOT_REFUND: 8,
    },
    getOrderStateTextColor(state) {
        switch (state) {
            case this.state.NO_PAY:
                return '#000000';
            case this.state.NO_PRICE:
                return '#000000';
            case this.state.NO_SELECT_WORKER:
                return '#000000';
            case this.state.NO_SERVICE:
                return '#000000';
            case this.state.NO_APPRAISE:
                return '#000000';
            case this.state.ALL_FINISH:
                return '#000000';
            case this.state.APPLY_REFUND:
                return '#000000';
            case this.state.REFUNDED:
                return '#000000';
            case this.state.CAN_NOT_REFUND:
                return '#000000';
            default:
                return '#ff0000';
        }
    },
    getOrderStateText(state) {
        switch (state) {
            case this.state.NO_PAY:
                return '待支付';
            case this.state.NO_PRICE:
                return '等待师傅报价';
            case this.state.NO_SELECT_WORKER:
                return '等待您选择师傅';
            case this.state.NO_SERVICE:
                return '等待师傅上门';
            case this.state.NO_APPRAISE:
                return '完成订单';
            case this.state.ALL_FINISH:
                return '服务完结';
            case this.state.APPLY_REFUND:
                return '已提交申请';
            case this.state.REFUNDED:
                return '已退款';
            case this.state.CAN_NOT_REFUND:
                return '未通过';
            default:
                return '未知状态';
        }
    }
}
