|
|
@ -4531,19 +4531,26 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
normalizeComponentPartInput () { |
|
|
|
|
|
const normalizedComponentPart = (this.componentData.componentPart || '').toString().trim().toUpperCase() |
|
|
|
|
|
this.componentData.componentPart = normalizedComponentPart |
|
|
|
|
|
return normalizedComponentPart |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 子物料编码失焦事件 |
|
|
// 子物料编码失焦事件 |
|
|
componentPartBlur () { |
|
|
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.limit = this.pageSize3 |
|
|
this.componentPartData.page = this.pageIndex3 |
|
|
this.componentPartData.page = this.pageIndex3 |
|
|
this.componentPartData.ifsPartNo = this.componentData.componentPart |
|
|
|
|
|
|
|
|
this.componentPartData.ifsPartNo = normalizedComponentPart |
|
|
queryPartListAll(this.componentPartData).then(({data}) => { |
|
|
queryPartListAll(this.componentPartData).then(({data}) => { |
|
|
if (data && data.code === 0 && data.page.list.length === 1) { |
|
|
if (data && data.code === 0 && data.page.list.length === 1) { |
|
|
this.componentData.componentPartDesc = data.page.list[0].partDesc |
|
|
this.componentData.componentPartDesc = data.page.list[0].partDesc |
|
|
this.componentData.printUnit = data.page.list[0].printUnit |
|
|
this.componentData.printUnit = data.page.list[0].printUnit |
|
|
this.componentData.printUnitName = data.page.list[0].printUnitName |
|
|
this.componentData.printUnitName = data.page.list[0].printUnitName |
|
|
this.tryAutoFillWidthByPartNo(this.componentData.componentPart) |
|
|
|
|
|
|
|
|
this.tryAutoFillWidthByPartNo(normalizedComponentPart) |
|
|
} else { |
|
|
} else { |
|
|
this.componentData.componentPartDesc = '' |
|
|
this.componentData.componentPartDesc = '' |
|
|
this.componentData.printUnit = '' |
|
|
this.componentData.printUnit = '' |
|
|
@ -4920,7 +4927,8 @@ export default { |
|
|
this.$message.warning('请填写主记录BOM版本号!') |
|
|
this.$message.warning('请填写主记录BOM版本号!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (this.componentData.componentPart === '' || this.componentData.componentPart == null) { |
|
|
|
|
|
|
|
|
const normalizedComponentPart = this.normalizeComponentPartInput() |
|
|
|
|
|
if (normalizedComponentPart === '') { |
|
|
this.$message.warning('请选择子物料编码!') |
|
|
this.$message.warning('请选择子物料编码!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|