Browse Source

2024.9.9 产品文档收集优化

java8
yuejiayang 1 year ago
parent
commit
4cbf7dbb9e
  1. 181
      src/views/modules/eam/eamProjectInfo.vue
  2. 38
      src/views/modules/eam/eamProjectInfoForConfirm.vue
  3. 77
      src/views/modules/eam/eamProjectInfoForUploads.vue

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

@ -872,6 +872,7 @@ import {searchBusinessInfo7} from "../../../api/factory/site";
flag:'',
bu: '',
buNo: '',
buDesc: '',
site: this.$store.state.user.site,
projectId: '',
projectNo: '',
@ -2612,15 +2613,95 @@ import {searchBusinessInfo7} from "../../../api/factory/site";
// return
// }
if (this.modalData.flag === '1') {
if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) {
this.$confirm('预计完成日期小于当前日期,确定继续保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(this.userBuList)
// userBuList
this.userBuList.forEach((item) => {
if (this.modalData.bu === item.buNo) {
this.modalData.buDesc = item.buDesc
}
})
this.$confirm('项目 ' + this.modalData.projectNo + '-' + this.modalData.projectDesc + ' 的BU为:' + this.modalData.buDesc + ',是否确认继续保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) {
this.$confirm('预计完成日期小于当前日期,确定继续保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.modalData.status = '草稿'
let inData = {
projectId: null,
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: '无物料',
}
eamProjectInfoSave(this.modalData).then(({data}) => {
if (data && data.code === '0') {
eamProjectInfoSearch(this.searchData).then(({data}) => {
if (data && data.code === 0) {
inData.projectId = data.page.list[0].projectId
eamProjectPartInfoSave(inData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
EventBus.$emit('updateProjectPartInfo')
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
},
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
})
}
})
}).catch(() => {
//
this.$message({
type: 'info',
message: '已取消操作'
})
})
} else {
this.modalData.status = '草稿'
let inData = {
projectId : null,
projectId: null,
projectNo: this.modalData.projectNo,
projectDesc: this.modalData.projectDesc,
projectCategory: this.modalData.projectCategory,
@ -2645,8 +2726,8 @@ import {searchBusinessInfo7} from "../../../api/factory/site";
customerDesc: this.modalData.customerDesc,
status: this.modalData.status,
active: this.modalData.active,
closeDate : this.modalData.projectCloseDate,
buildDate : this.modalData.projectCreationDate,
closeDate: this.modalData.projectCloseDate,
buildDate: this.modalData.projectCreationDate,
priority: this.modalData.priority,
testPartNo: 'P000000',
partDesc: '无物料',
@ -2676,82 +2757,20 @@ import {searchBusinessInfo7} from "../../../api/factory/site";
})
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
//
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
else {
this.modalData.status = '草稿'
let inData = {
projectId : null,
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: '无物料',
}
eamProjectInfoSave(this.modalData).then(({data}) => {
if (data && data.code === '0') {
eamProjectInfoSearch(this.searchData).then(({data}) => {
if (data && data.code === 0) {
inData.projectId = data.page.list[0].projectId
eamProjectPartInfoSave(inData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
EventBus.$emit('updateProjectPartInfo')
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
},
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch(() => {
//
this.$message({
type: 'info',
message: '已取消操作'
})
}
})
} else if (this.modalData.flag === '2'){
let inData = {
projectId : this.modalData.projectId,

38
src/views/modules/eam/eamProjectInfoForConfirm.vue

@ -829,7 +829,6 @@ export default {
//
getDataList () {
console.log(this.$route.query.flag)
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
if (this.$route.query.flag === '4') {
@ -871,19 +870,32 @@ export default {
}else {
searchAllConfirmProgressList(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])
}
})
console.log(pjmList)
console.log(this.$store.state.user.name)
if (pjmList.includes(this.$store.state.user.name)) {
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]
})
}
} else {
this.$route.query.flag = '3'
}
})
}

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

@ -75,6 +75,21 @@
<!-- </el-form-item>-->
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<download-excel
v-if="this.$route.query.flag !== '2' && this.$route.query.flag !== '1'"
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
</el-form-item>
</el-form>
@ -153,8 +168,14 @@ export default {
components: {UploadFileList1},
data() {
return {
//
exportData: [],
exportName: '待上传文件' + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ['待上传文件'],
exportFooter: [],
folder: '',
dataList: [],
allDataList: [],
fileList: [],
confirmProgressList: [],
projectPartDocumentList: [],
@ -961,6 +982,59 @@ export default {
})
},
//excel
async createExportData() {
this.getDataList()
this.allDataList.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.allDataList.length; i++) {
if (this.allDataList[i].responsibleDepartment === 'R001') {
this.allDataList[i].projectLeader = this.allDataList[i].projectManager.split("-")[1]
} else if (this.allDataList[i].responsibleDepartment === 'R002') {
this.allDataList[i].projectLeader = this.allDataList[i].projectOwner.split("-")[1]
} else if (this.allDataList[i].responsibleDepartment === 'R004') {
this.allDataList[i].projectLeader = this.allDataList[i].engineer.split("-")[1]
} else if (this.allDataList[i].responsibleDepartment === 'R005') {
this.allDataList[i].projectLeader = this.allDataList[i].cQualityEngineer1.split("-")[1]
} else if (this.allDataList[i].responsibleDepartment === 'R007') {
this.allDataList[i].projectLeader = this.allDataList[i].cQualityEngineer2.split("-")[1]
} else if (this.allDataList[i].responsibleDepartment === 'R008') {
this.allDataList[i].projectLeader = this.allDataList[i].cQualityEngineer3.split("-")[1]
} else if (this.allDataList[i].responsibleDepartment === 'R009') {
this.allDataList[i].projectLeader = this.allDataList[i].cManufactureEngineer.split("-")[1]
}
}
this.exportList = this.allDataList
return this.exportList
},
startDownload() {
},
finishDownload() {
},
fields () {
let json = "{"
this.columnProjectAllDocumentList.forEach((item, index) => {
if (index == this.columnProjectAllDocumentList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
//
getDataList () {
this.searchData.limit = this.pageSize
@ -1038,6 +1112,7 @@ export default {
}else {
searchAllProjectUploadsDocumentList(this.searchData).then(({data}) => {
if (data.code === 0) {
this.allDataList = data.list
let pjmList = []
// data.page.list
data.list.forEach((item) => {
@ -1045,8 +1120,6 @@ export default {
pjmList.push(item.projectOwner.split('-')[0])
}
})
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

Loading…
Cancel
Save