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

This commit is contained in:
2024-11-21 18:40:38 +03:00
parent 36dc4150ce
commit a04941f872
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 @check_auth
def waybill(): def waybill():
if request.method == 'GET': 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> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Авторизация</title> <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"> <link href="/static/css/main.css" type="text/css" rel="stylesheet">
</head> </head>
<body> <body>
<h1>Заглушка для примера составления накладной</h1> <h1>Заглушка для примера составления накладной</h1>
<div class="container"> <form method="POST">
<!-- Пример карточки --> <div class="container">
<div class="card"> <!-- Пример карточки -->
<img src="https://via.placeholder.com/250x150" alt="Фото товара"> <div class="card">
<h3>Название товара 1</h3> <img src="https://via.placeholder.com/250x150" alt="Фото товара">
<p class="price">Цена: 500 руб.</p> <h3>Название товара 1</h3>
<p class="quantity">Количество: 10 шт.</p> <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>
<div class="card"> <div class="button-container">
<img src="https://via.placeholder.com/250x150" alt="Фото товара"> <button type="submit">Создать накладную</button>
<h3>Название товара 2</h3> <a href="{{ url_for('index') }}"><button>На главную страницу</button></a>
<p class="price">Цена: 1200 руб.</p>
<p class="quantity">Количество: 5 шт.</p>
</div> </div>
<div class="card"> </form>
<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>
</body> </body>
</html> </html>

View File

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

View File

@@ -12,10 +12,6 @@
width: 250px; width: 250px;
padding: 15px; padding: 15px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.2s;
}
.card:hover {
transform: scale(1.05);
} }
.card img { .card img {
width: 100%; width: 100%;
@@ -26,17 +22,27 @@
.card h3 { .card h3 {
margin: 10px 0; margin: 10px 0;
font-size: 18px; font-size: 18px;
color: #333;
}
.card p {
margin: 5px 0;
color: #555;
} }
.price { .price {
font-weight: bold; font-weight: bold;
color: #28a745; color: #28a745;
} }
.quantity { .quantity {
margin: 10px 0;
font-weight: bold; font-weight: bold;
color: #007bff; 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> <a href="{{ url_for('report_bp.menu') }}"><button>Отчеты</button></a>
</nav> </nav>
{% else %} {% else %}
<p>Not implemented</p> <!-- <p>Not implemented</p> -->
<nav class="menu">
<a href="{{ url_for('waybill_bp.waybill') }}"><button>Новая накладная</button></a>
</nav>
{% endif %} {% endif %}
{% else %} {% else %}
<div class="login"> <div class="login">