调整 可用库存为0不展示在表中

This commit is contained in:
2026-05-07 18:29:45 +08:00
parent af02c33af8
commit 7de3bf123c
5 changed files with 42 additions and 2 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ FIELD_SPECS = [
FieldSpec("零售价", "零售价", 2, "0.00", 2),
FieldSpec("店铺名称", "店铺名称", 1),
FieldSpec("店铺可用库存", "店铺挂单量", 2, "0", 0),
FieldSpec("总库存", "总库存", 2, "0", 0),
FieldSpec("全渠道总库存", "总库存", 2, "0", 0),
FieldSpec(month_sales_field_name(0), "本月销售数量", 2, "0", 0),
FieldSpec(month_sales_field_name(1), "上月销售数量", 2, "0", 0),
FieldSpec(month_sales_field_name(2), "上上月销售数量", 2, "0", 0),
+1
View File
@@ -83,6 +83,7 @@ shop_stock_latest AS (
) t
WHERE t.rn = 1
AND t."状态" <> '已失效'
AND t."可发库存" <> 0
GROUP BY
t."统一规格编码",
t."店铺主键"
@@ -1,5 +1,18 @@
#!/usr/bin/env python3
from pathlib import Path
import sys
def _bootstrap_project_root() -> None:
project_root = Path(__file__).resolve().parents[1]
project_root_text = str(project_root)
if project_root_text not in sys.path:
sys.path.insert(0, project_root_text)
_bootstrap_project_root()
from inventory_analytics.batch_inventory_report.cli import main
+13
View File
@@ -1,11 +1,24 @@
#!/usr/bin/env python3
from pathlib import Path
import sys
def _bootstrap_project_root() -> None:
project_root = Path(__file__).resolve().parents[1]
project_root_text = str(project_root)
if project_root_text not in sys.path:
sys.path.insert(0, project_root_text)
_bootstrap_project_root()
from inventory_analytics.channel_inventory_sync.entrypoint import main
def _ensure_default_action() -> None:
if any(arg in {"-h", "--help"} for arg in sys.argv[1:]):
return
if any(arg == "--action" or arg.startswith("--action=") for arg in sys.argv[1:]):
return
sys.argv.extend(["--action", "all"])
+13
View File
@@ -1,5 +1,18 @@
#!/usr/bin/env python3
from pathlib import Path
import sys
def _bootstrap_project_root() -> None:
project_root = Path(__file__).resolve().parents[1]
project_root_text = str(project_root)
if project_root_text not in sys.path:
sys.path.insert(0, project_root_text)
_bootstrap_project_root()
from inventory_analytics.batch_upload.web import main