From 808d1ca5133832b946a3b4c475035c4b3d4465ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Tue, 19 Aug 2025 16:11:28 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=8E=9F=E6=9D=90=E6=96=99=E6=97=A0=E6=B3=95=E5=88=9B=E5=BB=BA?= =?UTF-8?q?BOM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/KLPService/BomPanel/index.vue | 12 +++++- .../KLPService/RawMaterialSelect/index.vue | 40 +++++++++---------- klp-ui/src/views/wms/print/index.vue | 7 +--- 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/klp-ui/src/components/KLPService/BomPanel/index.vue b/klp-ui/src/components/KLPService/BomPanel/index.vue index 4e50a2c7..303f1d4f 100644 --- a/klp-ui/src/components/KLPService/BomPanel/index.vue +++ b/klp-ui/src/components/KLPService/BomPanel/index.vue @@ -114,9 +114,12 @@ export default { try { this.createLoading = true; + // 添加一个semi类型 + const bomName = (this.type == 'product' ? '产品BOM' : (this.type == 'raw_material' ? '原材料BOM' : '半成品BOM')) + new Date().getTime(); + const bomCode = (this.type == 'product' ? 'P' : (this.type == 'raw_material' ? 'R' : 'S')) + new Date().getTime(); const bomResponse = await addBom({ - bomName: (this.type == 'product' ? '产品BOM' : '原材料BOM') + new Date().getTime(), - bomCode: (this.type == 'product' ? 'P' : 'R') + new Date().getTime() + bomName, + bomCode }); this.$message.success('创建BOM成功'); @@ -133,6 +136,11 @@ export default { rawMaterialId: this.itemId, bomId: bomData.bomId }); + } else if (this.type == 'semi' && this.itemId) { + await updateProduct({ + productId: this.itemId, + bomId: bomData.bomId + }); } this.$store.dispatch('category/getBomMap'); diff --git a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue index 090f89ce..abc55126 100644 --- a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue +++ b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue @@ -25,13 +25,13 @@ - - + + - - + + @@ -60,13 +60,10 @@