diff --git a/src/api/part/bomManagement.js b/src/api/part/bomManagement.js index e072028..40df69d 100644 --- a/src/api/part/bomManagement.js +++ b/src/api/part/bomManagement.js @@ -196,4 +196,11 @@ export const queryMultiLevelStructureTable = data => createAPI(`/plm/bomManageme */ export const queryPartListBom = data => createAPI(`/plm/bomManagement/queryPartListBom`,'post',data) +/** + * 查出所有类型的物料 + * @param data + * @returns {*} + */ +export const queryPartListAll = data => createAPI(`/plm/bomManagement/queryPartListAll`,'post',data) + diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue index 246c886..d4b5e3a 100644 --- a/src/views/modules/part/bomManagement.vue +++ b/src/views/modules/part/bomManagement.vue @@ -904,6 +904,7 @@ import { queryManufStructCostDistribtionTable, // 刷新项目成本分配 queryMultiLevelStructureTable, // 刷新多级别结构 queryPartListBom, // 查出可创建BOM的物料 + queryPartListAll, // 查询包含Purchase(Raw)的物料 } from '@/api/part/bomManagement.js' import ChooseList from '@/views/modules/common/Chooselist' @@ -1410,6 +1411,7 @@ export default { sortLv: 0, status: true, fixed: '', + columnWidth: 120 }, { columnProp: 'partDesc', @@ -1420,6 +1422,7 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 300 }, { columnProp: 'familyName', @@ -1430,26 +1433,29 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'printUnit', headerAlign: "center", - align: "center", + align: "left", columnLabel: '计量单位', columnHidden: false, columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'spec', headerAlign: "center", - align: "center", + align: "left", columnLabel: '规格型号', columnHidden: false, columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'partType', @@ -1460,6 +1466,7 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 150 } ], componentPartColumnList: [ @@ -1472,6 +1479,7 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 120 }, { columnProp: 'partDesc', @@ -1482,6 +1490,7 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 300 }, { columnProp: 'familyName', @@ -1492,26 +1501,29 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'printUnit', headerAlign: "center", - align: "center", + align: "left", columnLabel: '计量单位', columnHidden: false, columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'spec', headerAlign: "center", - align: "center", + align: "left", columnLabel: '规格型号', columnHidden: false, columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'partType', @@ -1522,6 +1534,7 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 150 } ], columnSubDetailList: [ @@ -3433,7 +3446,7 @@ export default { this.componentPartData.page = this.pageIndex3 this.componentPartData.status = 'Y' // 查询所有物料 - queryPartList(this.componentPartData).then(({data}) => { + queryPartListAll(this.componentPartData).then(({data}) => { if (data && data.code === 0) { this.componentPartList = data.page.list this.pageIndex3 = data.page.currPage @@ -3514,9 +3527,9 @@ export default { this.componentPartData.limit = this.pageSize3 this.componentPartData.page = this.pageIndex3 this.componentPartData.partNo = this.componentData.componentPart - queryPartList(this.componentPartData).then(({data}) => { + queryPartListAll(this.componentPartData).then(({data}) => { if (data && data.code === 0) { - if (data.rows.length === 1) { + 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 @@ -3543,7 +3556,7 @@ export default { if (data.page.list.length === 1) { this.copyBomData.partDesc = data.page.list[0].partDesc } else { - this.$message.warning('该物料不存在!') + this.$message.warning('该物料编码不存在或制造类型不合规!') this.copyBomData.partDesc = '' } } @@ -3559,7 +3572,7 @@ export default { if (data.page.list.length === 1) { this.copyAlternativeData.partDesc = data.page.list[0].partDesc } else { - this.$message.warning('该物料不存在!') + this.$message.warning('该物料编码不存在或制造类型不合规!') this.copyAlternativeData.partDesc = '' } } diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue index 058a3ad..23b1bc6 100644 --- a/src/views/modules/part/partInformation.vue +++ b/src/views/modules/part/partInformation.vue @@ -132,9 +132,6 @@ Next Part No - - - @@ -510,13 +507,13 @@ height="200px" border ref="bomAlternativeTable" - @row-click="bomAlternativeClickRow" @selection-change="selectionBomAlternative" style="width:100%"> { + this.bomAlternativeList.forEach((v, i) => { + this.$refs.bomAlternativeTable.toggleRowSelection(v, true) + }) + this.routingAlternativeList.forEach((v, i) => { + this.$refs.routingAlternativeTable.toggleRowSelection(v, true) + }) + }) + }, + + // 判断勾选 + alternativeSelectable (row, index) { + return false + }, + // 页签选择替换 inventoryPartClick (tab, event) { this.refreshInventoryPartTable() @@ -3982,6 +3996,7 @@ if (data && data.code === 0) { this.bomAlternativeList = data.rows.bomList this.routingAlternativeList = data.rows.routingList + this.defaultChecked() } else { this.bomAlternativeList = [] this.routingAlternativeList = [] @@ -3989,14 +4004,6 @@ }) }, - bomAlternativeClickRow (row) { - this.$refs.bomAlternativeTable.toggleRowSelection(row) - }, - - routingAlternativeClickRow (row) { - this.$refs.routingAlternativeTable.toggleRowSelection(row) - }, - selectionBomAlternative (val) { this.bomAlternativeSelections = val }, @@ -5096,12 +5103,12 @@ // 下一个物料编码 nextPartNo () { if (this.modalData.ifsPartNo.length !== 3) { - this.$message.warning('Part No的前缀必须是3位!') + this.$message.warning('IFS Part No的前缀必须是3位!') return } getNextPartNo(this.modalData).then(({data}) => { if (data && data.code === 0) { - this.modalData.partNo = data.rows + this.modalData.ifsPartNo = data.rows } }) }, diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue index 9bee2e8..060bd1a 100644 --- a/src/views/modules/part/routingManagement.vue +++ b/src/views/modules/part/routingManagement.vue @@ -417,7 +417,7 @@ - + @@ -1407,16 +1407,18 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 120 }, { columnProp: 'partDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '物料名称', columnHidden: false, columnImage: false, status: true, fixed: '', + columnWidth: 300 }, { columnProp: 'familyName', @@ -1427,26 +1429,29 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'printUnit', headerAlign: "center", - align: "center", + align: "left", columnLabel: '计量单位', columnHidden: false, columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'spec', headerAlign: "center", - align: "center", + align: "left", columnLabel: '规格型号', columnHidden: false, columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'partType', @@ -1457,6 +1462,7 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 150 } ], componentOperationColumnList: [ @@ -2169,6 +2175,7 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'partDesc', @@ -2179,6 +2186,7 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 300 }, { columnProp: 'familyName', @@ -2189,26 +2197,29 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'printUnit', headerAlign: "center", - align: "center", + align: "left", columnLabel: '计量单位', columnHidden: false, columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'spec', headerAlign: "center", - align: "center", + align: "left", columnLabel: '规格型号', columnHidden: false, columnImage: false, status: true, fixed: '', + columnWidth: 100 }, { columnProp: 'partType', @@ -2219,6 +2230,7 @@ export default { columnImage: false, status: true, fixed: '', + columnWidth: 150 } ], // ======== 必填规则 ========