feat: 库存管理系统 MaterialWMS 初始版本

- Flask + SQLAlchemy 物料/入库/出库/BOM/生产订单全模块管理
- PyInstaller 打包为单文件 EXE (双击运行, 自动建库)
- 物料维度: 入库总数量 / 消耗总数量 / 逐次入库流水(含时间)
- BOM 详情展示组成物料的规格型号与单套用量
- 支持 Altium / 嘉立创 BOM 批量导入(文本与 Excel 双通道)
- 内置端到端验证脚本(tools/_exe_util.py 等, 清理进程树防残留)
This commit is contained in:
2026-09-11 15:41:56 +08:00
commit 7d34a481b3
38 changed files with 3601 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}物料入库系统{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<header class="topbar">
<div class="brand">📦 物料入库系统 <span class="ver">M1+M2+M3</span></div>
<nav>
<a href="{{ url_for('dashboard') }}">库存看板</a>
<a href="{{ url_for('materials') }}">物料</a>
<a href="{{ url_for('inbound') }}">入库</a>
<a href="{{ url_for('outbound') }}">出库</a>
{% if g.user and g.user.role in ('admin','manager') %}
<a href="{{ url_for('boms') }}">BOM</a>
<a href="{{ url_for('orders') }}">生产订单</a>
<a href="{{ url_for('report') }}">报表</a>
<a href="{{ url_for('logs') }}">日志</a>
{% endif %}
{% if g.user and g.user.role == 'admin' %}
<a href="{{ url_for('users') }}">用户</a>
{% endif %}
{% if g.user %}<span class="who">{{ g.user.display_name or g.user.username }} ({{ g.user.role }})</span>
<a href="{{ url_for('logout') }}">退出</a>{% endif %}
</nav>
</header>
<main>
{% with msgs = get_flashed_messages(with_categories=true) %}
{% for cat, msg in msgs %}
<div class="flash {{ cat }}">{{ msg }}</div>
{% endfor %}
{% endwith %}
{% block content %}{% endblock %}
</main>
</body>
</html>