finance-consumer/bookkeeper/templates/tx.html.j2

62 lines
1.8 KiB
Django/Jinja

<div class="">
<table class="table is-fullwidth is-striped">
<thead>
<tr>
<th>代码</th>
<th>名称</th>
<th>买入日期</th>
<th>买入价</th>
<th>成交量</th>
<th><abbr title="买入价+佣金+过户费等各种手续费">实际买入价</abbr></th>
<th>卖出日期</th>
<th>卖出价</th>
<th>成交量</th>
<th><abbr title="卖出价-佣金-各种手续费">实际卖出价</abbr></th>
<th>收益</th>
<th>实际收益</th>
<th><abbr title="已完成">O</abbr></th>
<th>操作</th>
</tr>
</thead>
<tbody>
{% for r in rows %}
<tr>
<td>{{ r.code }}</td>
<td>{{ r.name }}</td>
<td>{{ r.date }}</td>
<td>{{ r.buy }}</td>
<td>{{ r.volume }}</td>
<td>{{ r.net_buy }}</td>
{% if r.split_pieces %}
<td></td>
<td></td>
<td>}</td>
<td></td>
{% else %}
<td>{{ r.sell_date or "" }}</td>
<td>{{ r.sell or "" }}</td>
<td>{{ r.sold_volume or "" }}</td>
<td>{{ r.net_sell or "" }}</td>
{% endif %}
<td>{{ r.gain or "" }}</td>
<td>{{ r.net_gain or "" }}</td>
<td>
{% if r.sold_volume == r.volume %}
{% else %}
{% endif %}
</td>
<td>
<a href="#">修改</a>
</td>
</tr>
{% endfor %}
<tr>
<td colspan="14" style="text-align: center"><a id="addEntry">添加</a></td>
</tr>
</tbody>
</table>
</div>