Per bricks-framework spec: - Text/Title: use 'text' for non-i18n, 'otext'+'i18n:true' for i18n - Button: use 'label' for button text
120 lines
4.0 KiB
XML
120 lines
4.0 KiB
XML
{
|
|
"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": {
|
|
"style": {
|
|
"fontSize": "20px",
|
|
"fontWeight": "bold"
|
|
},
|
|
"text": "商机管理"
|
|
}
|
|
},
|
|
{
|
|
"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}}')"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |