feat: add pricing_data view tool to pricing_program_timing list

- Hide pricing_data (YAML text) from list columns
- Add '定价数据' tool button to toolbar
- Open PopupWindow showing pricing_data content via pricing_data_display.ui
- Register new path in load_path.py
This commit is contained in:
yumoqing 2026-06-26 10:56:41 +08:00
parent 1610c0635f
commit d246d2a5ac
3 changed files with 60 additions and 2 deletions

View File

@ -4,7 +4,7 @@
"params": {
"editable": "default",
"browserfields": {
"exclouded": ["id", "ppid" ],
"exclouded": ["id", "ppid", "pricing_data" ],
"alters": {}
},
"editexclouded": [
@ -33,6 +33,11 @@
"selected_row": true,
"label": "验证定价",
"icon": "{{entire_url('/bricks/imgs/test.svg')}}"
}, {
"name": "view_pricing_data",
"selected_row": true,
"label": "定价数据",
"icon": "{{entire_url('/bricks/imgs/docx.svg')}}"
}
]
},
@ -49,7 +54,7 @@
"method": "POST",
"url": "{{entire_url('../download_pricing_pattern.dspy')}}"
}
},
},
{
"wid": "self",
"event": "upload_pricing_data",
@ -96,6 +101,23 @@
"method": "POST",
"url": "{{entire_url('../pricing_test.ui')}}"
}
},
{
"wid": "self",
"event": "view_pricing_data",
"actiontype": "urlwidget",
"target": "PopupWindow",
"popup_options": {
"title": "定价数据",
"width": "60%",
"height": "70%"
},
"options": {
"url": "{{entire_url('../pricing_data_display.ui')}}",
"params": {
"id": "${id}$"
}
}
}
]
}

View File

@ -53,6 +53,7 @@ PATHS_LOGINED = [
f"/{MOD}/load_pricing_data.ui",
f"/{MOD}/pricing_test.ui",
f"/{MOD}/test_pricing_program.ui",
f"/{MOD}/pricing_data_display.ui",
# 顶层 .dspy 文件
f"/{MOD}/download_pricing_data.dspy",

View File

@ -0,0 +1,35 @@
{% set sor = db.sqlorContext() %}
{% set row = sor.execute_sql('select name, pricing_data from pricing_program_timing where id = ${id}$').first() %}
{% set pricing_data = row.pricing_data if row and row.pricing_data else '' %}
{% set record_name = row.name if row else '' %}
{
"widgettype": "VScrollPanel",
"options": {
"width": "100%",
"height": "100%"
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"width": "100%",
"padding": "16px",
"spacing": 12
},
"subwidgets": [
{
"widgettype": "Title4",
"options": {
"text": "{{ record_name }}"
}
},
{
"widgettype": "Text",
"options": {
"text": {{ pricing_data | tojson }}
}
}
]
}
]
}