diff --git a/klp-ui/src/views/wms/coil/merge.vue b/klp-ui/src/views/wms/coil/merge.vue index 6e0b0421..7e6366e2 100644 --- a/klp-ui/src/views/wms/coil/merge.vue +++ b/klp-ui/src/views/wms/coil/merge.vue @@ -89,6 +89,40 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
@@ -300,6 +334,8 @@ @@ -907,25 +995,17 @@ export default { /* 流程图容器 */ .flow-container { display: flex; - gap: 40px; + gap: 20px; background: #fff; - padding: 30px; + padding: 20px; border-radius: 4px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); min-height: 600px; } .flow-left { - flex: 0 0 300px; -} - -.flow-middle { - flex: 0 0 120px; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - position: relative; + flex: 0 0 340px; + overflow-y: auto; } .flow-right { @@ -983,6 +1063,12 @@ export default { .coil-body { padding: 20px; + + &.two-col { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0 12px; + } } .coil-info-row { @@ -1041,43 +1127,6 @@ export default { } /* 流程箭头 */ -.flow-arrow-container { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - width: 100%; -} - -.arrow-line { - position: relative; - height: 3px; - margin: 20px 0; - display: flex; - align-items: center; -} - -.arrow-start { - width: 8px; - height: 8px; - background: #0066cc; - border-radius: 50%; -} - -.arrow-body { - flex: 1; - height: 3px; - background: #0066cc; -} - -.arrow-end { - width: 0; - height: 0; - border-left: 12px solid #0066cc; - border-top: 8px solid transparent; - border-bottom: 8px solid transparent; -} - .flow-label { position: absolute; bottom: 20px; @@ -1223,6 +1272,31 @@ export default { } } +/* 双列表单布局 */ +.form-row { + display: flex; + gap: 16px; + margin-bottom: 0; + + &:last-child { + margin-bottom: 0; + } +} + +.form-item-half { + flex: 1; + min-width: 0; +} + +.form-item-full { + width: 100%; +} + +/* 排产单区域 */ +.plan-sheet-section { + margin-top: 16px; +} + // 异常信息样式 .abnormal-container { display: flex; diff --git a/klp-ui/src/views/wms/coil/typing.vue b/klp-ui/src/views/wms/coil/typing.vue index d72bcfbb..e97f715d 100644 --- a/klp-ui/src/views/wms/coil/typing.vue +++ b/klp-ui/src/views/wms/coil/typing.vue @@ -11,12 +11,17 @@ - +
{{ currentLineName }}排产计划
+ + +
- + @@ -503,8 +508,9 @@ export default { parsedCacheData: null, itemSelectorQueryParams: {}, // 排产计划 - planDetailList: [], - currentPlanSheet: null, + planSheetList: [], + planSheetDetailMap: {}, + activePlanSheetId: null, currentLineName: '', }; }, @@ -512,6 +518,9 @@ export default { l2HotCoilId() { return (this.currentInfo && this.currentInfo.enterCoilNo) || '' }, + activePlanSheetDetails() { + return this.planSheetDetailMap[this.activePlanSheetId] || [] + }, /** 是否双机架工序(actionType 504=正常 / 524=修复) */ isDrAction() { return this.actionType === 504 || this.actionType === 524 @@ -702,7 +711,7 @@ export default { } }, - // 根据当前actionType加载对应产线的排产计划 + // 根据当前actionType加载对应产线的最近3个排产计划 async loadPlanDetails() { const lineName = actionTypeToLineName[this.actionType] if (!lineName) return @@ -711,24 +720,33 @@ export default { const sheetRes = await listPlanSheet({ lineName, pageNum: 1, - pageSize: 1, + pageSize: 3, }) - if (sheetRes.rows && sheetRes.rows.length > 0) { - const planSheet = sheetRes.rows[0] - this.currentPlanSheet = planSheet - const detailRes = await listPlanDetail({ - planSheetId: planSheet.planSheetId, - pageNum: 1, - pageSize: 50, - }) - if (detailRes.rows) { - this.planDetailList = detailRes.rows + this.planSheetList = sheetRes.rows || [] + this.planSheetDetailMap = {} + if (this.planSheetList.length > 0) { + this.activePlanSheetId = this.planSheetList[0].planSheetId + for (const sheet of this.planSheetList) { + this.fetchPlanSheetDetail(sheet.planSheetId) } } } catch (error) { console.error('加载排产计划失败', error) } }, + async fetchPlanSheetDetail(planSheetId) { + try { + const detailRes = await listPlanDetail({ + planSheetId, + pageNum: 1, + pageSize: 50, + }) + if (detailRes.rows) { + const details = detailRes.rows.sort((a, b) => (parseInt(a.bizSeqNo) || 0) - (parseInt(b.bizSeqNo) || 0)) + this.$set(this.planSheetDetailMap, planSheetId, details) + } + } catch (e) { console.error('查询排产单明细失败', e) } + }, // 复制当前信息到更新表单 copyFromCurrent() {