- 7个数据库表: suppliers, supply_contracts, supply_contract_items, sub_distributors, distribution_agreements, distribution_agreement_items, supplychain_accounting - CRUD JSON配置 (7个列表 + editable段) - API端点: create/update/delete (21个) + calculate_accounting + query_discount (2个) - 前端页面: index.ui + 5个功能页 + menu.ui - 记账计算: 自动查找有效合同/协议折扣,计算进货金额、分销金额、利润 - 折扣查找优先级: 精确产品 > 产品分类 > 默认折扣 - productid/prodtypeid引用product模块(即将开发)
93 lines
2.2 KiB
JSON
93 lines
2.2 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"
|
|
}
|
|
]
|
|
}
|