From ced0f89c1df1e2fe1b4655f36e002cfad474ddf1 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Sun, 20 Sep 2026 09:14:05 +0800 Subject: [PATCH] =?UTF-8?q?2026-09-20=20=E9=94=80=E5=94=AE=E6=8A=A5?= =?UTF-8?q?=E4=BB=B7=E2=80=9C=E9=A1=B9=E7=9B=AE=E5=B9=B4=E9=94=80=E5=94=AE?= =?UTF-8?q?=E9=A2=9DCNY(K)=E2=80=9D=E5=8F=96=E5=80=BC=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/quote/index.vue | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/views/modules/quote/index.vue b/src/views/modules/quote/index.vue index b46c03a..d45a964 100644 --- a/src/views/modules/quote/index.vue +++ b/src/views/modules/quote/index.vue @@ -576,7 +576,6 @@ export default { insideInquiryVisible:false, detailFlag:false, - skipAnnualSalesAssign: false, ossColumns:[ { @@ -973,11 +972,9 @@ export default { if (row){ // 先更新 currentQuote,确保 getNodeAuthority 能获取到正确的 stepId this.currentQuote = {...row} - this.skipAnnualSalesAssign = true this.saveQuote = { ...row } - this.skipAnnualSalesAssign = false // 草稿(10节点)/审批中均按节点配置控制字段 if (row.status !== '已完成') { await this.getNodeAuthority() @@ -1210,7 +1207,9 @@ export default { this.saveQuote.projectDesc = '' this.saveQuote.finalCustomerNo = '' this.saveQuote.finalCustomerDesc = '' - this.$set(this.saveQuote, 'annualSales', undefined) + if (!this.saveQuote.id) { + this.$set(this.saveQuote, 'annualSales', undefined) + } } }else { this.$message.warning(data.msg) @@ -1433,10 +1432,8 @@ export default { return Number.isNaN(amount) ? undefined : amount }, assignAnnualSalesFromProject(project, projectId) { - if (this.skipAnnualSalesAssign) { - return - } - if (!this.isAnnualSalesDisabled() && this.saveQuote && this.saveQuote.annualSales != null && this.saveQuote.annualSales !== '') { + // 仅新增报价单时从项目带出,已有单据不再刷新 + if (!this.saveQuote || this.saveQuote.id) { return } const amount = this.pickProjectAmount(project) @@ -1444,7 +1441,7 @@ export default { this.$set(this.saveQuote, 'annualSales', amount) return } - const id = projectId || (project && (project.projectId || project.project_id)) || (this.saveQuote && this.saveQuote.projectNo) + const id = projectId || (project && (project.projectId || project.project_id)) || this.saveQuote.projectNo if (!id) { this.$set(this.saveQuote, 'annualSales', undefined) return @@ -1453,6 +1450,9 @@ export default { site: this.$store.state.user.site, projectId: id }).then(({data}) => { + if (!this.saveQuote || this.saveQuote.id) { + return + } if (!(data && data.code === 0 && data.rows && data.rows.length)) { this.$set(this.saveQuote, 'annualSales', undefined) return @@ -1461,6 +1461,9 @@ export default { const row = data.rows.find(item => String(item.projectId || item.project_id || '').toUpperCase() === currentId) || data.rows[0] this.$set(this.saveQuote, 'annualSales', this.pickProjectAmount(row)) }).catch(() => { + if (!this.saveQuote || this.saveQuote.id) { + return + } this.$set(this.saveQuote, 'annualSales', undefined) }) }, @@ -1694,7 +1697,9 @@ export default { this.saveQuote.projectDesc = '' this.saveQuote.finalCustomerNo = '' this.saveQuote.finalCustomerDesc = '' - this.$set(this.saveQuote, 'annualSales', undefined) + if (!this.saveQuote.id) { + this.$set(this.saveQuote, 'annualSales', undefined) + } } }, 'saveQuote.quoter'(newVal, oldVal){