Merge branch 'develop'

This commit is contained in:
root
2026-03-03 13:42:57 +08:00
+17 -4
View File
@@ -615,14 +615,27 @@ export default function ApprovalDetail() {
{Object.entries(itinerary).map(([ikey, ivalue]) => {
if (ikey === 'id' || ikey === 'estimated_cost') return null
const itineraryLabelMap: Record<string, string> = {
departure: '出发地',
destination: '目的地',
start_date: '开始日期',
end_date: '结束日期',
start_time: '开始时间',
end_time: '结束时间',
transport: '出行方式',
trip_type: '行程类型',
remark: '备注',
}
const itineraryLabel = itineraryLabelMap[ikey] || ikey
let displayValue = ivalue as string
if (ikey.includes('date') && ivalue) {
displayValue = dayjs(String(ivalue)).format('YYYY-MM-DD')
// 处理时间字段
if ((ikey.includes('time') || ikey.includes('date')) && ivalue) {
displayValue = dayjs(String(ivalue)).format('YYYY-MM-DD HH:mm')
}
// 处理行程类型
if (ikey === 'trip_type' && ivalue) {
const tripTypeMap: Record<string, string> = {
oneway: '单程',
roundtrip: '往返',
}
displayValue = tripTypeMap[ivalue as string] || ivalue as string
}
return (
<div key={ikey} className={styles.itineraryRow}>