fix: 优化交接记录显示,将技术标识转换为用户友好文字
问题: - 交接记录显示原始技术标识(owner_handoff, renter_checkout 等) - 用户体验不佳,难以理解记录含义 改进: - 添加 formatHandoffRecordType 函数统一格式化交接记录类型 - 映射关系: - owner_handoff → 卖家交接 - renter_checkout → 买家结账 - owner_counter_checkout → 卖家反驳结账 - renter_confirm_checkout → 买家确认结账 - owner_accept_checkout → 卖家接受结账 - 同时优化PC端订单详情和管理后台订单详情 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -113,6 +113,17 @@ function refundStatusLabel(status: string) {
|
||||
}
|
||||
return map[status] || status || '未退款'
|
||||
}
|
||||
|
||||
function formatHandoffRecordType(type: string) {
|
||||
const typeMap: Record<string, string> = {
|
||||
owner_handoff: '卖家交接',
|
||||
renter_checkout: '买家结账',
|
||||
owner_counter_checkout: '卖家反驳结账',
|
||||
renter_confirm_checkout: '买家确认结账',
|
||||
owner_accept_checkout: '卖家接受结账',
|
||||
}
|
||||
return typeMap[type] || type
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -176,7 +187,7 @@ function refundStatusLabel(status: string) {
|
||||
<h2>交接记录</h2>
|
||||
<el-empty v-if="handoffRecords.length === 0" description="暂无交接记录" />
|
||||
<div v-for="record in handoffRecords" :key="record.id" class="timeline-item">
|
||||
<strong>{{ record.type }}</strong>
|
||||
<strong>{{ formatHandoffRecordType(record.type) }}</strong>
|
||||
<p>{{ record.content }}</p>
|
||||
<span>{{ formatDateTime(record.created_at) }}</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user