|
@@ -37,7 +37,10 @@ import {
|
|
|
getOrderFlowProcurementPivot,
|
|
getOrderFlowProcurementPivot,
|
|
|
getOrderFlowManufacturingPivot,
|
|
getOrderFlowManufacturingPivot,
|
|
|
getOrderFlowFinalAssemblyPivot,
|
|
getOrderFlowFinalAssemblyPivot,
|
|
|
|
|
+ // S8-STEP5B-ORDER-CHAIN-CLOSURE-1(P-2):筛选态 collab summary 需按 orderCodes 重取。
|
|
|
|
|
+ getOrderFlowAggregate,
|
|
|
} from '/@/views/aidop/s8/api/s8OrderFlowDomainApi';
|
|
} from '/@/views/aidop/s8/api/s8OrderFlowDomainApi';
|
|
|
|
|
+import { mapFinalAssemblyCollabSummary } from '/@/views/aidop/s8/monitoring/data/order-execution/domainMapper';
|
|
|
// ORDER-FLOW-CHAIN-PAGE2-ORIGINAL-LOGIC-RESTORE-1:baseline (isUnfiltered) 态下 L2/L3 使用 PPT 常量。
|
|
// ORDER-FLOW-CHAIN-PAGE2-ORIGINAL-LOGIC-RESTORE-1:baseline (isUnfiltered) 态下 L2/L3 使用 PPT 常量。
|
|
|
import {
|
|
import {
|
|
|
PPT_REVIEW_SUBSTEPS,
|
|
PPT_REVIEW_SUBSTEPS,
|
|
@@ -375,7 +378,17 @@ const showFinalAssemblyCollab = computed(() => activeStageKey.value === 'final_a
|
|
|
const finalStageSnapshot = computed(() =>
|
|
const finalStageSnapshot = computed(() =>
|
|
|
aggregateSnapshot.value?.stageSnapshots.find((s) => s.stageKey === 'final_assembly_shipping') ?? null,
|
|
aggregateSnapshot.value?.stageSnapshots.find((s) => s.stageKey === 'final_assembly_shipping') ?? null,
|
|
|
);
|
|
);
|
|
|
-const finalCollabSummary = computed(() => aggregateSnapshot.value?.finalAssemblyCollabSummary ?? null);
|
|
|
|
|
|
|
+// S8-STEP5B-ORDER-CHAIN-CLOSURE-1(P-2):筛选态下不得再用 baseline 的 collab summary。
|
|
|
|
|
+// aggregateSnapshot 只在挂载/刷新时以 scope=BASELINE_PPT 取一次、筛选变化不重取;
|
|
|
|
|
+// 而 finalAssemblyApiDetail 已按 orderCodes 过滤,两者混在同一张表里会串单——
|
|
|
|
|
+// 实测:筛选到 SO-2026-019 时「影响订单/主要风险」仍显示 SO-2026-020 的异常。
|
|
|
|
|
+// 修法:筛选态改用与 pivot 同 scope、同 orderCodes 取回的 collab summary(见 loadFinalAssemblyPivot)。
|
|
|
|
|
+const filteredCollabSummary = shallowRef<ReturnType<typeof mapFinalAssemblyCollabSummary>>(null);
|
|
|
|
|
+const finalCollabSummary = computed(() =>
|
|
|
|
|
+ isUnfiltered.value
|
|
|
|
|
+ ? (aggregateSnapshot.value?.finalAssemblyCollabSummary ?? null)
|
|
|
|
|
+ : filteredCollabSummary.value,
|
|
|
|
|
+);
|
|
|
|
|
|
|
|
function onRetry() {
|
|
function onRetry() {
|
|
|
// t3i:重试走 domain 流。
|
|
// t3i:重试走 domain 流。
|
|
@@ -512,13 +525,22 @@ async function loadFinalAssemblyPivot() {
|
|
|
finalAssemblyApiLoading.value = true;
|
|
finalAssemblyApiLoading.value = true;
|
|
|
finalAssemblyApiError.value = null;
|
|
finalAssemblyApiError.value = null;
|
|
|
try {
|
|
try {
|
|
|
- const pivot = await getOrderFlowFinalAssemblyPivot({ scope, orderCodes });
|
|
|
|
|
|
|
+ // S8-STEP5B-ORDER-CHAIN-CLOSURE-1(P-2):筛选态同步取同 scope / 同 orderCodes 的 collab summary,
|
|
|
|
|
+ // 让「影响订单 / 风险订单 / 主要风险」与 pivot 落在同一批订单上;共用 mySeq 防旧响应覆盖。
|
|
|
|
|
+ const [pivot, agg] = await Promise.all([
|
|
|
|
|
+ getOrderFlowFinalAssemblyPivot({ scope, orderCodes }),
|
|
|
|
|
+ isBaseline ? Promise.resolve(null) : getOrderFlowAggregate({ scope, orderCodes }),
|
|
|
|
|
+ ]);
|
|
|
if (mySeq !== finalAssemblyRequestSeq) return;
|
|
if (mySeq !== finalAssemblyRequestSeq) return;
|
|
|
finalAssemblyApiDetail.value = adaptFinalAssemblyPivotFromApi(pivot);
|
|
finalAssemblyApiDetail.value = adaptFinalAssemblyPivotFromApi(pivot);
|
|
|
|
|
+ filteredCollabSummary.value = isBaseline
|
|
|
|
|
+ ? null
|
|
|
|
|
+ : mapFinalAssemblyCollabSummary(agg?.finalAssemblyCollabSummary ?? null);
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
if (mySeq !== finalAssemblyRequestSeq) return;
|
|
if (mySeq !== finalAssemblyRequestSeq) return;
|
|
|
finalAssemblyApiError.value = '总装发货数据加载失败,请稍后重试';
|
|
finalAssemblyApiError.value = '总装发货数据加载失败,请稍后重试';
|
|
|
finalAssemblyApiDetail.value = null;
|
|
finalAssemblyApiDetail.value = null;
|
|
|
|
|
+ filteredCollabSummary.value = null;
|
|
|
} finally {
|
|
} finally {
|
|
|
if (mySeq === finalAssemblyRequestSeq) {
|
|
if (mySeq === finalAssemblyRequestSeq) {
|
|
|
finalAssemblyApiLoading.value = false;
|
|
finalAssemblyApiLoading.value = false;
|