14 Commits

Author SHA1 Message Date
b69bd38b27 fix: toolbar buttons open CRUD page directly, remove ensure dspy layer
Suppliers '供销协议' → /supplychain/supply_contracts_list?supplier_id=
Sub-distributors '分销协议' → /supplychain/distribution_agreements_list?sub_reseller_id=

No more DataViewer/HTML-redirect popup issues.
2026-07-12 10:32:45 +08:00
7f2c265764 fix: use absolute /supplychain/ URLs in all CRUD-generated index.ui
entire_url() relative paths resolve without module prefix
in bricks DataViewer context. Changed all to /supplychain/... paths.
2026-07-12 10:18:25 +08:00
0c718cf461 fix: fix column name + ensure dspy now returns CRUD page after create
- sub_resellers column is sub_reseller_name (not sub_dist_name)
- After ensure, return UrlWidget loading CRUD list filtered by id
- Popup size increased for CRUD page viewing
2026-07-10 11:11:21 +08:00
7fa70b9a24 fix: use urlwidget+PopupWindow instead of script/dspy for toolbar binds
bricks.js only supports 5 actiontypes; dspy and script with fetch
are not available. Use urlwidget with PopupWindow target instead.
2026-07-10 11:03:56 +08:00
0129866c00 fix: use existing SVG icons for toolbar buttons 2026-07-10 10:38:43 +08:00
3a36dc2400 feat: one-click ensure contract/agreement from supplier/distributor list
- api/ensure_distribution_agreement.dspy: check/create distribution_agreement for sub_reseller
- api/ensure_supply_contract.dspy: check/create supply_contract for supplier
- sub_distributors_list: toolbar '分销协议' now calls ensure endpoint (was PopupWindow)
- suppliers_list: add toolbar '供销协议' calling ensure endpoint
2026-07-10 10:37:17 +08:00
ccd1a6f0e8 fix: remove cheight from all CRUD index.ui — let bricks Tabular auto-height
Removed cheight:40 from outer VBox and inner Tabular options in:
- suppliers_list
- sub_resellers_list
- sub_distributors_list
- supply_contracts_list
- distribution_agreements_list

CRUD Tabular handles its own height; hardcoding cheight causes
title row to fill entire viewport.
2026-07-10 09:29:40 +08:00
Hermes Agent
c06d54d86a feat: 供应商资源定价模块 + CRUD配置 + load_path更新
新增模型: supplier_resource_price (供应商资源定价表)
新增UI: supplier_resource_price_list/index.ui (定价管理界面)
新增DDL: supplier_resource_price建表语句
更新load_path: 添加定价CRUD路径权限
2026-06-20 12:10:48 +08:00
Hermes Agent
a005962abb Revert "fix: root VBox height:100% instead of cheight:40"
This reverts commit 27fbb27e6344e21ebfe9f136945ba8af93684006.
2026-06-19 14:26:31 +08:00
Hermes Agent
27fbb27e63 fix: root VBox height:100% instead of cheight:40 2026-06-19 14:25:10 +08:00
Hermes Agent
2ff2ca7685 feat: 供应商表增加机构ID、内外部标识、结算周期/日、付款方式字段
- models/suppliers.json: 新增 orgid, is_external, settlement_cycle, settlement_day, payment_type
- 外部供应商创建时自动在sage库开设机构
- 内部供应商通过机构名称搜索选择机构ID
- suppliers_create.dspy: 处理is_external逻辑
- get_search_orgid.dspy: 机构名称搜索API
- load_path.py: 注册新API路由
2026-06-17 18:59:51 +08:00
dff8b0de2a feat(supplychain): P0 平台内供应链 - 供销关系/产品映射/跨组织引入
新增3张核心表:
- platform_supply_relations: 平台内org-to-org供销关系(分销/代理/直供)
- platform_supply_products: 供销产品明细(供货价/折扣/佣金)
- product_supplier_mapping: 统一产品供应映射(内部+外部)

新增3个业务API:
- query_platform_suppliers: 查询平台可用供应方机构
- query_platform_products: 查询供应方产品目录
- import_supplier_product: 引入供应方产品到需求方

更新: init/data.json(6组appcodes), load_path.py(RBAC权限), menu.ui(分组菜单)
2026-06-05 22:11:33 +08:00
b8f361af41 fix: wrap Tabular in VBox with cheight for proper scrolling 2026-05-29 22:09:58 +08:00
5942e78968 feat: add DDL, CRUD dspy and list pages for all supplychain tables 2026-05-28 11:43:45 +08:00