feat: 拆分上链与出库管理界面
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="page table-page outbound-page">
|
||||
<div :class="['page', 'table-page', 'outbound-page', { embedded }]">
|
||||
<div class="page-toolbar outbound-toolbar">
|
||||
<div class="section-title">{{ t('pages.outbound.batchImportTitle') }}</div>
|
||||
<div class="spacer" />
|
||||
@@ -94,6 +94,8 @@ import { openMediaViewer } from '@/composables/openMediaViewer';
|
||||
import { useRemoteSort } from '@/utils/tableSort';
|
||||
import { resolveMediaUrl } from '@/utils/mediaUrl';
|
||||
|
||||
withDefaults(defineProps<{ embedded?: boolean }>(), { embedded: false });
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
const auth = useAuthStore();
|
||||
|
||||
@@ -1039,22 +1041,21 @@ function localizeBackendError(value?: unknown) {
|
||||
const patterns: Array<[RegExp, string, string]> = [
|
||||
[/^追溯码在本次导入中重复(首次出现于第 (\d+) 行)$/, 'duplicateTraceCode', 'row'],
|
||||
[/^批次编号不匹配,实际为 (.+)$/, 'batchNoMismatch', 'value'],
|
||||
[/^每行最多填写 (\d+) 张出库图$/, 'tooManyImages', 'count'],
|
||||
[/^ZIP 中存在重复图片路径:(.+)$/, 'duplicateZipImage', 'path'],
|
||||
[/^图片超过 100MB:(.+)$/, 'imageTooLarge', 'path'],
|
||||
[/^导入数据超过 (\d+) 行限制$/, 'tooManyRows', 'count'],
|
||||
[/^ZIP 文件数量超过限制(最多 (\d+) 个)$/, 'zipEntryLimit', 'count'],
|
||||
[/^出库导入临时磁盘空间不足:至少需要 (\d+)MB 可用空间$/, 'tempDiskSpace', 'mb'],
|
||||
[/^xlsx 文件数量超过限制(最多 (\d+) 个)$/, 'xlsxEntryLimit', 'count'],
|
||||
[/^出库图片引用总数超过限制(最多 (\d+) 张)$/, 'imageReferenceLimit', 'count'],
|
||||
[/^xlsx 列数超过 (\d+) 列限制$/, 'tooManyColumns', 'count'],
|
||||
[/^xlsx 表头重复:(.+)$/, 'duplicateHeader', 'value'],
|
||||
[/^xlsx 包含未知表头:(.+)$/, 'unknownHeaders', 'value'],
|
||||
[/^xlsx 缺少必填表头:(.+)$/, 'missingHeaders', 'value'],
|
||||
[/^图片路径不安全:(.+)$/, 'unsafeImagePath', 'path'],
|
||||
[/^图片必须位于 images 目录:(.+)$/, 'imageOutsideDirectory', 'path'],
|
||||
[/^图片必须位于 images\/<12位追溯码>\/ 目录:(.+)$/, 'imageCodeDirectory', 'path'],
|
||||
[/^图片目录对应的追溯码未出现在 xlsx 中:(.+)$/, 'orphanImageDirectory', 'code'],
|
||||
[/^不支持的图片格式:(.+)$/, 'unsupportedImage', 'path'],
|
||||
[/^同一行重复引用图片:(.+)$/, 'duplicateImage', 'path'],
|
||||
[/^图片不存在:(.+)$/, 'imageMissing', 'path'],
|
||||
[/^图片实际格式与扩展名不一致:(.+)$/, 'imageFormat', 'path'],
|
||||
[/^图片像素尺寸超过限制:(.+)$/, 'imagePixels', 'path'],
|
||||
[/^不支持多帧图片:(.+)$/, 'animatedImage', 'path'],
|
||||
@@ -1076,6 +1077,18 @@ function localizeBackendError(value?: unknown) {
|
||||
.outbound-page {
|
||||
min-width: 0;
|
||||
}
|
||||
.outbound-page.embedded {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
max-height: none;
|
||||
padding: 0;
|
||||
}
|
||||
.outbound-page.embedded .page-toolbar {
|
||||
position: static;
|
||||
margin: 0 0 12px;
|
||||
padding: 0 0 12px;
|
||||
box-shadow: none;
|
||||
}
|
||||
.outbound-toolbar {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user