新增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(分组菜单)
188 lines
4.7 KiB
JSON
188 lines
4.7 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "platform_supply_relations",
|
|
"title": "平台内供销关系表",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "主键ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "supplier_org_id",
|
|
"title": "供应方机构ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "buyer_org_id",
|
|
"title": "需求方机构ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "relation_code",
|
|
"title": "关系编号",
|
|
"type": "str",
|
|
"length": 64,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "relation_name",
|
|
"title": "关系名称",
|
|
"type": "str",
|
|
"length": 255,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "relation_type",
|
|
"title": "合作类型",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"default": "distribution"
|
|
},
|
|
{
|
|
"name": "settlement_mode",
|
|
"title": "结算方式",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"default": "discount"
|
|
},
|
|
{
|
|
"name": "default_discount",
|
|
"title": "默认折扣率",
|
|
"type": "double",
|
|
"length": 5,
|
|
"dec": 4,
|
|
"default": "1.0000"
|
|
},
|
|
{
|
|
"name": "default_commission_rate",
|
|
"title": "默认佣金率",
|
|
"type": "double",
|
|
"length": 5,
|
|
"dec": 4,
|
|
"default": "0.0000"
|
|
},
|
|
{
|
|
"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": "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_psr_supplier",
|
|
"idxtype": "index",
|
|
"idxfields": ["supplier_org_id"]
|
|
},
|
|
{
|
|
"name": "idx_psr_buyer",
|
|
"idxtype": "index",
|
|
"idxfields": ["buyer_org_id"]
|
|
},
|
|
{
|
|
"name": "idx_psr_pair",
|
|
"idxtype": "index",
|
|
"idxfields": ["supplier_org_id", "buyer_org_id"]
|
|
},
|
|
{
|
|
"name": "idx_psr_code",
|
|
"idxtype": "unique",
|
|
"idxfields": ["supplier_org_id", "buyer_org_id", "relation_code"]
|
|
},
|
|
{
|
|
"name": "idx_psr_status",
|
|
"idxtype": "index",
|
|
"idxfields": ["status"]
|
|
}
|
|
],
|
|
"codes": [
|
|
{
|
|
"field": "supplier_org_id",
|
|
"table": "organization",
|
|
"valuefield": "id",
|
|
"textfield": "orgname"
|
|
},
|
|
{
|
|
"field": "buyer_org_id",
|
|
"table": "organization",
|
|
"valuefield": "id",
|
|
"textfield": "orgname"
|
|
},
|
|
{
|
|
"field": "relation_type",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='sc_relation_type'"
|
|
},
|
|
{
|
|
"field": "settlement_mode",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='sc_settlement_mode'"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='sc_relation_status'"
|
|
}
|
|
]
|
|
}
|