From bda75785ad8bd1b9e81505d8be6fe70d9995129d Mon Sep 17 00:00:00 2001 From: Vayne Date: Fri, 7 Apr 2023 17:37:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B8=E6=98=93=E4=B8=8A=E4=BC=A0=E5=90=88?= =?UTF-8?q?=E8=AE=A1=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basicInformation/tradeupload/index.vue | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/SC-web/src/views/scm/basicInformation/tradeupload/index.vue b/SC-web/src/views/scm/basicInformation/tradeupload/index.vue index ba0375da..47812cae 100644 --- a/SC-web/src/views/scm/basicInformation/tradeupload/index.vue +++ b/SC-web/src/views/scm/basicInformation/tradeupload/index.vue @@ -77,7 +77,7 @@ + @selection-change="handleSelectionChange" custom-column border show-summary :summary-method="getSummaries"> { + if (index === 0) { + sums[index] = '合计'; + return; + } + const values = data.map(item => Number(item[column.property])); + if (!values.every(value => isNaN(value)) && (index === 6 || index === 7 || index === 8 || index === 9)) { + sums[index] = values.reduce((prev, curr) => { + const value = Number(curr); + if (!isNaN(value)) { + return this.jnpf.floatAdd(prev,curr); + } else { + return prev; + } + }, 0); + } else { + sums[index] = ''; + } + }); + + return sums; + }, continueUpload(id,isDetail){ this.formVisible3 = true this.$nextTick(() => {