|
|
|
@ -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, |
|
|
|
|