diff --git a/src/views/wms/order/index.vue b/src/views/wms/order/index.vue index e2b6ff8..947a517 100644 --- a/src/views/wms/order/index.vue +++ b/src/views/wms/order/index.vue @@ -135,8 +135,8 @@ - - +
+ @@ -181,7 +181,14 @@ - + + + + + + + +
sum + (order.planNumber || 0), 0); + }, + getTotalRealityNumber() { + return this.orderList.reduce((sum, order) => sum + (order.realityNumber || 0), 0); + }, + getSummary(param) { + const { columns, data } = param; + const planNumberTotal = data.reduce((sum, row) => sum + (row.planNumber || 0), 0); + const realityNumberTotal = data.reduce((sum, row) => sum + (row.realityNumber || 0), 0); + + const summary = columns.map((column, index) => { + if (index === 6) { // "计划数量"在第8列 + return planNumberTotal; + } else if (index === 7) { // "已入库数量"在第9列 + return realityNumberTotal; + } + return ''; // 其余列不汇总,返回空 + }); + + return summary; + }, /** 修改按钮操作 */ handleUpdate(row) { this.reset(); @@ -565,3 +596,15 @@ export default { } }; +