{% set cstats = get_credit_stats_web(request) %} { "widgettype": "VBox", "options": { "width": "100%", "height": "100%", "padding": "16px", "gap": "16px" }, "subwidgets": [ { "widgettype": "Text", "options": { "text": "信用额度管理", "fontSize": "22px", "fontWeight": "700", "color": "#F1F5F9" } }, { "widgettype": "ResponsableBox", "options": { "gap": "12px", "minWidth": "200px" }, "subwidgets": [ { "widgettype": "VBox", "options": { "bgcolor": "#1E293B", "padding": "12px", "borderRadius": "10px", "border": "1px solid #334155", "flex": "none" }, "subwidgets": [ { "widgettype": "HBox", "options": { "alignItems": "center", "marginBottom": "6px" }, "subwidgets": [ { "widgettype": "Svg", "options": { "svg": "", "width": "20px", "height": "20px" } }, {"widgettype": "Filler"} ] }, { "widgettype": "Text", "options": { "text": "¥{{'%.2f' % cstats.total_credit}}", "fontSize": "22px", "fontWeight": "700", "color": "#3B82F6", "lineHeight": "1.2" } }, { "widgettype": "Text", "options": { "text": "授信总额度", "fontSize": "13px", "color": "#94A3B8", "marginTop": "2px" } } ] }, { "widgettype": "VBox", "options": { "bgcolor": "#1E293B", "padding": "12px", "borderRadius": "10px", "border": "1px solid #334155", "flex": "none" }, "subwidgets": [ { "widgettype": "HBox", "options": { "alignItems": "center", "marginBottom": "6px" }, "subwidgets": [ { "widgettype": "Svg", "options": { "svg": "", "width": "20px", "height": "20px" } }, {"widgettype": "Filler"} ] }, { "widgettype": "Text", "options": { "text": "¥{{'%.2f' % cstats.total_used}}", "fontSize": "22px", "fontWeight": "700", "color": "#F59E0B", "lineHeight": "1.2" } }, { "widgettype": "Text", "options": { "text": "已用额度", "fontSize": "13px", "color": "#94A3B8", "marginTop": "2px" } } ] }, { "widgettype": "VBox", "options": { "bgcolor": "#1E293B", "padding": "12px", "borderRadius": "10px", "border": "1px solid #334155", "flex": "none" }, "subwidgets": [ { "widgettype": "HBox", "options": { "alignItems": "center", "marginBottom": "6px" }, "subwidgets": [ { "widgettype": "Svg", "options": { "svg": "", "width": "20px", "height": "20px" } }, {"widgettype": "Filler"} ] }, { "widgettype": "Text", "options": { "text": "¥{{'%.2f' % cstats.total_available}}", "fontSize": "22px", "fontWeight": "700", "color": "#22C55E", "lineHeight": "1.2" } }, { "widgettype": "Text", "options": { "text": "剩余额度", "fontSize": "13px", "color": "#94A3B8", "marginTop": "2px" } } ] }, { "widgettype": "VBox", "options": { "bgcolor": "#1E293B", "padding": "12px", "borderRadius": "10px", "border": "1px solid #334155", "flex": "none" }, "subwidgets": [ { "widgettype": "HBox", "options": { "alignItems": "center", "marginBottom": "6px" }, "subwidgets": [ { "widgettype": "Svg", "options": { "svg": "", "width": "20px", "height": "20px" } }, {"widgettype": "Filler"} ] }, { "widgettype": "Text", "options": { "text": "{{cstats.usage_pct}}%", "fontSize": "22px", "fontWeight": "700", "color": "#A78BFA", "lineHeight": "1.2" } }, { "widgettype": "Text", "options": { "text": "额度使用率 ({{cstats.active_count}}/{{cstats.customer_count}}户)", "fontSize": "13px", "color": "#94A3B8", "marginTop": "2px" } } ] } ] }, { "widgettype": "HBox", "options": { "gap": "8px", "alignItems": "center" }, "subwidgets": [ { "widgettype": "Button", "options": { "label": "我的额度", "bgcolor": "#3B82F6", "color": "#FFFFFF", "borderRadius": "6px", "padding": "8px 16px" }, "binds": [{ "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.credit_content", "options": {"url": "{{entire_url('/accounting/credit_limit/credit_overview.ui')}}"}, "mode": "replace" }] }, { "widgettype": "Button", "options": { "label": "客户额度管理", "bgcolor": "#475569", "color": "#FFFFFF", "borderRadius": "6px", "padding": "8px 16px" }, "binds": [{ "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.credit_content", "options": {"url": "{{entire_url('/accounting/credit_limit/credit_manage.ui')}}"}, "mode": "replace" }] }, { "widgettype": "Button", "options": { "label": "全部客户查询", "bgcolor": "#475569", "color": "#FFFFFF", "borderRadius": "6px", "padding": "8px 16px" }, "binds": [{ "wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.credit_content", "options": {"url": "{{entire_url('/accounting/credit_limit/index.ui')}}"}, "mode": "replace" }] } ] }, { "widgettype": "VBox", "id": "credit_content", "options": { "width": "100%", "css": "filler", "marginTop": "8px" } } ] }