{ "id": "opportunity_management", "widgettype": "VBox", "options": { "width": "100%", "height": "100%", "style": { "padding": "16px" } }, "subwidgets": [ { "widgettype": "HBox", "options": { "style": { "marginBottom": "16px", "gap": "8px" } }, "subwidgets": [ { "widgettype": "Text", "options": { "label": "商机管理", "style": { "fontSize": "20px", "fontWeight": "bold" } } }, { "widgettype": "Filler", "options": {} }, { "widgettype": "Button", "id": "btn_add_opportunity", "options": { "label": "新增商机", "variant": "primary" } } ] }, { "widgettype": "Tabular", "id": "opportunity_grid", "options": { "data_url": "{{entire_url('api/opportunities_list.dspy')}}", "data_method": "GET", "row_options": { "fields": [ { "name": "opportunity_code", "title": "商机编码", "uitype": "str", "cwidth": 12 }, { "name": "opportunity_name", "title": "商机名称", "uitype": "str", "cwidth": 15 }, { "name": "customer_name", "title": "客户", "uitype": "str", "cwidth": 12 }, { "name": "stage", "title": "阶段", "uitype": "str", "cwidth": 10 }, { "name": "amount", "title": "金额", "uitype": "str", "cwidth": 12 }, { "name": "probability", "title": "概率", "uitype": "str", "cwidth": 8 }, { "name": "expected_close_date", "title": "预计关闭日期", "uitype": "str", "cwidth": 12 } ], "toolbar": [ { "type": "button", "text": "新增", "icon": "add", "action": "navigate('opportunity_edit.ui')" }, { "type": "button", "text": "编辑", "icon": "edit", "action": "navigate('opportunity_edit.ui?id={{selectedRow.id}}')" }, { "type": "button", "text": "删除", "icon": "delete", "action": "doDelete('{{selectedRow.id}}')" } ] } } } ] }