Files
order_system/po_app/templates/base.html
T

41 lines
1.8 KiB
HTML
Raw 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 }} · 采购订单管理系统 v3.0</footer>
</body>
</html>