From 0e7c2c3a47ce436fa8a8237458b1c267d54289b8 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 25 Aug 2026 17:42:50 +0800 Subject: [PATCH] =?UTF-8?q?2026-08-25=20=E5=8E=BB=E7=A9=BA=E6=A0=BC?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/part/bomManagement.vue | 18 +++++++++++++----- src/views/modules/part/recipeManagement.vue | 14 +++++++++++--- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue index 12761d6..a24bc9d 100644 --- a/src/views/modules/part/bomManagement.vue +++ b/src/views/modules/part/bomManagement.vue @@ -4531,19 +4531,26 @@ export default { }) }, + normalizeComponentPartInput () { + const normalizedComponentPart = (this.componentData.componentPart || '').toString().trim().toUpperCase() + this.componentData.componentPart = normalizedComponentPart + return normalizedComponentPart + }, + // 子物料编码失焦事件 componentPartBlur () { - if (this.componentData.componentPart != null && this.componentData.componentPart !== '') { - this.tryAutoFillWidthByPartNo(this.componentData.componentPart) + const normalizedComponentPart = this.normalizeComponentPartInput() + if (normalizedComponentPart !== '') { + this.tryAutoFillWidthByPartNo(normalizedComponentPart) this.componentPartData.limit = this.pageSize3 this.componentPartData.page = this.pageIndex3 - this.componentPartData.ifsPartNo = this.componentData.componentPart + this.componentPartData.ifsPartNo = normalizedComponentPart queryPartListAll(this.componentPartData).then(({data}) => { if (data && data.code === 0 && data.page.list.length === 1) { this.componentData.componentPartDesc = data.page.list[0].partDesc this.componentData.printUnit = data.page.list[0].printUnit this.componentData.printUnitName = data.page.list[0].printUnitName - this.tryAutoFillWidthByPartNo(this.componentData.componentPart) + this.tryAutoFillWidthByPartNo(normalizedComponentPart) } else { this.componentData.componentPartDesc = '' this.componentData.printUnit = '' @@ -4920,7 +4927,8 @@ export default { this.$message.warning('请填写主记录BOM版本号!') return } - if (this.componentData.componentPart === '' || this.componentData.componentPart == null) { + const normalizedComponentPart = this.normalizeComponentPartInput() + if (normalizedComponentPart === '') { this.$message.warning('请选择子物料编码!') return } diff --git a/src/views/modules/part/recipeManagement.vue b/src/views/modules/part/recipeManagement.vue index 3dda380..842f7d4 100644 --- a/src/views/modules/part/recipeManagement.vue +++ b/src/views/modules/part/recipeManagement.vue @@ -3973,12 +3973,19 @@ export default { }) }, + normalizeComponentPartInput () { + const normalizedComponentPart = (this.componentData.componentPart || '').toString().trim().toUpperCase() + this.componentData.componentPart = normalizedComponentPart + return normalizedComponentPart + }, + // 子物料编码失焦事件 componentPartBlur () { - if (this.componentData.componentPart != null && this.componentData.componentPart !== '') { + const normalizedComponentPart = this.normalizeComponentPartInput() + if (normalizedComponentPart !== '') { this.componentPartData.limit = this.pageSize3 this.componentPartData.page = this.pageIndex3 - this.componentPartData.partNo = this.componentData.componentPart + this.componentPartData.partNo = normalizedComponentPart queryPartListAll(this.componentPartData).then(({data}) => { if (data && data.code === 0) { if (data.page.list.length === 1) { @@ -4210,7 +4217,8 @@ export default { this.$message.warning('请填写主记录Recipe版本号!') return } - if (this.componentData.componentPart === '' || this.componentData.componentPart == null) { + const normalizedComponentPart = this.normalizeComponentPartInput() + if (normalizedComponentPart === '') { this.$message.warning('请选择子物料编码!') return }