//
|
// 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
|
}
|
}
|
}
|