From 79891db56b69e24f88478f8ff9980b6f62158400 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Tue, 5 Nov 2024 22:58:34 +0300 Subject: [PATCH 01/14] =?UTF-8?q?=D0=9E=D1=81=D0=BD=D0=BE=D0=B2=D0=BD?= =?UTF-8?q?=D0=BE=D0=B9=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D1=80=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BD=D0=B0=D0=BA=D0=BB=D0=B0=D0=B4=D0=BD?= =?UTF-8?q?=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Waybill/waybill_model.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 App/Waybill/waybill_model.py diff --git a/App/Waybill/waybill_model.py b/App/Waybill/waybill_model.py new file mode 100644 index 0000000..2928f24 --- /dev/null +++ b/App/Waybill/waybill_model.py @@ -0,0 +1,23 @@ +from Database.sql_provider import SQLProvider +from Database.select import select_list +from flask import current_app +from dataclasses import dataclass +import os + +@dataclass +class InfoRespronse: + result: tuple + error_message: str + status: bool + +sql_provider = SQLProvider(os.path.join(os.path.dirname(__file__), 'sql')) + + +def waybill_model(input_data) -> InfoRespronse: + _sql = sql_provider.get('waybill.sql', input_data) + result = select_list(current_app.config['db_config'], _sql) + if result is None: + return InfoRespronse((), + error_message = 'Ошибка в подключении к базе данных. Свяжитесь с администратором', + status=False) + return InfoRespronse(result, error_message='', status=True) \ No newline at end of file From 3f0c671cd1589f347eae2249e67967d6cc899fd8 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Sun, 17 Nov 2024 17:53:15 +0300 Subject: [PATCH 02/14] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D0=BE=D1=82=D0=BE?= =?UTF-8?q?=D0=B2=D0=BA=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=BE=D1=84=D0=BE?= =?UTF-8?q?=D1=80=D0=BC=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BD=D0=B0=D0=BA?= =?UTF-8?q?=D0=BB=D0=B0=D0=B4=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Waybill/templates/waybill.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/App/Waybill/templates/waybill.html b/App/Waybill/templates/waybill.html index f81ea5c..bef2fb3 100644 --- a/App/Waybill/templates/waybill.html +++ b/App/Waybill/templates/waybill.html @@ -7,4 +7,19 @@ -

Заглушка для примера составления накладной

\ No newline at end of file +

Новая накладная

+
+ {% for item in items %} +
+

{{ item['name'] }}

+

В наличии {{ item['count'] }}

+ +
+ {% endfor %} + +
+ + + \ No newline at end of file From 9d1656ef4eb2c6fce6fd52f60507e11bf4831082 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Thu, 21 Nov 2024 17:29:05 +0300 Subject: [PATCH 03/14] =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D1=80=D1=80=D0=B5?= =?UTF-8?q?=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D0=BE?= =?UTF-8?q?=D0=B5=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D1=8F=20Requests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Requests/description.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/App/Requests/description.txt b/App/Requests/description.txt index c21fa76..1b4d300 100644 --- a/App/Requests/description.txt +++ b/App/Requests/description.txt @@ -5,14 +5,14 @@ │   ├── select.py - файл для выполнения select-запросов к СУБД │   └── sql_provider.py - SQL-провайдер для формирования запроса к СУБД ├── __init__.py - файл для инициализации Requests как модуль -├── requests_model.py - - реализация модели варианта с запросами +├── requests_model.py - реализация модели варианта работы с запросами ├── sql │   ├── materials_names.sql - sql-запрос для получения списка материалоа заготовок │   ├── sellers_names.sql - sql-запрос для получения списка поставщиков │   ├── ship_seller.sql - sql-запрос для получения списка поставок поставщиком │   └── sklad_material.sql - sql-запрос для получения списка заготовок на складе ├── templates -│   ├── sellers_ship.html +│   ├── sellers_ship.html - шаблон для формы передачи параметров для запроса всех поставок выбранного поставщика │   ├── zagotovki.html - шаблон для формы передачи параметров для запроса количества заготовок на складе -│   └── zapros_menu.html - шаблон для формы передачи параметров для запроса всех поставок выбранного поставщика +│   └── zapros_menu.html - шаблон для выбора варианта отчёта └── zapros_menu.json - файл с названиями запросов и их ссылками \ No newline at end of file From 67babe43cd85864412aba639f62c5de88e06cd3f Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Thu, 21 Nov 2024 17:29:15 +0300 Subject: [PATCH 04/14] =?UTF-8?q?=D0=9E=D0=BF=D0=B8=D1=81=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D1=8F=20Report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Report/description.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 App/Report/description.txt diff --git a/App/Report/description.txt b/App/Report/description.txt new file mode 100644 index 0000000..3889def --- /dev/null +++ b/App/Report/description.txt @@ -0,0 +1,20 @@ +. +├── access - json-файлы доступа к вариантам для формирования отчета +│   ├── 1.json +│   └── 2.json +├── db +│   ├── DBconnect.py - коннектор к СУБД +│   ├── __init__.py - файл для инициализации db как модуль +│   ├── sql_provider.py - SQL-провайдер для формирования запроса к СУБД +│   └── work.py - файл для выполнения select и call запросов +├── __init__.py - файл для инициализации Report как модуль +├── report_model.py - реализация модели варианта работы с отчетами +├── reports.json - файл с названиями отчетов и их идентификаторы +├── sql +│   ├── check_report.sql - sql-запрос для проверки наличия отчета в БД +│   ├── sellers_report.sql - sql-запрос для просмотра отчета о поставках поставщиков +│   └── workpiece_report.sql - sql-запрос для просмотра отчета о поставках заготовок +└── templates + ├── OK.html - шаблон для вывода информации об успешном добавлении отчета в БД + ├── report_basic.html - шаблон для ввода параметров просмотра/создания отчета + └── report_menu.html - шаблон для выбора просмотра/создания отчета \ No newline at end of file From 351b6c97e514835044883c399842de93e2abb51d Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Thu, 21 Nov 2024 17:54:51 +0300 Subject: [PATCH 05/14] =?UTF-8?q?=D0=92=D1=80=D0=B5=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D0=BE=D0=B5=20=D0=BE=D1=84=D0=BE=D1=80=D0=BC=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=B0=D1=80=D1=82=D0=BE=D1=87=D0=B5?= =?UTF-8?q?=D0=BA=20=D0=B7=D0=B0=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Waybill/templates/waybill.html | 35 ++++++++++++++++--------- App/static/css/waybill.css | 42 ++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 13 deletions(-) create mode 100644 App/static/css/waybill.css diff --git a/App/Waybill/templates/waybill.html b/App/Waybill/templates/waybill.html index bef2fb3..4d17692 100644 --- a/App/Waybill/templates/waybill.html +++ b/App/Waybill/templates/waybill.html @@ -7,19 +7,28 @@ -

Новая накладная

-
- {% for item in items %} -
-

{{ item['name'] }}

-

В наличии {{ item['count'] }}

- -
- {% endfor %} - -
-
- +

Заглушка для примера составления накладной

+
+ +
+ Фото товара +

Название товара 1

+

Цена: 500 руб.

+

Количество: 10 шт.

+
+
+ Фото товара +

Название товара 2

+

Цена: 1200 руб.

+

Количество: 5 шт.

+
+
+ Фото товара +

Название товара 3

+

Цена: 800 руб.

+

Количество: 7 шт.

+
+ \ No newline at end of file diff --git a/App/static/css/waybill.css b/App/static/css/waybill.css new file mode 100644 index 0000000..3d04723 --- /dev/null +++ b/App/static/css/waybill.css @@ -0,0 +1,42 @@ +.container { + display: flex; + flex-wrap: wrap; + gap: 20px; + padding: 20px; + justify-content: center; +} +.card { + background: #fff; + border: 1px solid #ddd; + border-radius: 10px; + 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%; + height: 150px; + object-fit: cover; + border-radius: 5px; +} +.card h3 { + margin: 10px 0; + font-size: 18px; + color: #333; +} +.card p { + margin: 5px 0; + color: #555; +} +.price { + font-weight: bold; + color: #28a745; +} +.quantity { + font-weight: bold; + color: #007bff; +} \ No newline at end of file From a04941f872735d365db3637a3e75fda2873c0e7b Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Thu, 21 Nov 2024 18:40:38 +0300 Subject: [PATCH 06/14] =?UTF-8?q?=D0=9E=D1=81=D0=BD=D0=BE=D0=B2=D1=8B=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BE=D1=84=D0=BE=D1=80=D0=BC=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=BD=D0=B0=D0=BA=D0=BB=D0=B0=D0=B4=D0=BD?= =?UTF-8?q?=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Waybill/__init__.py | 4 ++- App/Waybill/templates/waybill.html | 56 +++++++++++++++++++----------- App/data/db_access.json | 2 +- App/static/css/waybill.css | 24 ++++++++----- App/templates/main_menu.html | 5 ++- 5 files changed, 58 insertions(+), 33 deletions(-) diff --git a/App/Waybill/__init__.py b/App/Waybill/__init__.py index c91ca76..66fdc1b 100644 --- a/App/Waybill/__init__.py +++ b/App/Waybill/__init__.py @@ -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') \ No newline at end of file + return render_template('waybill.html') + print(request.form) + return 'OK' \ No newline at end of file diff --git a/App/Waybill/templates/waybill.html b/App/Waybill/templates/waybill.html index 4d17692..529270f 100644 --- a/App/Waybill/templates/waybill.html +++ b/App/Waybill/templates/waybill.html @@ -3,32 +3,46 @@ Авторизация - +

Заглушка для примера составления накладной

-
- -
- Фото товара -

Название товара 1

-

Цена: 500 руб.

-

Количество: 10 шт.

+
+
+ +
+ Фото товара +

Название товара 1

+

Цена: 500 руб.

+

Количество: 10 шт.

+
+ +
+
+
+ Фото товара +

Название товара 2

+

Цена: 1200 руб.

+

Количество: 5 шт.

+
+ +
+
+
+ Фото товара +

Название товара 3

+

Цена: 800 руб.

+

Количество: 7 шт.

+
+ +
+
-
- Фото товара -

Название товара 2

-

Цена: 1200 руб.

-

Количество: 5 шт.

+
+ +
-
- Фото товара -

Название товара 3

-

Цена: 800 руб.

-

Количество: 7 шт.

-
-
- +
\ No newline at end of file diff --git a/App/data/db_access.json b/App/data/db_access.json index a6ba414..16a79c5 100644 --- a/App/data/db_access.json +++ b/App/data/db_access.json @@ -7,6 +7,6 @@ "report_bp"], "Бухгалтер": [ "report_bp"], - "Поставщик": [ + "": [ "waybill_bp"] } \ No newline at end of file diff --git a/App/static/css/waybill.css b/App/static/css/waybill.css index 3d04723..048abb5 100644 --- a/App/static/css/waybill.css +++ b/App/static/css/waybill.css @@ -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; } \ No newline at end of file diff --git a/App/templates/main_menu.html b/App/templates/main_menu.html index 288fbd0..fed3c58 100644 --- a/App/templates/main_menu.html +++ b/App/templates/main_menu.html @@ -19,7 +19,10 @@ {% else %} -

Not implemented

+ + {% endif %} {% else %} - {% if write %} + {% if is_write %} {% else %} From d69c127ef280be4490f8e9716285167b0225f989 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Fri, 22 Nov 2024 17:15:06 +0300 Subject: [PATCH 08/14] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D0=B0=D0=BD=D0=BD=D0=B0=D1=8F=20=D0=BF=D1=80=D0=BE=D1=86?= =?UTF-8?q?=D0=B5=D0=B4=D1=83=D1=80=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=BF?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=B0=D0=B2=D1=89=D0=B8=D0=BA=D0=BE=D0=B2=20?= =?UTF-8?q?+=20js=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=BA=D0=B8=20=D0=BC=D0=B5=D1=81=D1=8F=D1=86=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Report/__init__.py | 7 +++++-- App/Report/access/2.json | 2 +- App/Report/templates/report_basic.html | 6 ++++-- App/static/js/check.js | 7 +++++++ 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 App/static/js/check.js diff --git a/App/Report/__init__.py b/App/Report/__init__.py index 73ce20b..a824f02 100644 --- a/App/Report/__init__.py +++ b/App/Report/__init__.py @@ -1,6 +1,7 @@ from flask import request, Blueprint, render_template, session, url_for from checker import check_auth from os import path +from datetime import date from .report_model import view_report, make_report import json @@ -22,7 +23,8 @@ def create(): return render_template('report_basic.html', is_write=True, title='Создание отчетов', - items=report_list) + items=report_list, + date_today=date.today()) else: data = dict(id=request.form.get('category'), month=request.form.get('month'), @@ -48,7 +50,8 @@ def view(): return render_template('report_basic.html', is_write=False, title='Просмотр отчетов', - items=report_list) + items=report_list, + date_today=date.today()) else: data = dict(id=request.form.get('category'), month=request.form.get('month'), diff --git a/App/Report/access/2.json b/App/Report/access/2.json index d7a7537..270aaf5 100644 --- a/App/Report/access/2.json +++ b/App/Report/access/2.json @@ -3,5 +3,5 @@ "write" : ["Бухгалтер"], "read" : ["Управляющий"], "view" : "sellers_report", - "procedure" : "report_sellers" + "procedure" : "report_sellers_2" } \ No newline at end of file diff --git a/App/Report/templates/report_basic.html b/App/Report/templates/report_basic.html index ab2de71..1cf4630 100644 --- a/App/Report/templates/report_basic.html +++ b/App/Report/templates/report_basic.html @@ -5,6 +5,7 @@ {{ title }} +
@@ -12,7 +13,7 @@

{{ title }}

-
+ - +
{% if is_write %} @@ -51,3 +52,4 @@
+ diff --git a/App/static/js/check.js b/App/static/js/check.js new file mode 100644 index 0000000..e4546b0 --- /dev/null +++ b/App/static/js/check.js @@ -0,0 +1,7 @@ +function check_month(now_month) { + let selected_month = document.getElementById('month').value; + if (selected_month > now_month) { + alert('Невозможно сформировать отчет за будущий период!'); + return false; + } +} \ No newline at end of file From 8663c2a45180049c27ba526972a38c6f97b9cc5c Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Fri, 22 Nov 2024 20:04:04 +0300 Subject: [PATCH 09/14] =?UTF-8?q?Css-=D0=BF=D1=80=D0=B5=D0=BE=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Requests/templates/zapros_menu.html | 4 ++-- App/templates/main_menu.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/App/Requests/templates/zapros_menu.html b/App/Requests/templates/zapros_menu.html index e7d38b8..2030feb 100644 --- a/App/Requests/templates/zapros_menu.html +++ b/App/Requests/templates/zapros_menu.html @@ -10,11 +10,11 @@

Выберите вариант запроса

- +
diff --git a/App/templates/main_menu.html b/App/templates/main_menu.html index fed3c58..74b872b 100644 --- a/App/templates/main_menu.html +++ b/App/templates/main_menu.html @@ -14,15 +14,15 @@ {% if ses['access_user'] == 'internal_users' %}

Ваша роль: {{ ses['role'] }}

- + {% else %} - + {% endif %} {% else %}

{{ title }}

- + - +
{% if is_write %} diff --git a/App/static/js/check.js b/App/static/js/check.js index e4546b0..230c5ac 100644 --- a/App/static/js/check.js +++ b/App/static/js/check.js @@ -1,6 +1,7 @@ -function check_month(now_month) { +function check_month(now_month, now_year) { let selected_month = document.getElementById('month').value; - if (selected_month > now_month) { + let selected_year = document.getElementById('year').value; + if (selected_month > now_month && selected_year == now_year) { alert('Невозможно сформировать отчет за будущий период!'); return false; } From a85c1d9a41ab3434c3af32e8383e469b4c44c7cb Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Fri, 22 Nov 2024 21:51:33 +0300 Subject: [PATCH 12/14] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BD=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=BE=D1=82=D1=87=D1=91=D1=82=D0=B0=20=D0=BA=D0=B0=D0=BA=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D0=B4=D1=83=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Report/report_model.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/App/Report/report_model.py b/App/Report/report_model.py index 18ce3a2..468a77e 100644 --- a/App/Report/report_model.py +++ b/App/Report/report_model.py @@ -12,9 +12,8 @@ class InfoRespronse: status: bool def check_report(input_data: dict) -> bool: - _sql = sql_provider.get('check_report.sql', input_data) - result = select_list(current_app.config['db_config'], _sql) - if result is None or result[0]['exist'] == 0: + result = procedure(current_app.config['db_config'], 'check_report', tuple(input_data.values())) + if result is None or result['exist'] == 0: return False return True From e11d0411b152cf70f806045a67ae9874fa276bd6 Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Fri, 22 Nov 2024 21:56:46 +0300 Subject: [PATCH 13/14] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20sql-=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=B0?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D1=8F=20=D0=BE=D1=82=D1=87=D1=91?= =?UTF-8?q?=D1=82=D0=B0=20+=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Report/description.txt | 3 +-- App/Report/sql/check_report.sql | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 App/Report/sql/check_report.sql diff --git a/App/Report/description.txt b/App/Report/description.txt index 3889def..0572a31 100644 --- a/App/Report/description.txt +++ b/App/Report/description.txt @@ -10,8 +10,7 @@ ├── __init__.py - файл для инициализации Report как модуль ├── report_model.py - реализация модели варианта работы с отчетами ├── reports.json - файл с названиями отчетов и их идентификаторы -├── sql -│   ├── check_report.sql - sql-запрос для проверки наличия отчета в БД +├── sql  │   ├── sellers_report.sql - sql-запрос для просмотра отчета о поставках поставщиков │   └── workpiece_report.sql - sql-запрос для просмотра отчета о поставках заготовок └── templates diff --git a/App/Report/sql/check_report.sql b/App/Report/sql/check_report.sql deleted file mode 100644 index 7e6106a..0000000 --- a/App/Report/sql/check_report.sql +++ /dev/null @@ -1,4 +0,0 @@ -SELECT EXISTS ( - SELECT 1 FROM reports - WHERE report_category_id = '$id' AND (month = '$month' AND year = '$year') -) AS exist; \ No newline at end of file From 1836ce30fcb2a95cb1b4d9007e315fe4b931bfab Mon Sep 17 00:00:00 2001 From: Anton Kamalov Date: Fri, 22 Nov 2024 22:54:19 +0300 Subject: [PATCH 14/14] =?UTF-8?q?=D0=95=D1=89=D1=91=20=D0=BE=D0=B4=D0=BD?= =?UTF-8?q?=D0=BE=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/Report/description.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/App/Report/description.txt b/App/Report/description.txt index 0572a31..6908431 100644 --- a/App/Report/description.txt +++ b/App/Report/description.txt @@ -1,19 +1,16 @@ . -├── access - json-файлы доступа к вариантам для формирования отчета -│   ├── 1.json -│   └── 2.json ├── db │   ├── DBconnect.py - коннектор к СУБД │   ├── __init__.py - файл для инициализации db как модуль │   ├── sql_provider.py - SQL-провайдер для формирования запроса к СУБД │   └── work.py - файл для выполнения select и call запросов ├── __init__.py - файл для инициализации Report как модуль -├── report_model.py - реализация модели варианта работы с отчетами -├── reports.json - файл с названиями отчетов и их идентификаторы +├── report_model.py - реализация модели варианта работы с отчётами +├── reports.json - файл с информацией о вариантах отчётов ├── sql  -│   ├── sellers_report.sql - sql-запрос для просмотра отчета о поставках поставщиков -│   └── workpiece_report.sql - sql-запрос для просмотра отчета о поставках заготовок +│   ├── sellers_report.sql - sql-запрос для просмотра отчёта о поставках поставщиков +│   └── workpiece_report.sql - sql-запрос для просмотра отчёта о поставках заготовок └── templates ├── OK.html - шаблон для вывода информации об успешном добавлении отчета в БД - ├── report_basic.html - шаблон для ввода параметров просмотра/создания отчета - └── report_menu.html - шаблон для выбора просмотра/создания отчета \ No newline at end of file + ├── report_basic.html - шаблон для ввода параметров просмотра/создания отчёта + └── report_menu.html - шаблон для выбора просмотра/создания отчёта \ No newline at end of file