supplychain/models/supply_contract_items.json
yumoqing 092d74133e fix: 添加product引用, 创建scripts/load_path.py, 修复.dspy代码生成逻辑
- models/*.json: 在supply_contract_items, distribution_agreement_items,
  supplychain_accounting的codes段添加products/product_types引用
- scripts/load_path.py: 模块RBAC权限管理脚本, 包含any/logined/operator/sale四类权限
- supplychain/init.py: 重命名get_module_dbname为_get_dbname避免覆盖全局函数
- wwwroot/api/*_create.dspy: 修复自动编号生成逻辑(移除死代码条件判断)
2026-05-25 15:37:06 +08:00

105 lines
2.5 KiB
JSON

{
"summary": [
{
"name": "supply_contract_items",
"title": "供销合同产品折扣明细表",
"primary": ["id"],
"catelog": "relation"
}
],
"fields": [
{
"name": "id",
"title": "主键ID",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "contract_id",
"title": "供销合同ID",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "resellerid",
"title": "所属分销商机构ID",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "prodtypeid",
"title": "产品分类ID",
"type": "str",
"length": 32
},
{
"name": "productid",
"title": "产品ID",
"type": "str",
"length": 32
},
{
"name": "discount",
"title": "进货折扣",
"type": "double",
"length": 5,
"dec": 4,
"nullable": "no",
"default": "1.0000"
},
{
"name": "settlement_price",
"title": "结算单价",
"type": "double",
"length": 15,
"dec": 4
},
{
"name": "remark",
"title": "备注",
"type": "text"
},
{
"name": "created_at",
"title": "创建时间",
"type": "datetime",
"nullable": "no"
}
],
"indexes": [
{
"name": "idx_sci_contract",
"idxtype": "index",
"idxfields": ["contract_id"]
},
{
"name": "idx_sci_product",
"idxtype": "index",
"idxfields": ["contract_id", "prodtypeid", "productid"]
}
],
"codes": [
{
"field": "contract_id",
"table": "supply_contracts",
"valuefield": "id",
"textfield": "contract_name"
},
{
"field": "prodtypeid",
"table": "product_types",
"valuefield": "id",
"textfield": "type_name"
},
{
"field": "productid",
"table": "products",
"valuefield": "id",
"textfield": "product_name"
}
]
}