- 4张表: voucher_template, voucher_rule, voucher_instance, voucher_usage_log - 可配置规则引擎: registry + validators + engine - 8种内置规则: min_amount, max_amount, applicable_product_type, applicable_product, exclude_product, max_usage_count, valid_period, user_level - CRUD定义 + API接口 + 前端页面 - SQL建表脚本 + RBAC权限配置 - 一次性使用,不找零
52 lines
2.1 KiB
JSON
52 lines
2.1 KiB
JSON
{
|
|
"tblname": "voucher_rule",
|
|
"alias": "voucher_rule_list",
|
|
"title": "代金券规则管理",
|
|
"params": {
|
|
"sortby": ["sort_order"],
|
|
"data_filter": {
|
|
"AND": [
|
|
{"field": "template_id", "op": "=", "var": "template_id"},
|
|
{"field": "rule_type", "op": "=", "var": "rule_type"}
|
|
]
|
|
},
|
|
"browserfields": {
|
|
"exclouded": [],
|
|
"alters": {
|
|
"template_id": {
|
|
"uitype": "code",
|
|
"dataurl": "{{entire_url('../api/template/voucher_template_options.dspy')}}",
|
|
"data_field": "options",
|
|
"textField": "text",
|
|
"valueField": "value"
|
|
},
|
|
"rule_type": {
|
|
"uitype": "code",
|
|
"data": [
|
|
{"value": "min_amount", "text": "最低消费"},
|
|
{"value": "max_amount", "text": "最高消费"},
|
|
{"value": "applicable_product_type", "text": "限定产品类型"},
|
|
{"value": "applicable_product", "text": "限定特定产品"},
|
|
{"value": "exclude_product", "text": "排除特定产品"},
|
|
{"value": "max_usage_count", "text": "最大使用次数"},
|
|
{"value": "valid_period", "text": "有效期"},
|
|
{"value": "user_level", "text": "用户等级"}
|
|
]
|
|
},
|
|
"enabled": {
|
|
"uitype": "code",
|
|
"data": [
|
|
{"value": "1", "text": "启用"},
|
|
{"value": "0", "text": "停用"}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"editable": {
|
|
"new_data_url": "{{entire_url('../api/rule/voucher_rule_create.dspy')}}",
|
|
"update_data_url": "{{entire_url('../api/rule/voucher_rule_update.dspy')}}",
|
|
"delete_data_url": "{{entire_url('../api/rule/voucher_rule_delete.dspy')}}"
|
|
}
|
|
}
|
|
}
|