Update 2026-06-10 11:45:26
This commit is contained in:
+88
-62
@@ -4,6 +4,7 @@
|
||||
<head>
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}" />
|
||||
<link rel="stylesheet" type="text/css" href="{% static "css/modern_ui.css" %}" />
|
||||
{% block extrastyle %}{% endblock %}
|
||||
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="{% block stylesheet_ie %}{% static "admin/css/ie.css" %}{% endblock %}" /><![endif]-->
|
||||
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% static "admin/css/rtl.css" %}{% endblock %}" />{% endif %}
|
||||
@@ -20,77 +21,102 @@
|
||||
<div id="container">
|
||||
|
||||
{% if not is_popup %}
|
||||
<!-- Header -->
|
||||
<!-- Header (Sidebar) -->
|
||||
<div id="header">
|
||||
<div id="branding">
|
||||
{% block branding %}{% endblock %}
|
||||
<div class="brand-section">
|
||||
<div class="brand-logo">⚡</div>
|
||||
<div class="brand-text">
|
||||
<h1>智捷ERP</h1>
|
||||
<span>SmartJet ERP</span>
|
||||
</div>
|
||||
</div>
|
||||
{% block usertools %}
|
||||
{% if has_permission %}
|
||||
<div id="user-tools">
|
||||
<a href="http://code.xinmi.cloud/" target="_blank" style="color: #ffeb3b; font-weight: bold;">新觅源码库</a> /
|
||||
{% block welcome-msg %}
|
||||
{% trans 'Welcome,' %}
|
||||
<strong>{% firstof user.get_short_name user.get_username %}</strong>.
|
||||
{% endblock %}
|
||||
{% block userlinks %}
|
||||
<a href="/admin/workflow/todolist">{% trans 'workflow todo' %}</a> /
|
||||
{% if site_url %}
|
||||
<a href="/admin/basedata/document">{% trans 'document' %}</a> /
|
||||
{% endif %}
|
||||
{% if user.is_active and user.is_staff %}
|
||||
{% url 'django-admindocs-docroot' as docsroot %}
|
||||
{% if docsroot %}
|
||||
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if user.has_usable_password %}
|
||||
<a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
|
||||
{% endblock %}
|
||||
|
||||
<div class="sidebar-nav">
|
||||
<a href="/admin/" class="nav-item active"><i>🏠</i> 控制面板</a>
|
||||
|
||||
<div class="nav-group-label">核心业务</div>
|
||||
<a href="/admin/sale/saleorder/" class="nav-item"><i>📁</i> 销售管理 <span class="arrow">v</span></a>
|
||||
<a href="/admin/purchase/purchaseorder/" class="nav-item"><i>🛒</i> 采购管理 <span class="arrow">v</span></a>
|
||||
<a href="/admin/invent/inventory/" class="nav-item"><i>📦</i> 库存管理 <span class="arrow">v</span></a>
|
||||
|
||||
<div class="nav-group-label">组织人力</div>
|
||||
<a href="/admin/organ/organization/" class="nav-item"><i>🏢</i> 组织架构</a>
|
||||
<a href="/admin/basedata/employee/" class="nav-item"><i>👥</i> 员工档案</a>
|
||||
|
||||
<div class="nav-group-label">流程协同</div>
|
||||
<a href="/admin/workflow/instance/" class="nav-item"><i>🛡️</i> 审批中心</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block nav-global %}{% endblock %}
|
||||
|
||||
<div class="sidebar-footer">
|
||||
<a href="/admin/syscfg/site/" class="nav-item"><i>⚙️</i> 设置</a>
|
||||
<button type="button" id="sidebarCollapseBtn" class="nav-item nav-item-btn"><i>←</i> 收起菜单</button>
|
||||
</div>
|
||||
|
||||
{% block usertools %}{% endblock %}
|
||||
</div>
|
||||
<!-- END Header -->
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
|
||||
{% if title %} › {{ title }}{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% block messages %}
|
||||
{% if messages %}
|
||||
<ul class="messagelist">{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
|
||||
{% endfor %}</ul>
|
||||
{% endif %}
|
||||
{% endblock messages %}
|
||||
|
||||
<!-- Content -->
|
||||
<div id="content" class="{% block coltype %}colM{% endblock %}">
|
||||
{% block pretitle %}{% endblock %}
|
||||
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
|
||||
{% block content %}
|
||||
{% block object-tools %}{% endblock %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
{% block sidebar %}{% endblock %}
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<!-- END Content -->
|
||||
|
||||
{% block footer %}<div id="footer">
|
||||
<div style="text-align: center; padding: 10px;">
|
||||
<a href="http://code.xinmi.cloud/" target="_blank" style="color: #666; text-decoration: none;">智捷ERP - 新觅源码库</a>
|
||||
<div id="main" {% if is_popup %}style="margin-left: 0; width: 100%;"{% endif %}>
|
||||
{% if not is_popup %}
|
||||
<div class="topbar">
|
||||
<div class="topbar-left">
|
||||
<button type="button" class="icon-btn" id="topbarMenuBtn" title="切换菜单">☰</button>
|
||||
<div class="breadcrumb-new">首页 > <span>控制面板</span></div>
|
||||
</div>
|
||||
<div class="topbar-right">
|
||||
<button type="button" class="icon-btn" id="topbarNotifyBtn" title="待办任务">🔔</button>
|
||||
<div class="user-menu-wrap">
|
||||
<button type="button" class="user-profile" id="userProfileToggle" title="用户菜单">
|
||||
<div class="avatar" style="background: url('https://ui-avatars.com/api/?name={{ user.get_short_name|default:"管理员" }}&background=6366f1&color=fff') no-repeat center center; background-size: cover;"></div>
|
||||
<div class="user-info">
|
||||
<span class="user-name">{{ user.get_short_name|default:"管理员" }}</span>
|
||||
<span class="user-role">系统管理员</span>
|
||||
</div>
|
||||
<span class="user-caret">▾</span>
|
||||
</button>
|
||||
<div class="user-dropdown" id="userDropdown">
|
||||
<a href="{% url 'admin:password_change' %}">修改密码</a>
|
||||
<a href="{% url 'admin:logout' %}">退出登录</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% block messages %}
|
||||
{% if messages %}
|
||||
<ul class="messagelist">{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
|
||||
{% endfor %}</ul>
|
||||
{% endif %}
|
||||
{% endblock messages %}
|
||||
|
||||
<!-- Content -->
|
||||
<div id="content" class="{% block coltype %}colM{% endblock %}">
|
||||
{% block pretitle %}{% endblock %}
|
||||
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
|
||||
{% block content %}
|
||||
{% block object-tools %}{% endblock %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
{% block sidebar %}{% endblock %}
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<!-- END Content -->
|
||||
|
||||
{% if not is_popup %}
|
||||
{% block footer %}
|
||||
<div id="footer">
|
||||
<div style="text-align: center; padding: 10px;">
|
||||
<a href="http://code.xinmi.cloud/" target="_blank" style="color: #666; text-decoration: none;">智捷ERP - 新觅源码库</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- END Container -->
|
||||
|
||||
<script type="text/javascript" src="{% static "js/modern_ui.js" %}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+151
-99
@@ -1,110 +1,162 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n admin_static %}
|
||||
|
||||
{% block extrastyle %}{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block coltype %}colMS{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }} dashboard{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
|
||||
{% for app in maxi_app_list %}
|
||||
|
||||
| <a href="{{ app.app_url }}">{{ app.name }}</a>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content-main">
|
||||
{% if maxi_app_list %}
|
||||
{% for app in maxi_app_list %}
|
||||
<!-- Row 1: Stats Cards -->
|
||||
<div class="stats-grid">
|
||||
<div class="stat-card">
|
||||
<div class="stat-header">
|
||||
<div class="stat-icon-bg" style="background: #eef2ff; color: #6366f1;">¥</div>
|
||||
<span class="stat-info-icon">ⓘ</span>
|
||||
</div>
|
||||
<div class="stat-label">销售总额</div>
|
||||
<div class="stat-value">¥ 8,231,078</div>
|
||||
<div class="stat-footer">
|
||||
<span class="stat-trend trend-up">较上月 ▲ 12.6%</span>
|
||||
<svg class="sparkline" viewBox="0 0 100 30"><path d="M0,25 Q15,5 30,20 T60,10 T100,25" fill="none" stroke="#6366f1" stroke-width="2"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-header">
|
||||
<div class="stat-icon-bg" style="background: #eff6ff; color: #3b82f6;">📋</div>
|
||||
<span class="stat-info-icon">ⓘ</span>
|
||||
</div>
|
||||
<div class="stat-label">待办审批</div>
|
||||
<div class="stat-value">32</div>
|
||||
<div class="stat-footer">
|
||||
<span class="stat-trend trend-down" style="color: #ef4444;">较昨日 ▲ 8</span>
|
||||
<svg class="sparkline" viewBox="0 0 100 30"><path d="M0,15 L20,25 L40,10 L60,20 L80,5 L100,15" fill="none" stroke="#3b82f6" stroke-width="2"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-header">
|
||||
<div class="stat-icon-bg" style="background: #fff7ed; color: #f97316;">📦</div>
|
||||
<span class="stat-info-icon">ⓘ</span>
|
||||
</div>
|
||||
<div class="stat-label">库存预警</div>
|
||||
<div class="stat-value">18</div>
|
||||
<div class="stat-footer">
|
||||
<span class="stat-trend trend-down" style="color: #ef4444;">较昨日 ▲ 5</span>
|
||||
<svg class="sparkline" viewBox="0 0 100 30"><path d="M0,25 L30,5 L70,25 L100,10" fill="none" stroke="#f97316" stroke-width="2"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-header">
|
||||
<div class="stat-icon-bg" style="background: #f0fdf4; color: #10b981;">🖥️</div>
|
||||
<span class="stat-info-icon">ⓘ</span>
|
||||
</div>
|
||||
<div class="stat-label">系统在线</div>
|
||||
<div class="stat-value">98.6%</div>
|
||||
<div class="stat-footer">
|
||||
<span class="stat-trend trend-up">较昨日 ▲ 0.8%</span>
|
||||
<svg class="sparkline" viewBox="0 0 100 30"><path d="M0,20 L25,15 L50,22 L75,10 L100,12" fill="none" stroke="#10b981" stroke-width="2"/></svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="app-{{ app.app_label }} module">
|
||||
<table>
|
||||
<caption>
|
||||
<a href="{{ app.app_url }}" class="section" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">{{ app.name }}</a>
|
||||
</caption>
|
||||
{% for model in app.models %}
|
||||
<tr class="model-{{ model.object_name|lower }}">
|
||||
{% if model.admin_url %}
|
||||
<th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
|
||||
{% else %}
|
||||
<th scope="row">{{ model.name }}</th>
|
||||
{% endif %}
|
||||
|
||||
{% if model.add_url %}
|
||||
<td><a href="{{ model.add_url }}" class="addlink">{% trans 'Add' %}</a></td>
|
||||
{% else %}
|
||||
<td> </td>
|
||||
{% endif %}
|
||||
|
||||
{% if model.admin_url %}
|
||||
<td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
|
||||
{% else %}
|
||||
<td> </td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</table>
|
||||
<!-- Row 2: Main Grid -->
|
||||
<div class="dashboard-main-grid">
|
||||
<!-- Operation Logs -->
|
||||
<div class="module-card">
|
||||
<div class="card-title">最近操作日志</div>
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>时间</th>
|
||||
<th>操作人</th>
|
||||
<th>模块</th>
|
||||
<th>操作类型</th>
|
||||
<th>操作内容</th>
|
||||
<th>IP地址</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>2025-05-22 10:24:31</td>
|
||||
<td>张伟</td>
|
||||
<td>销售管理</td>
|
||||
<td><span class="badge badge-new">新增</span></td>
|
||||
<td>新增销售订单 SO-20250522-001</td>
|
||||
<td>192.168.1.100</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2025-05-22 10:18:44</td>
|
||||
<td>李娜</td>
|
||||
<td>采购管理</td>
|
||||
<td><span class="badge badge-audit">审核</span></td>
|
||||
<td>审核采购订单 PO-20250522-045</td>
|
||||
<td>192.168.1.101</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2025-05-22 09:56:12</td>
|
||||
<td>王强</td>
|
||||
<td>库存管理</td>
|
||||
<td><span class="badge badge-update">更新</span></td>
|
||||
<td>更新库存调拔单 TB-20250522-009</td>
|
||||
<td>192.168.1.102</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2025-05-22 09:41:07</td>
|
||||
<td>张伟</td>
|
||||
<td>审批中心</td>
|
||||
<td><span class="badge badge-submit">提交</span></td>
|
||||
<td>提交费用报销单 FB-20250522-008</td>
|
||||
<td>192.168.1.100</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="padding: 20px 32px; border-top: 1px solid var(--slate-50); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--slate-400);">
|
||||
<span>共 120 条记录</span>
|
||||
<div style="display: flex; gap: 8px;">
|
||||
<span style="width: 24px; height: 24px; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; border-radius: 4px;">1</span>
|
||||
<span style="width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;">2</span>
|
||||
<span style="width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;">3</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p>{% trans "You don't have permission to edit anything." %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
<div id="content-related" style="width:18em">
|
||||
<div class="module">
|
||||
<h2><a href="workflow/todolist" style="float:right">更多</a>我的待办</h2>
|
||||
{% if not todolist %}
|
||||
<p>无待办任务</p>
|
||||
{% else %}
|
||||
<ul class="actionlist">
|
||||
{% for todo in todolist%}
|
||||
<li class="changelink">
|
||||
{{todo.href}}<br/>
|
||||
<span class="mini quiet">{{todo.submitter}} {{todo.start_time}}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="module" id="recent-actions-module">
|
||||
<h2>{% trans 'Recent Actions' %}</h2>
|
||||
<h3>{% trans 'My Actions' %}</h3>
|
||||
{% load log %}
|
||||
{% get_admin_log 10 as admin_log for_user user %}
|
||||
{% if not admin_log %}
|
||||
<p>{% trans 'None available' %}</p>
|
||||
{% else %}
|
||||
<ul class="actionlist">
|
||||
{% for entry in admin_log %}
|
||||
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">
|
||||
{% if entry.is_deletion or not entry.get_admin_url %}
|
||||
{{ entry.object_repr }}
|
||||
{% else %}
|
||||
<a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
|
||||
{% endif %}
|
||||
<br/>
|
||||
{% if entry.content_type %}
|
||||
<span class="mini quiet">{% filter capfirst %}{{ entry.content_type }}{% endfilter %}</span>
|
||||
{% else %}
|
||||
<span class="mini quiet">{% trans 'Unknown content' %}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<!-- Task Sidebar -->
|
||||
<div class="module-card">
|
||||
<div class="card-title">
|
||||
待办任务
|
||||
<a href="#" style="font-size: 12px; color: var(--primary); text-decoration: none;">更多 ></a>
|
||||
</div>
|
||||
<div class="task-list">
|
||||
<div class="task-item">
|
||||
<div class="task-icon" style="background: #3b82f6;">📄</div>
|
||||
<div class="task-content">
|
||||
<div class="task-name">费用报销单审批</div>
|
||||
<div class="task-info">报销人:张伟</div>
|
||||
<span class="priority-tag p-urgent">紧急</span>
|
||||
</div>
|
||||
<div class="task-time">10分钟前</div>
|
||||
</div>
|
||||
<div class="task-item">
|
||||
<div class="task-icon" style="background: #f97316;">🛒</div>
|
||||
<div class="task-content">
|
||||
<div class="task-name">采购订单审批</div>
|
||||
<div class="task-info">单号:PO-20250522-047</div>
|
||||
<span class="priority-tag p-high">高</span>
|
||||
</div>
|
||||
<div class="task-time">30分钟前</div>
|
||||
</div>
|
||||
<div class="task-item">
|
||||
<div class="task-icon" style="background: #10b981;">💰</div>
|
||||
<div class="task-content">
|
||||
<div class="task-name">销售订单审批</div>
|
||||
<div class="task-info">单号:SO-20250522-004</div>
|
||||
<span class="priority-tag p-medium">中</span>
|
||||
</div>
|
||||
<div class="task-time">1小时前</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="view-all">
|
||||
<a href="/admin/workflow/todolist/">查看全部待办 →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
+65
-130
@@ -1,140 +1,75 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% extends "admin/login_base.html" %}
|
||||
{% load i18n admin_static %}
|
||||
|
||||
{% block extrastyle %}{{ block.super }}
|
||||
<style>
|
||||
body {
|
||||
background: url('https://images.unsplash.com/photo-1497215728101-856f4ea42174?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') no-repeat center center fixed;
|
||||
background-size: cover;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
#container {
|
||||
background: transparent;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
#content {
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 20px 40px rgba(0,0,0,0.3);
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
padding: 40px;
|
||||
backdrop-filter: blur(8px);
|
||||
margin: 0;
|
||||
}
|
||||
.login #header, .login .breadcrumbs, .login #footer { display: none; }
|
||||
#content-title { display: none; }
|
||||
.login .form-row { border: none; padding: 12px 0; }
|
||||
.login label { display: block; margin-bottom: 8px; color: #444; font-weight: 600; font-size: 14px; }
|
||||
.login input[type=text], .login input[type=password] {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
font-size: 14px;
|
||||
transition: border-color 0.3s;
|
||||
}
|
||||
.login input[type=text]:focus, .login input[type=password]:focus {
|
||||
border-color: #007bff;
|
||||
outline: none;
|
||||
}
|
||||
.submit-row { margin-top: 24px; text-align: center; }
|
||||
.submit-row input {
|
||||
background: #007bff;
|
||||
color: white;
|
||||
padding: 12px 0;
|
||||
width: 100%;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
transition: background 0.3s, transform 0.2s;
|
||||
}
|
||||
.submit-row input:hover {
|
||||
background: #0056b3;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.submit-row input:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.default-account {
|
||||
margin-top: 30px;
|
||||
padding: 15px;
|
||||
background: #f0f7ff;
|
||||
border-left: 4px solid #007bff;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
color: #555;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.brand-logo {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.brand-logo h1 {
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.errornote {
|
||||
background: #fff5f5;
|
||||
color: #e53e3e;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #feb2b2;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content-main">
|
||||
<div class="brand-logo">
|
||||
<h1>智捷ERP</h1>
|
||||
<p style="color: #666; margin-top: 5px;">高效管理 · 企业互联</p>
|
||||
<div class="login-shell">
|
||||
<div class="login-brand">
|
||||
<div class="login-brand-inner">
|
||||
<div class="login-brand-logo">⚡</div>
|
||||
<h1>智捷ERP</h1>
|
||||
<p class="login-brand-tagline">SmartJet ERP</p>
|
||||
<p class="login-brand-desc">高效管理 · 智能协同 · 企业互联</p>
|
||||
<ul class="login-brand-features">
|
||||
<li>销售 / 采购 / 库存一体化</li>
|
||||
<li>组织架构与审批流程</li>
|
||||
<li>数据驱动经营决策</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if form.errors and not form.non_field_errors %}
|
||||
<p class="errornote">
|
||||
{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
{% for error in form.non_field_errors %}
|
||||
<p class="errornote">
|
||||
{{ error }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="login-panel">
|
||||
<div class="login-card">
|
||||
<div class="login-card-header">
|
||||
<h2>欢迎登录</h2>
|
||||
<p>请输入您的账号和密码</p>
|
||||
</div>
|
||||
|
||||
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
|
||||
<div class="form-row">
|
||||
{{ form.username.label_tag }} {{ form.username }}
|
||||
</div>
|
||||
<div class="form-row">
|
||||
{{ form.password.label_tag }} {{ form.password }}
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
</div>
|
||||
<div class="submit-row">
|
||||
<input type="submit" value="{% trans 'Log in' %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% if form.errors and not form.non_field_errors %}
|
||||
<div class="login-error">
|
||||
{% if form.errors.items|length == 1 %}请修正以下错误。{% else %}请修正以下错误。{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="default-account">
|
||||
<strong style="color: #007bff;">演示账号</strong><br>
|
||||
用户名:admin<br>
|
||||
密 码:admin
|
||||
{% if form.non_field_errors %}
|
||||
{% for error in form.non_field_errors %}
|
||||
<div class="login-error">{{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<div class="login-error">
|
||||
您已以 {{ user.get_username }} 登录,但无权访问此页面。请使用其他账号登录。
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form action="{{ app_path }}" method="post" id="login-form" class="login-form">
|
||||
{% csrf_token %}
|
||||
<div class="login-field">
|
||||
<label for="id_username">用户名</label>
|
||||
{{ form.username }}
|
||||
</div>
|
||||
<div class="login-field">
|
||||
<label for="id_password">密码</label>
|
||||
{{ form.password }}
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
</div>
|
||||
<button type="submit" class="login-submit">登 录</button>
|
||||
</form>
|
||||
|
||||
<div class="login-demo">
|
||||
<div class="login-demo-title">演示账号</div>
|
||||
<div class="login-demo-row">
|
||||
<span>用户名</span><code>xinmi_admin</code>
|
||||
</div>
|
||||
<div class="login-demo-row">
|
||||
<span>密 码</span><code>admin123456</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-footer-link">
|
||||
<a href="http://code.xinmi.cloud/" target="_blank" rel="noopener">智捷ERP · 新觅源码库</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{% load i18n admin_static %}<!DOCTYPE html>
|
||||
<html lang="zh-hans">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}登录 | 智捷ERP{% endblock %}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{% static "css/modern_ui.css" %}" />
|
||||
{% block extrastyle %}{% endblock %}
|
||||
</head>
|
||||
<body class="login-page">
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user