折扣精确到 product_id(discount_detail.productid),三类折扣取最优惠(min): - 客户折扣 get_min_product_discount(pid, resellerid, customerid) - 分销商折扣 get_min_distributor_discount(pid, resellerid, distributorid) - 供应商折扣 get_min_supplier_discount(pid, resellerid, supplierid) resellerid=product.org_id, supplierid=product.providerid, distributorid 从 discount_customer_bind 按 customerid 查。
52 lines
1.2 KiB
JSON
52 lines
1.2 KiB
JSON
{
|
|
"tblname": "product_resource",
|
|
"title": "产品资源绑定管理",
|
|
"params": {
|
|
"sortby": [
|
|
"priority asc",
|
|
"created_at desc"
|
|
],
|
|
"data_filter": {
|
|
"fields": [
|
|
{
|
|
"field": "product_id",
|
|
"title": "产品",
|
|
"uitype": "code"
|
|
},
|
|
{
|
|
"field": "resource_type",
|
|
"title": "资源类型",
|
|
"uitype": "code"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"title": "状态",
|
|
"uitype": "code"
|
|
}
|
|
]
|
|
},
|
|
"browserfields": {
|
|
"exclouded": [],
|
|
"alters": {}
|
|
},
|
|
"editexclouded": [
|
|
"id",
|
|
"created_at",
|
|
"updated_at"
|
|
],
|
|
"editable": {
|
|
"new_data_url": "{{entire_url('../api/product_resource_create.dspy')}}",
|
|
"update_data_url": "{{entire_url('../api/product_resource_update.dspy')}}",
|
|
"delete_data_url": "{{entire_url('../api/product_resource_delete.dspy')}}"
|
|
},
|
|
"subtables": [
|
|
{
|
|
"field": "product_resource_id",
|
|
"title": "供应商关联",
|
|
"url": "{{entire_url('../product_resource_supplier')}}",
|
|
"subtable": "product_resource_supplier"
|
|
}
|
|
]
|
|
}
|
|
}
|