feat(仓库管理): 添加成品2库B区的复合架配置规则
添加F2B区的复合架配置规则,并完善复合架规则的验证逻辑,增加错误日志输出以便调试
This commit is contained in:
@@ -126,6 +126,13 @@ export default {
|
|||||||
small: 29,
|
small: 29,
|
||||||
rows: [0, 1, 2, 3, 4]
|
rows: [0, 1, 2, 3, 4]
|
||||||
},
|
},
|
||||||
|
// 成品2库B区,F2B
|
||||||
|
'1998933646134919170': {
|
||||||
|
col: 7,
|
||||||
|
big: 29 + 28,
|
||||||
|
small: 43 + 42,
|
||||||
|
rows: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
dialogOpen: false,
|
dialogOpen: false,
|
||||||
currentWarehouse: null,
|
currentWarehouse: null,
|
||||||
@@ -141,16 +148,19 @@ export default {
|
|||||||
// 当前的库区是否支持复合架
|
// 当前的库区是否支持复合架
|
||||||
isComposite() {
|
isComposite() {
|
||||||
if (!this.compositeRules[this.id]) {
|
if (!this.compositeRules[this.id]) {
|
||||||
|
console.log('当前库区不支持复合架');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 检车规则是否合法,
|
// 检车规则是否合法,
|
||||||
// 1. (small - big) / 2 = rows.length
|
// 1. (small - big) / 2 = rows.length
|
||||||
if ((this.compositeRules[this.id].small - this.compositeRules[this.id].big) / 2 !== this.compositeRules[this.id].rows.length) {
|
if ((this.compositeRules[this.id].small - this.compositeRules[this.id].big) / 2 !== this.compositeRules[this.id].rows.length) {
|
||||||
|
console.log('检车规则不合法,(small - big) / 2 !== rows.length');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 2. row中最大的值小于等于big
|
// 2. row中最大的值小于等于big
|
||||||
const maxRow = Math.max(...this.compositeRules[this.id].rows);
|
const maxRow = Math.max(...this.compositeRules[this.id].rows);
|
||||||
if (maxRow > this.compositeRules[this.id].big) {
|
if (maxRow > this.compositeRules[this.id].big) {
|
||||||
|
console.log('检车规则不合法,row中最大的值大于big');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user