diff --git a/src/modules/finance/pages/FinanceCustomerAccountsView.vue b/src/modules/finance/pages/FinanceCustomerAccountsView.vue
index a1459ba7..f9c548bb 100644
--- a/src/modules/finance/pages/FinanceCustomerAccountsView.vue
+++ b/src/modules/finance/pages/FinanceCustomerAccountsView.vue
@@ -214,6 +214,7 @@ watch(() => [route.name, String(route.params.customerId || '')], ([name, custome
导出
{{ customerName(row.customerId, row.customerName) }}
+ {{ formatDateTime(row.lastChangedAt) }}
{{ row.status === 'ACTIVE' ? '正常' : '停用' }}
汇总:未收 {{ money(summary.receivable) }} · 待出账 {{ money(summary.pending) }} · 本期已收 {{ money(summary.received) }} · 应付 {{ money(summary.payable) }} CNY
diff --git a/src/modules/finance/pages/FinanceCustomerArapView.vue b/src/modules/finance/pages/FinanceCustomerArapView.vue
index bda59063..9eca5cd7 100644
--- a/src/modules/finance/pages/FinanceCustomerArapView.vue
+++ b/src/modules/finance/pages/FinanceCustomerArapView.vue
@@ -101,8 +101,21 @@ function customerName(customerId: string, snapshot?: string) {
}
function sourceTypeDisplay(value: unknown) {
const code = String(value || '').trim().toUpperCase()
- const label = financeSourceTypeLabel(code)
- return label === '其他来源' ? (code ? `未识别来源(${code})` : '来源类型暂不可用') : label
+ const labels: Record = {
+ INBOUND_FEE: '入库费用', ORDER_FEE: '订单费用', CONTAINER_COST: '整柜成本', CONTAINER_FEE: '柜次费用',
+ MANUAL_COST: '人工成本', STORAGE_FEE: '仓储费用',
+ }
+ return labels[code] || (code ? '其他费用来源' : '来源类型暂不可用')
+}
+function feeDocumentLabel(direction: ArapRow['direction'], feeName: unknown) {
+ const prefix = direction === 'RECEIVABLE' ? '应收费用' : '应付费用'
+ const name = String(feeName || '').trim()
+ return name ? `${prefix} · ${name}` : prefix
+}
+function sourceSummary(sourceType: unknown, orderId: unknown, inboundId: unknown, containerId: unknown) {
+ const relations = [inboundId ? '关联入库单' : '', orderId ? '关联订单' : '', containerId ? '关联柜次' : ''].filter(Boolean)
+ const type = sourceTypeDisplay(sourceType)
+ return relations.length ? `${type} · ${relations.join('、')}` : type
}
function formatDateTime(value: unknown) {
const raw = String(value || '').trim()
@@ -137,7 +150,7 @@ async function load(model: QueryModel = filters.value) {
try {
const direction = String(filters.value.direction || '') as 'RECEIVABLE' | 'PAYABLE' | ''
const items = await listFinanceFeePool(customerId || undefined, direction || undefined)
- allRows.value = items.map((item): ArapRow => ({ id: item.poolItemId, feeSourceId: item.feeSourceId, customerId: item.customerId, customerName: customerName(item.customerId, item.customerName), direction: item.direction, documentNo: item.poolItemId, sourceType: item.sourceType, sourceId: [item.inboundId ? `入库单 ${item.inboundId}` : '', item.orderId ? `订单 ${item.orderId}` : '', item.containerId ? `柜次 ${item.containerId}` : '', `来源 ${item.sourceId}/v${item.sourceVersion}`].filter(Boolean).join(' · '), orderId: item.orderId || '', inboundId: item.inboundId || '', containerId: item.containerId || '', feeName: item.feeItemName, amount: item.amount, status: item.status, occurredAt: item.createdAt, businessDate: item.createdAt, reviewStatus: item.status, settlementIncluded: null, statementGenerated: null }))
+ allRows.value = items.map((item): ArapRow => ({ id: item.poolItemId, feeSourceId: item.feeSourceId, customerId: item.customerId, customerName: customerName(item.customerId, item.customerName), direction: item.direction, documentNo: feeDocumentLabel(item.direction, item.feeItemName), sourceType: item.sourceType, sourceId: sourceSummary(item.sourceType, item.orderId, item.inboundId, item.containerId), orderId: item.orderId || '', inboundId: item.inboundId || '', containerId: item.containerId || '', feeName: item.feeItemName, amount: item.amount, status: item.status, occurredAt: item.createdAt, businessDate: item.createdAt, reviewStatus: item.status, settlementIncluded: null, statementGenerated: null }))
} catch (error) { loadError.value = getApiErrorDetails(error, '客户应收应付加载失败,请重试') }
finally { loading.value = false }
}
@@ -233,10 +246,11 @@ watch(() => [route.name, String(route.params.feeSourceId || '')], ([name, feeSou
按截止日期生成按勾选生成
详情审核结算手工成本
{{ customerName(row.customerId, row.customerName) }}{{ financeDirectionLabel(row.direction) }}
+ {{ feeDocumentLabel(row.direction, row.feeName) }}{{ sourceTypeDisplay(row.sourceType) }}{{ row.sourceId }}
{{ statusLabel(row.reviewStatus) }}
{{ row.settlementIncluded == null ? '待加载' : row.settlementIncluded ? '参与' : '不参与' }}
{{ row.statementGenerated == null ? '待加载' : row.statementGenerated ? '已生成' : '未生成' }}
- 已选 {{ selectedRows.length }} 笔 · 应收金额 {{ money(selectedAmount) }} CNY
+ {{ formatDateTime(row.businessDate) }}已选 {{ selectedRows.length }} 笔 · 应收金额 {{ money(selectedAmount) }} CNY
diff --git a/src/modules/finance/pages/FinanceFormalSettlementPage.vue b/src/modules/finance/pages/FinanceFormalSettlementPage.vue
index 8429e2c9..1a122afb 100644
--- a/src/modules/finance/pages/FinanceFormalSettlementPage.vue
+++ b/src/modules/finance/pages/FinanceFormalSettlementPage.vue
@@ -137,7 +137,12 @@ function displayDate(value?: string) { return value || '—' }
function rowTotal(value: unknown) { return totalAmount(value as SettlementRow) }
function rowPaid(value: unknown) { return paidAmount(value as SettlementRow) }
function rowOutstanding(value: unknown) { return Number((value as SettlementRow).outstandingAmount || 0) }
-function customerName(customerId: string, snapshot?: string) { return snapshot || customers.value.find((item) => String(item.id) === String(customerId))?.tenantName || '—' }
+function customerName(customerId: string, snapshot?: string) {
+ const mappedName = customers.value.find((item) => String(item.id) === String(customerId))?.tenantName
+ // Backend snapshots may contain the internal fallback label; never promote that ID to the finance UI.
+ if (snapshot && !/^客户\d+$/.test(snapshot.trim())) return snapshot
+ return mappedName || '—'
+}
function totalAmount(row: SettlementRow) { return props.kind === 'receivable' ? (row as FinanceReceivableSettlement).receivableAmount : (row as FinancePayableSettlement).payableAmount }
function paidAmount(row: SettlementRow) { return props.kind === 'receivable' ? (row as FinanceReceivableSettlement).receivedAmount : (row as FinancePayableSettlement).paidAmount }
function selectedSupplierName() { return selectedRow.value && 'supplierName' in selectedRow.value ? selectedRow.value.supplierName || '—' : '—' }