From dcecb039035f4b2e82e31c39b74db9402444c536 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期二, 08 四月 2025 21:35:39 +0800 Subject: [PATCH] 代码更新,优化等内容 --- 代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue" index 6091790..cbb7c93 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue" @@ -43,6 +43,8 @@ <el-table ref="singleTable" :data="tableData" + :summary-method="getSummaries" + show-summary style="width: 100%; height: 100%" highlight-current-row @current-change="handleCurrentChange" @@ -271,6 +273,34 @@ this.getDictionaryData(); this.getData(); }, + getSummaries(param) { + const { columns, data } = param + const sums = [] + + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '鍚堣' + return + } + + // 浠呭鏁板�煎垪姹傚拰 + // 浠呭鏌愪竴鍒楁眰鍜� + if (column.property === 'lockQuantity' || column.property === 'overOutQuantity' || column.property === 'orderQuantity') { + const values = data.map(item => Number(item[column.property])) + console.log(values); + if (!values.every(value => isNaN(value))) { + sums[index] = values.reduce((prev, curr) => { + return prev + (isNaN(curr) ? 0 : curr) + }, 0) + } else { + sums[index] = '-' + } + } + + }) + + return sums + }, getData() { var wheres = [{ name: "orderId", value: this.row.id }]; var param = { -- Gitblit v1.9.3