From 6f415c44d1bdb0ceff279e527aaae078b4d18718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Mon, 11 Aug 2025 16:17:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E9=9C=80=E8=A6=81=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/KLPService/MaterialSelect/index.vue | 2 +- .../src/components/KLPService/Renderer/BomInfo.vue | 4 ++-- .../components/KLPService/Renderer/BomInfoMini.vue | 5 +++-- .../components/KLPService/Renderer/ProductInfo.vue | 6 +++--- .../KLPService/Renderer/RawMaterialInfo.vue | 5 +++-- klp-ui/src/views/wms/ledger/index.vue | 14 ++++++++------ klp-ui/src/views/wms/stockIo/move.vue | 2 +- 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/klp-ui/src/components/KLPService/MaterialSelect/index.vue b/klp-ui/src/components/KLPService/MaterialSelect/index.vue index 00cd49bd..888c06d6 100644 --- a/klp-ui/src/components/KLPService/MaterialSelect/index.vue +++ b/klp-ui/src/components/KLPService/MaterialSelect/index.vue @@ -48,7 +48,7 @@ }, _itemId: { get() { - return this.itemId; + return this.itemId.toString(); }, set(val) { this.$emit('update:itemId', val); diff --git a/klp-ui/src/components/KLPService/Renderer/BomInfo.vue b/klp-ui/src/components/KLPService/Renderer/BomInfo.vue index 3387f47d..51765133 100644 --- a/klp-ui/src/components/KLPService/Renderer/BomInfo.vue +++ b/klp-ui/src/components/KLPService/Renderer/BomInfo.vue @@ -63,9 +63,9 @@ 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) { diff --git a/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue b/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue index e08552e1..52c24df0 100644 --- a/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue +++ b/klp-ui/src/components/KLPService/Renderer/BomInfoMini.vue @@ -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]) { diff --git a/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue b/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue index 0830efb1..6e5580cb 100644 --- a/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue +++ b/klp-ui/src/components/KLPService/Renderer/ProductInfo.vue @@ -62,9 +62,9 @@ export default { watch: { productId: { handler(newVal) { - this.product = this.productMap && this.productMap[this.productId] - ? { ...this.productMap[this.productId] } - : {}; + const res = this.productMap[this.productId] ? this.productMap[this.productId] : {}; + console.log(res) + this.product = res; }, immediate: true } diff --git a/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue b/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue index 79975da6..00f76682 100644 --- a/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue +++ b/klp-ui/src/components/KLPService/Renderer/RawMaterialInfo.vue @@ -3,7 +3,7 @@ - {{ material.rawMaterialName ? material.rawMaterialName : '--' }} + {{ material.rawMaterialName ? material.rawMaterialName : '-' }} + - +