fix: use urlwidget+PopupWindow instead of script/dspy for toolbar binds
bricks.js only supports 5 actiontypes; dspy and script with fetch are not available. Use urlwidget with PopupWindow target instead.
This commit is contained in:
parent
8d9f31d7ad
commit
7fa70b9a24
@ -321,8 +321,21 @@
|
|||||||
{
|
{
|
||||||
"wid": "self",
|
"wid": "self",
|
||||||
"event": "distribution_agreements",
|
"event": "distribution_agreements",
|
||||||
"actiontype": "script",
|
"actiontype": "urlwidget",
|
||||||
"script": "bricks_fetch('{{entire_url('../api/ensure_distribution_agreement.dspy')}}',{method:'POST',body:JSON.stringify({sub_reseller_id:data.id})}).then(r=>r.json()).then(r=>bricks.showMessage(r.options.title,r.options.message,r.options.type||'success'))"
|
"target": "PopupWindow",
|
||||||
|
"popup_options": {
|
||||||
|
"title": "分销协议",
|
||||||
|
"height": "200px",
|
||||||
|
"width": "400px"
|
||||||
|
},
|
||||||
|
"params_mapping": {
|
||||||
|
"mapping": {"id": "sub_reseller_id"},
|
||||||
|
"need_other": false
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"method": "POST",
|
||||||
|
"url": "{{entire_url('../api/ensure_distribution_agreement.dspy')}}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -453,11 +453,15 @@
|
|||||||
{
|
{
|
||||||
"wid": "self",
|
"wid": "self",
|
||||||
"event": "supply_contracts",
|
"event": "supply_contracts",
|
||||||
"actiontype": "dspy",
|
"actiontype": "urlwidget",
|
||||||
|
"target": "PopupWindow",
|
||||||
|
"popup_options": {
|
||||||
|
"title": "供销协议",
|
||||||
|
"height": "200px",
|
||||||
|
"width": "400px"
|
||||||
|
},
|
||||||
"params_mapping": {
|
"params_mapping": {
|
||||||
"mapping": {
|
"mapping": {"id": "supplier_id"},
|
||||||
"id": "supplier_id"
|
|
||||||
},
|
|
||||||
"need_other": false
|
"need_other": false
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user