@@ -14,9 +14,9 @@
-
-
@@ -37,9 +37,9 @@
-
-
@@ -152,6 +152,31 @@ export default {
methods: {
isEmpty(list) {
return !list || list.length === 0 || list.every(c => !c || c.currentCoilNo === '-')
+ },
+ // 获取创建步骤的钢卷列表(含兜底逻辑)
+ getCreationCoils(step, allSteps) {
+ // 如果已有有效钢卷信息,直接返回
+ if (!this.isEmpty(step.newCoilInfoList)) return step.newCoilInfoList
+
+ // 兜底1:从后续步骤的"变更前"获取(加工前的钢卷)
+ // 使用 display_step 或 storage_index 匹配步骤(避免 traceLayout 下对象引用不一致)
+ if (allSteps && allSteps.length > 1) {
+ const stepId = step.original?.display_step ?? step.original?.storage_index
+ const idx = stepId != null
+ ? allSteps.findIndex(s => (s.original?.display_step ?? s.original?.storage_index) === stepId)
+ : -1
+ if (idx >= 0 && idx < allSteps.length - 1) {
+ const nextStep = allSteps[idx + 1]
+ if (!this.isEmpty(nextStep.oldCoilInfoList)) return nextStep.oldCoilInfoList
+ }
+ }
+
+ // 兜底2:使用当前钢卷信息作为创建的卷
+ if (this.coilInfo && this.coilInfo.currentCoilNo && this.coilInfo.currentCoilNo !== '-') {
+ return [this.coilInfo]
+ }
+
+ return step.newCoilInfoList
}
}
}
diff --git a/klp-ui/src/views/wms/coil/panels/CoilTraceResult.vue b/klp-ui/src/views/wms/coil/panels/CoilTraceResult.vue
index befb579f..cffd7a85 100644
--- a/klp-ui/src/views/wms/coil/panels/CoilTraceResult.vue
+++ b/klp-ui/src/views/wms/coil/panels/CoilTraceResult.vue
@@ -5,7 +5,7 @@
-
+
@@ -23,7 +23,7 @@
-
+
@@ -35,7 +35,7 @@
合卷汇聚
-
+