feat: 支持控制出库时间轴显示
This commit is contained in:
@@ -58,6 +58,7 @@ export class PublicTraceService {
|
||||
outTime: Date;
|
||||
images: Array<{ fileKey: string; fileName: string; mimeType: string; id: bigint; size: bigint; width: number; height: number; sortOrder: number }>;
|
||||
} | null,
|
||||
showOutboundTimeline: boolean,
|
||||
) {
|
||||
const timeline = nodes.map((n) => ({
|
||||
nodeType: n.nodeType,
|
||||
@@ -71,7 +72,7 @@ export class PublicTraceService {
|
||||
|
||||
const outMedia = outbound?.images.map((image) => this.mapOutboundImage(image)) ?? [];
|
||||
|
||||
if (outbound) {
|
||||
if (showOutboundTimeline && outbound) {
|
||||
// 单件出库记录:不下发中文标题/说明,标记 system=OUTBOUND_RECORD 由 C 端按语言本地化
|
||||
timeline.push({
|
||||
nodeType: 'OUTBOUND',
|
||||
@@ -319,9 +320,14 @@ export class PublicTraceService {
|
||||
artist: artwork.artist,
|
||||
archiveNo: artwork.archiveNo,
|
||||
images: this.mapMedia(artwork.images),
|
||||
showOutboundTimeline: artwork.showOutboundTimeline,
|
||||
fields: this.buildFields(artwork.template.fields, artwork.dynamicFields),
|
||||
},
|
||||
timeline: this.buildTimeline(artwork.traceNodes, code.outbound ?? null),
|
||||
timeline: this.buildTimeline(
|
||||
artwork.traceNodes,
|
||||
code.outbound ?? null,
|
||||
artwork.showOutboundTimeline === true,
|
||||
),
|
||||
outbound: code.outbound
|
||||
? {
|
||||
outTime: code.outbound.outTime,
|
||||
|
||||
Reference in New Issue
Block a user