supplychain/models/suppliers.json
yumoqing da32159ad9 feat: 供应商和分销商管理模块 (supplychain)
- 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模块(即将开发)
2026-05-25 15:37:06 +08:00

133 lines
3.1 KiB
JSON

{
"summary": [
{
"name": "suppliers",
"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": "supplier_code",
"title": "供应商编号",
"type": "str",
"length": 64,
"nullable": "no"
},
{
"name": "supplier_name",
"title": "供应商名称",
"type": "str",
"length": 255,
"nullable": "no"
},
{
"name": "contact_person",
"title": "联系人",
"type": "str",
"length": 100
},
{
"name": "contact_phone",
"title": "联系电话",
"type": "str",
"length": 50
},
{
"name": "contact_email",
"title": "联系邮箱",
"type": "str",
"length": 255
},
{
"name": "address",
"title": "地址",
"type": "str",
"length": 500
},
{
"name": "tax_number",
"title": "税号",
"type": "str",
"length": 64
},
{
"name": "bank_name",
"title": "开户银行",
"type": "str",
"length": 255
},
{
"name": "bank_account",
"title": "银行账号",
"type": "str",
"length": 64
},
{
"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_suppliers_reseller",
"idxtype": "index",
"idxfields": ["resellerid"]
},
{
"name": "idx_suppliers_code",
"idxtype": "unique",
"idxfields": ["resellerid", "supplier_code"]
}
],
"codes": [
{
"field": "resellerid",
"table": "organization",
"valuefield": "id",
"textfield": "orgname"
}
]
}