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:
parent
1610c0635f
commit
d246d2a5ac
@ -4,7 +4,7 @@
|
|||||||
"params": {
|
"params": {
|
||||||
"editable": "default",
|
"editable": "default",
|
||||||
"browserfields": {
|
"browserfields": {
|
||||||
"exclouded": ["id", "ppid" ],
|
"exclouded": ["id", "ppid", "pricing_data" ],
|
||||||
"alters": {}
|
"alters": {}
|
||||||
},
|
},
|
||||||
"editexclouded": [
|
"editexclouded": [
|
||||||
@ -33,6 +33,11 @@
|
|||||||
"selected_row": true,
|
"selected_row": true,
|
||||||
"label": "验证定价",
|
"label": "验证定价",
|
||||||
"icon": "{{entire_url('/bricks/imgs/test.svg')}}"
|
"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",
|
"method": "POST",
|
||||||
"url": "{{entire_url('../download_pricing_pattern.dspy')}}"
|
"url": "{{entire_url('../download_pricing_pattern.dspy')}}"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"wid": "self",
|
"wid": "self",
|
||||||
"event": "upload_pricing_data",
|
"event": "upload_pricing_data",
|
||||||
@ -96,6 +101,23 @@
|
|||||||
"method": "POST",
|
"method": "POST",
|
||||||
"url": "{{entire_url('../pricing_test.ui')}}"
|
"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}$"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,6 +53,7 @@ PATHS_LOGINED = [
|
|||||||
f"/{MOD}/load_pricing_data.ui",
|
f"/{MOD}/load_pricing_data.ui",
|
||||||
f"/{MOD}/pricing_test.ui",
|
f"/{MOD}/pricing_test.ui",
|
||||||
f"/{MOD}/test_pricing_program.ui",
|
f"/{MOD}/test_pricing_program.ui",
|
||||||
|
f"/{MOD}/pricing_data_display.ui",
|
||||||
|
|
||||||
# 顶层 .dspy 文件
|
# 顶层 .dspy 文件
|
||||||
f"/{MOD}/download_pricing_data.dspy",
|
f"/{MOD}/download_pricing_data.dspy",
|
||||||
|
|||||||
35
wwwroot/pricing_data_display.ui
Normal file
35
wwwroot/pricing_data_display.ui
Normal 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 }}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user