优化
This commit is contained in:
@@ -72,6 +72,9 @@ const financeOperationActionLabels: Record<string, string> = {
|
||||
const financeOperationResultLabels: Record<string, string> = {
|
||||
SUCCESS: '操作成功', FAILED: '操作失败', PENDING: '待处理', PROCESSING: '处理中',
|
||||
}
|
||||
const financeDirectionLabels: Record<string, string> = {
|
||||
RECEIVABLE: '应收', PAYABLE: '应付',
|
||||
}
|
||||
|
||||
function codeLabel(value: unknown, labels: Record<string, string>, unknownLabel: string) {
|
||||
const code = normalizeStatus(value)
|
||||
@@ -84,3 +87,4 @@ export const financeBusinessTypeLabel = (value: unknown) => codeLabel(value, fin
|
||||
export const financeDocumentTypeLabel = (value: unknown) => codeLabel(value, financeDocumentTypeLabels, '其他单据')
|
||||
export const financeOperationActionLabel = (value: unknown) => codeLabel(value, financeOperationActionLabels, '其他操作')
|
||||
export const financeOperationResultLabel = (value: unknown) => codeLabel(value, financeOperationResultLabels, '结果未知')
|
||||
export const financeDirectionLabel = (value: unknown) => codeLabel(value, financeDirectionLabels, '未知方向')
|
||||
|
||||
Reference in New Issue
Block a user