diff --git a/src/api/eam/eamProject.js b/src/api/eam/eamProject.js index f5ba4de..251e471 100644 --- a/src/api/eam/eamProject.js +++ b/src/api/eam/eamProject.js @@ -13,6 +13,8 @@ export const eamProjectPartInfoSave= data => createAPI(`/pms/eamProject/eamProje export const eamProjectPartInfoEdit= data => createAPI(`/pms/eamProject/eamProjectPartInfoEdit`,'post',data) export const eamProjectPartInfoDelete= data => createAPI(`/pms/eamProject/eamProjectPartInfoDelete`,'post',data) export const searchConfirmatorList= data => createAPI(`/pms/eamProject/searchConfirmatorList`,'post',data) +export const addConfirmatory= data => createAPI(`/pms/eamProject/addConfirmatory`,'post',data) +export const deleteConfirmatory= data => createAPI(`/pms/eamProject/deleteConfirmatory`,'post',data) export const saveProductionValidationDocumentConfirmator= data => createAPI(`/pms/eamProject/saveProductionValidationDocumentConfirmator`,'post',data) export const saveProductionValidationDocument= data => createAPI(`/pms/eamProject/saveProductionValidationDocument`,'post',data) export const deleteConfirmatorInformation= data => createAPI(`/pms/eamProject/deleteConfirmatorInformation`,'post',data) diff --git a/src/api/factory/site.js b/src/api/factory/site.js index 713d9b4..c6a6323 100644 --- a/src/api/factory/site.js +++ b/src/api/factory/site.js @@ -47,5 +47,7 @@ export const searchBusinessInfo5 = data => createAPI(`/site/searchBusinessInfo5` export const searchBusinessInfo6 = data => createAPI(`/site/searchBusinessInfo6`,'post',data) +export const searchBusinessInfo7 = data => createAPI(`/site/searchBusinessInfo7`,'post',data) + export const getResponsibleDepartment = data => createAPI(`/site/getResponsibleDepartment`,'post',data) diff --git a/src/views/modules/eam/eamDocumentTypeDefinition.vue b/src/views/modules/eam/eamDocumentTypeDefinition.vue index 4ced6f0..86bb64e 100644 --- a/src/views/modules/eam/eamDocumentTypeDefinition.vue +++ b/src/views/modules/eam/eamDocumentTypeDefinition.vue @@ -693,7 +693,12 @@ this.modalData.site = this.$store.state.user.site getResponsibleDepartment(this.modalData).then(({data}) => { if (data.code === 0) { - this.responsibleDepartmentList = data.rows + data.rows.forEach((item) => { + // 判断roleNo是否为A开头 + if (item.roleNo.startsWith('R')) { + this.responsibleDepartmentList.push(item) + } + }) } }) }, diff --git a/src/views/modules/eam/eamProjectInfo.vue b/src/views/modules/eam/eamProjectInfo.vue index cc06d5c..1f04d75 100644 --- a/src/views/modules/eam/eamProjectInfo.vue +++ b/src/views/modules/eam/eamProjectInfo.vue @@ -269,6 +269,10 @@ MFG + + 文档工程师 + + 保存 @@ -651,6 +655,57 @@ + + + + + + + + + + + + + + + + + 查询 + + + + + + + + + + + + 关闭 + + + @@ -728,6 +783,7 @@ import row from "element-ui/packages/row"; import 'moment/locale/zh-cn'; import {EventBus} from "../../../main"; import {queryCustomerList} from "../../../api/customer/customer"; +import {searchBusinessInfo7} from "../../../api/factory/site"; /*打样记录組件*/ export default { @@ -793,6 +849,7 @@ import {queryCustomerList} from "../../../api/customer/customer"; businessDataList4: [], businessDataList5: [], businessDataList6: [], + businessDataList7: [], dataList: [], projectPartList: [], // ======== 选中的当前行数据 ======== @@ -809,6 +866,7 @@ import {queryCustomerList} from "../../../api/customer/customer"; IPQCFlag:false, FQCFlag:false, MFGlag:false, + docEngineerFlag:false, newCustomerFlag:false, modalData:{ flag:'', @@ -844,6 +902,8 @@ import {queryCustomerList} from "../../../api/customer/customer"; cQualityEngineer3Name:'', cManufactureEngineer:'', cManufactureEngineerName:'', + docEngineer:'', + docEngineerName:'', engineer:'', engineerName:'', //projectCreationDate为当前服务器的时间 @@ -918,6 +978,15 @@ import {queryCustomerList} from "../../../api/customer/customer"; page: 1, limit: 10, }, + searchBusinessData7:{ + site: this.$store.state.user.site, + username: '', + roleDesc: '', + userDisplay: '', + active: '', + page: 1, + limit: 10, + }, activeName: 'projectPart', // 展示列集 columnList: [ @@ -1210,6 +1279,24 @@ import {queryCustomerList} from "../../../api/customer/customer"; fixed: '', columnWidth: 120, }, + { + userId: this.$store.state.user.name, + functionId: 101001014, + serialNumber: '101001014Table1DocEngineer', + tableId: "101001014Table1", + tableName: "项目信息表", + columnProp: 'docEngineerName', + headerAlign: "center", + align: "left", + columnLabel: '文档工程师', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120, + }, { userId: this.$store.state.user.name, functionId: 101001014, @@ -1574,6 +1661,24 @@ import {queryCustomerList} from "../../../api/customer/customer"; fixed: '', columnWidth: 120, }, + { + userId: this.$store.state.user.name, + functionId: 101001014, + serialNumber: '101001014Table1DocEngineer', + tableId: "101001014Table1", + tableName: "项目信息表", + columnProp: 'docEngineerName', + headerAlign: "center", + align: "left", + columnLabel: '文档工程师', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120, + }, { userId: this.$store.state.user.name, functionId: 101001014, @@ -1822,6 +1927,20 @@ import {queryCustomerList} from "../../../api/customer/customer"; trigger: ['blur','change'] } ], + docEngineer:[ + { + required: true, + message: ' ', + trigger: ['blur','change'] + } + ], + docEngineerName:[ + { + required: true, + message: ' ', + trigger: ['blur','change'] + } + ], projectManagerName:[ { required: true, @@ -2256,14 +2375,18 @@ import {queryCustomerList} from "../../../api/customer/customer"; item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1] item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1] item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1] + if (item.docEngineer != null && item.docEngineer !== ''){ + item.docEngineerName = item.docEngineer.split('-')[1] + } }) + console.log(this.totalPage) // 判断是否全部存在数据 if (this.totalPage > 0) { // 设置选中行 this.$refs.mainTable.setCurrentRow(this.dataList[0]) // 加载当前的页签的table this.refreshCurrentTabTable() - this.projectPartClickRow(this.dataList[0]) + this.projectPartClickRow(this.projectPartList[0]) } } }) @@ -2330,6 +2453,8 @@ import {queryCustomerList} from "../../../api/customer/customer"; cQualityEngineer3Name:'', cManufactureEngineer: '', cManufactureEngineerName: '', + docEngineer: '', + docEngineerName: '', projectCreationDate:new Date(), createDate: '', // active: 'Y', @@ -2371,12 +2496,16 @@ import {queryCustomerList} from "../../../api/customer/customer"; cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名 cManufactureEngineer: row.cManufactureEngineer, cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名 + docEngineer: row.docEngineer, projectCreationDate: row.projectCreationDate, status: row.status, // active: row.active, createBy: this.$store.state.user.name, updateBy: this.$store.state.user.name, } + if (row.docEngineer != null && row.docEngineer !== ''){ + this.modalData.docEngineerName= row.docEngineer.split('-')[1] // 截取用户名 + } this.modalDisableFlag = true this.modalPartDisableFlag = false this.modalFlag = true @@ -2474,6 +2603,10 @@ import {queryCustomerList} from "../../../api/customer/customer"; this.$message.warning('请输入MFG!') return } + if (this.modalData.docEngineer === '' || this.modalData.docEngineer == null) { + this.$message.warning('请输入文档工程师!') + return + } // if (this.modalData.active === '' || this.modalData.active == null) { // this.$message.warning('选择是否在用!') // return @@ -2501,6 +2634,7 @@ import {queryCustomerList} from "../../../api/customer/customer"; cQualityEngineer2: this.modalData.cQualityEngineer2, cQualityEngineer3: this.modalData.cQualityEngineer3, cManufactureEngineer: this.modalData.cManufactureEngineer, + docEngineer: this.modalData.docEngineer, projectCreationDate: this.modalData.projectCreationDate, createDate: this.modalData.createDate, createBy: this.modalData.createBy, @@ -2569,6 +2703,7 @@ import {queryCustomerList} from "../../../api/customer/customer"; cQualityEngineer2: this.modalData.cQualityEngineer2, cQualityEngineer3: this.modalData.cQualityEngineer3, cManufactureEngineer: this.modalData.cManufactureEngineer, + docEngineer: this.modalData.docEngineer, projectCreationDate: this.modalData.projectCreationDate, createDate: this.modalData.createDate, createBy: this.modalData.createBy, @@ -2618,6 +2753,38 @@ import {queryCustomerList} from "../../../api/customer/customer"; }) } } else if (this.modalData.flag === '2'){ + let inData = { + projectId : this.modalData.projectId, + projectNo: this.modalData.projectNo, + projectDesc: this.modalData.projectDesc, + projectCategory: this.modalData.projectCategory, + projectCloseDate: this.modalData.projectCloseDate, + needDate: this.modalData.needDate, + cProjectRegion: this.modalData.cProjectRegion, + projectManager: this.modalData.projectManager, + projectOwner: this.modalData.projectOwner, + engineer: this.modalData.engineer, + cQualityEngineer1: this.modalData.cQualityEngineer1, + cQualityEngineer2: this.modalData.cQualityEngineer2, + cQualityEngineer3: this.modalData.cQualityEngineer3, + cManufactureEngineer: this.modalData.cManufactureEngineer, + docEngineer: this.modalData.docEngineer, + projectCreationDate: this.modalData.projectCreationDate, + createDate: this.modalData.createDate, + createBy: this.modalData.createBy, + updateBy: this.modalData.updateBy, + site: this.modalData.site, + bu: this.modalData.bu, + customerNo: this.modalData.customerNo, + customerDesc: this.modalData.customerDesc, + status: this.modalData.status, + active: this.modalData.active, + closeDate : this.modalData.projectCloseDate, + buildDate : this.modalData.projectCreationDate, + priority: this.modalData.priority, + testPartNo: 'P000000', + partDesc: '无物料', + } if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) { this.$confirm('预计完成日期小于当前日期,确定继续保存?', '提示', { confirmButtonText: '确定', @@ -2626,6 +2793,16 @@ import {queryCustomerList} from "../../../api/customer/customer"; }).then(() => { eamProjectInfoEdit(this.modalData).then(({data}) => { if (data && data.code === '0') { + if (this.projectPartList.length !== 0 && this.projectPartList[0].testPartNo === 'P000000') { + inData.projectPartId = this.projectPartList[0].projectPartId + eamProjectPartInfoEdit(inData).then(({data}) => { + if (data && data.code !== 0) { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } this.getDataList() this.modalFlag=false EventBus.$emit('updateProjectPartInfo') @@ -2653,6 +2830,16 @@ import {queryCustomerList} from "../../../api/customer/customer"; else { eamProjectInfoEdit(this.modalData).then(({data}) => { if (data && data.code === '0') { + if (this.projectPartList.length !== 0 && this.projectPartList[0].testPartNo === 'P000000') { + inData.projectPartId = this.projectPartList[0].projectPartId + eamProjectPartInfoEdit(inData).then(({data}) => { + if (data && data.code !== 0) { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } this.getDataList() this.modalFlag=false EventBus.$emit('updateProjectPartInfo') @@ -2776,6 +2963,13 @@ import {queryCustomerList} from "../../../api/customer/customer"; } }) }, + searchBusinessInfoList7 () { + searchBusinessInfo7(this.searchBusinessData7).then(({data}) => { + if (data && data.code === 0){ + this.businessDataList7 = data.rows; + } + }) + }, // 打开项目经理 openProjectManagerInfoDialog () { //请求 @@ -2806,6 +3000,11 @@ import {queryCustomerList} from "../../../api/customer/customer"; //请求 this.searchBusinessInfoList5(); }, + // 打开文档工程师 + openDocEngineerInfoDialog () { + //请求 + this.searchBusinessInfoList7(); + }, openEngineer6InfoDialog () { //请求 this.searchBusinessInfoList6(); @@ -2843,6 +3042,11 @@ import {queryCustomerList} from "../../../api/customer/customer"; this.businessDataList5 = [] this.MFGlag = false }, + //关闭 + closeDocEngineerInfoDialog () { + this.businessDataList7 = [] + this.docEngineerFlag = false + }, projectManagerRowDblclick(row) { if (row && row.username && row.userDisplay) { this.modalData.projectManager = row.username + '-' + row.userDisplay; @@ -2882,6 +3086,11 @@ import {queryCustomerList} from "../../../api/customer/customer"; this.modalData.cManufactureEngineerName = this.modalData.cManufactureEngineer.split('-')[1] // 截取用户名 this.MFGlag = false }, + docEngineerRowDblclick (row) { + this.modalData.docEngineer = row.username + '-' + row.userDisplay + this.modalData.docEngineerName = this.modalData.docEngineer.split('-')[1] // 截取用户名 + this.docEngineerFlag = false + }, closeClear () { this.modalData.bu = '' this.modalData.projectNo = '' @@ -2901,6 +3110,12 @@ import {queryCustomerList} from "../../../api/customer/customer"; this.modalData.cQualityEngineer1Name = '' this.modalData.cQualityEngineer2 = '' this.modalData.cQualityEngineer2Name = '' + this.modalData.cQualityEngineer3 = '' + this.modalData.cQualityEngineer3Name = '' + this.modalData.cManufactureEngineer = '' + this.modalData.cManufactureEngineerName = '' + this.modalData.docEngineer = '' + this.modalData.docEngineerName = '' this.modalData.projectCreationDate = new Date() }, @@ -2926,6 +3141,9 @@ import {queryCustomerList} from "../../../api/customer/customer"; item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1] item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1] item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1] + if (item.docEngineer != null && item.docEngineer !== ''){ + item.docEngineerName = item.docEngineer.split('-')[1] + } }) } }) @@ -2962,12 +3180,16 @@ import {queryCustomerList} from "../../../api/customer/customer"; cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名 cManufactureEngineer: row.cManufactureEngineer, cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名 + docEngineer: row.docEngineer, projectCreationDate: row.projectCreationDate, status: '草稿', // active: row.active, createBy: this.$store.state.user.name, updateBy: this.$store.state.user.name, } + if (row.docEngineer != null && row.docEngineer !== ''){ + this.modalData.docEngineerName= row.docEngineer.split('-')[1] // 截取用户名 + } this.modalDisableFlag = true this.modalPartDisableFlag = true this.modalFlag = true @@ -3004,12 +3226,16 @@ import {queryCustomerList} from "../../../api/customer/customer"; cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名 cManufactureEngineer: row.cManufactureEngineer, cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名 + docEngineer: row.docEngineer, projectCreationDate: row.buildDate, status: row.status, // active: row.active, createBy: this.$store.state.user.name, updateBy: this.$store.state.user.name, } + if (row.docEngineer != null && row.docEngineer !== ''){ + this.modalData.docEngineerName= row.docEngineer.split('-')[1] // 截取用户名 + } this.modalDisableFlag = true this.modalPartDisableFlag = true this.modalFlag = true diff --git a/src/views/modules/eam/eamProjectInfoForUploads.vue b/src/views/modules/eam/eamProjectInfoForUploads.vue index c3d4c61..6865fff 100644 --- a/src/views/modules/eam/eamProjectInfoForUploads.vue +++ b/src/views/modules/eam/eamProjectInfoForUploads.vue @@ -107,10 +107,11 @@ label="操作" align="center" fixed="left" - width="110"> + width="150"> @@ -141,7 +142,7 @@ import { searchProjectOverUploadsDocumentList, searchConfirmProgressList, searchOverConfirmProgressList, getProofDocument, searchAllProjectUploadsDocumentList } from "../../../api/eam/eamProofing"; -import {searchConfirmProgressPusherList} from "../../../api/eam/eamProject"; +import {searchConfirmProgressPusherList, warnSendMailHandle} from "../../../api/eam/eamProject"; import {getSiteAndBuByUserName} from "../../../api/qc/qc"; import {removeUserFavorite, saveUserFavorite, userFavoriteList} from "../../../api/userFavorite"; import {getTableDefaultListLanguage, getTableUserListLanguage} from "../../../api/table"; @@ -165,6 +166,7 @@ export default { uploadDialog:false, isEditable: true, isMassProductionStage: true, + warnFlag: false, projectAllDocumentCurrentRow: {}, searchData: { site: this.$store.state.user.site, @@ -1036,41 +1038,81 @@ export default { }else { searchAllProjectUploadsDocumentList(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 - 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] - item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1] + let pjmList = [] + // 遍历data.page.list + data.list.forEach((item) => { + if (!pjmList.includes(item.projectOwner.split('-')[0])) { + pjmList.push(item.projectOwner.split('-')[0]) + } }) - for (let i = 0; i < this.dataList.length; i++) { - if (this.dataList[i].responsibleDepartment === 'R001') { - this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1] - } else if (this.dataList[i].responsibleDepartment === 'R002') { - this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1] - } else if (this.dataList[i].responsibleDepartment === 'R004') { - this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1] - } else if (this.dataList[i].responsibleDepartment === 'R005') { - this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1] - } else if (this.dataList[i].responsibleDepartment === 'R007') { - this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1] - } else if (this.dataList[i].responsibleDepartment === 'R008') { - this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1] - } else if (this.dataList[i].responsibleDepartment === 'R009') { - this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1] + console.log(pjmList) + console.log(this.$store.state.user.name) + if (pjmList.includes(this.$store.state.user.name)){ + this.warnFlag = true + this.dataList = data.page.list + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + 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] + item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1] + }) + for (let i = 0; i < this.dataList.length; i++) { + if (this.dataList[i].responsibleDepartment === 'R001') { + this.dataList[i].projectLeader = this.dataList[i].projectManager.split("-")[1] + } else if (this.dataList[i].responsibleDepartment === 'R002') { + this.dataList[i].projectLeader = this.dataList[i].projectOwner.split("-")[1] + } else if (this.dataList[i].responsibleDepartment === 'R004') { + this.dataList[i].projectLeader = this.dataList[i].engineer.split("-")[1] + } else if (this.dataList[i].responsibleDepartment === 'R005') { + this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer1.split("-")[1] + } else if (this.dataList[i].responsibleDepartment === 'R007') { + this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer2.split("-")[1] + } else if (this.dataList[i].responsibleDepartment === 'R008') { + this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer3.split("-")[1] + } else if (this.dataList[i].responsibleDepartment === 'R009') { + this.dataList[i].projectLeader = this.dataList[i].cManufactureEngineer.split("-")[1] + } } + } else { + this.$route.query.flag = '1' } } }) } }, + warnSendMail(row) { + this.$confirm('确认发送提醒?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + warnSendMailHandle(row).then(({data}) => { + if (data && data.code === 0) { + this.$message({ + message: '发送成功', + type: 'success' + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消发送' + }); + }); + }, + // 每页数 sizeChangeHandle (val) { this.pageSize = val diff --git a/src/views/modules/eam/eamProjectPartInfo.vue b/src/views/modules/eam/eamProjectPartInfo.vue index 06f3941..320dde9 100644 --- a/src/views/modules/eam/eamProjectPartInfo.vue +++ b/src/views/modules/eam/eamProjectPartInfo.vue @@ -262,6 +262,16 @@ style="width: 100px; height: 80px"/> + + + @@ -522,26 +532,97 @@ - - - - - - +
+ + + + + + + + + 查询 + + +
+ + + 可选人员 + + + + + + + + + + +
+ 添加>> +
+
+ 删除<< +
+
+ + 确认人员 + + + + + + + + + +