This commit is contained in:
zlwu committed 2026-07-06 19:41:24 +08:00
1 parent cdaa0ac273
commit b7cd657f32
32 files changed
+2885 -1936

No files matched your search

@@ -40,7 +40,7 @@ export type ProtocolStandardImportParsed = {
medicalStaff?: string
hospitalName?: string
salesUserName?: string
payMode: 'dj' | 'fq'
payMode: 'dj' | 'fq' | 'djfq'
contractAmount?: number | null
transferTypeLabel?: string
paymentTransfers: ProtocolPaymentTransferHint[]
@@ -193,12 +193,13 @@ function earliestCollectTime(hints: ProtocolSampleImportHint[]): string | undefi
return times.sort((a, b) => a.localeCompare(b))[0]
}
/** 缴费方式:仅「分期」为 fq,其余(含微信/趸交)均为 dj */
/** 缴费方式:趸交+分期 → djfq;仅「分期」→ fq;其余 → dj */
export function parsePayModeFromText(value: string): {
payMode: 'dj' | 'fq'
payMode: 'dj' | 'fq' | 'djfq' | 'djfq'
transferLabel?: string
} {
const v = (value || '').trim()
if (/趸交\s*[++]\s*分期|趸交.*分期/.test(v)) return { payMode: 'djfq' }
if (/分期/.test(v)) return { payMode: 'fq' }
if (/微信|支付宝|银行卡|银行|现金/.test(v)) {
return { payMode: 'dj', transferLabel: v }