diff --git a/frontend/src/features/chat/views/ShippingOrderReviewView.vue b/frontend/src/features/chat/views/ShippingOrderReviewView.vue index 73e8972e..e5cadf00 100644 --- a/frontend/src/features/chat/views/ShippingOrderReviewView.vue +++ b/frontend/src/features/chat/views/ShippingOrderReviewView.vue @@ -2760,6 +2760,16 @@ function releaseBarLineRequiredFields(line: { snapshot_line_id?: number | null } return fulfillment?.release_required_fields || []; } +/** + * 缺失徽标文案:前缀 + 数量 + 后缀(纯文本键拼接)。 + * 【注】不用 vue-i18n 命名插值 `{n}`——11.4.7 对该实例深层键+插值组合存在解析异常 + * (te=false、t 回原始 key,已用 vitest 分层断言复现,见 src/i18n.spec.ts)。 + */ +function releaseMissingBadgeLabel(line: { snapshot_line_id?: number | null }): string { + const n = releaseBarLineRequiredFields(line).length; + return `${t('chat.shippingOrderReview.releaseBar.missingPrefix')}${n}${t('chat.shippingOrderReview.releaseBar.missingSuffix')}`; +} + /** 缺字段型短缺行:放行走行内补录(而非仅原因的旧弹窗路径)。 */ function releaseBarHasFields(line: { snapshot_line_id?: number | null; @@ -5309,7 +5319,7 @@ watch(
| {{ preparationCustomerPoLineLabel() }} | {{ t('chat.shippingOrderReview.workbench.resultReservation') }} | {{ t('chat.shippingOrderReview.workbench.resultPartNumber') }} | {{ t('chat.shippingOrderReview.lifecycle.prepare.requiredQty') }} | {{ t('chat.shippingOrderReview.lifecycle.prepare.inventorySource') }} | {{ t('chat.shippingOrderReview.odmConflict.column') }} | {{ t('chat.shippingOrderReview.fulfillmentDecision.availableQty') }} | {{ t('chat.shippingOrderReview.fulfillmentDecision.shortage') }} | {{ t('chat.shippingOrderReview.lifecycle.prepare.lineStatus') }} | {{ t('chat.shippingOrderReview.lineOps.moreActions') }} | |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ preparationLineCustomerPoLine(line) }} | {{ line.reservation_id || '—' }} | {{ line.part_number || '—' }} | {{ line.required_qty ?? '—' }} | {{ formalPreparationLineSource(line) || '—' }} | {{ line.chosen_odm_id || '—' }} | {{ line.available_qty ?? '—' }} | {{ line.shortage_qty ?? '—' }} | {{ formalPreparationLineStatusLabel(line) }}{{ t('chat.shippingOrderReview.releaseBar.missingBadge', { n: releaseBarLineRequiredFields(line).length }) }} | ||
{{ t('chat.shippingOrderReview.releaseBar.label') }} | ||||||||||
| {{ preparationLineCustomerPoLine(line) }} | {{ line.reservation_id || '—' }} | {{ line.part_number || '—' }} | {{ line.required_qty ?? '—' }} | {{ formalPreparationLineSource(line) || '—' }} | {{ line.chosen_odm_id || '—' }} | {{ line.available_qty ?? '—' }} | {{ line.shortage_qty ?? '—' }} | {{ formalPreparationLineStatusLabel(line) }}{{ releaseMissingBadgeLabel(line) }} | ||
{{ t('chat.shippingOrderReview.releaseBar.label') }} |