diff --git a/klp-ui/src/components/KLPService/WarehouseTree/index.vue b/klp-ui/src/components/KLPService/WarehouseTree/index.vue index 50b9f3ac..0f57bf4d 100644 --- a/klp-ui/src/components/KLPService/WarehouseTree/index.vue +++ b/klp-ui/src/components/KLPService/WarehouseTree/index.vue @@ -17,6 +17,10 @@ export default { type: String, default: 'real' }, + showEmpty: { + type: Boolean, + default: false + } }, data() { return { @@ -38,23 +42,19 @@ export default { } }, methods: { - loadChildren(node, resolve) { - if (this.warehouseType !== 'real') { - return; - } - if (node.level === 0) { - // resolve(this.handleTree(this.treeData, 'warehouseId', 'parentId')); - } else { - listActualWarehouse({ parentId: node.data.actualWarehouseId }).then(response => { - resolve(response.data); - }); - } - }, getWarehouseTree() { this.loading = true; if (this.warehouseType === 'real') { treeActualWarehouseTwoLevel().then(response => { - this.treeData = response.data + const data = response.data; + if (this.showEmpty) { + data.unshift({ + actualWarehouseId: '-1', + actualWarehouseName: '空置库', + isLeaf: true + }) + } + this.treeData = data; this.loading = false; }); } else { diff --git a/klp-ui/src/views/wms/coil/do/correct.vue b/klp-ui/src/views/wms/coil/do/correct.vue index 56428531..125882ca 100644 --- a/klp-ui/src/views/wms/coil/do/correct.vue +++ b/klp-ui/src/views/wms/coil/do/correct.vue @@ -307,6 +307,12 @@ + + + + + + - +