diff --git a/inventory-web/src/views/stock/stocktake/index.vue b/inventory-web/src/views/stock/stocktake/index.vue index 92088d2..43d4034 100644 --- a/inventory-web/src/views/stock/stocktake/index.vue +++ b/inventory-web/src/views/stock/stocktake/index.vue @@ -98,7 +98,16 @@
- 近 {{ RECOMMEND_DAYS }} 天最活跃的前 + + + 天最活跃的前
+
+ 💡 提示:勾选父级货架,将自动涵盖其下属的所有末级库位及库存。 +
(m ? MODE_LABELS[m] || m : '') const scopeLabel = (s?: string | null) => (s ? SCOPE_LABELS[s] || s : '') // ★ 抽盘范围:系统推荐 + 人工在库位树上微调 -const RECOMMEND_DAYS = 30 -const recTopN = ref(50) // 推荐「近 N 天最活跃的前 X 个库位」中的 X +const recommendDays = ref(90) // 推荐「近 N 天最活跃的前 X 个库位」中的 N(可编辑) +const recTopN = ref(10) // 同上,X const recLoading = ref(false) // 获取推荐中 const treeLoading = ref(false) // 库位树加载中 const locTreeData = ref([]) // 库位树(已按当前公司前缀过滤) @@ -825,11 +837,11 @@ const fetchRecommendLocations = async () => { const res: any = await request({ url: '/v1/inbound/stock/stocktake/recommend-locations', method: 'get', - params: withCompany({ days: RECOMMEND_DAYS, top_n: recTopN.value }) + params: withCompany({ days: recommendDays.value, top_n: recTopN.value }) }) const locs: string[] = res?.data?.locations || [] if (!locs.length) { - ElMessage.warning(`最近 ${RECOMMEND_DAYS} 天没有找到活跃库位`) + ElMessage.warning(`最近 ${recommendDays.value} 天没有找到活跃库位`) return } @@ -860,7 +872,7 @@ const buildScopeConfig = () => { const nodes = locTreeRef.value?.getCheckedNodes() || [] return { locations: nodes.map((n: any) => n.full_path).filter(Boolean), - recommend_days: RECOMMEND_DAYS, + recommend_days: recommendDays.value, recommend_top_n: recTopN.value } } @@ -1868,7 +1880,15 @@ const goToVarianceReview = () => { margin-bottom: 8px; } .scope-recommend-text { font-size: 12px; color: #606266; } -.scope-topn-input { width: 100px; } +.scope-topn-input { width: 96px; } +.scope-days-input { width: 96px; } +/* 操作提示:柔和的灰色小字 */ +.scope-hint { + font-size: 12px; + color: #909399; + line-height: 1.5; + margin-bottom: 6px; +} /* 左右双栏:左 60% 库位树 | 右 40% 已选明细 */ .scope-columns {