feat: 拆分上链与出库管理界面

This commit is contained in:
Nixevol
2026-07-16 11:50:24 +08:00
parent ebc2603815
commit fee1efc490
22 changed files with 2844 additions and 250 deletions
+4
View File
@@ -22,10 +22,14 @@ const STATUS_TYPE: Record<string, 'default' | 'success' | 'warning' | 'error' |
UNBOUND: 'default',
INACTIVE: 'info',
PENDING: 'info',
SUBMITTING: 'info',
CONFIRMING: 'info',
PROCESSING: 'info',
GENERATING: 'info',
PARTIAL: 'warning',
UNKNOWN: 'warning',
CANCELLED: 'warning',
SKIPPED: 'default',
DISABLED: 'warning',
ABNORMAL: 'error',
FAILED: 'error',
+16
View File
@@ -0,0 +1,16 @@
import { i18n } from '@/locales';
const REASON_KEYS: Record<string, string> = {
'该追溯码已登记出库': 'alreadyOutbound',
'停用或异常追溯码不可上链': 'traceCodeUnavailable',
'作品未生效或未审核通过': 'artworkUnavailable',
'作品缺少有效主图': 'missingPrimaryImage',
'该追溯码已上链': 'alreadyOnchain',
'该追溯码正在上链处理中': 'onchainProcessing',
};
export function localizeOperationReason(value: unknown): string {
const text = typeof value === 'string' ? value : '';
const key = REASON_KEYS[text];
return key ? i18n.global.t(`pages.operations.reason.${key}`) : text;
}