完善下单逻辑及其ui展示,修复支付倒计时显示错误bug
This commit is contained in:
@@ -16,6 +16,28 @@ export type HomeServiceTimelineItemType = {
|
||||
description: string
|
||||
}
|
||||
|
||||
export type HomeServiceSelectedAddressType = {
|
||||
addressId: string
|
||||
userId: string
|
||||
isDefault: boolean
|
||||
contactName: string
|
||||
contactPhone: string
|
||||
phone?: string
|
||||
addressName: string
|
||||
locationName?: string
|
||||
addressDetail: string
|
||||
locationAddress?: string
|
||||
houseNumber: string
|
||||
doorNo?: string
|
||||
fullAddress: string
|
||||
latitude: number
|
||||
longitude: number
|
||||
remark: string
|
||||
coordinateType: string
|
||||
createdAt: number
|
||||
updatedAt: number
|
||||
}
|
||||
|
||||
export type HomeServiceCaseType = {
|
||||
id: string
|
||||
caseNo: string
|
||||
@@ -35,6 +57,13 @@ export type HomeServiceCaseType = {
|
||||
staffName: string
|
||||
staffPhone: string
|
||||
amount: number
|
||||
checkinTime: string
|
||||
checkinAddress: string
|
||||
serviceStartedAt: string
|
||||
serviceFinishedAt: string
|
||||
executionSummary: string
|
||||
evidenceCount: number
|
||||
serviceAddressSnapshot?: HomeServiceSelectedAddressType | null
|
||||
timeline: Array<HomeServiceTimelineItemType>
|
||||
}
|
||||
|
||||
@@ -67,6 +96,7 @@ export type HomeServiceApplicationDraftType = {
|
||||
address: string
|
||||
preferredTime: string
|
||||
demandSummary: string
|
||||
serviceAddressSnapshot?: HomeServiceSelectedAddressType | null
|
||||
}
|
||||
|
||||
export type HomeServiceAdminApplicationType = {
|
||||
|
||||
@@ -33,6 +33,32 @@ export const SERVICE_ORDER_STATUS_LIST: Array<ServiceOrderStatus> = [
|
||||
'exception'
|
||||
]
|
||||
|
||||
export type ServiceOrderAddressSnapshotType = {
|
||||
addressId: string
|
||||
contactName: string
|
||||
contactPhone: string
|
||||
province: string
|
||||
city: string
|
||||
district: string
|
||||
detailAddress: string
|
||||
fullAddress: string
|
||||
latitude: number
|
||||
longitude: number
|
||||
coordinateType: string
|
||||
remark: string
|
||||
}
|
||||
|
||||
export type ServiceOrderServiceSnapshotType = {
|
||||
serviceId: string
|
||||
serviceName: string
|
||||
category: string
|
||||
price: number
|
||||
durationText: string
|
||||
summary: string
|
||||
tags: Array<string>
|
||||
suitableFor: string
|
||||
}
|
||||
|
||||
export type ServiceOrderTimelineItemType = {
|
||||
id: string
|
||||
orderId: string
|
||||
@@ -44,6 +70,85 @@ export type ServiceOrderTimelineItemType = {
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export type ServiceExecutionRecordType = {
|
||||
id: string
|
||||
orderId: string
|
||||
assignmentId: string
|
||||
checkinTime: string
|
||||
checkinLatitude: number
|
||||
checkinLongitude: number
|
||||
checkinAddress: string
|
||||
serviceStartedAt: string
|
||||
serviceFinishedAt: string
|
||||
actualDurationMinutes: number
|
||||
serviceItemsJson: string
|
||||
summary: string
|
||||
remark: string
|
||||
trackPointsJson: string
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export type ServiceEvidenceFileType = {
|
||||
id: string
|
||||
orderId: string
|
||||
executionRecordId: string
|
||||
phase: string
|
||||
fileType: string
|
||||
storagePath: string
|
||||
fileUrl: string
|
||||
latitude: number
|
||||
longitude: number
|
||||
capturedAt: string
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export type ServiceReviewType = {
|
||||
id: string
|
||||
orderId: string
|
||||
userId: string
|
||||
rating: number
|
||||
tags: Array<string>
|
||||
content: string
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export type ServiceOrderType = {
|
||||
id: string
|
||||
orderNo: string
|
||||
userId: string
|
||||
serviceId: string
|
||||
serviceName: string
|
||||
serviceSnapshot: ServiceOrderServiceSnapshotType
|
||||
serviceAddressId: string
|
||||
addressSnapshot: ServiceOrderAddressSnapshotType
|
||||
recipientName: string
|
||||
recipientPhone: string
|
||||
contactName: string
|
||||
contactPhone: string
|
||||
appointmentTime: string
|
||||
remark: string
|
||||
status: ServiceOrderStatus
|
||||
currentAssignmentId: string
|
||||
currentStaffId: string
|
||||
acceptedAt: string
|
||||
departedAt: string
|
||||
arrivedAt: string
|
||||
serviceStartedAt: string
|
||||
completedAt: string
|
||||
pendingAcceptanceAt: string
|
||||
acceptedByUserAt: string
|
||||
reviewedAt: string
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
staffName: string
|
||||
staffPhone: string
|
||||
logs: Array<ServiceOrderTimelineItemType>
|
||||
executionRecord: ServiceExecutionRecordType | null
|
||||
evidenceFiles: Array<ServiceEvidenceFileType>
|
||||
review: ServiceReviewType | null
|
||||
}
|
||||
|
||||
export function getServiceOrderStatusText(status: ServiceOrderStatus): string {
|
||||
if (status == 'created') return '待处理'
|
||||
if (status == 'paid') return '已支付'
|
||||
|
||||
Reference in New Issue
Block a user