From 30b32ec5e19d03da28e183a99aac3ead2bbfa584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Sat, 26 Sep 2026 17:23:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=88=E6=9D=BF=E5=88=86=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../haianPalletAssembly.vue | 30 +++++++++++++++++ .../haianAutoWarehouse/haianPalletPacking.vue | 32 +++++++++++++++++-- .../haianAutoWarehouse/haianPalletSorting.vue | 32 +++++++++++++++++-- 3 files changed, 90 insertions(+), 4 deletions(-) diff --git a/src/views/modules/haianAutoWarehouse/haianPalletAssembly.vue b/src/views/modules/haianAutoWarehouse/haianPalletAssembly.vue index e9407ea..06fd4a8 100644 --- a/src/views/modules/haianAutoWarehouse/haianPalletAssembly.vue +++ b/src/views/modules/haianAutoWarehouse/haianPalletAssembly.vue @@ -384,13 +384,17 @@ export default { } }, computed: { + // 按托盘类型决定扫入位置图:钢四宫格菱形,平托盘两层都按行 2x2,九宫格仍按行 - rqrq getPositionGridClass() { const len = this.positionGrid.length if (len === 1) return 'position-grid-1' if (len === 2) return 'position-grid-4' + if (len === 4 && this.currentPalletType === 'A0102') return 'position-grid-steel-4' + if (len === 4 && this.currentPalletType === 'A0301') return 'position-grid-flat-4' if (len === 4) return 'position-grid-4' return 'position-grid-9' }, + // 钢托盘四宫格按现场菱形插占位;平托盘保持 1-4 原序,由按行网格画成 1 2 / 3 4 - rqrq displayPositionGrid() { const len = this.positionGrid.length if (len === 2) { @@ -403,6 +407,18 @@ export default { { ...pos2, isPlaceholder: false } ] } + if (len === 4 && this.currentPalletType === 'A0102') { + const findPos = (no) => { + const found = this.positionGrid.find((p) => String(p.position) === String(no)) + return found ? { ...found, isPlaceholder: false } : { position: String(no), count: 0, isPlaceholder: false } + } + const blank = () => ({ position: '', count: 0, isPlaceholder: true }) + return [ + blank(), findPos('1'), blank(), + findPos('2'), blank(), findPos('3'), + blank(), findPos('4'), blank() + ] + } return this.positionGrid.map((p) => ({ ...p, isPlaceholder: false })) }, // 直接组盘规则:area与location_code同时为空时才允许推送 - rqrq @@ -1190,6 +1206,20 @@ export default { grid-auto-flow: column; } +/* 钢托盘四宫格:3x3 里只留十字,上1 左2 右3 下4 - rqrq */ +.position-grid.position-grid-steel-4 { + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(3, 1fr); + grid-auto-flow: row; +} + +/* 平托盘两层都是4格,按行铺成 1 2 / 3 4 - rqrq */ +.position-grid.position-grid-flat-4 { + grid-template-columns: repeat(2, 1fr); + grid-template-rows: repeat(2, 1fr); + grid-auto-flow: row; +} + .position-grid.position-grid-9 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); diff --git a/src/views/modules/haianAutoWarehouse/haianPalletPacking.vue b/src/views/modules/haianAutoWarehouse/haianPalletPacking.vue index 53b64fe..b21399e 100644 --- a/src/views/modules/haianAutoWarehouse/haianPalletPacking.vue +++ b/src/views/modules/haianAutoWarehouse/haianPalletPacking.vue @@ -428,15 +428,17 @@ export default { } }, computed: { - // 根据位置数量决定网格布局,确保与原PDA扫码弹窗一致 - rqrq + // 按托盘类型决定扫入位置图:钢四宫格菱形,平托盘两层都按行 2x2,九宫格仍按行 - rqrq getPositionGridClass() { const len = this.positionGrid.length if (len === 1) return 'position-grid-1' if (len === 2) return 'position-grid-4' + if (len === 4 && this.currentPalletType === 'A0102') return 'position-grid-steel-4' + if (len === 4 && this.currentPalletType === 'A0301') return 'position-grid-flat-4' if (len === 4) return 'position-grid-4' return 'position-grid-9' }, - // 2宫格场景采用对角展示,其余按原位置顺序展示 - rqrq + // 钢托盘四宫格按现场菱形插占位;平托盘保持 1-4 原序,由按行网格画成 1 2 / 3 4 - rqrq displayPositionGrid() { const len = this.positionGrid.length if (len === 2) { @@ -449,6 +451,18 @@ export default { { ...pos2, isPlaceholder: false } ] } + if (len === 4 && this.currentPalletType === 'A0102') { + const findPos = (no) => { + const found = this.positionGrid.find((p) => String(p.position) === String(no)) + return found ? { ...found, isPlaceholder: false } : { position: String(no), count: 0, isPlaceholder: false } + } + const blank = () => ({ position: '', count: 0, isPlaceholder: true }) + return [ + blank(), findPos('1'), blank(), + findPos('2'), blank(), findPos('3'), + blank(), findPos('4'), blank() + ] + } return this.positionGrid.map((p) => ({ ...p, isPlaceholder: false })) }, // 统一接口忙碌状态:用于禁用按钮、回退和首页,避免请求未返回时重复触发 - rqrq @@ -1251,6 +1265,20 @@ export default { grid-auto-flow: column; } +/* 钢托盘四宫格:3x3 里只留十字,上1 左2 右3 下4 - rqrq */ +.position-grid.position-grid-steel-4 { + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(3, 1fr); + grid-auto-flow: row; +} + +/* 平托盘两层都是4格,按行铺成 1 2 / 3 4 - rqrq */ +.position-grid.position-grid-flat-4 { + grid-template-columns: repeat(2, 1fr); + grid-template-rows: repeat(2, 1fr); + grid-auto-flow: row; +} + .position-grid.position-grid-9 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); diff --git a/src/views/modules/haianAutoWarehouse/haianPalletSorting.vue b/src/views/modules/haianAutoWarehouse/haianPalletSorting.vue index 76e9b0f..b19d246 100644 --- a/src/views/modules/haianAutoWarehouse/haianPalletSorting.vue +++ b/src/views/modules/haianAutoWarehouse/haianPalletSorting.vue @@ -422,15 +422,17 @@ export default { } }, computed: { - // 根据位置数量决定网格布局,确保与原PDA扫码弹窗一致 - rqrq + // 按托盘类型决定扫入位置图:钢四宫格菱形,平托盘两层都按行 2x2,九宫格仍按行 - rqrq getPositionGridClass() { const len = this.positionGrid.length if (len === 1) return 'position-grid-1' if (len === 2) return 'position-grid-4' + if (len === 4 && this.currentPalletType === 'A0102') return 'position-grid-steel-4' + if (len === 4 && this.currentPalletType === 'A0301') return 'position-grid-flat-4' if (len === 4) return 'position-grid-4' return 'position-grid-9' }, - // 2宫格场景采用对角展示,其余按原位置顺序展示 - rqrq + // 钢托盘四宫格按现场菱形插占位;平托盘保持 1-4 原序,由按行网格画成 1 2 / 3 4 - rqrq displayPositionGrid() { const len = this.positionGrid.length if (len === 2) { @@ -443,6 +445,18 @@ export default { { ...pos2, isPlaceholder: false } ] } + if (len === 4 && this.currentPalletType === 'A0102') { + const findPos = (no) => { + const found = this.positionGrid.find((p) => String(p.position) === String(no)) + return found ? { ...found, isPlaceholder: false } : { position: String(no), count: 0, isPlaceholder: false } + } + const blank = () => ({ position: '', count: 0, isPlaceholder: true }) + return [ + blank(), findPos('1'), blank(), + findPos('2'), blank(), findPos('3'), + blank(), findPos('4'), blank() + ] + } return this.positionGrid.map((p) => ({ ...p, isPlaceholder: false })) }, // 仅手工分拣工作盘显示拆分列;被分拣源盘 sortedSourceFlag=true 时隐藏 - rqrq @@ -1400,6 +1414,20 @@ export default { grid-auto-flow: column; } +/* 钢托盘四宫格:3x3 里只留十字,上1 左2 右3 下4 - rqrq */ +.position-grid.position-grid-steel-4 { + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(3, 1fr); + grid-auto-flow: row; +} + +/* 平托盘两层都是4格,按行铺成 1 2 / 3 4 - rqrq */ +.position-grid.position-grid-flat-4 { + grid-template-columns: repeat(2, 1fr); + grid-template-rows: repeat(2, 1fr); + grid-auto-flow: row; +} + .position-grid.position-grid-9 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);