feat(shipping-notice): 新增库存快照管理与RPA批量导出功能

This commit is contained in:
hugo committed 2026-07-08 08:59:08 +08:00
1 parent fc694a8f43
commit d54f51ddc3
48 files changed
+4970 -543

No files matched your search

@@ -131,6 +131,16 @@ const detailErrorMessage = computed(() =>
sanitizeShippingRuntimeStatusText(String(detail.value?.error_message || '').trim()),
);
const inventorySnapshotLabel = (triggerType?: string | null) => {
const key = String(triggerType || 'on_demand');
const map: Record<string, string> = {
scheduled: t('workspace.shippingNotice.inventorySnapshot.sourceScheduled'),
on_demand: t('workspace.shippingNotice.inventorySnapshot.sourceOnDemand'),
manual_upload: t('workspace.shippingNotice.inventorySnapshot.sourceManual'),
};
return map[key] || map.on_demand;
};
const loadCases = async () => {
loading.value = true;
try {
@@ -378,6 +388,39 @@ onMounted(async () => {
<div><dt class="text-muted">{{ $t('workspace.shippingNotice.fields.freightRef') }}</dt><dd>{{ detail.freight_ref_no || '—' }}</dd></div>
</dl>
<div
v-if="detail.inventory_snapshot"
class="rounded-2xl border border-default/80 bg-surface px-4 py-3 text-sm"
>
<h3 class="mb-2 text-sm font-semibold text-secondary">
{{ $t('workspace.shippingNotice.inventorySnapshot.title') }}
</h3>
<dl class="grid gap-2 sm:grid-cols-2">
<div>
<dt class="text-xs text-muted">{{ $t('workspace.shippingNotice.inventorySnapshot.warehouseId') }}</dt>
<dd class="font-mono">{{ detail.inventory_snapshot.warehouse_id || '—' }}</dd>
</div>
<div>
<dt class="text-xs text-muted">{{ $t('workspace.shippingNotice.inventorySnapshot.source') }}</dt>
<dd>{{ inventorySnapshotLabel(detail.inventory_snapshot.trigger_type) }}</dd>
</div>
<div>
<dt class="text-xs text-muted">{{ $t('workspace.shippingNotice.inventorySnapshot.exportedAt') }}</dt>
<dd>{{ detail.inventory_snapshot.exported_at || '—' }}</dd>
</div>
<div>
<dt class="text-xs text-muted">{{ $t('workspace.shippingNotice.inventorySnapshot.fileNo') }}</dt>
<dd class="font-mono text-xs">{{ detail.inventory_snapshot.inventory_file_no || '—' }}</dd>
</div>
</dl>
<div
v-if="detail.inventory_snapshot.is_fresh === false"
class="mt-2 text-xs text-amber-700"
>
{{ $t('workspace.shippingNotice.inventorySnapshot.expired') }}
</div>
</div>
<div v-if="detailErrorMessage" class="rounded-xl border border-rose-200 bg-rose-50 px-3 py-2 text-sm text-rose-700">
{{ detailErrorMessage }}
</div>