From ad56bd4b37f833a28c359274869b2f33493638f1 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 4 Jul 2026 20:25:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20index.ui=20literal=20\t=20=E2=86=92=20ac?= =?UTF-8?q?tual=20TAB=20for=20valid=20JSON=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/discount_setting/index.ui | 196 +++++++++++++++--------------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/wwwroot/discount_setting/index.ui b/wwwroot/discount_setting/index.ui index b0011b6..c81bfae 100644 --- a/wwwroot/discount_setting/index.ui +++ b/wwwroot/discount_setting/index.ui @@ -1,104 +1,104 @@ {% set products = get_discount_setting_products(request) %} {% set info = get_discount_info(request) %} { -\t"widgettype": "VBox", -\t"options": { -\t\t"width": "100%", -\t\t"height": "100%", -\t\t"css": "filler" -\t}, -\t"subwidgets": [ -\t\t{ -\t\t\t"widgettype": "Text", -\t\t\t"options": { -\t\t\t\t"text": "产品折扣设置 - {{info.name or ''}}{% if info.customer %} ({{info.customer}}){% endif %}", -\t\t\t\t"fontSize": "16px", -\t\t\t\t"fontWeight": "600", -\t\t\t\t"color": "#F1F5F9", -\t\t\t\t"padding": "8px 12px" -\t\t\t} -\t\t}, -\t\t{ -\t\t\t"widgettype": "HBox", -\t\t\t"options": { -\t\t\t\t"bgcolor": "#0F172A", -\t\t\t\t"padding": "8px 0", -\t\t\t\t"borderRadius": "6px 6px 0 0", -\t\t\t\t"alignItems": "center", -\t\t\t\t"width": "100%" -\t\t\t}, -\t\t\t"subwidgets": [ -\t\t\t\t{"widgettype": "Text", "options": {"text": "产品分类", "width": "20%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}}, -\t\t\t\t{"widgettype": "Text", "options": {"text": "产品名称", "width": "28%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}}, -\t\t\t\t{"widgettype": "Text", "options": {"text": "产品编码", "width": "18%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}}, -\t\t\t\t{"widgettype": "Text", "options": {"text": "折扣", "width": "14%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}}, -\t\t\t\t{"widgettype": "Text", "options": {"text": "状态", "width": "16%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}} -\t\t\t] -\t\t}, -\t\t{ -\t\t\t"widgettype": "VScrollPanel", -\t\t\t"options": { -\t\t\t\t"width": "100%", -\t\t\t\t"flex": "1" -\t\t\t}, -\t\t\t"subwidgets": [ -\t\t\t\t{ -\t\t\t\t\t"widgettype": "VBox", -\t\t\t\t\t"options": { -\t\t\t\t\t\t"width": "100%" -\t\t\t\t\t}, -\t\t\t\t\t"subwidgets": [ + "widgettype": "VBox", + "options": { + "width": "100%", + "height": "100%", + "css": "filler" + }, + "subwidgets": [ + { + "widgettype": "Text", + "options": { + "text": "产品折扣设置 - {{info.name or ''}}{% if info.customer %} ({{info.customer}}){% endif %}", + "fontSize": "16px", + "fontWeight": "600", + "color": "#F1F5F9", + "padding": "8px 12px" + } + }, + { + "widgettype": "HBox", + "options": { + "bgcolor": "#0F172A", + "padding": "8px 0", + "borderRadius": "6px 6px 0 0", + "alignItems": "center", + "width": "100%" + }, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "产品分类", "width": "20%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}}, + {"widgettype": "Text", "options": {"text": "产品名称", "width": "28%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}}, + {"widgettype": "Text", "options": {"text": "产品编码", "width": "18%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}}, + {"widgettype": "Text", "options": {"text": "折扣", "width": "14%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}}, + {"widgettype": "Text", "options": {"text": "状态", "width": "16%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}} + ] + }, + { + "widgettype": "VScrollPanel", + "options": { + "width": "100%", + "flex": "1" + }, + "subwidgets": [ + { + "widgettype": "VBox", + "options": { + "width": "100%" + }, + "subwidgets": [ {% for p in products %} -\t\t\t\t\t\t{ -\t\t\t\t\t\t\t"widgettype": "HBox", -\t\t\t\t\t\t\t"options": { -\t\t\t\t\t\t\t\t"padding": "6px 0", -\t\t\t\t\t\t\t\t"border": "0 0 1px 0", -\t\t\t\t\t\t\t\t"borderColor": "#334155", -\t\t\t\t\t\t\t\t"alignItems": "center", -\t\t\t\t\t\t\t\t"width": "100%" -\t\t\t\t\t\t\t}, -\t\t\t\t\t\t\t"subwidgets": [ -\t\t\t\t\t\t\t\t{"widgettype": "Text", "options": {"text": "{{p.category_name or ''}}", "width": "20%", "padding": "0 8px", "fontSize": "12px", "color": "#E2E8F0"}}, -\t\t\t\t\t\t\t\t{"widgettype": "Text", "options": {"text": "{{p.product_name or ''}}", "width": "28%", "padding": "0 8px", "fontSize": "12px", "color": "#F1F5F9"}}, -\t\t\t\t\t\t\t\t{"widgettype": "Text", "options": {"text": "{{p.product_code or ''}}", "width": "18%", "padding": "0 8px", "fontSize": "12px", "color": "#E2E8F0"}}, -\t\t\t\t\t\t\t\t{ -\t\t\t\t\t\t\t\t\t"widgettype": "UiFloat", -\t\t\t\t\t\t\t\t\t"options": { -\t\t\t\t\t\t\t\t\t\t"width": "14%", -\t\t\t\t\t\t\t\t\t\t"padding": "0 8px", -\t\t\t\t\t\t\t\t\t\t"name": "discount", -\t\t\t\t\t\t\t\t\t\t"value": "{{p.discount or '1.0'}}", -\t\t\t\t\t\t\t\t\t\t"placeholder": "0~1", -\t\t\t\t\t\t\t\t\t\t"dec_len": 2, -\t\t\t\t\t\t\t\t\t\t"fontSize": "12px" -\t\t\t\t\t\t\t\t\t}, -\t\t\t\t\t\t\t\t\t"binds": [ -\t\t\t\t\t\t\t\t\t\t{ -\t\t\t\t\t\t\t\t\t\t\t"wid": "self", -\t\t\t\t\t\t\t\t\t\t\t"event": "blur", -\t\t\t\t\t\t\t\t\t\t\t"actiontype": "urlwidget", -\t\t\t\t\t\t\t\t\t\t\t"datawidget": "self", -\t\t\t\t\t\t\t\t\t\t\t"target": "self", -\t\t\t\t\t\t\t\t\t\t\t"options": { -\t\t\t\t\t\t\t\t\t\t\t\t"url": "{{entire_url('./save_discount.dspy')}}", -\t\t\t\t\t\t\t\t\t\t\t\t"params": { -\t\t\t\t\t\t\t\t\t\t\t\t\t"discountid": "{{params_kw.discountid}}", -\t\t\t\t\t\t\t\t\t\t\t\t\t"old_discount": "{{p.discount or '1.0'}}", -\t\t\t\t\t\t\t\t\t\t\t\t\t"productid": "{{p.productid}}", -\t\t\t\t\t\t\t\t\t\t\t\t\t"detail_id": "{{p.detail_id or ''}}" -\t\t\t\t\t\t\t\t\t\t\t\t} -\t\t\t\t\t\t\t\t\t\t\t} -\t\t\t\t\t\t\t\t\t\t} -\t\t\t\t\t\t\t\t\t] -\t\t\t\t\t\t\t\t}, -\t\t\t\t\t\t\t\t{"widgettype": "Text", "options": {"text": "{% if p.in_plan == 1 %}✓方案内{% endif %}", "width": "16%", "padding": "0 8px", "fontSize": "11px", "color": "#34D399"}} -\t\t\t\t\t\t\t] -\t\t\t\t\t\t}{% if not loop.last %},{% endif %} + { + "widgettype": "HBox", + "options": { + "padding": "6px 0", + "border": "0 0 1px 0", + "borderColor": "#334155", + "alignItems": "center", + "width": "100%" + }, + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "{{p.category_name or ''}}", "width": "20%", "padding": "0 8px", "fontSize": "12px", "color": "#E2E8F0"}}, + {"widgettype": "Text", "options": {"text": "{{p.product_name or ''}}", "width": "28%", "padding": "0 8px", "fontSize": "12px", "color": "#F1F5F9"}}, + {"widgettype": "Text", "options": {"text": "{{p.product_code or ''}}", "width": "18%", "padding": "0 8px", "fontSize": "12px", "color": "#E2E8F0"}}, + { + "widgettype": "UiFloat", + "options": { + "width": "14%", + "padding": "0 8px", + "name": "discount", + "value": "{{p.discount or '1.0'}}", + "placeholder": "0~1", + "dec_len": 2, + "fontSize": "12px" + }, + "binds": [ + { + "wid": "self", + "event": "blur", + "actiontype": "urlwidget", + "datawidget": "self", + "target": "self", + "options": { + "url": "{{entire_url('./save_discount.dspy')}}", + "params": { + "discountid": "{{params_kw.discountid}}", + "old_discount": "{{p.discount or '1.0'}}", + "productid": "{{p.productid}}", + "detail_id": "{{p.detail_id or ''}}" + } + } + } + ] + }, + {"widgettype": "Text", "options": {"text": "{% if p.in_plan == 1 %}✓方案内{% endif %}", "width": "16%", "padding": "0 8px", "fontSize": "11px", "color": "#34D399"}} + ] + }{% if not loop.last %},{% endif %} {% endfor %} -\t\t\t\t\t] -\t\t\t\t} -\t\t\t] -\t\t} -\t] + ] + } + ] + } + ] }