diff --git a/src/api/eam/eamProject.js b/src/api/eam/eamProject.js index abb4866..08b08ae 100644 --- a/src/api/eam/eamProject.js +++ b/src/api/eam/eamProject.js @@ -37,3 +37,4 @@ export const deleteAndSaveHandle= data => createAPI(`/pms/eamProject/deleteAndSa export const saveHandle= data => createAPI(`/pms/eamProject/saveHandle`,'post',data) export const searchMassProductionBomList= data => createAPI(`/pms/eamProject/searchMassProductionBomList`,'post',data) +export const searchRoutingList= data => createAPI(`/pms/eamProject/searchRoutingList`,'post',data) diff --git a/src/views/modules/eam/eamProjectPartInfo.vue b/src/views/modules/eam/eamProjectPartInfo.vue index 5f6e851..a8dc3ca 100644 --- a/src/views/modules/eam/eamProjectPartInfo.vue +++ b/src/views/modules/eam/eamProjectPartInfo.vue @@ -509,6 +509,40 @@ + + + + + + + + @@ -1154,7 +1188,12 @@ import { confirmatorSendMailHandle, eamProjectPartSearch, eamProjectPartInfoEdit, - getFinalPartDesc, addConfirmatory, deleteConfirmatory, queryEamProjectPart,searchMassProductionBomList + getFinalPartDesc, + addConfirmatory, + deleteConfirmatory, + queryEamProjectPart, + searchMassProductionBomList, + searchRoutingList } from "../../../api/eam/eamProject"; import row from "element-ui/packages/row"; import moment from 'moment'; @@ -1317,6 +1356,7 @@ import {updateColumnSize} from "../../../api/table"; projectAllDocumentConfirmatorList: [], projectANotDocumentConfirmatorList: [], projectPartBomList: [],// 量产BOM原始平面数据数组 + projectPartRoutingList: [],// 原始平面数据数组 confirmatorySelection1: [], confirmatorySelection2: [], proofDocumentListDefinition: [], @@ -2567,6 +2607,170 @@ import {updateColumnSize} from "../../../api/table"; columnWidth: 150, }, ], + columnProjectRoutingList: [ + { + userId: this.$store.state.user.name, + functionId: 401005, + serialNumber: '401005Table1PartNo2', + tableId: "401005Table1", + tableName: "项目物料BOM表", + columnProp: 'partNo2', + headerAlign: "center", + align: "center", + columnLabel: '物料编码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 145, + }, + { + userId: this.$store.state.user.name, + functionId: 401005, + serialNumber: '401005Table1WorkCenterNo', + tableId: "401005Table1", + tableName: "项目物料BOM表", + columnProp: 'workCenterNo', + headerAlign: "center", + align: "left", + columnLabel: '加工中心', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, + { + userId: this.$store.state.user.name, + functionId: 401005, + serialNumber: '401005Table1ItemNo', + tableId: "401005Table1", + tableName: "项目物料表", + columnProp: 'itemNo', + headerAlign: "center", + align: "center", + columnLabel: '工序行号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, + { + userId: this.$store.state.user.name, + functionId: 401005, + serialNumber: '401005Table1RoutingItemNo', + tableId: "401005Table1", + tableName: "项目物料表", + columnProp: 'routingItemNo', + headerAlign: "center", + align: "left", + columnLabel: '标准工序代号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, + { + userId: this.$store.state.user.name, + functionId: 401005, + serialNumber: '401005Table1ItemDesc', + tableId: "401005Table1", + tableName: "项目物料表", + columnProp: 'itemDesc', + headerAlign: "center", + align: "left", + columnLabel: '工序名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, + { + userId: this.$store.state.user.name, + functionId: 401005, + serialNumber: '401005Table1LaborTime', + tableId: "401005Table1", + tableName: "项目物料表", + columnProp: 'laborTime', + headerAlign: "center", + align: "right", + columnLabel: '工时', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, + { + userId: this.$store.state.user.name, + functionId: 401005, + serialNumber: '401005Table1LaborResources', + tableId: "401005Table1", + tableName: "项目物料表", + columnProp: 'laborResources', + headerAlign: "center", + align: "right", + columnLabel: '人数', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, + { + userId: this.$store.state.user.name, + functionId: 401005, + serialNumber: '401005Table1MachRunFactor', + tableId: "401005Table1", + tableName: "项目物料表", + columnProp: 'machRunFactor', + headerAlign: "center", + align: "right", + columnLabel: '单位工时', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, + { + userId: this.$store.state.user.name, + functionId: 401005, + serialNumber: '401005Table1FactorUnit', + tableId: "401005Table1", + tableName: "项目物料表", + columnProp: 'factorUnit', + headerAlign: "center", + align: "center", + columnLabel: '单位', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 150, + }, + ], levelList: [], rules:{ projectNo:[ @@ -5193,6 +5397,28 @@ import {updateColumnSize} from "../../../api/table"; }) }, + fetchRoutingList() { + let inData = { + site: this.proofingCurrentRow.site, + buNo: this.proofingCurrentRow.buNo, + projectId: this.proofingCurrentRow.projectId, + projectNo: this.proofingCurrentRow.projectNo, + projectDesc: this.proofingCurrentRow.projectDesc, + projectPartId: this.proofingCurrentRow.projectPartId, + testPartNo: this.proofingCurrentRow.testPartNo, + partNo:this.proofingCurrentRow.finalPartNo, + partDesc: this.proofingCurrentRow.partDesc, + page: 1, + limit: 1000 + } + searchRoutingList(inData).then(({data}) => { + if (data && data.code === 0){ + this.dataListLoading = false; + this.projectPartRoutingList = data.list + } + }) + }, + // 列表表格选择替换 tabClick (tab, event) { // 刷新列表数据 @@ -5209,14 +5435,14 @@ import {updateColumnSize} from "../../../api/table"; this.searchProjectAllDocumentList() this.searchConfirmatorList() } - if (this.activeName == 'productionDocumentsConfirmProgress'){ + if (this.activeName === 'productionDocumentsConfirmProgress'){ this.getConfirmProgressDocumentList() this.getConfirmProgressPusherList() } - if (this.activeName == 'massProductionBOM' && this.proofingCurrentRow.finalPartNo !== '' && this.proofingCurrentRow.finalPartNo !== null){ + if (this.activeName === 'massProductionBOM' && this.proofingCurrentRow.finalPartNo !== '' && this.proofingCurrentRow.finalPartNo !== null){ this.dataListLoading = true; try { - // 模拟从后端获取数据 + // 从后端获取数据 const flatData = await this.fetchBomList(); // 将平铺数据转换为树形结构 this.projectPartBomList = arrayToTreeByLevelCode(flatData, "levelCode", "children"); @@ -5228,6 +5454,12 @@ import {updateColumnSize} from "../../../api/table"; } else { this.projectPartBomList = [] } + if (this.activeName === 'Routing' && this.proofingCurrentRow.finalPartNo !== '' && this.proofingCurrentRow.finalPartNo !== null){ + this.dataListLoading = true; + this.fetchRoutingList() + } else { + this.projectPartRoutingList = [] + } }, //获取按钮的权限数据 getButtonAuthData () {