- 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权限配置 - 一次性使用,不找零
50 lines
1.8 KiB
JSON
50 lines
1.8 KiB
JSON
{
|
|
"tblname": "voucher_instance",
|
|
"alias": "voucher_instance_list",
|
|
"title": "代金券实例管理",
|
|
"params": {
|
|
"sortby": ["created_at desc"],
|
|
"data_filter": {
|
|
"AND": [
|
|
{"field": "customer_id", "op": "=", "var": "customer_id"},
|
|
{"field": "status", "op": "=", "var": "status"},
|
|
{"field": "template_id", "op": "=", "var": "template_id"}
|
|
]
|
|
},
|
|
"browserfields": {
|
|
"exclouded": [],
|
|
"alters": {
|
|
"template_id": {
|
|
"uitype": "code",
|
|
"dataurl": "{{entire_url('../api/template/voucher_template_options.dspy')}}",
|
|
"data_field": "options",
|
|
"textField": "text",
|
|
"valueField": "value"
|
|
},
|
|
"status": {
|
|
"uitype": "code",
|
|
"data": [
|
|
{"value": "unused", "text": "未使用"},
|
|
{"value": "used", "text": "已使用"},
|
|
{"value": "expired", "text": "已过期"}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"editexclouded": ["used_at", "order_id", "actual_deducted"],
|
|
"editable": {
|
|
"new_data_url": "{{entire_url('../api/instance/voucher_instance_create.dspy')}}",
|
|
"update_data_url": "{{entire_url('../api/instance/voucher_instance_update.dspy')}}",
|
|
"delete_data_url": "{{entire_url('../api/instance/voucher_instance_delete.dspy')}}"
|
|
},
|
|
"subtables": [
|
|
{
|
|
"field": "id",
|
|
"title": "使用记录",
|
|
"url": "{{entire_url('../voucher_usage_log_list/')}}",
|
|
"subtable": "voucher_usage_log"
|
|
}
|
|
]
|
|
}
|
|
}
|