diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue index a3268a2..355786a 100644 --- a/src/views/modules/part/bomManagement.vue +++ b/src/views/modules/part/bomManagement.vue @@ -677,6 +677,17 @@ + + + + + + + + + + + @@ -1400,6 +1411,9 @@ export default { operationNo: '', issueToLoc: '', issueToLocName: '', + width: '', + vp: '', + across: '', noteText: '', createDate: '', createBy: '', @@ -2215,6 +2229,60 @@ export default { fixed: '', columnWidth: 80 }, + { + userId: this.$store.state.user.name, + functionId: 104002001, + serialNumber: '104002001Table2Width', + tableId: '104002001Table2', + tableName: 'BOM子物料表', + columnProp: 'width', + headerAlign: 'center', + align: 'right', + columnLabel: '宽幅', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90 + }, + { + userId: this.$store.state.user.name, + functionId: 104002001, + serialNumber: '104002001Table2Vp', + tableId: '104002001Table2', + tableName: 'BOM子物料表', + columnProp: 'vp', + headerAlign: 'center', + align: 'right', + columnLabel: '跳距', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90 + }, + { + userId: this.$store.state.user.name, + functionId: 104002001, + serialNumber: '104002001Table2Across', + tableId: '104002001Table2', + tableName: 'BOM子物料表', + columnProp: 'across', + headerAlign: 'center', + align: 'right', + columnLabel: '排位', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90 + }, { userId: this.$store.state.user.name, functionId: 104002001, @@ -2451,6 +2519,60 @@ export default { fixed: '', columnWidth: 80 }, + { + userId: this.$store.state.user.name, + functionId: 104002001, + serialNumber: '104002001Table3Width', + tableId: '104002001Table3', + tableName: 'BOM副产品表', + columnProp: 'width', + headerAlign: 'center', + align: 'right', + columnLabel: '宽幅', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90 + }, + { + userId: this.$store.state.user.name, + functionId: 104002001, + serialNumber: '104002001Table3Vp', + tableId: '104002001Table3', + tableName: 'BOM副产品表', + columnProp: 'vp', + headerAlign: 'center', + align: 'right', + columnLabel: '跳距', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90 + }, + { + userId: this.$store.state.user.name, + functionId: 104002001, + serialNumber: '104002001Table3Across', + tableId: '104002001Table3', + tableName: 'BOM副产品表', + columnProp: 'across', + headerAlign: 'center', + align: 'right', + columnLabel: '排位', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90 + }, { userId: this.$store.state.user.name, functionId: 104002001, @@ -3868,6 +3990,9 @@ export default { operationNo: '', issueToLoc: '', issueToLocName: '', + width: null, + vp: null, + across: null, noteText: '', createBy: this.$store.state.user.name, lineSequence: '', @@ -3910,6 +4035,9 @@ export default { operationNo: '', issueToLoc: '', issueToLocName: '', + width: null, + vp: null, + across: null, noteText: '', createBy: this.$store.state.user.name, lineSequence: '', @@ -3948,6 +4076,9 @@ export default { operationNo: row.operationNo, issueToLoc: row.issueToLoc, issueToLocName: row.issueToLocName, + width: row.width, + vp: row.vp, + across: row.across, noteText: row.noteText, updateBy: this.$store.state.user.name, lineSequence: row.lineSequence, @@ -3982,6 +4113,9 @@ export default { operationNo: row.operationNo, issueToLoc: row.issueToLoc, issueToLocName: row.issueToLocName, + width: row.width, + vp: row.vp, + across: row.across, noteText: row.noteText, updateBy: this.$store.state.user.name, lineSequence: row.lineSequence, @@ -4223,6 +4357,7 @@ export default { this.componentData.componentPartDesc = row.partDesc this.componentData.printUnit = row.printUnit this.componentData.printUnitName = row.printUnitName + this.tryAutoFillWidthByPartNo(row.partNo) this.componentPartModelFlag = false }, @@ -4399,25 +4534,54 @@ export default { // 子物料编码失焦事件 componentPartBlur () { if (this.componentData.componentPart != null && this.componentData.componentPart !== '') { + this.tryAutoFillWidthByPartNo(this.componentData.componentPart) this.componentPartData.limit = this.pageSize3 this.componentPartData.page = this.pageIndex3 this.componentPartData.ifsPartNo = this.componentData.componentPart queryPartListAll(this.componentPartData).then(({data}) => { - if (data && data.code === 0) { - if (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 - return - } + 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) + } else { + this.componentData.componentPartDesc = '' + this.componentData.printUnit = '' + this.componentData.printUnitName = '' } }) + return } this.componentData.componentPartDesc = '' this.componentData.printUnit = '' this.componentData.printUnitName = '' }, + tryAutoFillWidthByPartNo (partNo) { + if (this.componentData.flag !== '1') { + return + } + if (partNo == null || partNo === '') { + return + } + const splitIndex = partNo.lastIndexOf('-') + if (splitIndex < 0 || splitIndex === partNo.length - 1) { + this.componentData.width = null + return + } + const widthText = partNo.substring(splitIndex + 1).trim() + if (widthText === '') { + this.componentData.width = null + return + } + const parsedWidth = Number(widthText) + if (!Number.isNaN(parsedWidth)) { + this.componentData.width = parsedWidth + } else { + this.componentData.width = null + } + }, + // copy物料编码失焦事件 copyPartBlur () { if (this.copyPartData.type === '1') { diff --git a/src/views/modules/quote/detail/primary/quoteDetailBom.vue b/src/views/modules/quote/detail/primary/quoteDetailBom.vue index a2de6c2..8dd3852 100644 --- a/src/views/modules/quote/detail/primary/quoteDetailBom.vue +++ b/src/views/modules/quote/detail/primary/quoteDetailBom.vue @@ -94,6 +94,57 @@ export default { status: true, fixed: '', columnWidth: 160, + }, { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table4Width', + tableId: "5011Table4", + tableName: "报价材料信息", + columnProp: 'width', + headerAlign: "center", + align: "right", + columnLabel: '宽幅', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90, + }, { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table4Vp', + tableId: "5011Table4", + tableName: "报价材料信息", + columnProp: 'vp', + headerAlign: "center", + align: "right", + columnLabel: '跳距', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90, + }, { + userId: this.$store.state.user.name, + functionId: 5011, + serialNumber: '5011Table4Across', + tableId: "5011Table4", + tableName: "报价材料信息", + columnProp: 'across', + headerAlign: "center", + align: "right", + columnLabel: '排位', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 90, }, { userId: this.$store.state.user.name, functionId: 5011,