117 lines
4.5 KiB
XML
117 lines
4.5 KiB
XML
{
|
|
"options": {
|
|
"height": "100vh",
|
|
"padding": "0"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"padding": "16px",
|
|
"flex": 1,
|
|
"overflow": "hidden"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"marginBottom": "16px",
|
|
"gap": "8px"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "TextField",
|
|
"id": "search_keyword",
|
|
"options": {
|
|
"label": "搜索",
|
|
"placeholder": "商机名称/客户",
|
|
"flex": 1
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "btn_search",
|
|
"options": {
|
|
"variant": "primary",
|
|
"label": "搜索"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "btn_add",
|
|
"options": {
|
|
"variant": "primary",
|
|
"action": "navigate('main/opportunity_management/opportunity_edit.ui')",
|
|
"label": "新增"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "DataGrid",
|
|
"id": "opportunity_grid",
|
|
"options": {
|
|
"url": "{{entire_url('api/opportunities_list.dspy')}}",
|
|
"columns": [
|
|
{
|
|
"field": "opportunity_name",
|
|
"header": "商机名称",
|
|
"width": 200
|
|
},
|
|
{
|
|
"field": "customer_name",
|
|
"header": "客户",
|
|
"width": 150
|
|
},
|
|
{
|
|
"field": "estimated_amount",
|
|
"header": "预估金额",
|
|
"width": 120
|
|
},
|
|
{
|
|
"field": "current_stage",
|
|
"header": "阶段",
|
|
"width": 120
|
|
},
|
|
{
|
|
"field": "probability",
|
|
"header": "概率",
|
|
"width": 80
|
|
},
|
|
{
|
|
"field": "expected_close_date",
|
|
"header": "预计成交",
|
|
"width": 120
|
|
},
|
|
{
|
|
"field": "owner_name",
|
|
"header": "负责人",
|
|
"width": 100
|
|
},
|
|
{
|
|
"field": "status",
|
|
"header": "状态",
|
|
"width": 80
|
|
}
|
|
],
|
|
"toolbar": [
|
|
{
|
|
"type": "button",
|
|
"text": "编辑",
|
|
"icon": "edit",
|
|
"action": "navigate('main/opportunity_management/opportunity_edit.ui?id={% raw %}{{selectedRow.id}}{% endraw %}')"
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "删除",
|
|
"icon": "delete",
|
|
"action": "doDelete('{% raw %}{{selectedRow.id}}{% endraw %}')"
|
|
}
|
|
],
|
|
"flex": 1
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |