From 377edeb2ad33985fa4f23ec757a551ac9bfcf675 Mon Sep 17 00:00:00 2001 From: Aoi_Tori <2547614904@qq.com> Date: Fri, 4 Jul 2025 12:07:00 +0800 Subject: [PATCH] 2025/7/4 --- src/views/modules/part/routingManagement.vue | 9 +- .../project/projectInfo/projectInfo.vue | 393 +++++++++--------- src/views/modules/quote/index.vue | 18 +- .../com_tsd_basicInformation.vue | 10 +- 4 files changed, 219 insertions(+), 211 deletions(-) diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue index 265462a..9d7f90c 100644 --- a/src/views/modules/part/routingManagement.vue +++ b/src/views/modules/part/routingManagement.vue @@ -205,7 +205,7 @@ - + @@ -4706,13 +4706,6 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - this.searchRoutingTools() - if(this.routingToolList.length>0){ - this.$alert('该工序已绑定刀具,不允许删除!', '提示', { - confirmButtonText: '确定' - }) - return - } this.detailData.updateBy = this.$store.state.user.name routingDetailDelete(this.detailData).then(({data}) => { if (data && data.code === 0) { diff --git a/src/views/modules/project/projectInfo/projectInfo.vue b/src/views/modules/project/projectInfo/projectInfo.vue index 7d6431d..c87fd0f 100644 --- a/src/views/modules/project/projectInfo/projectInfo.vue +++ b/src/views/modules/project/projectInfo/projectInfo.vue @@ -1985,229 +1985,240 @@ }).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); + const ossCheck = new Promise((resolve, reject) => { + let ossParams = { + orderRef1: row.site, + orderRef2: row.projectId } - }).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 + queryOss(ossParams).then(({data}) => { + if (data && data.code === 0) { + if (data.rows.length===0) { + resolve(true); + }else { + reject(new Error('该项目已存在附件,不允许删除!')) + this.$alert('该项目已存在附件,不允许删除!', '提示', { + confirmButtonText: '确定' + }) + } } else { this.$message.warning(data.msg); } - } + }).catch((error) => { + this.$message.error(error); + }) }) - if (partDeleteFlag===false){ - this.$alert('该项目已绑定物料信息,不允许删除!', '提示', { - confirmButtonText: '确定' + + // 校验项目物料 + const partCheck = new Promise((resolve, reject) => { + let partParams = { + site: row.site, + projectId: row.projectId, + searchType: 'Y', + username: this.$store.state.user.name, + customerId: row.customerId + } + getProjectInfoPartList(partParams).then(({data}) => { + if (data && data.code === 0) { + if (data.page.list.length===0){ + resolve(true); + } else { + reject(new Error('该项目已绑定物料信息,不允许删除!')) + 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); + const quotationCheck = new Promise((resolve, reject) => { + let quotationParams = { + site: row.site, + projectId: row.projectId, + createBy: this.$store.state.user.name, + menuId: '102001' } - }); - if (quotationDeleteFlag===false){ - this.$alert('该项目已存在询价信息,不允许删除!', '提示', { - confirmButtonText: '确定' - }) - return - } + quotationInformationSearch(quotationParams).then(({data}) => { + //区分请求成功和失败的状况 + if (data && data.code === 0) { + if(data.page.list.length===0){ + resolve(true); + }else { + reject(new Error('该项目已存在询价信息,不允许删除!')) + this.$alert('该项目已存在询价信息,不允许删除!', '提示', { + confirmButtonText: '确定' + }) + } + } else { + this.$message.warning(data.msg); + } + }); + }) // 校验项目报价信息 - 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) + const quoteCheck = new Promise((resolve, reject) => { + let quoteParams = { + site: row.site, + projectNo: row.projectId } - }) - if (quoteDeleteFlag===false){ - this.$alert('该项目已存在报价信息,不允许删除!', '提示', { - confirmButtonText: '确定' + queryQuoteGroupDetailByInquiry(quoteParams).then(({data})=>{ + if (data && data.code === 0){ + if (data.rows.length===0){ + resolve(true); + }else { + reject(new Error('该项目已存在报价信息,不允许删除!')) + this.$alert('该项目已存在报价信息,不允许删除!', '提示', { + confirmButtonText: '确定' + }) + } + }else { + this.$message.warning(data.msg); + } }) - 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) + const proofingCheck = new Promise((resolve, reject) => { + let proofingParams = { + site: row.site, + projectId: row.projectId, + createBy: this.$store.state.user.name, + menuId: '103001' } - }) - if (proofingDeleteFlag===false){ - this.$alert('该项目已存在打样信息,不允许删除!', '提示', { - confirmButtonText: '确定' + proofingInformationSearch(proofingParams).then(({data}) => { + if (data && data.code === 0) { + if (data.page.list.length===0){ + resolve(true); + }else { + reject(new Error('该项目已存在打样信息,不允许删除!')) + this.$alert('该项目已存在打样信息,不允许删除!', '提示', { + confirmButtonText: '确定' + }) + } + } else { + this.$message.warning(data.msg) + } }) - 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) + const testCheck = new Promise((resolve, reject) => { + let testParams = { + site: row.site, + projectId: row.projectId, + createBy: this.$store.state.user.name, + menuId: '107001' } - }); - if (testDeleteFlag===false){ - this.$alert('该项目已存在测试信息,不允许删除!', '提示', { - confirmButtonText: '确定' - }) - return - } + testInformationList(testParams).then(({data}) => { + if (data && data.code === 0) { + if (data.rows.length===0){ + resolve(true); + } else { + reject(new Error('该项目已存在测试记录,不允许删除!')) + this.$alert('该项目已存在测试记录,不允许删除!', '提示', { + confirmButtonText: '确定' + }) + } + } else { + this.$message.warning(data.msg); + } + }); + }) + // 检验刀模申请 - 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) + const toolCheck = new Promise((resolve, reject) => { + let toolParams = { + orderRef1: row.projectId, + site: row.site, + username: this.$store.state.user.name } - }) - if (toolDeleteFlag===false){ - this.$alert('该项目已存在刀模申请,不允许删除!', '提示', { - confirmButtonText: '确定' + searchProjectToolApplyDetail(toolParams).then(({data}) => { + if (data && data.code === 0) { + if (data.rows.length===0){ + resolve(true); + } else { + reject(new Error('该项目已存在刀模申请,不允许删除!')) + this.$alert('该项目已存在刀模申请,不允许删除!', '提示', { + confirmButtonText: '确定' + }) + } + } else { + this.$message.warning(data.msg) + } }) - 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) + const technicalSpecificationCheck = new Promise((resolve, reject) => { + let technicalSpecificationParams = { + site: row.site, + userName: this.$store.state.user.name, + projectId: row.projectId, + page: 1, + limit: 10 } - }); - 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 + technicalSpecificationListSearch(technicalSpecificationParams).then(({data}) => { + if (data && data.code === 0) { + if (data.page.list.length===0){ + resolve(true); + } else { + this.$alert('该项目已绑定技术参数卡,不允许删除!', '提示', { + confirmButtonText: '确定' + }) + reject(new Error('该项目已绑定技术参数卡,不允许删除!')) + } + } else { + this.$message.warning(data.msg); } - } 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( '操作成功') - this.contactChooseFlag = false - this.search() - } else { - this.$message.error(data.msg) + // 校验项目变更记录 + const changeCheck = new Promise((resolve, reject) => { + let changeParams = { + site: row.site, + projectId: row.projectId, + menuId: '108002' } + getChangeRecordByPartNo(changeParams).then(({data}) => { + if (data && data.code === 0) { + if (data.rows.length===0){ + resolve(true); + } else { + this.$alert('该项目已存在变更记录,不允许删除!', '提示', { + confirmButtonText: '确定' + }) + reject(new Error('该项目已存在变更记录,不允许删除!')) + } + } else { + this.$message.warning(data.msg) + } + }) }) - }).catch(() => {}) + return Promise.all([ + ossCheck, + partCheck, + quotationCheck, + quoteCheck, + proofingCheck, + testCheck, + toolCheck, + technicalSpecificationCheck, + changeCheck + ]); + }).then(()=>{ + deleteProjectInfo(row).then(({data}) => { + if (data && data.code === 0) { + this.$message.success( '操作成功') + this.contactChooseFlag = false + this.search() + } else { + this.$message.error(data.msg) + } + }) + }) }else { this.$alert('没有权限删除这个项目信息!', '错误', { confirmButtonText: '确定' diff --git a/src/views/modules/quote/index.vue b/src/views/modules/quote/index.vue index 311ae75..075ad54 100644 --- a/src/views/modules/quote/index.vue +++ b/src/views/modules/quote/index.vue @@ -1151,22 +1151,22 @@ export default { layout="total,sizes, prev, pager, next, jumper"> - + - + - + - + - + - + - + - + - + diff --git a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue index 790981b..432fae6 100644 --- a/src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue +++ b/src/views/modules/sampleManagement/technicalSpecificationDetail/com_tsd_basicInformation.vue @@ -413,8 +413,8 @@ -
- 刷新 +
+ 刷新 保存 取消
@@ -847,7 +847,6 @@ }) } }) - this.dataEntryFlag = false }, searchTable () { @@ -1405,6 +1404,11 @@ this.dataEntryFlag = true }, + refresh1(){ + this.dataEntryForm.remarkPage = this.dataForm.remarkPage + this.dataEntryForm.relevancePartNo = this.dataForm.relevancePartNo + }, + submitDataEntry(){ let params = { ...this.dataForm,