fix: 优化后台体验与导出日志交互

This commit is contained in:
Nixevol
2026-07-05 00:04:35 +08:00
parent 935375a904
commit 4122897725
44 changed files with 798 additions and 221 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ export class ImportProcessor extends WorkerHost {
for (const row of rows) {
try {
const code = await this.prisma.traceCode.findUnique({ where: { shortCode: row.shortCode || '' } });
if (!code) throw new Error('短码不存在');
if (!code) throw new Error('追溯码不存在');
const imageItems = jsonArray<{ key: string; url?: string; name?: string; type?: string }>(row.outImageKeys);
await this.prisma.traceCode.update({
where: { id: code.id },
@@ -112,7 +112,7 @@ export class ImportProcessor extends WorkerHost {
const ws = wb.addWorksheet('导入结果');
ws.columns = [
{ header: '行号', key: 'rowNo', width: 10 },
{ header: '短码', key: 'shortCode', width: 18 },
{ header: '追溯码', key: 'shortCode', width: 18 },
{ header: '批次编号', key: 'batchNo', width: 22 },
{ header: '出库时间', key: 'outTime', width: 22 },
{ header: '图片数量', key: 'imageCount', width: 10 },