(name: string)
| 44 | up = up.replace(/\bLIMITED\b/g, "LTD."); |
| 45 | // 在 (TAIWAN)LTD. 中间补逗号 |
| 46 | up = up.replace(/\)(\s*)LTD\./g, "), LTD."); |
| 47 | // 避免重复逗号 |
| 48 | up = up.replace(/,\s*,/g, ", "); |
| 49 | return up; |
| 50 | } |
| 51 | |
| 52 | function formatType(t: any): string { |
| 53 | const map: Record<string, string> = { |
| 54 | credit: "信用", |
| 55 | debit: "借记", |
| 56 | charge: "签账", |
| 57 | prepaid: "预付", |
| 58 | }; |
| 59 | const k = typeof t === "string" ? t.toLowerCase() : ""; |
| 60 | return k ? (map[k] || k) : "未知"; |