Browse Source

如果是Alpha和天线硬标这3个事业部不需要选择分类

master
han\hanst 5 days ago
parent
commit
a4e8a1809b
  1. 33
      src/views/modules/eam/eamProjectInfo.vue
  2. 548
      src/views/modules/eam/eamProjectInfoForUploads.vue

33
src/views/modules/eam/eamProjectInfo.vue

@ -393,7 +393,7 @@
<el-input v-model="modalData.partDesc" class="project-modal-input"></el-input> <el-input v-model="modalData.partDesc" class="project-modal-input"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3">
<el-col :span="isDryWetTypeOptionalBu?4:3">
<el-form-item prop="partType" :rules="rules.partType"> <el-form-item prop="partType" :rules="rules.partType">
<template #label> <template #label>
<span class="big-label">料号状态</span> <span class="big-label">料号状态</span>
@ -406,7 +406,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="2">
<el-col :span="2" v-if="!isDryWetTypeOptionalBu">
<el-form-item prop="dry_wet_type" :rules="rules.dry_wet_type"> <el-form-item prop="dry_wet_type" :rules="rules.dry_wet_type">
<template #label> <template #label>
<span class="big-label">分类</span> <span class="big-label">分类</span>
@ -417,7 +417,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3" v-if="this.modalData.flag !== '2' && this.modalData.flag !== '1'">
<el-col :span="isDryWetTypeOptionalBu?4:3" v-if="this.modalData.flag !== '2' && this.modalData.flag !== '1'">
<el-form-item prop="priority" :rules="rules.priority"> <el-form-item prop="priority" :rules="rules.priority">
<template #label> <template #label>
<span class="big-label">优先级</span> <span class="big-label">优先级</span>
@ -1253,9 +1253,18 @@ import {updateColumnSize} from "../../../api/table";
let buDescText = this.normalizeBuText(this.currentModalBuDesc) let buDescText = this.normalizeBuText(this.currentModalBuDesc)
return buNoText === '04-MHM' || buNoText.indexOf('ANTENNA') > -1 || buDescText.indexOf('ANTENNA') > -1 || buDescText.indexOf('天线') > -1 return buNoText === '04-MHM' || buNoText.indexOf('ANTENNA') > -1 || buDescText.indexOf('ANTENNA') > -1 || buDescText.indexOf('天线') > -1
}, },
isHardtagBu () {
let buNoText = this.normalizeBuText(this.currentModalBuNo)
let buDescText = this.normalizeBuText(this.currentModalBuDesc)
return buNoText.indexOf('02-Hardtag') > -1 || buNoText.indexOf('HARDTAG') > -1 || buDescText.indexOf('HARDTAG') > -1 || buDescText.indexOf('硬标') > -1
},
isAlphaOrAntennaBu () { isAlphaOrAntennaBu () {
return this.isAlphaBu || this.isAntennaBu return this.isAlphaBu || this.isAntennaBu
}, },
// Alpha / 线 /
isDryWetTypeOptionalBu () {
return this.isAlphaOrAntennaBu || this.isHardtagBu
},
}, },
components: { components: {
Chooselist, Chooselist,
@ -3832,7 +3841,7 @@ import {updateColumnSize} from "../../../api/table";
projectCategory:'', projectCategory:'',
testPartNo:'', testPartNo:'',
partDesc:'', partDesc:'',
dry_wet_type: 'Dry',
dry_wet_type: '',
projectNo: '', projectNo: '',
projectDesc:'', projectDesc:'',
projectCloseDate:'', projectCloseDate:'',
@ -4072,6 +4081,10 @@ import {updateColumnSize} from "../../../api/table";
this.$message.warning('请输入PjM!') this.$message.warning('请输入PjM!')
return return
} }
// Alpha / 线 / BU Dry
if (this.isDryWetTypeOptionalBu && (this.modalData.dry_wet_type === '' || this.modalData.dry_wet_type == null)) {
this.modalData.dry_wet_type = ''
}
if (this.isAlphaOrAntennaBu) { if (this.isAlphaOrAntennaBu) {
if (this.modalData.qcEngineer === '' || this.modalData.qcEngineer == null) { if (this.modalData.qcEngineer === '' || this.modalData.qcEngineer == null) {
this.$message.warning('请输入QC!') this.$message.warning('请输入QC!')
@ -4189,7 +4202,7 @@ import {updateColumnSize} from "../../../api/table";
testPartNo: 'P000000', testPartNo: 'P000000',
partDesc: '无物料', partDesc: '无物料',
partType: 'Active', partType: 'Active',
dry_wet_type: this.modalData.dry_wet_type || 'Dry',
dry_wet_type: this.modalData.dry_wet_type ,
remark: this.modalData.remark, remark: this.modalData.remark,
} }
eamProjectInfoSave(this.modalData).then(({data}) => { eamProjectInfoSave(this.modalData).then(({data}) => {
@ -4271,7 +4284,7 @@ import {updateColumnSize} from "../../../api/table";
testPartNo: 'P000000', testPartNo: 'P000000',
partDesc: '无物料', partDesc: '无物料',
partType: 'Active', partType: 'Active',
dry_wet_type: this.modalData.dry_wet_type || 'Dry',
dry_wet_type: this.modalData.dry_wet_type ,
remark: this.modalData.remark, remark: this.modalData.remark,
} }
eamProjectInfoSave(this.modalData).then(({data}) => { eamProjectInfoSave(this.modalData).then(({data}) => {
@ -4354,7 +4367,7 @@ import {updateColumnSize} from "../../../api/table";
buildDate : this.modalData.projectCreationDate, buildDate : this.modalData.projectCreationDate,
priority: this.modalData.priority, priority: this.modalData.priority,
partType: this.modalData.partType, partType: this.modalData.partType,
dry_wet_type: this.modalData.dry_wet_type || 'Dry',
dry_wet_type: this.modalData.dry_wet_type ,
testPartNo: 'P000000', testPartNo: 'P000000',
partDesc: '无物料', partDesc: '无物料',
status: this.modalData.status, status: this.modalData.status,
@ -4444,7 +4457,7 @@ import {updateColumnSize} from "../../../api/table";
this.$message.warning('请选择料号状态!') this.$message.warning('请选择料号状态!')
return return
} }
if (this.modalData.dry_wet_type === '' || this.modalData.dry_wet_type == null) {
if (!this.isDryWetTypeOptionalBu && (this.modalData.dry_wet_type === '' || this.modalData.dry_wet_type == null)) {
this.$message.warning('请选择分类!') this.$message.warning('请选择分类!')
return return
} }
@ -4480,7 +4493,7 @@ import {updateColumnSize} from "../../../api/table";
this.$message.warning('请选择料号状态!') this.$message.warning('请选择料号状态!')
return return
} }
if (this.modalData.dry_wet_type === '' || this.modalData.dry_wet_type == null) {
if (!this.isDryWetTypeOptionalBu && (this.modalData.dry_wet_type === '' || this.modalData.dry_wet_type == null)) {
this.$message.warning('请选择分类!') this.$message.warning('请选择分类!')
return return
} }
@ -4861,7 +4874,7 @@ import {updateColumnSize} from "../../../api/table";
projectCreationDate: row.projectCreationDate, projectCreationDate: row.projectCreationDate,
status: '草稿', status: '草稿',
partType: 'Active', partType: 'Active',
dry_wet_type: 'Dry',
dry_wet_type: '',
remark: row.remark, remark: row.remark,
// active: row.active, // active: row.active,
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,

548
src/views/modules/eam/eamProjectInfoForUploads.vue

@ -1773,6 +1773,8 @@ export default {
copyDialog: false, copyDialog: false,
documentCopySelection: [], documentCopySelection: [],
copyDocumentList: [], copyDocumentList: [],
// keep-alive created/activated
skipFirstActivatedDataLoad: true,
}; };
}, },
created() { created() {
@ -1794,7 +1796,9 @@ export default {
this.getDataList() this.getDataList()
}, },
activated() { activated() {
if (this.$route.query.flag) {
if (this.skipFirstActivatedDataLoad) {
this.skipFirstActivatedDataLoad = false
} else if (this.$route.query.flag) {
this.getDataList() this.getDataList()
} }
this.$store.commit("sift/commitSearchFunction",this.queryProjectUploadsDocumentList) this.$store.commit("sift/commitSearchFunction",this.queryProjectUploadsDocumentList)
@ -1838,6 +1842,51 @@ export default {
} }
}) })
}, },
getNameAfterDash (userText) {
if (userText === null || userText === undefined || userText === '') {
return ''
}
const splitValues = String(userText).split('-')
if (splitValues.length < 2) {
return ''
}
return splitValues[1]
},
resolveProjectLeaderByResponsibleDepartment (row) {
if (!row) {
return ''
}
const responsibleDepartment = row.responsibleDepartment
//
if (responsibleDepartment === 'R001') return this.getNameAfterDash(row.projectManager)
if (responsibleDepartment === 'R002') return this.getNameAfterDash(row.projectOwner)
if (responsibleDepartment === 'R004') return this.getNameAfterDash(row.engineer)
if (responsibleDepartment === 'R005') return this.getNameAfterDash(row.cQualityEngineer1)
if (responsibleDepartment === 'R007') return this.getNameAfterDash(row.cQualityEngineer2)
if (responsibleDepartment === 'R008') return this.getNameAfterDash(row.cQualityEngineer3)
if (responsibleDepartment === 'R009') return this.getNameAfterDash(row.cManufactureEngineer)
if (responsibleDepartment === 'R011') return this.getNameAfterDash(row.cQualityEngineer4)
if (responsibleDepartment === 'R012') return this.getNameAfterDash(row.docEngineer)
if (responsibleDepartment === 'R013') return this.getNameAfterDash(row.cQualityEngineer5)
if (responsibleDepartment === 'R014') return this.getNameAfterDash(row.cQualityEngineer6)
if (responsibleDepartment === 'R015') return this.getNameAfterDash(row.ipqcHardTag)
if (responsibleDepartment === 'R016') return this.getNameAfterDash(row.cQualityEngineer7)
if (responsibleDepartment === 'R017') return this.getNameAfterDash(row.docEngineer2)
if (responsibleDepartment === 'RQC') return this.getNameAfterDash(row.qcEngineer)
if (responsibleDepartment === 'RPE') return this.getNameAfterDash(row.peEngineer)
if (responsibleDepartment === 'REE') return this.getNameAfterDash(row.eeEngineer)
if (responsibleDepartment === 'RSQEME') return this.getNameAfterDash(row.sqemeEngineer)
if (responsibleDepartment === 'RSQEEE') return this.getNameAfterDash(row.sqeeeEngineer)
return ''
},
applyProjectLeaderForList (list) {
if (!Array.isArray(list) || list.length === 0) {
return
}
for (let i = 0; i < list.length; i++) {
list[i].projectLeader = this.resolveProjectLeaderByResponsibleDepartment(list[i])
}
},
// bu // bu
getSiteAndBuByUserName () { getSiteAndBuByUserName () {
let tempData = { let tempData = {
@ -1887,51 +1936,7 @@ export default {
} }
}); });
for (let i = 0; i < this.exportList.length; i++) {
if (this.exportList[i].responsibleDepartment === 'R001') {
this.exportList[i].projectLeader = this.exportList[i].projectManager.split("-")[1];
} else if (this.exportList[i].responsibleDepartment === 'R002') {
this.exportList[i].projectLeader = this.exportList[i].projectOwner.split("-")[1];
} else if (this.exportList[i].responsibleDepartment === 'R004') {
this.exportList[i].projectLeader = this.exportList[i].engineer.split("-")[1];
} else if (this.exportList[i].responsibleDepartment === 'R005') {
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer1.split("-")[1];
} else if (this.exportList[i].responsibleDepartment === 'R007') {
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer2.split("-")[1];
} else if (this.exportList[i].responsibleDepartment === 'R008') {
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer3.split("-")[1];
} else if (this.exportList[i].responsibleDepartment === 'R009') {
this.exportList[i].projectLeader = this.exportList[i].cManufactureEngineer.split("-")[1];
} else if (this.exportList[i].responsibleDepartment === 'R011') {
if (this.exportList[i].cQualityEngineer4 !== null && this.exportList[i].cQualityEngineer4 !== '') {
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer4.split("-")[1];
}
} else if (this.exportList[i].responsibleDepartment === 'R012') {
if (this.exportList[i].docEngineer !== null && this.exportList[i].docEngineer !== '') {
this.exportList[i].projectLeader = this.exportList[i].docEngineer.split("-")[1];
}
} else if (this.exportList[i].responsibleDepartment === 'R013') {
if (this.exportList[i].cQualityEngineer5 !== null && this.exportList[i].cQualityEngineer5 !== '') {
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer5.split("-")[1];
}
} else if (this.exportList[i].responsibleDepartment === 'R014') {
if (this.exportList[i].cQualityEngineer6 !== null && this.exportList[i].cQualityEngineer6 !== '') {
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer6.split("-")[1];
}
} else if (this.exportList[i].responsibleDepartment === 'R015') {
if (this.exportList[i].ipqcHardTag !== null && this.exportList[i].ipqcHardTag !== '') {
this.exportList[i].projectLeader = this.exportList[i].ipqcHardTag.split("-")[1];
}
} else if (this.exportList[i].responsibleDepartment === 'R016') {
if (this.exportList[i].cQualityEngineer7 !== null && this.exportList[i].cQualityEngineer7 !== '') {
this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer7.split("-")[1];
}
} else if (this.exportList[i].responsibleDepartment === 'R017') {
if (this.exportList[i].docEngineer2 !== null && this.exportList[i].docEngineer2 !== '') {
this.exportList[i].projectLeader = this.exportList[i].docEngineer2.split("-")[1];
}
}
}
this.applyProjectLeaderForList(this.exportList)
}) })
return this.exportList return this.exportList
}, },
@ -1963,8 +1968,10 @@ export default {
this.searchData.limit = this.pageSize % 10 === 0 ? this.pageSize : 20 this.searchData.limit = this.pageSize % 10 === 0 ? this.pageSize : 20
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
this.dataListLoading = true
let requestPromise = null
if (this.$route.query.flag === '2') { if (this.$route.query.flag === '2') {
searchProjectOverUploadsDocumentList(this.searchData).then(({data}) => {
requestPromise = searchProjectOverUploadsDocumentList(this.searchData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.allPersonnelInfoList = data.list this.allPersonnelInfoList = data.list
@ -2015,71 +2022,13 @@ export default {
item.cQualityEngineer7Name = item.cQualityEngineer7.split('-')[1] item.cQualityEngineer7Name = item.cQualityEngineer7.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 if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013'){
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R014'){
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R015'){
if (this.dataList[i].ipqcHardTag === null || this.dataList[i].ipqcHardTag === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].ipqcHardTag.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R016'){
if (this.dataList[i].cQualityEngineer7 === null || this.dataList[i].cQualityEngineer7 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer7.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R017'){
if (this.dataList[i].docEngineer2 === null || this.dataList[i].docEngineer2 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer2.split("-")[1]
}
}
}
this.applyProjectLeaderForList(this.dataList)
} }
// //
this.getAllPersonnelList() this.getAllPersonnelList()
}) })
}else if(this.$route.query.flag === '1') { }else if(this.$route.query.flag === '1') {
searchProjectUploadsDocumentList(this.searchData).then(({data}) => {
requestPromise = searchProjectUploadsDocumentList(this.searchData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.allPersonnelInfoList = data.list this.allPersonnelInfoList = data.list
@ -2130,72 +2079,13 @@ export default {
item.cQualityEngineer7Name = item.cQualityEngineer7.split("-")[1] item.cQualityEngineer7Name = item.cQualityEngineer7.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 if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013') {
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R014') {
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R015') {
if (this.dataList[i].ipqcHardTag === null || this.dataList[i].ipqcHardTag === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].ipqcHardTag.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R016') {
if (this.dataList[i].cQualityEngineer7 === null || this.dataList[i].cQualityEngineer7 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer7.split("-")[1]
}
}
else if(this.dataList[i].responsibleDepartment === 'R017'){
if (this.dataList[i].docEngineer2 === null || this.dataList[i].docEngineer2 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer2.split("-")[1]
}
}
}
this.applyProjectLeaderForList(this.dataList)
} }
// //
this.getAllPersonnelList() this.getAllPersonnelList()
}) })
}else { }else {
searchAllProjectUploadsDocumentList(this.searchData).then(({data}) => {
requestPromise = searchAllProjectUploadsDocumentList(this.searchData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.allDataList = data.list this.allDataList = data.list
let pjmList = [] let pjmList = []
@ -2256,65 +2146,7 @@ export default {
item.cQualityEngineer7Name = item.cQualityEngineer7.split("-")[1] item.cQualityEngineer7Name = item.cQualityEngineer7.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 if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013'){
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R014'){
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R015'){
if (this.dataList[i].ipqcHardTag === null || this.dataList[i].ipqcHardTag === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].ipqcHardTag.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R016'){
if (this.dataList[i].cQualityEngineer7 === null || this.dataList[i].cQualityEngineer7 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer7.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R017'){
if (this.dataList[i].docEngineer2 === null || this.dataList[i].docEngineer2 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer2.split("-")[1]
}
}
}
this.applyProjectLeaderForList(this.dataList)
} else { } else {
this.$route.query.flag = '1' this.$route.query.flag = '1'
} }
@ -2323,6 +2155,13 @@ export default {
} }
}) })
} }
if (requestPromise) {
requestPromise.finally(() => {
this.dataListLoading = false
})
} else {
this.dataListLoading = false
}
}, },
queryProjectUploadsDocumentList (params) { queryProjectUploadsDocumentList (params) {
@ -2337,8 +2176,10 @@ export default {
} else { } else {
params = this.searchData params = this.searchData
} }
this.dataListLoading = true
let requestPromise = null
if (this.$route.query.flag === '2') { if (this.$route.query.flag === '2') {
queryProjectOverUploadsDocumentList(params).then(({data}) => {
requestPromise = queryProjectOverUploadsDocumentList(params).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.allPersonnelInfoList = data.list this.allPersonnelInfoList = data.list
@ -2389,71 +2230,13 @@ export default {
item.cQualityEngineer7Name = item.cQualityEngineer7.split("-")[1] item.cQualityEngineer7Name = item.cQualityEngineer7.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 if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013'){
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
}else if(this.dataList[i].responsibleDepartment === 'R014'){
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R015'){
if (this.dataList[i].ipqcHardTag === null || this.dataList[i].ipqcHardTag === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].ipqcHardTag.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R016'){
if (this.dataList[i].cQualityEngineer7 === null || this.dataList[i].cQualityEngineer7 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer7.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R017') {
if (this.dataList[i].docEngineer2 === null || this.dataList[i].docEngineer2 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer2.split("-")[1]
}
}
}
this.applyProjectLeaderForList(this.dataList)
} }
// //
this.getAllPersonnelList() this.getAllPersonnelList()
}) })
}else if(this.$route.query.flag === '1') { }else if(this.$route.query.flag === '1') {
queryProjectUploadsDocumentList(params).then(({data}) => {
requestPromise = queryProjectUploadsDocumentList(params).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.allPersonnelInfoList = data.list this.allPersonnelInfoList = data.list
@ -2504,71 +2287,13 @@ export default {
item.cQualityEngineer7Name = item.cQualityEngineer7.split("-")[1] item.cQualityEngineer7Name = item.cQualityEngineer7.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 if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013') {
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R014') {
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R015') {
if (this.dataList[i].ipqcHardTag === null || this.dataList[i].ipqcHardTag === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].ipqcHardTag.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R016') {
if (this.dataList[i].cQualityEngineer7 === null || this.dataList[i].cQualityEngineer7 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer7.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R017') {
if (this.dataList[i].docEngineer2 === null || this.dataList[i].docEngineer2 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer2.split("-")[1]
}
}
}
this.applyProjectLeaderForList(this.dataList)
} }
// //
this.getAllPersonnelList() this.getAllPersonnelList()
}) })
}else { }else {
queryAllProjectUploadsDocumentList(params).then(({data}) => {
requestPromise = queryAllProjectUploadsDocumentList(params).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.allDataList = data.list this.allDataList = data.list
let pjmList = [] let pjmList = []
@ -2629,65 +2354,7 @@ export default {
item.cQualityEngineer7Name = item.cQualityEngineer7.split("-")[1] item.cQualityEngineer7Name = item.cQualityEngineer7.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 if(this.dataList[i].responsibleDepartment === 'R012'){
if (this.dataList[i].docEngineer === null || this.dataList[i].docEngineer === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R011'){
if (this.dataList[i].cQualityEngineer4 === null || this.dataList[i].cQualityEngineer4 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer4.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R013'){
if (this.dataList[i].cQualityEngineer5 === null || this.dataList[i].cQualityEngineer5 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer5.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R014'){
if (this.dataList[i].cQualityEngineer6 === null || this.dataList[i].cQualityEngineer6 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer6.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R015'){
if (this.dataList[i].ipqcHardTag === null || this.dataList[i].ipqcHardTag === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].ipqcHardTag.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R016'){
if (this.dataList[i].cQualityEngineer7 === null || this.dataList[i].cQualityEngineer7 === ''){
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].cQualityEngineer7.split("-")[1]
}
} else if(this.dataList[i].responsibleDepartment === 'R017') {
if (this.dataList[i].docEngineer2 === null || this.dataList[i].docEngineer2 === '') {
this.dataList[i].projectLeader = ''
} else {
this.dataList[i].projectLeader = this.dataList[i].docEngineer2.split("-")[1]
}
}
}
this.applyProjectLeaderForList(this.dataList)
} else { } else {
this.$route.query.flag = '1' this.$route.query.flag = '1'
} }
@ -2697,6 +2364,13 @@ export default {
} }
}) })
} }
if (requestPromise) {
requestPromise.finally(() => {
this.dataListLoading = false
})
} else {
this.dataListLoading = false
}
}, },
// //
@ -2712,65 +2386,7 @@ export default {
const finalPartNosMap = new Map(); const finalPartNosMap = new Map();
const projectProjectLeadersMap = new Map(); const projectProjectLeadersMap = new Map();
for (let i = 0; i < allPersonnelInfoDataList.length; i++) {
if (allPersonnelInfoDataList[i].responsibleDepartment === 'R001'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].projectManager.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R002'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].projectOwner.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R004'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].engineer.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R005'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer1.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R007'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer2.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R008'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer3.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R009'){
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cManufactureEngineer.split("-")[1]
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R012'){
if (allPersonnelInfoDataList[i].docEngineer === null || allPersonnelInfoDataList[i].docEngineer === ''){
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].docEngineer.split("-")[1]
}
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R011'){
if (allPersonnelInfoDataList[i].cQualityEngineer4 === null || allPersonnelInfoDataList[i].cQualityEngineer4 === ''){
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer4.split("-")[1]
}
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R013'){
if (allPersonnelInfoDataList[i].cQualityEngineer5 === null || allPersonnelInfoDataList[i].cQualityEngineer5 === ''){
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer5.split("-")[1]
}
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R014'){
if (allPersonnelInfoDataList[i].cQualityEngineer6 === null || allPersonnelInfoDataList[i].cQualityEngineer6 === ''){
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer6.split("-")[1]
}
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R015'){
if (allPersonnelInfoDataList[i].ipqcHardTag === null || allPersonnelInfoDataList[i].ipqcHardTag === ''){
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].ipqcHardTag.split("-")[1]
}
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R016'){
if (allPersonnelInfoDataList[i].cQualityEngineer7 === null || allPersonnelInfoDataList[i].cQualityEngineer7 === ''){
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].cQualityEngineer7.split("-")[1]
}
} else if(allPersonnelInfoDataList[i].responsibleDepartment === 'R017') {
if (allPersonnelInfoDataList[i].docEngineer2 === null || allPersonnelInfoDataList[i].docEngineer2 === '') {
allPersonnelInfoDataList[i].projectLeader = ''
} else {
allPersonnelInfoDataList[i].projectLeader = allPersonnelInfoDataList[i].docEngineer2.split("-")[1]
}
}
}
this.applyProjectLeaderForList(allPersonnelInfoDataList)
allPersonnelInfoDataList.forEach((item) => { allPersonnelInfoDataList.forEach((item) => {
// Handle project owners // Handle project owners

Loading…
Cancel
Save