fix(wms): 修复复合架拆分按钮显示逻辑及更新库位编码注释

修复复合架拆分按钮仅在支持拆分的列显示的问题
更新库位编码解析注释以反映最新格式要求
This commit is contained in:
砂糖
2025-12-30 10:36:44 +08:00
parent 70bcdd88d2
commit f1637501b2
2 changed files with 16 additions and 5 deletions

View File

@@ -127,7 +127,7 @@ export default {
}, },
/** /**
* 解析第四级库位编码格式为F2A1-01-01-1 * 解析第四级库位编码格式为F2A1-X01-1
*/ */
parseWarehouseCodeFourth(code) { parseWarehouseCodeFourth(code) {
if (!code) return null; if (!code) return null;

View File

@@ -9,7 +9,7 @@
<span class="column-number">{{ col }}</span> <span class="column-number">{{ col }}</span>
<!-- 拆分/合并切换按钮 --> <!-- 拆分/合并切换按钮 -->
<button class="split-merge-toggle" <button class="split-merge-toggle"
v-if="isComposite" v-if="isComposite && splitColumns.includes(Number(col))"
:class="{ 'is-split': getColumnLevel(col) === 4, 'is-merge': getColumnLevel(col) === 3 }" :class="{ 'is-split': getColumnLevel(col) === 4, 'is-merge': getColumnLevel(col) === 3 }"
@click.stop="handleColumnToggle(col)" :title="getColumnLevel(col) === 3 ? '点击切换为小卷状态' : '点击切换为大卷状态'"> @click.stop="handleColumnToggle(col)" :title="getColumnLevel(col) === 3 ? '点击切换为小卷状态' : '点击切换为大卷状态'">
<i class="el-icon-s-tools"></i> <i class="el-icon-s-tools"></i>
@@ -124,14 +124,18 @@ export default {
col: 5, col: 5,
big: 19, big: 19,
small: 29, small: 29,
rows: [0, 1, 2, 3, 4] rows: [0, 1, 2, 3, 4],
// 支持拆分的列
splitColumns: [1, 2, 3, 4, 5]
}, },
// 成品2库B区F2B // 成品2库B区F2B
'1998933646134919170': { '1998933646134919170': {
col: 7, col: 7,
big: 29 + 28, big: 29 + 28,
small: 43 + 42, small: 43 + 42,
rows: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26] rows: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26],
// 支持拆分的列
splitColumns: [1, 2, 3]
} }
}, },
dialogOpen: false, dialogOpen: false,
@@ -141,7 +145,7 @@ export default {
currentContextWarehouse: null, currentContextWarehouse: null,
rulerRowHeight: 80, rulerRowHeight: 80,
// rulerMaxRow: 0, // rulerMaxRow: 0,
isMounted: false isMounted: false,
}; };
}, },
computed: { computed: {
@@ -166,6 +170,13 @@ export default {
return this.compositeRules[this.id]; return this.compositeRules[this.id];
}, },
splitColumns() {
if (!this.compositeRules[this.id]) {
console.log('当前库区不支持复合架');
return [];
}
return this.compositeRules[this.id].splitColumns || [];
},
sortedColumnKeys() { sortedColumnKeys() {
return Object.keys(this.columns) return Object.keys(this.columns)
.map(key => Number(key)) .map(key => Number(key))