宽窄优行-由【嘉易行】项目成品而来
younger_times
2023-07-05 0d8f5fc8a516bfd07e425909e4a4432600572ee7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
//  Define.swift
//  OKProject
//
//  Created by alvin_y on 2020/9/17.
//  Copyright © 2020 yangwang. All rights reserved.
//
 
import Foundation
import HandyJSON
/// 订单状态(1=待接单,2=待出发,3=待到达预约地点,4=待乘客上车,5=服务中,6=完成服务,7=待支付,8=待评价,9=已完成,10=已取消,11=改派中,12=取消待支付)
enum SpecialCarState: Int,HandyJSONEnum{
 
    /// 等待应答
    case witingForResponse = 1
    /// 等待司机出发
    case driverReaydToGo = 2
    /// 等待接驾(待到达预约地点)
    case witingForPickUp = 3
    /// 司机到达
    case driverArrived = 4
    /// 服务中
    case serving = 5
    /// 已完成 待付费
    case waitingForConfirmCost = 6
    /// 等待支付
    case waitingForPayment = 7
    /// 等待评价
    case waitingForComment = 8
    /// 已完成
    case completed = 9
    /// 已取消
    case canceled = 10
    /// 改派订单
    case reassign = 11
    /// 取消待支付
    case canceledWaitingForPayment = 12
 
    
    func stateString() -> String? {
        switch self {
        case .witingForResponse:
            return "等待应答"
        case .driverReaydToGo, .witingForPickUp:
            return "等待接驾"
        case .driverArrived:
            return "等待上车"
        case .serving:
            return "服务中"
        case .waitingForPayment:
            return "待支付"
        case .waitingForComment:
            return "待评价"
        case .completed:
            return "已完成"
        case .canceled:
            return "已取消"
        case .canceledWaitingForPayment:
            return "待支付"
        case .waitingForConfirmCost:
            return "待确认费用"
        default:
            return nil
        }
    }
}