From 9e48c924bf6a9e63416a0a0488a83e0269af53d3 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 14 Oct 2026 10:18:38 +0800 Subject: [PATCH] =?UTF-8?q?2026-10-14=20=E5=BE=85=E6=8A=A5=E4=BB=B7?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E3=80=90=E6=8A=A5=E4=BB=B7=E3=80=91=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E6=A0=A1=E9=AA=8C=E9=A1=B9=E7=9B=AE=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=BF=85=E9=A1=BB=E6=98=AF=E2=80=9C=E5=B7=B2=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/quotation/toBeQuoted.vue | 44 +++++----------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/src/views/modules/quotation/toBeQuoted.vue b/src/views/modules/quotation/toBeQuoted.vue index 35b27f2..61f6fbe 100644 --- a/src/views/modules/quotation/toBeQuoted.vue +++ b/src/views/modules/quotation/toBeQuoted.vue @@ -188,7 +188,6 @@ import { quotationInformationSearch2, // 询价信息列表查询 } from '@/api/quotation/quotationInformation.js' import {batchSaveQuote} from "../../../api/quote/quote"; -import {queryProjectByCustomer} from "../../../api/project/project"; import DictDataSelect from "../sys/dict-data-select.vue"; import {quotationInformationSearchByAnyField} from "../../../api/quotation/quotationInformation"; import FilterSearch from "../../common/filterSearch.vue"; @@ -624,11 +623,7 @@ export default { }, // 报价 batchQuotation(){ - this.assertSelectedProjectsCompleted(this.quotationSelections).then(() => { - this.saveBatchQuotationHeader(this.quotationSelections); - }).catch((msg) => { - this.$message.warning(typeof msg === 'string' ? msg : '校验项目状态失败') - }) + this.saveBatchQuotationHeader(this.quotationSelections); }, // 批量新增报价信息 saveBatchQuotationHeader(list){ @@ -661,35 +656,14 @@ export default { this.$message.warning("请选择需报价的单号") return } - this.assertSelectedProjectsCompleted(this.quotationSelections).then(() => { - this.quotationSelections = this.quotationSelections.map(item=>({ - ...item, - qty: undefined, - currency: undefined, - createBy: this.$store.state.user.name, - site: this.$store.state.user.site, - })) - this.quoteVisible = true; - }).catch((msg) => { - this.$message.warning(typeof msg === 'string' ? msg : '校验项目状态失败') - }) - }, - assertSelectedProjectsCompleted(list) { - const site = this.$store.state.user.site - const uniqueIds = [...new Set((list || []).map(item => item.projectId).filter(Boolean))] - if (!uniqueIds.length) { - return Promise.reject('项目号不能为空') - } - return Promise.all(uniqueIds.map(projectId => - queryProjectByCustomer({ site, projectId }).then(({data}) => { - if (!(data && data.code === 0 && data.rows && data.rows.length === 1)) { - return Promise.reject('未找到项目:' + projectId) - } - if (data.rows[0].status !== '已完成') { - return Promise.reject('询价单项目 ' + projectId + ' 单据状态必须为已完成,当前状态:' + data.rows[0].status) - } - }) - )) + this.quotationSelections = this.quotationSelections.map(item=>({ + ...item, + qty: undefined, + currency: undefined, + createBy: this.$store.state.user.name, + site: this.$store.state.user.site, + })) + this.quoteVisible = true; }, buildBatchQuotePayload(list){ return list.map(item=>({