From e25c3d0610a9e1a99476a88db176a2c7e46c0cb4 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 12 Jan 2026 14:49:32 +0800 Subject: [PATCH] =?UTF-8?q?2026-01-12=20=E6=8A=A5=E4=BB=B7=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=AE=A1=E6=89=B9=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=B9=B4=E9=94=80=E5=94=AE=E9=A2=9D=EF=BC=88annual=5Fsales?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processManagement/processBindingInfo.vue | 4 +- src/views/modules/quote/index.vue | 52 +++++++++++++++---- 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/src/views/modules/processManagement/processBindingInfo.vue b/src/views/modules/processManagement/processBindingInfo.vue index ae91143..6ef83db 100644 --- a/src/views/modules/processManagement/processBindingInfo.vue +++ b/src/views/modules/processManagement/processBindingInfo.vue @@ -1319,7 +1319,9 @@ 'plm_quote_detail_test', 'plm_quote_detail_tool' ], - addTable: [] + addTable: [ + 'plm_quote' + ] } } else { return diff --git a/src/views/modules/quote/index.vue b/src/views/modules/quote/index.vue index 6461faa..e33cce7 100644 --- a/src/views/modules/quote/index.vue +++ b/src/views/modules/quote/index.vue @@ -474,6 +474,7 @@ export default { superAdmin: false, rejectVisible: false, rejectOpinion: '', + plmQuoteArr: [], // plm_quote表字段配置(如annual_sales) plmQuoteDetailArr: [], defaultQuoteDetailRow: null, // 默认报价行数据 userBuList: [], @@ -483,7 +484,7 @@ export default { customerDesc:[{required: true, message: '请输入客户名称', trigger: ['blur','change']}], projectNo:[{required: true, message: '请输入项目编码', trigger: ['blur','change']}], projectDesc:[{required: true, message: '请输入项目名称', trigger: ['blur','change']}], - currency:[{required: true, message: '请输入币种', trigger: ['blur','change']}], + // currency:[{required: true, message: '请输入币种', trigger: ['blur','change']}], quoteDate:[{required: true, message: '请选择报价日期', trigger: ['blur','change']}], quoter:[{required: true, message: '请输入报价专员', trigger: ['blur','change']}], }, @@ -689,6 +690,7 @@ export default { } await getNodeAuthority(tempData).then(({data}) => { if (data && data.code === 0) { + this.plmQuoteArr = data.rows.plm_quote || [] this.plmQuoteDetailArr = data.rows.plm_quote_detail || [] } }) @@ -728,6 +730,20 @@ export default { }, // 同意提交 agreeSubmit() { + // 校验报价主表的必填字段 + if (this.plmQuoteArr && this.plmQuoteArr.length > 0) { + for (let i = 0; i < this.plmQuoteArr.length; i++) { + const field = this.plmQuoteArr[i] + if (field.required === 'Y') { + const fieldValue = this.saveQuote[field.fieldId] + // 统一判断是否有值(包括勾选字段) + if (!fieldValue && fieldValue !== 0) { + this.$message.warning(field.fieldName + '不能为空!') + return + } + } + } + } // 校验默认报价行的必填字段 if (this.plmQuoteDetailArr && this.plmQuoteDetailArr.length > 0 && this.defaultQuoteDetailRow) { for (let i = 0; i < this.plmQuoteDetailArr.length; i++) { @@ -744,8 +760,10 @@ export default { type: 'warning' }).then(() => { this.submitLoading = true + // 提交审批流程(后端会在事务中先更新主表,再提交OA) let params = { ...this.currentQuote, + annualSales: this.saveQuote.annualSales, // 传递annualSales userName: this.$store.state.user.name, nodeConclusion: 'Y', menuId: this.$route.meta.menuId @@ -756,9 +774,7 @@ export default { this.saveVisible = false this.handleSearch() } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) + this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } this.submitLoading = false }).catch((error) => { @@ -769,6 +785,20 @@ export default { }, // 驳回提交 rejectSubmit() { + // 校验报价主表的必填字段 + if (this.plmQuoteArr && this.plmQuoteArr.length > 0) { + for (let i = 0; i < this.plmQuoteArr.length; i++) { + const field = this.plmQuoteArr[i] + if (field.required === 'Y') { + const fieldValue = this.saveQuote[field.fieldId] + // 统一判断是否有值(包括勾选字段) + if (!fieldValue && fieldValue !== 0) { + this.$message.warning(field.fieldName + '不能为空!') + return + } + } + } + } // 校验默认报价行的必填字段 if (this.plmQuoteDetailArr && this.plmQuoteDetailArr.length > 0 && this.defaultQuoteDetailRow) { for (let i = 0; i < this.plmQuoteDetailArr.length; i++) { @@ -785,8 +815,10 @@ export default { type: 'warning' }).then(() => { this.submitLoading = true + // 提交驳回流程(后端会在事务中先更新主表,再提交OA) let params = { ...this.currentQuote, + annualSales: this.saveQuote.annualSales, // 传递annualSales userName: this.$store.state.user.name, nodeConclusion: 'N', rejectOpinion: this.rejectOpinion, @@ -799,9 +831,7 @@ export default { this.saveVisible = false this.handleSearch() } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) + this.$alert(data.msg, '错误', { confirmButtonText: '确定' }) } this.submitLoading = false }).catch((error) => { @@ -832,6 +862,8 @@ export default { } }) if (row){ + // 先更新 currentQuote,确保 getNodeAuthority 能获取到正确的 stepId + this.currentQuote = {...row} this.saveQuote = { ...row } @@ -1400,9 +1432,9 @@ export default { this.detailFlag = false; } }, - 'saveQuote.currency'(newVal, oldVal){ - this.saveQuote.currency = newVal.toUpperCase() - }, + // 'saveQuote.currency'(newVal, oldVal){ + // this.saveQuote.currency = newVal.toUpperCase() + // }, 'currentQuote'(newVal, oldVal){ if (newVal && this.isMenu){ this.getPriceCheckProperties();