|
|
|
@ -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); |
|
|
|
|