fix: wrap Tabular in VBox with cheight for proper scrolling
This commit is contained in:
parent
8f8a4dce90
commit
874bee20cb
225
wwwroot/base.ui
225
wwwroot/base.ui
@ -1,114 +1,123 @@
|
||||
{
|
||||
"id": "opportunity_management",
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"padding": "16px"
|
||||
},
|
||||
"subwidgets": [
|
||||
"id": "opportunity_management",
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"padding": "16px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"marginBottom": "16px",
|
||||
"gap": "8px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"marginBottom": "16px",
|
||||
"gap": "8px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "商机管理",
|
||||
"fontSize": "20px",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Filler",
|
||||
"options": {}
|
||||
},
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"id": "btn_add_opportunity",
|
||||
"options": {
|
||||
"label": "新增商机",
|
||||
"variant": "primary"
|
||||
}
|
||||
}
|
||||
]
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "商机管理",
|
||||
"fontSize": "20px",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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}}')"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"widgettype": "Filler",
|
||||
"options": {}
|
||||
},
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"id": "btn_add_opportunity",
|
||||
"options": {
|
||||
"label": "新增商机",
|
||||
"variant": "primary"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"cheight": 38,
|
||||
"width": "100%"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"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}}')"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user