init: 博特维采购订单系统 v1.0 源码

This commit is contained in:
star
2026-09-10 16:18:15 +08:00
commit 6327ef7641
35 changed files with 4029 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
{% extends "base.html" %}
{% block body %}
<h1 class="page">订单列表</h1>
<div class="card">
<form class="toolbar" method="get">
<input type="text" name="kw" placeholder="单号 / 供应商" value="{{ args.get('kw','') }}" style="width:180px;">
<select name="status" style="width:140px;">
<option value="">全部状态</option>
{% for k, v in STATUS_TEXT.items() %}
<option value="{{ k }}" {% if args.get('status')==k %}selected{% endif %}>{{ v }}</option>
{% endfor %}
</select>
<select name="doc_type" style="width:150px;">
<option value="">全部类型</option>
{% for k, v in DOC_TYPES.items() %}
<option value="{{ k }}" {% if args.get('doc_type')==k %}selected{% endif %}>{{ v }}</option>
{% endfor %}
</select>
<input type="date" name="date_from" value="{{ args.get('date_from','') }}" style="width:150px;">
<span>~</span>
<input type="date" name="date_to" value="{{ args.get('date_to','') }}" style="width:150px;">
<button class="btn primary">查询</button>
<span class="grow"></span>
<a class="btn" href="{{ url_for('export_ledger') }}">导出 Excel 台账</a>
<a class="btn primary" href="{{ url_for('order_new') }}">新建订单</a>
</form>
<table class="grid">
<tr>
<th>单号</th><th>类型</th><th>供应商</th><th>采购日期</th><th class="num">金额</th>
<th>状态</th><th>制单</th><th>审核</th><th>批准</th><th class="nowrap">操作</th>
</tr>
{% for o in rows %}
<tr>
<td class="nowrap">{{ o.order_no }}</td>
<td>{{ o.doc_type_text }}</td>
<td>{{ o.supplier_name }}</td>
<td class="nowrap">{{ o.order_date }}</td>
<td class="num">{{ '%.2f'|format(o.total_amount) }}</td>
<td><span class="badge {{ o.status }}">{{ o.status_text }}</span></td>
<td>{{ o.created_by_name }}</td>
<td>{{ o.reviewed_by or '-' }}</td>
<td>{{ o.approved_by or '-' }}</td>
<td class="nowrap">
<a class="btn sm" href="{{ url_for('order_view', oid=o.id) }}">查看</a>
<a class="btn sm" href="{{ url_for('order_pdf', oid=o.id) }}" target="_blank">PDF</a>
</td>
</tr>
{% else %}
<tr><td colspan="10" class="center muted">没有符合条件的订单</td></tr>
{% endfor %}
</table>
</div>
{% endblock %}