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(() => {