From f13c4a7ef6584d54538622b1d4b71d110ea2ffcb Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Tue, 10 Mar 2026 10:51:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=90=E6=96=99=E6=88=90=E6=9C=AC=E4=B8=BA0?= =?UTF-8?q?=E7=9A=84=EF=BC=9A=E6=95=B4=E8=A1=8C=E6=98=BE=E7=A4=BA=E7=BA=A2?= =?UTF-8?q?=E8=89=B2=20=E6=8A=A5=E4=BB=B7=E4=B8=8B=E8=BE=BE=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E6=9C=890=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=EF=BC=9A=E5=AD=98=E5=9C=A8=E6=88=90=E6=9C=AC=E4=B8=BA?= =?UTF-8?q?0=E7=9A=84=E6=9D=90=E6=96=99=EF=BC=8C=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E4=B8=8B=E8=BE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/quote/quoteDetailBom.js | 2 ++ .../quote/detail/primary/quoteDetailBom.vue | 7 +++- src/views/modules/quote/index.vue | 33 ++++++++++++++++--- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/src/api/quote/quoteDetailBom.js b/src/api/quote/quoteDetailBom.js index d89e7b3..e613485 100644 --- a/src/api/quote/quoteDetailBom.js +++ b/src/api/quote/quoteDetailBom.js @@ -1,3 +1,5 @@ import {createAPI} from "../../utils/httpRequest"; export const queryQuoteDetailBom = (data) => createAPI("/quote/detail/bom", "post", data); + +export const checkZeroUnitPrice = (data) => createAPI("/quote/detail/bom/checkZeroPrice", "post", data); diff --git a/src/views/modules/quote/detail/primary/quoteDetailBom.vue b/src/views/modules/quote/detail/primary/quoteDetailBom.vue index 888782f..eedd457 100644 --- a/src/views/modules/quote/detail/primary/quoteDetailBom.vue +++ b/src/views/modules/quote/detail/primary/quoteDetailBom.vue @@ -370,6 +370,11 @@ export default { this.$message.error(error); }) }, + unitPriceRowStyle({row}) { + if (Number(row.unitPrice) === 0) { + return { color: '#F56C6C' }; + } + }, levelRowStyle({row}) { if (row.engChgLevel === this.bomEngChgLevel.engChgLevel && row.bomType === this.bomEngChgLevel.bomType && row.partNo === this.bomEngChgLevel.partNo) { return {'background-color': '#E8F7F6'}; @@ -544,7 +549,7 @@ export default { - + { + const submitIssue = () => { this.submitLoading = true let params = { ...row, @@ -1382,6 +1379,32 @@ export default { }).finally(() => { this.submitLoading = false }) + } + + const doIssue = () => { + this.$confirm('是否确认下达?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + submitIssue() + }) + } + + checkZeroUnitPrice({ quoteId: row.id }).then(({ data }) => { + if (data && data.code === 0 && data.hasZero) { + this.$confirm('存在单位成本为0的材料,是否继续下达?', '提示', { + confirmButtonText: '继续下达', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + submitIssue() + }).catch(() => {}) + } else { + doIssue() + } + }).catch(() => { + doIssue() }) }, },