{% extends "base.html" %} {% block body %} {% from 'tracking_macros.html' import progress, invoice, tasks, actions with context %}

订单列表

~ 导出 Excel 台账 {% if user.role in ['maker','admin'] %}新建订单{% endif %}
{% if not args.get('tracking') and not args.get('kw') and not args.get('material_kw') and args.get('show_completed') != '1' %}

已收起付款、交货、收票均完成的订单。搜索时会同时查找历史已完成订单。

{% endif %} {% if args.get('material_kw') %}

物料搜索结果同时包含历史已完成订单。匹配的物料显示在订单下方。

{% endif %} {% for o in rows %} {% else %}{% endfor %}
订单 / 供应商审批状态金额付款进度交货进度收票 / 待办操作
{{ o.order_no }}
{{ o.supplier_name }}
{{ o.doc_type_text }} · {{ o.order_date }}
制单 {{ o.created_by_name }} · 审批 {{ o.approved_by or '—' }}
{% if o.needs_prepayment %}需提前付款{{ '(待核对)' if o.fulfillment_stale else '' }}{% endif %}{% if matched_items.get(o.id) %}
匹配物料:{% for it in matched_items[o.id][:5] %}{{ it.material_code or '无代码' }} · {{ it.material_spec or '未填规格' }}{% endfor %}{% if matched_items[o.id]|length > 5 %}另有 {{ matched_items[o.id]|length - 5 }} 项{% endif %}
{% endif %}
{{ o.status_text }} ¥{{ '%.2f'|format(o.total_amount) }} {{ progress(o, 'payment') }} {{ progress(o, 'delivery') }} {{ invoice(o) }}{{ tasks(o) }} {{ actions(o, user) }}{% if user.role in ['maker', 'admin'] %}
{% endif %}下载 / 预览 PDF
没有符合条件的订单
{% endblock %}