diff --git a/json/pricing_program_timing.json b/json/pricing_program_timing.json index cdb35ac..835a1ab 100644 --- a/json/pricing_program_timing.json +++ b/json/pricing_program_timing.json @@ -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}$" + } + } } ] } diff --git a/scripts/load_path.py b/scripts/load_path.py index 76d746b..9bf70e9 100644 --- a/scripts/load_path.py +++ b/scripts/load_path.py @@ -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", diff --git a/wwwroot/pricing_data_display.ui b/wwwroot/pricing_data_display.ui new file mode 100644 index 0000000..40b5193 --- /dev/null +++ b/wwwroot/pricing_data_display.ui @@ -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 }} + } + } + ] + } + ] +}