新增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(分组菜单)
164 lines
4.0 KiB
JSON
164 lines
4.0 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "platform_supply_products",
|
|
"title": "平台供销产品明细表",
|
|
"primary": ["id"],
|
|
"catelog": "relation"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "主键ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "relation_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": "source_product_id",
|
|
"title": "供应方产品ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "supply_price",
|
|
"title": "供货价",
|
|
"type": "double",
|
|
"length": 15,
|
|
"dec": 4,
|
|
"nullable": "no",
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "suggested_retail_price",
|
|
"title": "建议零售价",
|
|
"type": "double",
|
|
"length": 15,
|
|
"dec": 4
|
|
},
|
|
{
|
|
"name": "discount",
|
|
"title": "折扣率",
|
|
"type": "double",
|
|
"length": 5,
|
|
"dec": 4,
|
|
"default": "1.0000"
|
|
},
|
|
{
|
|
"name": "commission_rate",
|
|
"title": "佣金率",
|
|
"type": "double",
|
|
"length": 5,
|
|
"dec": 4,
|
|
"default": "0.0000"
|
|
},
|
|
{
|
|
"name": "min_order_qty",
|
|
"title": "最小订货量",
|
|
"type": "int"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "状态",
|
|
"type": "char",
|
|
"length": 1,
|
|
"nullable": "no",
|
|
"default": "1"
|
|
},
|
|
{
|
|
"name": "remark",
|
|
"title": "备注",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "创建时间",
|
|
"type": "datetime",
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"title": "更新时间",
|
|
"type": "datetime"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_psp_relation",
|
|
"idxtype": "index",
|
|
"idxfields": ["relation_id"]
|
|
},
|
|
{
|
|
"name": "idx_psp_supplier_product",
|
|
"idxtype": "index",
|
|
"idxfields": ["supplier_org_id", "source_product_id"]
|
|
},
|
|
{
|
|
"name": "idx_psp_buyer",
|
|
"idxtype": "index",
|
|
"idxfields": ["buyer_org_id"]
|
|
},
|
|
{
|
|
"name": "idx_psp_unique",
|
|
"idxtype": "unique",
|
|
"idxfields": ["relation_id", "source_product_id"]
|
|
}
|
|
],
|
|
"codes": [
|
|
{
|
|
"field": "relation_id",
|
|
"table": "platform_supply_relations",
|
|
"valuefield": "id",
|
|
"textfield": "relation_name"
|
|
},
|
|
{
|
|
"field": "supplier_org_id",
|
|
"table": "organization",
|
|
"valuefield": "id",
|
|
"textfield": "orgname"
|
|
},
|
|
{
|
|
"field": "buyer_org_id",
|
|
"table": "organization",
|
|
"valuefield": "id",
|
|
"textfield": "orgname"
|
|
},
|
|
{
|
|
"field": "source_product_id",
|
|
"table": "product",
|
|
"valuefield": "id",
|
|
"textfield": "product_name"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='sc_product_status'"
|
|
}
|
|
]
|
|
}
|