From af82feb7dc8b084c997abf7df511c32c6005a996 Mon Sep 17 00:00:00 2001 From: TianyangZhang Date: Fri, 21 Nov 2025 14:33:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?add=20:=20ofm=20-vehicle=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=BD=A6=E8=BE=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ofm/vehicle_form.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/ofm/vehicle_form.vue b/src/views/ofm/vehicle_form.vue index e2a3624d..d7c41d07 100644 --- a/src/views/ofm/vehicle_form.vue +++ b/src/views/ofm/vehicle_form.vue @@ -72,7 +72,7 @@ - + From 60ed2579d62c1b44139fbc8a70ad844bb1b3326a Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 21 Nov 2025 14:37:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=E5=85=89=E8=8A=AF=E6=88=90=E5=93=81?= =?UTF-8?q?=E5=87=BA=E5=BA=93mioitem=E5=88=97=E8=A1=A8=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=9F=E8=AE=A1=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inm/mioitem.vue | 46 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue index 8c1e8693..23c6035b 100644 --- a/src/views/inm/mioitem.vue +++ b/src/views/inm/mioitem.vue @@ -84,6 +84,8 @@ hideDo @row-click="rowClick" @selection-change="selectionChange" + :summary-method="getSummaries" + show-summary > @@ -104,7 +106,7 @@ - + @@ -642,6 +644,48 @@ export default { loading.close(); }); }, + getSummaries({ columns, data }) { + const sums = []; + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = "合计"; + return; + } + let propert = ''; + //尺寸检验 + if(index == 6){ + propert = 'count'; + }else if(index == 7){ + propert = 'count_send'; + } + if (propert!=='') { + const values = data.map((item) => + Number(item[propert]) + ); + if (!values.every((value) => Number.isNaN(value))) { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr); + let sum = Number(Number(prev) + Number(curr)); + if (!isNaN(value)) { + return sum; + } else { + return prev; + } + }, 0); + } + } + if(index==8){ + if(sums[6]){ + if(sums[7]){ + sums[index] = sums[6]-sums[7]; + }else{ + sums[index] = sums[6]; + } + } + } + }); + return sums; + }, }, };