diff --git a/src/api/eam/eam.js b/src/api/eam/eam.js index 59e4b9e..ae706cb 100644 --- a/src/api/eam/eam.js +++ b/src/api/eam/eam.js @@ -172,12 +172,14 @@ export const getFeedBackId= data => createAPI(`/pms/eam/getFeedBackId`,'post',da //---------------文档类型定义------------------- export const eamDocumentTypeSearch= data => createAPI(`/pms/eam/eamDocumentTypeSearch`,'post',data) +export const queryEamDocumentType= data => createAPI(`/pms/eam/queryEamDocumentType`,'post',data) export const eamDocumentTypeSave= data => createAPI(`/pms/eam/eamDocumentTypeSave`,'post',data) export const eamDocumentTypeEdit= data => createAPI(`/pms/eam/eamDocumentTypeEdit`,'post',data) export const eamDocumentTypeDelete= data => createAPI(`/pms/eam/eamDocumentTypeDelete`,'post',data) //---------------BU文档清单定义------------------- export const eamBuDocumentSearch= data => createAPI(`/pms/eam/eamBuDocumentSearch`,'post',data) +export const queryEamBuDocument= data => createAPI(`/pms/eam/queryEamBuDocument`,'post',data) export const eamBuDocumentSave= data => createAPI(`/pms/eam/eamBuDocumentSave`,'post',data) export const eamBuDocumentEdit= data => createAPI(`/pms/eam/eamBuDocumentEdit`,'post',data) export const eamBuDocumentDelete= data => createAPI(`/pms/eam/eamBuDocumentDelete`,'post',data) diff --git a/src/api/eam/eamProject.js b/src/api/eam/eamProject.js index d0b1d65..d96a4bc 100644 --- a/src/api/eam/eamProject.js +++ b/src/api/eam/eamProject.js @@ -1,6 +1,7 @@ import { createAPI } from "@/utils/httpRequest.js"; //---------------项目信息------------------- export const eamProjectInfoSearch= data => createAPI(`/pms/eamProject/eamProjectInfoSearch`,'post',data) +export const queryEamProjectInfo= data => createAPI(`/pms/eamProject/queryEamProjectInfo`,'post',data) export const eamProjectInfoSave= data => createAPI(`/pms/eamProject/eamProjectInfoSave`,'post',data) export const eamProjectInfoEdit= data => createAPI(`/pms/eamProject/eamProjectInfoEdit`,'post',data) export const eamProjectInfoDelete= data => createAPI(`/pms/eamProject/eamProjectInfoDelete`,'post',data) diff --git a/src/views/modules/eam/eamBuDocumentListDefinition.vue b/src/views/modules/eam/eamBuDocumentListDefinition.vue index 2b3c751..1ccf54a 100644 --- a/src/views/modules/eam/eamBuDocumentListDefinition.vue +++ b/src/views/modules/eam/eamBuDocumentListDefinition.vue @@ -7,43 +7,43 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + 文档类型ID + + + + + 查询 新增 @@ -196,6 +196,7 @@ getTableUserListLanguage, } from "@/api/table.js" import {EventBus} from "../../../main"; + import {queryEamBuDocument} from "../../../api/eam/eam"; export default { components: { @@ -241,6 +242,7 @@ pageSize: 20, totalPage: 0, dataList: [], + selectTypeFlag: [], dataListSelections: [], modalFlag:false, modalDisableFlag:false, @@ -567,7 +569,7 @@ }, activated() { - this.$store.commit("sift/commitSearchFunction",this.getDataList) + this.$store.commit("sift/commitSearchFunction",this.queryDataList) }, created () { @@ -698,8 +700,27 @@ return s }, + // 获取数据列表 + // 获取数据列表 getDataList (params) { + this.selectTypeFlag = params + this.searchData.limit = this.pageSize + this.searchData.page = this.pageIndex + eamBuDocumentSearch(this.searchData).then(({data}) => { + if (data.code === 0) { + this.dataList = data.page.list + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + for (let i = 0; i < this.dataList.length; i++) { + this.dataList[i].responsibleDepartment = this.dataList[i].roleDesc + } + } + }) + }, + queryDataList (params) { + this.selectTypeFlag = params this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex if (params !== null && params !== undefined) { @@ -710,7 +731,7 @@ } else { params = this.searchData } - eamBuDocumentSearch(params).then(({data}) => { + queryEamBuDocument(params).then(({data}) => { if (data.code === 0) { this.dataList = data.page.list this.pageIndex = data.page.currPage @@ -726,12 +747,20 @@ sizeChangeHandle (val) { this.pageSize = val this.pageIndex = 1 - this.getDataList() + if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) { + this.queryDataList(this.selectTypeFlag) + } else { + this.getDataList() + } }, // 当前页 currentChangeHandle (val) { this.pageIndex = val - this.getDataList() + if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) { + this.queryDataList(this.selectTypeFlag) + } else { + this.getDataList() + } }, // 多选 selectionChangeHandle (val) { diff --git a/src/views/modules/eam/eamDocumentTypeDefinition.vue b/src/views/modules/eam/eamDocumentTypeDefinition.vue index 9ce02bd..e55e88c 100644 --- a/src/views/modules/eam/eamDocumentTypeDefinition.vue +++ b/src/views/modules/eam/eamDocumentTypeDefinition.vue @@ -5,21 +5,20 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + 查询 新增 @@ -154,7 +153,7 @@ import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import {EventBus} from "../../../main"; - import {eamAdminLevelSearch} from "../../../api/eam/eam"; + import {eamAdminLevelSearch, queryEamDocumentType} from "../../../api/eam/eam"; export default { watch: { searchData: { @@ -193,6 +192,7 @@ limit: 10, }, responsibleDepartmentList: [], + selectTypeFlag: [], height: 200, pageIndex: 1, pageSize: 20, @@ -422,7 +422,7 @@ }, activated() { - this.$store.commit("sift/commitSearchFunction",this.getDataList) + this.$store.commit("sift/commitSearchFunction",this.queryDataList) }, created () { @@ -512,6 +512,23 @@ // 获取数据列表 getDataList (params) { + this.selectTypeFlag = params + this.searchData.limit = this.pageSize + this.searchData.page = this.pageIndex + eamDocumentTypeSearch(this.searchData).then(({data}) => { + if (data.code === 0) { + this.dataList = data.page.list + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + for (let i = 0; i < this.dataList.length; i++) { + this.dataList[i].responsibleDepartment = this.dataList[i].roleDesc + } + } + }) + }, + queryDataList (params) { + this.selectTypeFlag = params this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex if (params !== null && params !== undefined) { @@ -522,7 +539,7 @@ } else { params = this.searchData } - eamDocumentTypeSearch(params).then(({data}) => { + queryEamDocumentType(params).then(({data}) => { if (data.code === 0) { this.dataList = data.page.list this.pageIndex = data.page.currPage @@ -538,12 +555,20 @@ sizeChangeHandle (val) { this.pageSize = val this.pageIndex = 1 - this.getDataList() + if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) { + this.queryDataList(this.selectTypeFlag) + } else { + this.getDataList() + } }, // 当前页 currentChangeHandle (val) { this.pageIndex = val - this.getDataList() + if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) { + this.queryDataList(this.selectTypeFlag) + } else { + this.getDataList() + } }, // 多选 selectionChangeHandle (val) { diff --git a/src/views/modules/eam/eamProjectInfo.vue b/src/views/modules/eam/eamProjectInfo.vue index 60ee671..c881746 100644 --- a/src/views/modules/eam/eamProjectInfo.vue +++ b/src/views/modules/eam/eamProjectInfo.vue @@ -7,38 +7,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -49,53 +49,63 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + 查询 新增 @@ -845,7 +855,7 @@ import { eamProjectPartInfoDelete, eamProjectPartInfoEdit, eamProjectPartInfoSave, - eamProjectPartSearch, getCustomerNo, saveNewCustomer + eamProjectPartSearch, getCustomerNo, queryEamProjectInfo, saveNewCustomer } from "../../../api/eam/eamProject"; import row from "element-ui/packages/row"; import 'moment/locale/zh-cn'; @@ -867,7 +877,7 @@ import {searchBusinessInfo7} from "../../../api/factory/site"; }, engineersList() { return this.allPersonnelInfoList.filter(item => item.engineerId !== undefined); - } + }, }, components: { Chooselist, @@ -914,6 +924,7 @@ import {searchBusinessInfo7} from "../../../api/factory/site"; projectCreationDate: new Date(), projectCloseDate:'', needDate:'', + cProjectRegion: '', // active: 'Y', page: 1, limit: 10, @@ -931,6 +942,7 @@ import {searchBusinessInfo7} from "../../../api/factory/site"; businessDataList6: [], businessDataList7: [], dataList: [], + selectTypeFlag: [], projectPartList: [], allPersonnelInfoList: [], // ======== 选中的当前行数据 ======== @@ -2366,7 +2378,7 @@ import {searchBusinessInfo7} from "../../../api/factory/site"; }, activated() { - this.$store.commit("sift/commitSearchFunction",this.getDataList) + this.$store.commit("sift/commitSearchFunction",this.queryDataList) }, created () { @@ -2669,17 +2681,10 @@ import {searchBusinessInfo7} from "../../../api/factory/site"; // 获取数据列表 getDataList (params) { + this.selectTypeFlag = params this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex - if (params !== null && params !== undefined) { - params.limit = this.pageSize - params.page = this.pageIndex - params.site = this.$store.state.user.site - params.userName = this.$store.state.user.name - } else { - params = this.searchData - } - eamProjectInfoSearch(params).then(({data}) => { + eamProjectInfoSearch(this.searchData).then(({data}) => { if (data.code === 0) { this.dataList = data.page.list this.allPersonnelInfoList = data.rows @@ -2728,6 +2733,67 @@ import {searchBusinessInfo7} from "../../../api/factory/site"; }) }, + queryDataList (params) { + this.selectTypeFlag = params + this.searchData.limit = this.pageSize + this.searchData.page = this.pageIndex + if (params !== null && params !== undefined) { + params.limit = this.pageSize + params.page = this.pageIndex + params.site = this.$store.state.user.site + params.userName = this.$store.state.user.name + } else { + params = this.searchData + } + queryEamProjectInfo(params).then(({data}) => { + if (data.code === 0) { + this.dataList = data.page.list + this.allPersonnelInfoList = data.rows + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + // 遍历dataList + this.dataList.forEach((item) => { + item.projectManagerName = item.projectManager.split('-')[1] + item.projectOwnerName = item.projectOwner.split('-')[1] + item.engineerName = item.engineer.split('-')[1] + item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1] + item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1] + item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1] + if (item.cQualityEngineer4 != null && item.cQualityEngineer4 !== ''){ + item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1] + } + if (item.cQualityEngineer5 != null && item.cQualityEngineer5 !== ''){ + item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1] + } + if (item.cQualityEngineer6 != null && item.cQualityEngineer6 !== ''){ + item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1] + } + item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1] + if (item.docEngineer != null && item.docEngineer !== ''){ + item.docEngineerName = item.docEngineer.split('-')[1] + } + }) + + // 获取全部人员信息用于下拉框 + this.getAllPersonnelList() + + // 判断是否全部存在数据 + if (this.totalPage > 0) { + // 设置选中行 + this.$refs.mainTable.setCurrentRow(this.dataList[0]) + // 加载当前的页签的table + this.refreshCurrentTabTable() + } + } else { + this.$alert(data.msg, '提示', { + confirmButtonText: '确定', + type: 'warning' + }) + } + }) + }, + getAllPersonnelList() { let allPersonnelInfoDataList = JSON.parse(JSON.stringify(this.allPersonnelInfoList)) @@ -2801,12 +2867,20 @@ import {searchBusinessInfo7} from "../../../api/factory/site"; sizeChangeHandle (val) { this.pageSize = val this.pageIndex = 1 - this.getDataList() + if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) { + this.queryDataList(this.selectTypeFlag) + } else { + this.getDataList() + } }, // 当前页 currentChangeHandle (val) { this.pageIndex = val - this.getDataList() + if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) { + this.queryDataList(this.selectTypeFlag) + } else { + this.getDataList() + } }, addModal () { diff --git a/src/views/modules/eam/eamProjectInfoForUploads.vue b/src/views/modules/eam/eamProjectInfoForUploads.vue index 28eec07..6c34fed 100644 --- a/src/views/modules/eam/eamProjectInfoForUploads.vue +++ b/src/views/modules/eam/eamProjectInfoForUploads.vue @@ -86,6 +86,33 @@ + + + + + + + + + + - + + + item.engineerId !== undefined); - } + }, + finalPartNosList() { + return this.allPersonnelInfoList.filter(item => item.finalPartNoId !== undefined); + }, }, data() { @@ -271,6 +301,9 @@ export default { projectManager: '', projectOwner: '', engineer: '', + finalPartNo: '', + closeStartDate: '', + closeEndDate: '', page: 1, limit: 10, }, @@ -1459,7 +1492,6 @@ export default { } else { this.$route.query.flag = '1' } - // 获取全部人员信息用于下拉框 this.getAllPersonnelList() } @@ -1752,6 +1784,7 @@ export default { const projectOwnersMap = new Map(); const projectManagersMap = new Map(); const engineersMap = new Map(); + const finalPartNosMap = new Map(); allPersonnelInfoDataList.forEach((item) => { // Handle project owners @@ -1786,6 +1819,16 @@ export default { }); allPersonnelList.push(engineersMap.get(item.engineer)); } + + // Handle finalPartNos + if (!finalPartNosMap.has(item.finalPartNo) && item.finalPartNo !== null) { + const finalPartNoId = finalPartNosMap.size + 1; + finalPartNosMap.set(item.finalPartNo, { + finalPartNoId, + finalPartNo: item.finalPartNo, + }); + allPersonnelList.push(finalPartNosMap.get(item.finalPartNo)); + } }); this.allPersonnelInfoList = allPersonnelList; diff --git a/src/views/modules/eam/eamProjectPartInfo.vue b/src/views/modules/eam/eamProjectPartInfo.vue index c5894c4..5b0d541 100644 --- a/src/views/modules/eam/eamProjectPartInfo.vue +++ b/src/views/modules/eam/eamProjectPartInfo.vue @@ -85,6 +85,43 @@ + + + + + + + + + + + + + + + + - + + + item.engineerId !== undefined); }, - cManufactureEngineerList(){ - return this.allPersonnelInfoList.filter(item => item.cManufactureEngineerId !== undefined); - } - + finalPartNosList() { + return this.allPersonnelInfoList.filter(item => item.finalPartNoId !== undefined); + }, }, components: { UploadFileList1, @@ -1119,6 +1155,10 @@ import {EventBus} from "../../../main"; projectManager: '', projectOwner: '', engineer: '', + cProjectRegion: '', + finalPartNo: '', + massProductionStartDate: '', + massProductionEndDate: '', // active: 'Y', page: 1, limit: 10, @@ -3082,6 +3122,7 @@ import {EventBus} from "../../../main"; const projectOwnersMap = new Map(); const projectManagersMap = new Map(); const engineersMap = new Map(); + const finalPartNosMap = new Map(); allPersonnelInfoDataList.forEach((item) => { // Handle project owners @@ -3117,6 +3158,16 @@ import {EventBus} from "../../../main"; allPersonnelList.push(engineersMap.get(item.engineer)); } + // Handle finalPartNos + if (!finalPartNosMap.has(item.finalPartNo) && item.finalPartNo !== null) { + const finalPartNoId = finalPartNosMap.size + 1; + finalPartNosMap.set(item.finalPartNo, { + finalPartNoId, + finalPartNo: item.finalPartNo, + }); + allPersonnelList.push(finalPartNosMap.get(item.finalPartNo)); + } + // Handle cManufactureEngineer if (item.cManufactureEngineer !== null || item.cManufactureEngineer !== ''){ if (!this.allMFGList.includes(item.cManufactureEngineer.split('-')[0])) {