From 5868fd6225914ad715d97f7437f30a539918005e Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 10 Aug 2026 11:59:55 +0800 Subject: [PATCH] =?UTF-8?q?2026-08-10=20=E9=94=80=E5=94=AE=E6=8A=A5?= =?UTF-8?q?=E4=BB=B7=EF=BC=9A=20=E6=9D=90=E6=96=99=E3=80=90=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E3=80=91=EF=BC=8C=E2=80=9C=E5=8D=95=E4=BD=8D=E6=88=90?= =?UTF-8?q?=E6=9C=AC=E2=80=9D=E5=92=8C=E2=80=9C=E5=8D=95=E4=BD=8D=E8=B0=83?= =?UTF-8?q?=E6=9C=BA=E6=88=90=E6=9C=AC=E2=80=9D=E5=AF=BC=E5=87=BA=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../quote/detail/primary/quoteDetailBom.vue | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/views/modules/quote/detail/primary/quoteDetailBom.vue b/src/views/modules/quote/detail/primary/quoteDetailBom.vue index 8dd3852..f282166 100644 --- a/src/views/modules/quote/detail/primary/quoteDetailBom.vue +++ b/src/views/modules/quote/detail/primary/quoteDetailBom.vue @@ -588,8 +588,31 @@ export default { json += "}" return eval("(" + json + ")") }, + formatCostValue(value) { + return Number.isFinite(value) ? value.toFixed(6) : '' + }, + getCalcUnitCost(row) { + let qtyPerAssembly = Number(row.qtyPerAssembly) + let unitPrice = Number(row.unitPrice) + return this.formatCostValue(qtyPerAssembly * unitPrice) + }, + getCalcSetupCost(row) { + let quoteQty = Number(this.quoteDetail.qty) + if (!quoteQty) { + return '' + } + let componentScrap = Number(row.componentScrap) + let unitPrice = Number(row.unitPrice) + return this.formatCostValue(componentScrap * unitPrice / quoteQty) + }, createExportData() { - return this.dataList; + return this.dataList.map(item => { + return { + ...item, + calcUnitCost: this.getCalcUnitCost(item), + calcSetupCost: this.getCalcSetupCost(item), + } + }); }, startDownload() { this.exportLoading = true @@ -667,10 +690,10 @@ export default { {{ scope.row[item.columnProp] }}