From dbdcc0557e791d45b422e83e7d1c2984aafffd1e Mon Sep 17 00:00:00 2001 From: "zangch@mesnac.com" Date: Sat, 11 Oct 2025 19:57:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(wms):=20=E5=A2=9E=E5=8A=A0=E5=91=86?= =?UTF-8?q?=E6=BB=9E=E5=BA=93=E5=AD=98=E5=A4=A9=E6=95=B0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在查询表单中添加呆滞天数输入框,默认值为180天 - 支持用户自定义呆滞天数范围(1-3650天) - 更新统计逻辑以使用动态呆滞天数阈值- 调整超过6个月未出库的显示为动态天数标签- 移除呆滞原因列以简化报表展示 -修复数量统计时可能存在的NaN问题 - 注释掉原有的Excel和CSV导出按钮 --- src/api/wms/report/types.ts | 4 ++++ src/views/mes/reportHourlyOutput/index.vue | 4 ++-- src/views/wms/stagnantInventory/index.vue | 17 +++++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/api/wms/report/types.ts b/src/api/wms/report/types.ts index ae2439a..039fa52 100644 --- a/src/api/wms/report/types.ts +++ b/src/api/wms/report/types.ts @@ -1,6 +1,10 @@ export interface ReportQuery { tenantId?: string; materialCategoryId?: number; + /** + * 呆滞天数阈值 + */ + stagnantDays?: number; } export interface ReturnReasonAnalysisVO { diff --git a/src/views/mes/reportHourlyOutput/index.vue b/src/views/mes/reportHourlyOutput/index.vue index bfae2b9..ad10752 100644 --- a/src/views/mes/reportHourlyOutput/index.vue +++ b/src/views/mes/reportHourlyOutput/index.vue @@ -34,8 +34,8 @@ 查询 重置 - 导出Excel - 导出CSV + diff --git a/src/views/wms/stagnantInventory/index.vue b/src/views/wms/stagnantInventory/index.vue index e8f295c..72eedec 100644 --- a/src/views/wms/stagnantInventory/index.vue +++ b/src/views/wms/stagnantInventory/index.vue @@ -4,7 +4,10 @@ :leave-active-class="proxy?.animate.searchAnimate.leave">
- + + + + 刷新 @@ -39,7 +42,7 @@
{{ stagnantStats.overSixMonths }}
-
超过6个月未出库
+
超过{{ queryParams.stagnantDays }}天未出库
@@ -89,7 +92,7 @@ - + @@ -131,7 +134,8 @@ const queryFormRef = ref(); const queryParams = ref({ tenantId: undefined, - materialCategoryId: undefined + materialCategoryId: undefined, + stagnantDays: 180 }); /** 查询呆滞料库存报表列表 */ @@ -152,10 +156,11 @@ const getList = async () => { /** 计算统计数据 */ const calculateStats = () => { + const overThresholdLabel = `超过${queryParams.value.stagnantDays ?? 180}天未出库`; stagnantStats.value = { neverOut: reportList.value.filter(item => item.stagnantReason === '从未出库').length, - overSixMonths: reportList.value.filter(item => item.stagnantReason === '超过6个月未出库').length, - totalQty: reportList.value.reduce((sum, item) => sum + (item.stagnantInventoryQty || 0), 0) + overSixMonths: reportList.value.filter(item => item.stagnantReason === overThresholdLabel).length, + totalQty: reportList.value.reduce((sum, item) => sum + Number(item.stagnantInventoryQty ?? 0), 0) }; };