diff --git a/ft-app/app/templates/admin.html b/ft-app/app/templates/admin.html index fa5e71f..678d5c0 100644 --- a/ft-app/app/templates/admin.html +++ b/ft-app/app/templates/admin.html @@ -118,25 +118,38 @@ {% if products %} -
- - - {% for p in products %} - - - - - - - - - {% endfor %} -
代码名称交易所每点合约数操作
{{ p.code }}{{ p.name }}{{ exchange_names.get(p.exchange, p.exchange) }}{{ p.point_value }}{{ p.contracts|length }} -
- -
-
+ {% for ex in exchanges %} + {% set ex_products = products | selectattr('exchange', 'equalto', ex[0]) | list %} + {% if ex_products %} +
+
+ + {{ ex[1] }} + {{ ex_products|length }} 个品种 +
+
+ {% endif %} + {% endfor %} {% else %}
暂无品种,请先新建。
{% endif %} @@ -146,16 +159,22 @@
{% if products %} {# ── Add contract form ── #} -
+
添加合约
+
+ + +
- +
@@ -208,6 +227,26 @@