// 后端单号与溯源号为“前缀-32 位随机串”,列表中保留首尾 4 位便于人工核对,完整值放在 title 中 export function shortDocNo(value) { const text = String(value ?? '') const match = text.match(/^([A-Z]{2,4}-)([0-9a-f]{20,})$/i) if (!match) return text const body = match[2].toUpperCase() return `${match[1]}${body.slice(0, 4)}…${body.slice(-4)}` }