feat: 更新静态出库模板与大包上传

This commit is contained in:
Nixevol
2026-07-14 10:04:33 +08:00
parent 9644f5c128
commit 2250869244
36 changed files with 1378 additions and 461 deletions
+2 -9
View File
@@ -84,7 +84,6 @@ import { useI18n } from 'vue-i18n';
import type { UploadCustomRequestOptions } from 'naive-ui';
import { NButton, NIcon, NImage, NTag, NText, type DataTableColumns } from 'naive-ui';
import { CloudUploadOutline, DownloadOutline } from '@vicons/ionicons5';
import { MAX_OUTBOUND_IMPORT_SIZE } from '@artveris/shared';
import { jobApi, outboundApi } from '@/api';
import { useAuthStore } from '@/stores/auth';
import { message } from '@/utils/feedback';
@@ -694,10 +693,6 @@ function validateUploadFile(file: File | null | undefined): file is File {
message.error(t('pages.outbound.zipFileOnly'));
return false;
}
if (file.size > MAX_OUTBOUND_IMPORT_SIZE) {
message.error(t('pages.outbound.zipFileTooLarge', { size: MAX_OUTBOUND_IMPORT_SIZE / 1024 / 1024 }));
return false;
}
return true;
}
@@ -1010,8 +1005,7 @@ const BACKEND_ERROR_KEY_BY_MESSAGE: Record<string, string> = {
'导入会话中没有待处理数据': 'noPendingRows',
'ZIP 中必须且只能包含一个 xlsx 文件': 'xlsxCount',
'xlsx 文件必须位于 ZIP 根目录': 'xlsxRoot',
'xlsx 文件超过 10MB': 'xlsxTooLarge',
'ZIP 解压后总大小超过限制': 'zipExpandedTooLarge',
'xlsx 文件超过 100MB': 'xlsxTooLarge',
'xlsx 解压后总大小超过限制': 'xlsxExpandedTooLarge',
'ZIP 文件结构无效': 'zipInvalidStructure',
'xlsx 文件结构无效': 'xlsxInvalidStructure',
@@ -1047,12 +1041,11 @@ function localizeBackendError(value?: unknown) {
[/^批次编号不匹配,实际为 (.+)$/, 'batchNoMismatch', 'value'],
[/^每行最多填写 (\d+) 张出库图$/, 'tooManyImages', 'count'],
[/^ZIP 中存在重复图片路径:(.+)$/, 'duplicateZipImage', 'path'],
[/^图片超过 10MB:(.+)$/, 'imageTooLarge', 'path'],
[/^图片超过 100MB:(.+)$/, 'imageTooLarge', 'path'],
[/^导入数据超过 (\d+) 行限制$/, 'tooManyRows', 'count'],
[/^ZIP 文件数量超过限制(最多 (\d+) 个)$/, 'zipEntryLimit', 'count'],
[/^xlsx 文件数量超过限制(最多 (\d+) 个)$/, 'xlsxEntryLimit', 'count'],
[/^出库图片引用总数超过限制(最多 (\d+) 张)$/, 'imageReferenceLimit', 'count'],
[/^出库图片按引用累计大小超过限制(最多 (\d+)MB)$/, 'storedImageSizeLimit', 'count'],
[/^xlsx 列数超过 (\d+) 列限制$/, 'tooManyColumns', 'count'],
[/^xlsx 表头重复:(.+)$/, 'duplicateHeader', 'value'],
[/^xlsx 包含未知表头:(.+)$/, 'unknownHeaders', 'value'],