ymq 4ed6d15a59 feat(discount): calculate_product_cost 接产品级折扣
折扣精确到 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 查。
2026-08-26 16:04:38 +08:00

130 lines
4.2 KiB
XML

{
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%",
"padding": "0"
},
"subwidgets": [
{
"widgettype": "HBox",
"options": {
"width": "100%",
"alignItems": "center",
"padding": "16px 24px",
"marginBottom": "0"
},
"subwidgets": [
{
"widgettype": "Title2",
"options": {
"text": "产品管理",
"fontWeight": "700"
}
},
{
"widgettype": "Filler"
},
{
"widgettype": "Text",
"options": {
"text": "产品类别与产品信息管理",
"fontSize": "14px"
}
}
]
},
{
"widgettype": "ResponsableBox",
"options": {
"gap": "12px",
"minWidth": "200px",
"padding": "0 24px 16px 24px"
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"padding": "16px 24px",
"borderRadius": "8px",
"cursor": "pointer"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.product_content",
"options": {
"url": "{{entire_url('product_category')}}"
},
"mode": "replace"
}
],
"subwidgets": [
{
"widgettype": "Title5",
"options": {
"text": "产品类别管理",
"fontWeight": "600"
}
},
{
"widgettype": "Text",
"options": {
"text": "管理产品类别树结构,配置类别属性",
"fontSize": "12px"
}
}
]
},
{
"widgettype": "VBox",
"options": {
"padding": "16px 24px",
"borderRadius": "8px",
"cursor": "pointer"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.product_content",
"options": {
"url": "{{entire_url('product')}}"
},
"mode": "replace"
}
],
"subwidgets": [
{
"widgettype": "Title5",
"options": {
"text": "产品管理",
"fontWeight": "600"
}
},
{
"widgettype": "Text",
"options": {
"text": "添加和管理产品,配置产品信息",
"fontSize": "12px"
}
}
]
}
]
},
{
"widgettype": "VBox",
"id": "product_content",
"css": "filler",
"options": {
"width": "100%",
"overflowY": "auto"
}
}
]
}