yumoqing dff8b0de2a feat(supplychain): P0 平台内供应链 - 供销关系/产品映射/跨组织引入
新增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(分组菜单)
2026-06-05 22:11:33 +08:00

191 lines
4.1 KiB
XML

{
"widgettype":"VBox",
"options":{"cheight":40,"width":"100%"},
"subwidgets":[{
"id":"supply_contract_items_tbl",
"widgettype":"Tabular",
"options":{
"width":"100%",
"height":"100%",
"title":"供销合同产品折扣明细表",
"css":"card",
"editable":{
"new_data_url":"{{entire_url('add_supply_contract_items.dspy')}}",
"delete_data_url":"{{entire_url('delete_supply_contract_items.dspy')}}",
"update_data_url":"{{entire_url('update_supply_contract_items.dspy')}}"
},
"data_url":"{{entire_url('./get_supply_contract_items.dspy')}}",
"data_method":"GET",
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
"row_options":{
"browserfields": {
"exclouded": [
"id",
"contract_id",
"resellerid"
]
},
"fields":[
{
"name": "id",
"title": "主键ID",
"type": "str",
"length": 32,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "主键ID"
},
{
"name": "contract_id",
"title": "供销合同ID",
"type": "str",
"length": 32,
"nullable": "no",
"label": "供销合同ID",
"uitype": "code",
"valueField": "contract_id",
"textField": "contract_id_text",
"params": {
"dbname": "{{get_module_dbname('supplychain')}}",
"table": "supply_contracts",
"tblvalue": "id",
"tbltext": "contract_name",
"valueField": "contract_id",
"textField": "contract_id_text"
},
"dataurl": "{{entire_url('/appbase/get_code.dspy')}}"
},
{
"name": "resellerid",
"title": "所属分销商机构ID",
"type": "str",
"length": 32,
"nullable": "no",
"cwidth": 18,
"uitype": "str",
"datatype": "str",
"label": "所属分销商机构ID"
},
{
"name": "prodtypeid",
"title": "产品分类ID",
"type": "str",
"length": 32,
"label": "产品分类ID",
"uitype": "code",
"valueField": "prodtypeid",
"textField": "prodtypeid_text",
"params": {
"dbname": "{{get_module_dbname('supplychain')}}",
"table": "product_types",
"tblvalue": "id",
"tbltext": "type_name",
"valueField": "prodtypeid",
"textField": "prodtypeid_text"
},
"dataurl": "{{entire_url('/appbase/get_code.dspy')}}"
},
{
"name": "productid",
"title": "产品ID",
"type": "str",
"length": 32,
"label": "产品ID",
"uitype": "code",
"valueField": "productid",
"textField": "productid_text",
"params": {
"dbname": "{{get_module_dbname('supplychain')}}",
"table": "products",
"tblvalue": "id",
"tbltext": "product_name",
"valueField": "productid",
"textField": "productid_text"
},
"dataurl": "{{entire_url('/appbase/get_code.dspy')}}"
},
{
"name": "discount",
"title": "进货折扣",
"type": "double",
"length": 5,
"dec": 4,
"nullable": "no",
"default": "1.0000",
"cwidth": 5,
"uitype": "float",
"datatype": "double",
"label": "进货折扣"
},
{
"name": "settlement_price",
"title": "结算单价",
"type": "double",
"length": 15,
"dec": 4,
"cwidth": 15,
"uitype": "float",
"datatype": "double",
"label": "结算单价"
},
{
"name": "remark",
"title": "备注",
"type": "text",
"length": 0,
"uitype": "text",
"datatype": "text",
"label": "备注"
},
{
"name": "created_at",
"title": "创建时间",
"type": "datetime",
"nullable": "no",
"length": 0,
"uitype": "str",
"datatype": "datetime",
"label": "创建时间"
}
]
},
"page_rows":160,
"cache_limit":5
}
,"binds":[]
}]
}