🐞 fix: 部分位置需要判空

This commit is contained in:
砂糖
2025-08-11 16:17:27 +08:00
parent 542b481155
commit 6f415c44d1
7 changed files with 21 additions and 17 deletions

View File

@@ -63,12 +63,13 @@ export default {
let bomId = this.bomId;
if (!bomId) {
if (this.itemType === 'product') {
bomId = this.productMap[this.itemId].bomId;
bomId = this.productMap[this.itemId]?.bomId;
} else if (this.itemType === 'raw_material') {
bomId = this.rawMaterialMap[this.itemId].bomId;
bomId = this.rawMaterialMap[this.itemId]?.bomId;
}
}
if (!bomId) {
this.bomInfo = [];
return;
}
if (bomMap[bomId]) {