feat(price): 信息价/市场价重设计——目录树+行内编辑+只收标准模板+导出一份数据(决策42)

- schema: 新增 price_dirs 目录树(批次级单根/多级/仅叶挂行),prices.dir_id;Class 冗余完整路径文本
- 导入只收标准模板 xlsx:表头严格校验(HTML/别名/多sheet拆批退役);名称默认=文件名可改;期次从文件名认
- 后台明细页重做:左树行内增删改名/上下移(↑↓✕两段式确认、选中按钮常显),右表行内新增/编辑(重算比对键即刻生效)
- 导出 zip = 价格明细.xlsx(目录路径+批次信息页签)+ 附件原件,导入可复原
- 壳/跨页跳转带版本参数根治 WebView2 旧缓存;导入弹框文件框只收 .xlsx
- 附 P0/P1 接口测试夹具与价格重设计回归(新增 test_price_redesign 等 8 件,全套 148 项绿)
This commit is contained in:
lianjianwei2024
2026-10-13 08:35:34 +08:00
parent 7fb7969a2f
commit dd6bd24018
17 changed files with 2465 additions and 324 deletions

View File

@@ -16,8 +16,20 @@ sys.path.insert(0, os.path.join(HERE, "core"))
import api_server
PORT = api_server.PORT
URL = "http://127.0.0.1:%d/workbench.html" % PORT
ADMIN_URL = "http://127.0.0.1:%d/admin.html" % PORT
def _page_ver(name):
"""页面文件 mtime 作版本参数(2026-10-12):文件一更新 URL 就变,任何内核的
磁盘缓存都必然失配。起因:主人的 WebView2 对静态响应的 no-store 不完全遵守,
价格库重设计后壳里一直显示旧界面(IAB/新浏览器带 ?v= 才是新的)。"""
try:
return str(int(os.path.getmtime(os.path.join(api_server.ROOT, name))))
except Exception:
return "0"
URL = "http://127.0.0.1:%d/workbench.html?v=%s" % (PORT, _page_ver("workbench.html"))
ADMIN_URL = "http://127.0.0.1:%d/admin.html?v=%s" % (PORT, _page_ver("admin.html"))
LOG = os.path.join(ROOT, "data", "launch.log")