{% extends 'ewoooc_base.html' %} {% block title %}EwoooC 缺貨清單{% endblock %} {% block page_attrs %}data-page-group="monitor" data-page-id="vendor-list"{% endblock %} {% block extra_css %} {% endblock %} {% block ewooo_content %} {% set status_labels = {'pending': '待發送', 'sent': '已發送', 'failed': '失敗', 'duplicate': '重複', 'unknown': '未標記'} %}
缺貨清單 · 即時狀態

缺貨清單

依正式缺貨資料呈現,可用批次、廠商、商品與發送狀態篩選;桌機保留密度,手機改為逐筆資料卡。

符合筆數
{{ stats.total | number_format }}
目前清單 {{ total_items | number_format }} 筆
待發送
{{ stats.pending | number_format }}
含未標記狀態
已發送
{{ stats.sent | number_format }}
通知完成記錄
失敗
{{ stats.failed | number_format }}
需人工檢查
來源廠商
{{ stats.vendor_count | number_format }}
重複 {{ stats.duplicate | number_format }} 筆
{% if current_status and current_status != 'all' %} {% endif %}
缺貨資料 第 {{ current_page }} / {{ total_pages }} 頁
{{ total_items | number_format }} 筆
{% if records %}
{% for record in records %} {% set record_status = record.status or 'pending' %} {% set status_class = record_status if record_status in status_labels else 'unknown' %} {% endfor %}
狀態 商品 廠商 批次 庫存 缺貨日期 缺貨天數 30 日業績 建立時間
{{ status_labels.get(record_status, record_status) }} {% if record.is_duplicate %}
重複 {{ record.duplicate_count or 0 }}
{% endif %}
{{ record.product_name }}
{{ record.product_code }}
{{ record.vendor_name }}
{{ record.vendor_code }}
{{ record.batch_id }} {{ record.current_stock if record.current_stock is not none else '—' }} {{ record.stockout_date.strftime('%Y-%m-%d') if record.stockout_date else '—' }} {{ record.stockout_days if record.stockout_days is not none else '—' }} {% if record.monthly_sales_amount is not none %} ${{ record.monthly_sales_amount | int | number_format }} {% else %}—{% endif %} {{ record.created_at.strftime('%Y-%m-%d %H:%M') if record.created_at else '—' }}
{% else %}
目前沒有符合條件的缺貨資料;請調整篩選條件,或先匯入真實缺貨清單。
{% endif %}
{% if current_page > 1 %} 上一頁 {% endif %} {{ current_page }} / {{ total_pages }} {% if current_page < total_pages %} 下一頁 {% endif %}
{% endblock %}