From 8e054463d8ee449b67aa160998acddb7b568ded0 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 12 Nov 2025 13:03:00 +0800 Subject: [PATCH] =?UTF-8?q?2025-11-12=20=E6=B5=8B=E8=AF=95=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=A1=86=E9=87=8C=E5=A2=9E=E5=8A=A0=E6=9D=90=E6=96=99=E6=80=BB?= =?UTF-8?q?=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/test/requestForTest.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue index 78fa4c8..4c15c60 100644 --- a/src/views/modules/test/requestForTest.vue +++ b/src/views/modules/test/requestForTest.vue @@ -354,8 +354,9 @@ - - + + 材料总金额:{{ materialTotalAmount.toFixed(2) }} + @@ -1034,6 +1035,15 @@ export default { return 'N' } }, + // 计算材料总金额 + materialTotalAmount() { + if (!this.testSoBomList || this.testSoBomList.length === 0) { + return 0 + } + return this.testSoBomList.reduce((sum, item) => { + return sum + (Number(item.totalCost) || 0) + }, 0) + } }, name: "test", components: {