44 lines
1.4 KiB
XML
44 lines
1.4 KiB
XML
{
|
|
"widgettype": "Form",
|
|
"id": "voucher_invalidate_form",
|
|
"options": {
|
|
"cols": 1,
|
|
"title": "作废代金券",
|
|
"padding": "16px",
|
|
"submit_label": "确认作废",
|
|
"submit_url": "{{entire_url('/voucher/api/instance/voucher_invalidate.dspy')}}",
|
|
"method": "POST",
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"label": "实例ID",
|
|
"uitype": "hide",
|
|
"value": "{{params_kw.get('id') or ''}}"
|
|
},
|
|
{
|
|
"name": "code_display",
|
|
"label": "券码",
|
|
"uitype": "str",
|
|
"nonuse": true,
|
|
"value": "{{params_kw.get('code') or ''}}"
|
|
},
|
|
{
|
|
"name": "reason",
|
|
"label": "作废原因",
|
|
"uitype": "str",
|
|
"required": true,
|
|
"placeholder": "必填,将追加到券备注(审计留痕)"
|
|
}
|
|
]
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "submited",
|
|
"actiontype": "script",
|
|
"target": "self",
|
|
"script": "var resp=event.params; var d=null; try{d=await resp.json();}catch(e){d=null;} if(d&&d.widgettype){await bricks.widgetBuild(d,bricks.Body);} if(d&&d.widgettype==='Message'){ var t=bricks.getWidgetById('voucher_instance_tbl',bricks.app); if(t){await t.render({});} }"
|
|
}
|
|
]
|
|
}
|