From a0b075dfddd51ef90b89bbd26f518ac3abae8ac8 Mon Sep 17 00:00:00 2001 From: lunanting Date: Thu, 22 Oct 2026 14:07:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E7=BC=BA=E8=B4=A7?= =?UTF-8?q?=E8=A1=A5=E8=B4=A7=E7=9B=91=E6=8E=A7=20summary=20=E4=B8=AD?= =?UTF-8?q?=E3=80=8C=E4=BB=8A=E6=97=A5=E6=97=A0=E5=8D=95=E3=80=8D=E8=AE=A1?= =?UTF-8?q?=E6=95=B0=EF=BC=88no=5Forder=20=E4=B8=8E=20noOrder=20=E9=94=AE?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=E5=AF=BC=E8=87=B4=E6=BC=8F=E8=AE=A1?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/services/binReplenishService.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/services/binReplenishService.js b/backend/src/services/binReplenishService.js index e13c3b8..870701e 100644 --- a/backend/src/services/binReplenishService.js +++ b/backend/src/services/binReplenishService.js @@ -309,8 +309,10 @@ function buildSummary(rows, orderSkuCount) { pickTotal: 0, storageTotal: 0, }; + const STATUS_SUM_KEY = { need: 'need', short: 'short', enough: 'enough', no_order: 'noOrder' }; rows.forEach((row) => { - if (summary[row.status] !== undefined) summary[row.status] += 1; + const key = STATUS_SUM_KEY[row.status]; + if (key && summary[key] !== undefined) summary[key] += 1; summary.suggestQtyTotal += row.suggestQty || 0; summary.orderQtyTotal += row.orderQty || 0; summary.exceedTotal += row.excess || 0;