diff --git a/klp-ui/src/store/modules/category.js b/klp-ui/src/store/modules/category.js index 9cb17a74..f7a0cdfa 100644 --- a/klp-ui/src/store/modules/category.js +++ b/klp-ui/src/store/modules/category.js @@ -98,7 +98,6 @@ export function findItemWithBom(itemType, itemId) { if (!itemType || !itemId) { return null; } - console.log('itemType', itemType, 'itemId', itemId) let map = {} if (itemType === 'product') { map = state.productMap; @@ -107,13 +106,14 @@ export function findItemWithBom(itemType, itemId) { } else { return null; } - console.log('map', map) const item = map[itemId]; - const bomId = item.bomId if (!item) { return null; } - console.log('bomId', bomId, item) + const bomId = item.bomId + if (!bomId) { + return null; + } const bomItems = state.bomMap[bomId]; return { diff --git a/klp-ui/src/views/wms/warehouse/real.vue b/klp-ui/src/views/wms/warehouse/real.vue index 938f816a..a059a5a7 100644 --- a/klp-ui/src/views/wms/warehouse/real.vue +++ b/klp-ui/src/views/wms/warehouse/real.vue @@ -65,7 +65,7 @@ v-if="refreshTable" v-loading="loading" :data="warehouseList" - row-key="warehouseId" + row-key="actualWarehouseId" :default-expand-all="isExpandAll" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" > @@ -239,8 +239,8 @@ export default { delete node.children; } return { - id: node.warehouseId, - label: node.warehouseName, + id: node.actualWarehouseId, + label: node.actualWarehouseName, children: node.children }; }, @@ -248,8 +248,8 @@ export default { getTreeselect() { listActualWarehouse().then(response => { this.warehouseOptions = []; - const data = { warehouseId: 0, warehouseName: '顶级节点', children: [] }; - data.children = this.handleTree(response.data, "warehouseId", "parentId"); + const data = { actualWarehouseId: 0, actualWarehouseName: '顶级节点', children: [] }; + data.children = this.handleTree(response.data, "actualWarehouseId", "parentId"); this.warehouseOptions.push(data); }); }, @@ -261,7 +261,7 @@ export default { // 表单重置 reset() { this.form = { - warehouseId: null, + actualWarehouseId: null, parentId: null, actualWarehouseCode: null, actualWarehouseName: null, @@ -290,8 +290,8 @@ export default { handleAdd(row) { this.reset(); this.getTreeselect(); - if (row != null && row.warehouseId) { - this.form.parentId = row.warehouseId; + if (row != null && row.actualWarehouseId) { + this.form.parentId = row.actualWarehouseId; } else { this.form.parentId = 0; } @@ -312,9 +312,9 @@ export default { this.reset(); this.getTreeselect(); if (row != null) { - this.form.parentId = row.warehouseId; + this.form.parentId = row.actualWarehouseId; } - getActualWarehouse(row.warehouseId).then(response => { + getActualWarehouse(row.actualWarehouseId).then(response => { this.loading = false; this.form = response.data; this.open = true;