Files

52 lines
2.4 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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>
{% if session.get('user_id') %}
<div class="topbar">
<span class="brand">博特维 · 采购订单管理</span>
<nav style="display:flex;gap:18px;">
<a href="{{ url_for('index') }}">工作台</a>
<a href="{{ url_for('orders') }}">订单列表</a>
{% if session.get('role') in ['maker','admin'] %}<a href="{{ url_for('order_new') }}">新建订单</a>{% endif %}
<a href="{{ url_for('suppliers') }}">供应商</a>
<a href="{{ url_for('materials') }}">物料库</a>
<a href="{{ url_for('stats') }}">统计</a>
{% if session.get('role') == 'admin' %}<a href="{{ url_for('users') }}">用户</a>{% endif %}
{% if session.get('role') == 'admin' %}<a href="{{ url_for('notification_settings') }}">通知配置</a>{% endif %}
</nav>
<span class="spacer"></span>
<span class="me">{{ session.get('user_name') }}({{ ROLE_TEXT.get(session.get('role'), '') }})</span>
<a href="{{ url_for('change_password') }}" style="color:#d8e6f7;">修改密码</a>
<form method="post" action="{{ url_for('logout') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><button class="btn sm">退出</button></form>
</div>
{% endif %}
<div class="wrap">
{% with msgs = get_flashed_messages(with_categories=true) %}
{% for cat, msg in msgs %}
<div class="flash {{ cat }}">{{ msg }}</div>
{% endfor %}
{% endwith %}
{% block body %}{% endblock %}
</div>
<footer class="foot">{{ COMPANY_NAME }} · 采购订单管理系统 v4.0</footer>
{% if session.get('user_id') %}
<dialog id="tracking-dialog" aria-labelledby="tracking-dialog-title">
<div class="modal-head"><span id="tracking-dialog-title">快捷登记</span><button type="button" class="btn sm" data-tracking-close aria-label="关闭快捷登记">关闭</button></div>
<div class="modal-body">
<div id="tracking-dialog-error" class="flash error" role="alert" hidden></div>
<button type="button" class="btn sm" id="tracking-reload" hidden>重新读取当前状态</button>
<div id="tracking-dialog-content" aria-live="polite"></div>
</div>
</dialog>
<script src="{{ url_for('static', filename='tracking.js') }}" defer></script>
{% endif %}
</body>
</html>