{% extends "base.html" %} {% block title %}峰和友能源 · 仪表盘{% endblock %} {% block topbar_title %}仪表盘{% endblock %} {% block content %} {% set ns = namespace(total_actual=0, total_target=0, over_count=0) %} {% for gs in group_stats %} {% set ns.total_actual = ns.total_actual + gs.actual %} {% set ns.total_target = ns.total_target + gs.target %} {% if gs.exceeded > 0 %}{% set ns.over_count = ns.over_count + 1 %}{% endif %} {% endfor %}
Operations Desk · 经营驾驶舱
原料油进销存、价格与供货全景
{{ start_date }} 至 {{ end_date }} 当前库存 {{ inventory }} 吨 累计入库 {{ total_in }} 吨 累计出库 {{ total_out }} 吨
{% set in_d = (dash_kpi.in_this - dash_kpi.in_prev)|round(2) %} {% set out_d = (dash_kpi.out_this - dash_kpi.out_prev)|round(2) %}
{{ inventory }}
当前库存
待出库 {{ pending_outbound }} 吨
{{ dash_kpi.in_this }}
本月入库
{% if in_d > 0 %}+{{ in_d }} 吨 vs 上月 {% elif in_d < 0 %}{{ in_d }} 吨 vs 上月 {% else %}持平 vs 上月{% endif %}
{{ dash_kpi.out_this }}
本月出库
{% if out_d > 0 %}+{{ out_d }} 吨 vs 上月 {% elif out_d < 0 %}{{ out_d }} 吨 vs 上月 {% else %}持平 vs 上月{% endif %}
{% if dash_kpi.spread is not none %}
{{ dash_kpi.spread }} 元/斤
最新购销价差
收 {{ dash_kpi.buy_latest }} · 售 {{ dash_kpi.sell_latest }}
{% else %}
最新购销价差
暂无足够价格数据
{% endif %}
Purchase Cost
采购均价 · 本账期
{{ cycle_prices.start }} 至 {{ cycle_prices.end }} · 账期每月 18 号起 · 单位 元/斤
{{ cycle_prices.spot.avg_jin if cycle_prices.spot.avg_jin is not none else '—' }} 元/斤
外部人员均价
{{ cycle_prices.spot.tons }} 吨 · 货款 ¥{{ cycle_prices.spot.amount }}
{{ cycle_prices.fixed.avg_jin if cycle_prices.fixed.avg_jin is not none else '—' }} 元/斤
内部人员均价(含工资奖金)
{{ cycle_prices.fixed.tons }} 吨 · 工资 ¥{{ cycle_prices.fixed.base_total }} · 奖金 ¥{{ cycle_prices.fixed.bonus_total }}
{{ cycle_prices.sell.avg_jin if cycle_prices.sell.avg_jin is not none else '—' }} 元/斤
销售均价(同期)
每斤毛利:对外部 {{ spread_spot if spread_spot is not none else '—' }} · 对内部 {{ spread_fixed if spread_fixed is not none else '—' }}
{{ two_yuan.tons }}
2 元/斤 收购(本期)
¥{{ two_yuan.amount }} · 占临时收购 {{ two_yuan.pct }}%
Inventory Flow
进销存趋势
近 12 个月入库、出库与月末结存库存
入库 · 出库 · 结存
单位:吨
货源结构
入库占比
Price & Suppliers
价格与供应商
收购价 vs 销售价走势,以及临时供货商贡献排行
收购价 vs 销售价
单位:元/斤
临时供货商 Top
按采购金额 ·
Group Targets
分组月目标达成
{{ start_date }} 至 {{ end_date }} · 实际产量 vs 月目标
{% if group_stats %}
实际产量 月目标 达标分组 {{ ns.over_count }} / {{ group_stats|length }}
{% else %}

暂无分组数据

{% endif %}
Recent Activity
最近动态

最近入库

查看全部
{% if recent_in %}
{% for r in recent_in %} {% endfor %}
日期类型来源数量
{{ r.date.strftime('%m-%d') }} {% if r.supplier_type == 'fixed' %}固定 {% elif r.supplier_type == 'spot' %}临时 {% else %}自有{% endif %} {% if r.supplier_type == 'fixed' %}{{ r.group.name if r.group else '—' }} {% else %}{{ r.spot_supplier.name if r.spot_supplier else '—' }}{% endif %} {{ (r.quantity_ton * 2000)|round|int }} 
{% else %}

暂无入库记录

{% endif %}

最近出库

查看全部
{% if recent_out %}
{% for r in recent_out %} {% endfor %}
日期去向数量金额
{{ r.date.strftime('%m-%d') }} {{ r.destination or '—' }} {{ r.quantity_ton }} {{ '%.2f'|format(r.total_amount or 0) }} 元
{% else %}

暂无出库记录

{% endif %}
{% endblock %} {% block scripts %} {% endblock %}