128 lines
5.0 KiB
XML
128 lines
5.0 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/contract_management/contract_edit.ui')",
|
|
"label": "新增"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "DataGrid",
|
|
"id": "contract_grid",
|
|
"options": {
|
|
"url": "{{entire_url('api/contract_list.dspy')}}",
|
|
"columns": [
|
|
{
|
|
"field": "contract_number",
|
|
"header": "合同编号",
|
|
"width": 140
|
|
},
|
|
{
|
|
"field": "title",
|
|
"header": "合同名称",
|
|
"width": 200
|
|
},
|
|
{
|
|
"field": "party_a",
|
|
"header": "甲方",
|
|
"width": 150
|
|
},
|
|
{
|
|
"field": "party_b",
|
|
"header": "乙方",
|
|
"width": 150
|
|
},
|
|
{
|
|
"field": "contract_type",
|
|
"header": "类型",
|
|
"width": 100
|
|
},
|
|
{
|
|
"field": "amount",
|
|
"header": "金额",
|
|
"width": 120
|
|
},
|
|
{
|
|
"field": "start_date",
|
|
"header": "开始日期",
|
|
"width": 110
|
|
},
|
|
{
|
|
"field": "end_date",
|
|
"header": "结束日期",
|
|
"width": 110
|
|
},
|
|
{
|
|
"field": "status",
|
|
"header": "状态",
|
|
"width": 90
|
|
}
|
|
],
|
|
"toolbar": [
|
|
{
|
|
"type": "button",
|
|
"text": "详情",
|
|
"icon": "view",
|
|
"action": "navigate('main/contract_management/contract_detail.ui?id={% raw %}{{selectedRow.id}}{% endraw %}')"
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "编辑",
|
|
"icon": "edit",
|
|
"action": "navigate('main/contract_management/contract_edit.ui?id={% raw %}{{selectedRow.id}}{% endraw %}')"
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "删除",
|
|
"icon": "delete",
|
|
"action": "doDelete('{% raw %}{{selectedRow.id}}{% endraw %}')"
|
|
}
|
|
],
|
|
"flex": 1
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |