忽略本地报错信息文件
This commit is contained in:
@@ -6,6 +6,7 @@ export type ServiceOrderStatus =
|
||||
'rejected' |
|
||||
'departed' |
|
||||
'arrived' |
|
||||
'ARRIVAL_PENDING' |
|
||||
'in_service' |
|
||||
'completed' |
|
||||
'pending_acceptance' |
|
||||
@@ -23,6 +24,7 @@ export const SERVICE_ORDER_STATUS_LIST: Array<ServiceOrderStatus> = [
|
||||
'rejected',
|
||||
'departed',
|
||||
'arrived',
|
||||
'ARRIVAL_PENDING',
|
||||
'in_service',
|
||||
'completed',
|
||||
'pending_acceptance',
|
||||
@@ -131,6 +133,7 @@ export type ServiceOrderType = {
|
||||
appointmentTime: string
|
||||
remark: string
|
||||
status: ServiceOrderStatus
|
||||
waitingConsumerConfirm: boolean
|
||||
paymentStatus: number
|
||||
payExpireAt?: string
|
||||
currentAssignmentId: string
|
||||
@@ -164,6 +167,7 @@ export function getServiceOrderStatusText(status: ServiceOrderStatus): string {
|
||||
if (status == 'rejected') return '已拒单'
|
||||
if (status == 'departed') return '已出发'
|
||||
if (status == 'arrived') return '已到达'
|
||||
if (status == 'ARRIVAL_PENDING') return '等待消费者确认到达'
|
||||
if (status == 'in_service') return '服务中'
|
||||
if (status == 'completed') return '已完成'
|
||||
if (status == 'pending_acceptance') return '待验收'
|
||||
@@ -174,7 +178,20 @@ export function getServiceOrderStatusText(status: ServiceOrderStatus): string {
|
||||
return '异常'
|
||||
}
|
||||
|
||||
export function normalizeOrderStatusCode(status: string): string {
|
||||
if (status == null) return ''
|
||||
return status.trim().toUpperCase()
|
||||
}
|
||||
|
||||
export function isArrivalPendingStatus(status: string): boolean {
|
||||
const s = normalizeOrderStatusCode(status)
|
||||
return s == 'ARRIVAL_PENDING'
|
||||
|| s == 'WAITING_CONSUMER_CONFIRM'
|
||||
|| s == 'WAITING_ARRIVAL_CONFIRM'
|
||||
}
|
||||
|
||||
export function normalizeServiceOrderStatus(status: string): ServiceOrderStatus {
|
||||
if (isArrivalPendingStatus(status)) return 'ARRIVAL_PENDING'
|
||||
if (status == 'ORDER_CREATED') return 'created'
|
||||
if (status == 'ORDER_ASSIGNED') return 'assigned'
|
||||
if (status == 'ORDER_ACCEPTED') return 'accepted'
|
||||
@@ -201,4 +218,4 @@ export function normalizeServiceOrderStatus(status: string): ServiceOrderStatus
|
||||
if (status == 'settled') return 'settled'
|
||||
if (status == 'cancelled') return 'cancelled'
|
||||
return 'exception'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user