折扣精确到 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 查。
44 lines
982 B
JSON
44 lines
982 B
JSON
{
|
|
"tblname": "product_subscription",
|
|
"title": "客户订购管理",
|
|
"params": {
|
|
"sortby": [
|
|
"created_at desc"
|
|
],
|
|
"data_filter": {
|
|
"fields": [
|
|
{
|
|
"field": "product_id",
|
|
"title": "产品",
|
|
"uitype": "code"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"title": "状态",
|
|
"uitype": "code"
|
|
},
|
|
{
|
|
"field": "subscription_type",
|
|
"title": "订购类型",
|
|
"uitype": "code"
|
|
}
|
|
]
|
|
},
|
|
"browserfields": {
|
|
"exclouded": [],
|
|
"alters": {}
|
|
},
|
|
"editexclouded": [
|
|
"id",
|
|
"quota_used",
|
|
"created_at",
|
|
"updated_at"
|
|
],
|
|
"editable": {
|
|
"new_data_url": "{{entire_url('../api/product_subscription_create.dspy')}}",
|
|
"update_data_url": "{{entire_url('../api/product_subscription_update.dspy')}}",
|
|
"delete_data_url": "{{entire_url('../api/product_subscription_delete.dspy')}}"
|
|
}
|
|
}
|
|
}
|