|
|
|
@ -416,7 +416,14 @@ |
|
|
|
import {isAuth} from "../../../../utils"; |
|
|
|
import FilterSearch from "../../../common/filterSearch.vue"; |
|
|
|
import {siteList} from "../../../../api/base/site"; |
|
|
|
import {projectInfoSearchByAnyField} from "../../../../api/project/project"; |
|
|
|
import {getProjectInfoPartList, projectInfoSearchByAnyField} from "../../../../api/project/project"; |
|
|
|
import {queryOss} from "../../../../api/oss/oss"; |
|
|
|
import {quotationInformationSearch} from "../../../../api/quotation/quotationInformation"; |
|
|
|
import {queryQuoteGroupDetailByInquiry} from "../../../../api/quote/quoteGroupDetail"; |
|
|
|
import {proofingInformationSearch} from "../../../../api/proofing/proofingInformation"; |
|
|
|
import {testInformationList} from "../../../../api/test/testInformation"; |
|
|
|
import {searchProjectToolApplyDetail} from "../../../../api/tool/toolApply"; |
|
|
|
import {technicalSpecificationListSearch} from "../../../../api/sampleManagement/technicalSpecificationList"; |
|
|
|
/*組件*/ |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
@ -1976,6 +1983,221 @@ |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
// 校验附件信息 |
|
|
|
let ossParams = { |
|
|
|
orderRef1: row.site, |
|
|
|
orderRef2: row.projectId |
|
|
|
} |
|
|
|
let ossDeleteFlag = false |
|
|
|
queryOss(ossParams).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
if (data.rows.length===0){ |
|
|
|
ossDeleteFlag = true |
|
|
|
} |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg); |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error); |
|
|
|
}) |
|
|
|
if (ossDeleteFlag===false){ |
|
|
|
this.$alert('请先删除项目的附件信息!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 校验项目物料 |
|
|
|
let partParams = { |
|
|
|
site: row.site, |
|
|
|
projectId: row.projectId, |
|
|
|
searchType: 'Y', |
|
|
|
username: this.$store.state.user.name, |
|
|
|
customerId: row.customerId |
|
|
|
} |
|
|
|
let partDeleteFlag = false |
|
|
|
getProjectInfoPartList(partParams).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
if (data.page.list.length===0){ |
|
|
|
partDeleteFlag = true |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
if (partDeleteFlag===false){ |
|
|
|
this.$alert('请先删除项目的物料信息!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 校验询价信息 |
|
|
|
let quotationParams = { |
|
|
|
site: row.site, |
|
|
|
projectId: row.projectId, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
menuId: '102001' |
|
|
|
} |
|
|
|
let quotationDeleteFlag = false |
|
|
|
quotationInformationSearch(quotationParams).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code === 0) { |
|
|
|
if(data.page.list.length===0){ |
|
|
|
quotationDeleteFlag = true |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
if (quotationDeleteFlag===false){ |
|
|
|
this.$alert('请先删除项目的询价信息!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 校验项目报价信息 |
|
|
|
let quoteParams = { |
|
|
|
site: row.site, |
|
|
|
projectNo: row.projectId |
|
|
|
} |
|
|
|
let quoteDeleteFlag = false |
|
|
|
queryQuoteGroupDetailByInquiry(quoteParams).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
if (data.rows.length===0){ |
|
|
|
quoteDeleteFlag = true |
|
|
|
} |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
if (quoteDeleteFlag===false){ |
|
|
|
this.$alert('请先删除项目的报价信息!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 校验项目打样信息 |
|
|
|
let proofingParams = { |
|
|
|
site: row.site, |
|
|
|
projectId: row.projectId, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
menuId: '103001' |
|
|
|
} |
|
|
|
let proofingDeleteFlag = false |
|
|
|
proofingInformationSearch(proofingParams).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
if (data.page.list.length===0){ |
|
|
|
proofingDeleteFlag = true |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
if (proofingDeleteFlag===false){ |
|
|
|
this.$alert('请先删除项目的打样信息!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 校验项目测试记录 |
|
|
|
let testParams = { |
|
|
|
site: row.site, |
|
|
|
projectId: row.projectId, |
|
|
|
createBy: this.$store.state.user.name, |
|
|
|
menuId: '107001' |
|
|
|
} |
|
|
|
let testDeleteFlag = false |
|
|
|
testInformationList(testParams).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
if (data.rows.length===0){ |
|
|
|
testDeleteFlag = true |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}); |
|
|
|
if (testDeleteFlag===false){ |
|
|
|
this.$alert('请先删除项目的测试记录!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 检验刀模申请 |
|
|
|
let toolParams = { |
|
|
|
orderRef1: row.projectId, |
|
|
|
site: row.site, |
|
|
|
username: this.$store.state.user.name |
|
|
|
} |
|
|
|
let toolDeleteFlag = false |
|
|
|
searchProjectToolApplyDetail(toolParams).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code === 0) { |
|
|
|
if (data.rows.length===0){ |
|
|
|
toolDeleteFlag = true |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
if (toolDeleteFlag===false){ |
|
|
|
this.$alert('请先删除项目的刀模申请!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 校验技术参数卡 |
|
|
|
let technicalSpecificationParams = { |
|
|
|
site: row.site, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
projectId: row.projectId, |
|
|
|
} |
|
|
|
let technicalSpecificationDeleteFlag = false |
|
|
|
technicalSpecificationListSearch(technicalSpecificationParams).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
if (data.page.list.length===0){ |
|
|
|
technicalSpecificationDeleteFlag = true |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}); |
|
|
|
if (technicalSpecificationDeleteFlag===false){ |
|
|
|
this.$alert('请先删除项目的技术参数卡!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 校验项目变更记录 |
|
|
|
let changeParams = { |
|
|
|
site: row.site, |
|
|
|
projectId: row.projectId, |
|
|
|
menuId: '108002' |
|
|
|
} |
|
|
|
let changeDeleteFlag = false |
|
|
|
getChangeRecordByPartNo(changeParams).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
if (data.rows.length===0){ |
|
|
|
changeDeleteFlag = true |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
if(changeDeleteFlag===false){ |
|
|
|
this.$alert('请先删除项目的变更记录!', '提示', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
deleteProjectInfo(row).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success( '操作成功') |
|
|
|
|