完善下单逻辑及其ui展示,修复支付倒计时显示错误bug

This commit is contained in:
2026-05-25 15:35:41 +08:00
parent d25f80ccdd
commit cecb51a8e2
40 changed files with 13040 additions and 3217 deletions

View File

@@ -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 '已支付'