Основы для оформления накладных

This commit is contained in:
2024-11-21 18:40:38 +03:00
parent aaefc3494c
commit 3872d9035c
5 changed files with 58 additions and 33 deletions

View File

@@ -6,4 +6,6 @@ waybill_bp = Blueprint('waybill_bp', __name__, template_folder='templates')
@check_auth
def waybill():
if request.method == 'GET':
return render_template('waybill.html')
return render_template('waybill.html')
print(request.form)
return 'OK'

View File

@@ -3,32 +3,46 @@
<head>
<meta charset="UTF-8">
<title>Авторизация</title>
<link href="/static/css/auth.css" type="text/css" rel="stylesheet">
<link href="/static/css/waybill.css" type="text/css" rel="stylesheet">
<link href="/static/css/main.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>Заглушка для примера составления накладной</h1>
<div class="container">
<!-- Пример карточки -->
<div class="card">
<img src="https://via.placeholder.com/250x150" alt="Фото товара">
<h3>Название товара 1</h3>
<p class="price">Цена: 500 руб.</p>
<p class="quantity">Количество: 10 шт.</p>
<form method="POST">
<div class="container">
<!-- Пример карточки -->
<div class="card">
<img src="https://via.placeholder.com/250x150" alt="Фото товара">
<h3>Название товара 1</h3>
<p class="price">Цена: 500 руб.</p>
<p class="quantity">Количество: 10 шт.</p>
<div class="input-container">
<input type="number" name="1" placeholder="Введите количество" min="1" max="1000" value="0">
</div>
</div>
<div class="card">
<img src="https://via.placeholder.com/250x150" alt="Фото товара">
<h3>Название товара 2</h3>
<p class="price">Цена: 1200 руб.</p>
<p class="quantity">Количество: 5 шт.</p>
<div class="input-container">
<input type="number" name="2" placeholder="Введите количество" min="0" max="1000" value="0">
</div>
</div>
<div class="card">
<img src="https://via.placeholder.com/250x150" alt="Фото товара">
<h3>Название товара 3</h3>
<p class="price">Цена: 800 руб.</p>
<p class="quantity">Количество: 7 шт.</p>
<div class="input-container">
<input type="number" name="3" placeholder="Введите количество" min="1" max="1000" value="0">
</div>
</div>
</div>
<div class="card">
<img src="https://via.placeholder.com/250x150" alt="Фото товара">
<h3>Название товара 2</h3>
<p class="price">Цена: 1200 руб.</p>
<p class="quantity">Количество: 5 шт.</p>
<div class="button-container">
<button type="submit">Создать накладную</button>
<a href="{{ url_for('index') }}"><button>На главную страницу</button></a>
</div>
<div class="card">
<img src="https://via.placeholder.com/250x150" alt="Фото товара">
<h3>Название товара 3</h3>
<p class="price">Цена: 800 руб.</p>
<p class="quantity">Количество: 7 шт.</p>
</div>
</div>
<a href="{{ url_for('index') }}"><button>На главную страницу</button></a>
</form>
</body>
</html>

View File

@@ -7,6 +7,6 @@
"report_bp"],
"Бухгалтер": [
"report_bp"],
"Поставщик": [
"": [
"waybill_bp"]
}

View File

@@ -12,10 +12,6 @@
width: 250px;
padding: 15px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.2s;
}
.card:hover {
transform: scale(1.05);
}
.card img {
width: 100%;
@@ -26,17 +22,27 @@
.card h3 {
margin: 10px 0;
font-size: 18px;
color: #333;
}
.card p {
margin: 5px 0;
color: #555;
}
.price {
font-weight: bold;
color: #28a745;
}
.quantity {
margin: 10px 0;
font-weight: bold;
color: #007bff;
}
.input-container {
margin: 10px 0;
}
.input-container input {
width: 80%;
padding: 8px;
font-size: 14px;
border: 1px solid #ddd;
border-radius: 5px;
}
.button-container {
text-align: center;
margin: 20px 0;
}

View File

@@ -19,7 +19,10 @@
<a href="{{ url_for('report_bp.menu') }}"><button>Отчеты</button></a>
</nav>
{% else %}
<p>Not implemented</p>
<!-- <p>Not implemented</p> -->
<nav class="menu">
<a href="{{ url_for('waybill_bp.waybill') }}"><button>Новая накладная</button></a>
</nav>
{% endif %}
{% else %}
<div class="login">