Browse Source

2026-08-25

去空格优化
master
fengyuan_yang 4 weeks ago
parent
commit
0e7c2c3a47
  1. 18
      src/views/modules/part/bomManagement.vue
  2. 14
      src/views/modules/part/recipeManagement.vue

18
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
}

14
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
}

Loading…
Cancel
Save