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) }; };