fix: index.ui literal \t → actual TAB for valid JSON output
This commit is contained in:
parent
90e2fd0c0c
commit
ad56bd4b37
@ -1,104 +1,104 @@
|
|||||||
{% set products = get_discount_setting_products(request) %}
|
{% set products = get_discount_setting_products(request) %}
|
||||||
{% set info = get_discount_info(request) %}
|
{% set info = get_discount_info(request) %}
|
||||||
{
|
{
|
||||||
\t"widgettype": "VBox",
|
"widgettype": "VBox",
|
||||||
\t"options": {
|
"options": {
|
||||||
\t\t"width": "100%",
|
"width": "100%",
|
||||||
\t\t"height": "100%",
|
"height": "100%",
|
||||||
\t\t"css": "filler"
|
"css": "filler"
|
||||||
\t},
|
},
|
||||||
\t"subwidgets": [
|
"subwidgets": [
|
||||||
\t\t{
|
{
|
||||||
\t\t\t"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
\t\t\t"options": {
|
"options": {
|
||||||
\t\t\t\t"text": "产品折扣设置 - {{info.name or ''}}{% if info.customer %} ({{info.customer}}){% endif %}",
|
"text": "产品折扣设置 - {{info.name or ''}}{% if info.customer %} ({{info.customer}}){% endif %}",
|
||||||
\t\t\t\t"fontSize": "16px",
|
"fontSize": "16px",
|
||||||
\t\t\t\t"fontWeight": "600",
|
"fontWeight": "600",
|
||||||
\t\t\t\t"color": "#F1F5F9",
|
"color": "#F1F5F9",
|
||||||
\t\t\t\t"padding": "8px 12px"
|
"padding": "8px 12px"
|
||||||
\t\t\t}
|
}
|
||||||
\t\t},
|
},
|
||||||
\t\t{
|
{
|
||||||
\t\t\t"widgettype": "HBox",
|
"widgettype": "HBox",
|
||||||
\t\t\t"options": {
|
"options": {
|
||||||
\t\t\t\t"bgcolor": "#0F172A",
|
"bgcolor": "#0F172A",
|
||||||
\t\t\t\t"padding": "8px 0",
|
"padding": "8px 0",
|
||||||
\t\t\t\t"borderRadius": "6px 6px 0 0",
|
"borderRadius": "6px 6px 0 0",
|
||||||
\t\t\t\t"alignItems": "center",
|
"alignItems": "center",
|
||||||
\t\t\t\t"width": "100%"
|
"width": "100%"
|
||||||
\t\t\t},
|
},
|
||||||
\t\t\t"subwidgets": [
|
"subwidgets": [
|
||||||
\t\t\t\t{"widgettype": "Text", "options": {"text": "产品分类", "width": "20%", "padding": "0 8px", "fontSize": "12px", "fontWeight": "600", "color": "#94A3B8"}},
|
{"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"}},
|
{"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"}},
|
{"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"}},
|
{"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"}}
|
{"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",
|
"widgettype": "VScrollPanel",
|
||||||
\t\t\t"options": {
|
"options": {
|
||||||
\t\t\t\t"width": "100%",
|
"width": "100%",
|
||||||
\t\t\t\t"flex": "1"
|
"flex": "1"
|
||||||
\t\t\t},
|
},
|
||||||
\t\t\t"subwidgets": [
|
"subwidgets": [
|
||||||
\t\t\t\t{
|
{
|
||||||
\t\t\t\t\t"widgettype": "VBox",
|
"widgettype": "VBox",
|
||||||
\t\t\t\t\t"options": {
|
"options": {
|
||||||
\t\t\t\t\t\t"width": "100%"
|
"width": "100%"
|
||||||
\t\t\t\t\t},
|
},
|
||||||
\t\t\t\t\t"subwidgets": [
|
"subwidgets": [
|
||||||
{% for p in products %}
|
{% for p in products %}
|
||||||
\t\t\t\t\t\t{
|
{
|
||||||
\t\t\t\t\t\t\t"widgettype": "HBox",
|
"widgettype": "HBox",
|
||||||
\t\t\t\t\t\t\t"options": {
|
"options": {
|
||||||
\t\t\t\t\t\t\t\t"padding": "6px 0",
|
"padding": "6px 0",
|
||||||
\t\t\t\t\t\t\t\t"border": "0 0 1px 0",
|
"border": "0 0 1px 0",
|
||||||
\t\t\t\t\t\t\t\t"borderColor": "#334155",
|
"borderColor": "#334155",
|
||||||
\t\t\t\t\t\t\t\t"alignItems": "center",
|
"alignItems": "center",
|
||||||
\t\t\t\t\t\t\t\t"width": "100%"
|
"width": "100%"
|
||||||
\t\t\t\t\t\t\t},
|
},
|
||||||
\t\t\t\t\t\t\t"subwidgets": [
|
"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"}},
|
{"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"}},
|
{"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"}},
|
{"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",
|
"widgettype": "UiFloat",
|
||||||
\t\t\t\t\t\t\t\t\t"options": {
|
"options": {
|
||||||
\t\t\t\t\t\t\t\t\t\t"width": "14%",
|
"width": "14%",
|
||||||
\t\t\t\t\t\t\t\t\t\t"padding": "0 8px",
|
"padding": "0 8px",
|
||||||
\t\t\t\t\t\t\t\t\t\t"name": "discount",
|
"name": "discount",
|
||||||
\t\t\t\t\t\t\t\t\t\t"value": "{{p.discount or '1.0'}}",
|
"value": "{{p.discount or '1.0'}}",
|
||||||
\t\t\t\t\t\t\t\t\t\t"placeholder": "0~1",
|
"placeholder": "0~1",
|
||||||
\t\t\t\t\t\t\t\t\t\t"dec_len": 2,
|
"dec_len": 2,
|
||||||
\t\t\t\t\t\t\t\t\t\t"fontSize": "12px"
|
"fontSize": "12px"
|
||||||
\t\t\t\t\t\t\t\t\t},
|
},
|
||||||
\t\t\t\t\t\t\t\t\t"binds": [
|
"binds": [
|
||||||
\t\t\t\t\t\t\t\t\t\t{
|
{
|
||||||
\t\t\t\t\t\t\t\t\t\t\t"wid": "self",
|
"wid": "self",
|
||||||
\t\t\t\t\t\t\t\t\t\t\t"event": "blur",
|
"event": "blur",
|
||||||
\t\t\t\t\t\t\t\t\t\t\t"actiontype": "urlwidget",
|
"actiontype": "urlwidget",
|
||||||
\t\t\t\t\t\t\t\t\t\t\t"datawidget": "self",
|
"datawidget": "self",
|
||||||
\t\t\t\t\t\t\t\t\t\t\t"target": "self",
|
"target": "self",
|
||||||
\t\t\t\t\t\t\t\t\t\t\t"options": {
|
"options": {
|
||||||
\t\t\t\t\t\t\t\t\t\t\t\t"url": "{{entire_url('./save_discount.dspy')}}",
|
"url": "{{entire_url('./save_discount.dspy')}}",
|
||||||
\t\t\t\t\t\t\t\t\t\t\t\t"params": {
|
"params": {
|
||||||
\t\t\t\t\t\t\t\t\t\t\t\t\t"discountid": "{{params_kw.discountid}}",
|
"discountid": "{{params_kw.discountid}}",
|
||||||
\t\t\t\t\t\t\t\t\t\t\t\t\t"old_discount": "{{p.discount or '1.0'}}",
|
"old_discount": "{{p.discount or '1.0'}}",
|
||||||
\t\t\t\t\t\t\t\t\t\t\t\t\t"productid": "{{p.productid}}",
|
"productid": "{{p.productid}}",
|
||||||
\t\t\t\t\t\t\t\t\t\t\t\t\t"detail_id": "{{p.detail_id or ''}}"
|
"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"}}
|
{"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 %}
|
}{% if not loop.last %},{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
\t\t\t\t\t]
|
]
|
||||||
\t\t\t\t}
|
}
|
||||||
\t\t\t]
|
]
|
||||||
\t\t}
|
}
|
||||||
\t]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user