- 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模块(即将开发)
133 lines
3.2 KiB
JSON
133 lines
3.2 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "distribution_agreements",
|
|
"title": "分销协议表",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "主键ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "resellerid",
|
|
"title": "所属主分销商机构ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "sub_distributor_id",
|
|
"title": "二级分销商ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "agreement_code",
|
|
"title": "协议编号",
|
|
"type": "str",
|
|
"length": 64,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "agreement_name",
|
|
"title": "协议名称",
|
|
"type": "str",
|
|
"length": 255,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "sign_date",
|
|
"title": "签署日期",
|
|
"type": "date"
|
|
},
|
|
{
|
|
"name": "start_date",
|
|
"title": "生效日期",
|
|
"type": "date",
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "end_date",
|
|
"title": "到期日期",
|
|
"type": "date"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "状态",
|
|
"type": "char",
|
|
"length": 1,
|
|
"nullable": "no",
|
|
"default": "1"
|
|
},
|
|
{
|
|
"name": "default_discount",
|
|
"title": "默认分销折扣",
|
|
"type": "double",
|
|
"length": 5,
|
|
"dec": 4,
|
|
"default": "1.0000"
|
|
},
|
|
{
|
|
"name": "remark",
|
|
"title": "备注",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"name": "created_by",
|
|
"title": "创建人",
|
|
"type": "str",
|
|
"length": 32
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "创建时间",
|
|
"type": "datetime",
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"title": "更新时间",
|
|
"type": "datetime"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_da_reseller",
|
|
"idxtype": "index",
|
|
"idxfields": ["resellerid"]
|
|
},
|
|
{
|
|
"name": "idx_da_subdist",
|
|
"idxtype": "index",
|
|
"idxfields": ["sub_distributor_id"]
|
|
},
|
|
{
|
|
"name": "idx_da_code",
|
|
"idxtype": "unique",
|
|
"idxfields": ["resellerid", "agreement_code"]
|
|
}
|
|
],
|
|
"codes": [
|
|
{
|
|
"field": "sub_distributor_id",
|
|
"table": "sub_distributors",
|
|
"valuefield": "id",
|
|
"textfield": "sub_dist_name"
|
|
},
|
|
{
|
|
"field": "resellerid",
|
|
"table": "organization",
|
|
"valuefield": "id",
|
|
"textfield": "orgname"
|
|
}
|
|
]
|
|
}
|