db-connect-tools 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
database/__init__.py ADDED
File without changes
database/database.py ADDED
@@ -0,0 +1,180 @@
1
+ import pymysql
2
+ from pymysql import cursors
3
+
4
+
5
+ class Database:
6
+ def __init__(self):
7
+ self.connection=pymysql.connect(
8
+ host='localhost',
9
+ user='root',
10
+ password='',
11
+ database='demo',
12
+ cursorclass=pymysql.cursors.DictCursor
13
+ )
14
+
15
+ def check_auth(self, log, passw):
16
+ with self.connection.cursor() as cursor:
17
+ sql="SELECT * FROM users WHERE login=%s AND password=%s"
18
+ cursor.execute(sql, (log, passw))
19
+ return cursor.fetchone()
20
+
21
+ # id_pr | name | description | category_id | supplier_id | manufacturer_id | price | quantity | discount | img
22
+ def get_products(self):
23
+ with self.connection.cursor() as cursor:
24
+ sql = """
25
+ SELECT products.id_pr,
26
+ products.name AS pr_name,
27
+ products.description,
28
+ products.price,
29
+ products.quantity,
30
+ products.discount,
31
+ products.img,
32
+ categories.name AS cat_name,
33
+ manufacturers.name AS man_name,
34
+ suppliers.name AS sup_name
35
+ FROM products
36
+ JOIN categories ON products.category_id = categories.id_cat
37
+ JOIN manufacturers ON products.manufacturer_id = manufacturers.id_man
38
+ JOIN suppliers ON products.supplier_id = suppliers.id_supl
39
+ """
40
+ cursor.execute(sql)
41
+ return cursor.fetchall()
42
+
43
+ def add_product(self, name, descr, categ, supp, man, price, quant, disc, image):
44
+ with self.connection.cursor() as cursor:
45
+ sql = """
46
+ INSERT INTO products(name, description, category_id, supplier_id, manufacturer_id, price, quantity, discount, img)
47
+ VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)
48
+ """
49
+ cursor.execute(sql, (name, descr, categ, supp, man, price, quant, disc, image))
50
+ self.connection.commit()
51
+ return True
52
+
53
+
54
+ def update_product(self, id_pr, name, description, category_id, supplier_id, manufacturer_id, price, quantity, discount, img):
55
+ with self.connection.cursor() as cursor:
56
+ sql = """
57
+ UPDATE products
58
+ SET name=%s, description=%s, category_id=%s, supplier_id=%s,
59
+ manufacturer_id=%s, price=%s, quantity=%s, discount=%s, img=%s
60
+ WHERE id_pr=%s
61
+ """
62
+ cursor.execute(sql, (name, description, category_id, supplier_id, manufacturer_id, price, quantity, discount, img, id_pr))
63
+ self.connection.commit()
64
+ return True
65
+
66
+
67
+ def delete_product(self, get_id):
68
+ with self.connection.cursor() as cursor:
69
+ sql="DELETE FROM products WHERE id_pr=%s"
70
+ cursor.execute(sql, (get_id))
71
+ self.connection.commit()
72
+ return True
73
+
74
+
75
+ def get_orders(self):
76
+ with self.connection.cursor() as cursor:
77
+ self.connection.commit()
78
+ sql="""
79
+ SELECT orders.id_ord,
80
+ orders.article,
81
+ users.full_name,
82
+ pickup_points.address,
83
+ orders.order_date,
84
+ orders.delivery_date,
85
+ statuses.name AS stat_name
86
+ FROM orders
87
+ JOIN users ON orders.client_id=users.id_user
88
+ JOIN pickup_points ON orders.address_pick=pickup_points.id_pick
89
+ JOIN statuses ON orders.status_id=statuses.id_stat
90
+ ORDER BY orders.order_date DESC
91
+ """
92
+ cursor.execute(sql)
93
+ return cursor.fetchall()
94
+
95
+ def update_order(self, order_id, status_id, address_pick, delivery_date):
96
+ with self.connection.cursor() as cursor:
97
+ sql = "UPDATE orders SET status_id=%s, address_pick=%s, delivery_date=%s WHERE id_ord=%s"
98
+ cursor.execute(sql, (status_id, address_pick, delivery_date, order_id))
99
+ self.connection.commit()
100
+ return True
101
+
102
+
103
+ def delete_order(self, order_id):
104
+ with self.connection.cursor() as cursor:
105
+
106
+ sql_items = "DELETE FROM order_items WHERE order_id=%s"
107
+ cursor.execute(sql_items, (order_id,))
108
+
109
+ sql_order="DELETE FROM orders WHERE id_ord=%s"
110
+ cursor.execute(sql_order, (order_id,))
111
+
112
+ self.connection.commit()
113
+ return True
114
+
115
+
116
+ # ---------------------------------МЕТОДЫ ДЛЯ ЗАКАЗОВ---------------------------------
117
+
118
+ def get_pickup_points(self):
119
+ with self.connection.cursor() as cursor:
120
+ cursor.execute("SELECT * FROM pickup_points")
121
+ return cursor.fetchall()
122
+
123
+ def get_statuses(self):
124
+ with self.connection.cursor() as cursor:
125
+ cursor.execute("SELECT * FROM statuses")
126
+ return cursor.fetchall()
127
+
128
+ def get_next_article(self):
129
+ with self.connection.cursor() as cursor:
130
+ cursor.execute("SELECT MAX(article) as max_article FROM orders")
131
+ result = cursor.fetchone()
132
+ max_art = result['max_article'] if result['max_article'] else 1000
133
+ return max_art + 1
134
+
135
+ def create_order(self, order_data, items):
136
+ # id_ord | client_id | article | status_id | address_pick | order_date | delivery_date | overall_price
137
+ with self.connection.cursor() as cursor:
138
+ cursor_order="""
139
+ INSERT INTO orders (client_id, article, status_id, address_pick, order_date, delivery_date, overall_price)
140
+ VALUES (%s, %s, %s, %s, NOW(), %s, %s)"""
141
+ cursor.execute(cursor_order, (
142
+ order_data['client_id'],
143
+ order_data['article'],
144
+ order_data['status_id'],
145
+ order_data['address_pick'],
146
+ order_data['delivery_data'],
147
+ order_data['overall_price']
148
+ ))
149
+ last_id=cursor.lastrowid
150
+ sql_item = "INSERT INTO order_items (order_id, product_id, quantity) VALUES (%s, %s, %s)"
151
+ for item in items:
152
+ cursor.execute(sql_item, (last_id, item['product_id'], item['quantity']))
153
+
154
+ cursor_update="""UPDATE products
155
+ SET quantity=quantity-%s
156
+ WHERE id_pr = %s"""
157
+ cursor.execute(cursor_update, (item['quantity'], item['product_id']))
158
+
159
+ self.connection.commit()
160
+ return last_id
161
+
162
+
163
+
164
+ def get_categories(self):
165
+ with self.connection.cursor() as cursor:
166
+ sql="SELECT * FROM categories"
167
+ cursor.execute(sql)
168
+ return cursor.fetchall()
169
+
170
+ def get_suppliers(self):
171
+ with self.connection.cursor() as cursor:
172
+ sql = "SELECT * FROM suppliers"
173
+ cursor.execute(sql)
174
+ return cursor.fetchall()
175
+
176
+ def get_manu(self):
177
+ with self.connection.cursor() as cursor:
178
+ sql="SELECT * FROM manufacturers"
179
+ cursor.execute(sql)
180
+ return cursor.fetchall()
database/img.png ADDED
Binary file
database/script.sql ADDED
@@ -0,0 +1,142 @@
1
+
2
+ CREATE DATABASE IF NOT EXISTS demo;
3
+ USE demo;
4
+
5
+ CREATE TABLE roles (
6
+ id_role INT AUTO_INCREMENT PRIMARY KEY,
7
+ name VARCHAR(50) NOT NULL UNIQUE
8
+ );
9
+ CREATE TABLE users (
10
+ id_user INT AUTO_INCREMENT PRIMARY KEY,
11
+ full_name VARCHAR(150) NOT NULL,
12
+ login VARCHAR(100) NOT NULL UNIQUE,
13
+ password VARCHAR(100) NOT NULL,
14
+ role_id INT NOT NULL,
15
+ FOREIGN KEY (role_id) REFERENCES roles(id_role)
16
+ );
17
+ INSERT INTO roles (name) VALUES ('Клиент'), ('Менеджер'), ('Администратор');
18
+ INSERT INTO users (full_name, login, password, role_id) VALUES
19
+ ('Иванов Иван Иванович', 'client', '123', 1),
20
+ ('Петрова Мария Сергеевна', 'manager', '123', 2),
21
+ ('Сидоров Алексей Петрович','admin', '123', 3);
22
+
23
+ CREATE TABLE categories(
24
+ id_cat INT AUTO_INCREMENT PRIMARY KEY,
25
+ name VARCHAR(255) NOT NULL UNIQUE
26
+ );
27
+
28
+ INSERT INTO categories (name) VALUES
29
+ ('Кроссовки'), ('Ботинки'), ('Туфли'), ('Сапоги'), ('Сандалии');
30
+
31
+ CREATE TABLE suppliers (
32
+ id_supl INT AUTO_INCREMENT PRIMARY KEY,
33
+ name VARCHAR(150) NOT NULL UNIQUE
34
+ );
35
+
36
+ INSERT INTO suppliers (name) VALUES
37
+ ('ООО СпортТрейд'), ('ИП Краснов'), ('ООО ЕвроОбувь');
38
+
39
+ CREATE TABLE manufacturers(
40
+ id_man INT AUTO_INCREMENT PRIMARY KEY,
41
+ name VARCHAR(150) NOT NULL UNIQUE
42
+ );
43
+
44
+ INSERT INTO manufacturers(name) VALUES
45
+ ('Nike'),
46
+ ('Adidas'),
47
+ ('Ecco'),
48
+ ('Respect'),
49
+ ('Zara Shoes');
50
+
51
+ CREATE TABLE products (
52
+ id_pr INT AUTO_INCREMENT PRIMARY KEY,
53
+ name VARCHAR(200) NOT NULL,
54
+ description VARCHAR(255),
55
+ category_id INT NOT NULL,
56
+ supplier_id INT NOT NULL,
57
+ manufacturer_id INT NOT NULL,
58
+ price DECIMAL(10,2) NOT NULL,
59
+ quantity INT NOT NULL DEFAULT 0,
60
+ discount INT NOT NULL DEFAULT 0,
61
+ img VARCHAR(300) DEFAULT NULL,
62
+ FOREIGN KEY (category_id) REFERENCES categories(id_cat),
63
+ FOREIGN KEY (supplier_id) REFERENCES suppliers(id_supl),
64
+ FOREIGN KEY (manufacturer_id) REFERENCES manufacturers(id_man)
65
+ );
66
+
67
+ INSERT INTO products(name, description, category_id, supplier_id, manufacturer_id, price, quantity, discount, img) VALUES
68
+ ('Nike Air Max 90', 'Для бега', 1, 1, 1, 8990.00, 15, 0, 'nikeair.png'),
69
+ ('Adidas Ultraboost', 'Для ходьбы', 1, 1, 1, 12500.00, 8, 20, 'adidasultra.png'),
70
+ ('Ecco Track 25', 'Зимние ботинки', 2, 3, 3, 9800.00, 5, 10, 'ecco.png'),
71
+ ('Ralf Ringer Classic', 'Праздничные туфли', 3, 2, 4, 6500.00, 0, 0, 'ralf.png'),
72
+ ('Rieker Ankle Boot', 'Весенние ботинки', 2, 3, 5, 7200.00, 12, 5, 'rieker.png'),
73
+ ('Nike Tanjun', 'Ультратонкие', 1, 1, 1, 5490.00, 20, 25, 'niketan.png'),
74
+ ('Adidas Gazelle', 'Редкие', 1, 1, 2, 7800.00, 3, 0, 'gazelle.png');
75
+
76
+ INSERT INTO products (name, description, category_id, supplier_id, manufacturer_id, price, quantity, discount, img)
77
+ VALUES
78
+ ('Кроссовки 1', 'Тестик 1', 1, 1, 1, 8990.00, 15, 0, 'test1.png'),
79
+ ('Кроссовки 2', 'Тестик 2', 1, 1, 1, 12500.00, 20, 20, 'test2.png');
80
+
81
+ CREATE TABLE pickup_points(
82
+ id_pick INT AUTO_INCREMENT PRIMARY KEY,
83
+ address VARCHAR(255) NOT NULL
84
+ );
85
+
86
+ INSERT INTO pickup_points(address)
87
+ VALUES
88
+ ('ул. Сосновая 1'),
89
+ ('ул. Березовая 2'),
90
+ ('ул. Лесная 3');
91
+
92
+ CREATE TABLE statuses(
93
+ id_stat INT AUTO_INCREMENT PRIMARY KEY,
94
+ name VARCHAR(255)
95
+ );
96
+
97
+ INSERT INTO statuses(name) VALUES
98
+ ('Новый'),
99
+ ('Отменен'),
100
+ ('В обработке'),
101
+ ('Отправлен'),
102
+ ('В доставке'),
103
+ ('Доставлен');
104
+
105
+
106
+ CREATE TABLE orders(
107
+ id_ord INT AUTO_INCREMENT PRIMARY KEY,
108
+ client_id INT,
109
+ article INT NOT NULL,
110
+ status_id INT,
111
+ address_pick INT NOT NULL,
112
+ order_date DATETIME NOT NULL DEFAULT NOW(),
113
+ delivery_date DATETIME NOT NULL,
114
+ overall_price DECIMAL(10, 2),
115
+ FOREIGN KEY (client_id) REFERENCES users(id_user),
116
+ FOREIGN KEY (address_pick) REFERENCES pickup_points(id_pick),
117
+ FOREIGN KEY (status_id) REFERENCES statuses(id_stat)
118
+ );
119
+
120
+ INSERT INTO orders (client_id, article, status_id, address_pick, order_date, delivery_date) VALUES
121
+ (1, 1001, 1, 1, '2025-03-01 10:00:00', '2025-03-05 12:00:00'),
122
+ (1, 1002, 1, 1, '2025-03-10 09:00:00', '2025-03-15 12:00:00'),
123
+ (2, 1003, 2, 2, '2025-03-18 14:00:00', '2025-03-25 12:00:00'),
124
+ (3, 1004, 4, 3, '2025-03-20 11:00:00', '2025-03-26 12:00:00'),
125
+ (2, 1005, 5, 2, '2025-03-22 16:00:00', '2025-03-30 12:00:00');
126
+
127
+ CREATE TABLE order_items(
128
+ id_order_item INT AUTO_INCREMENT PRIMARY KEY,
129
+ order_id INT NOT NULL,
130
+ product_id INT NOT NULL,
131
+ quantity INT,
132
+ FOREIGN KEY (order_id) REFERENCES orders(id_ord),
133
+ FOREIGN KEY (product_id) REFERENCES products(id_pr)
134
+ );
135
+
136
+ INSERT INTO order_items(order_id, product_id, quantity) VALUES
137
+ (1, 1, 1),
138
+ (1, 3, 1),
139
+ (2, 6, 2),
140
+ (3, 3, 1),
141
+ (4, 1, 1),
142
+ (5, 6, 3);
@@ -0,0 +1,41 @@
1
+ Metadata-Version: 2.4
2
+ Name: db-connect-tools
3
+ Version: 0.1.0
4
+ Summary: Database connector tools packaged for PyPI
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: PyQt6
8
+ Requires-Dist: pymysql
9
+
10
+ # ОПИСАНИЕ КОНСОЛЬНОЙ ПРОГРАММЫ ДЛЯ
11
+ ## Перед запуском:
12
+
13
+ 1. Создать базу данных: выполнить скрипт database/database.sql в MySQL.
14
+ 2. В main.py указать верные host, user, password, database.
15
+ 3. Установить библиотеки: PyQt6, pymysql
16
+
17
+ ## Запуск через команду: python main.py
18
+
19
+ ## Учётные записи: ##
20
+ - admin / 123
21
+ - manager / 123
22
+ - client / 123
23
+ - кнопка "Войти как гость"
24
+
25
+ ## Состав проекта: ##
26
+ - main.py - команда для запуска
27
+ - readme.md - описание проекта
28
+ - schemas/er_model.pdf - ER-модель базы данных
29
+ - database/database.sql - дамп базы данных
30
+ - images - фото для проекта
31
+ - ui - файлы интерфейсов
32
+ - converted_ui - конвертированные .ui в .py
33
+ - windows - файлы .py с функционалом
34
+
35
+ ## Описание ролей программы: ##
36
+ - гость - просмотр товаров
37
+ - авторизированный клиент - просмотр товаров
38
+ - менеджер - просмотр товаров и заказов, поиск/фильтрация/сорт товаров
39
+ - администратор - просмотр товаров, заказов + добавление/редактирование/удаление товаров и заказов
40
+
41
+
@@ -0,0 +1,29 @@
1
+ database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ database/database.py,sha256=FFCVq3_-h78OiaMH3Ww4YA8QuhWcMH8YCmnCu5ehilg,7097
3
+ database/img.png,sha256=a4mQJUsgkYtuhntYkfxDdlZSaPKh0w41R5eCxGKnNN8,74323
4
+ database/script.sql,sha256=geLIhY_iJ2VusyHtJYbBcvg5W6spGlf3veOYt0Ee8oY,4974
5
+ ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ ui/dialog_products.ui,sha256=8bI5XxmNYHGSldbZzE9sKlib7_wid2ZDs-jprVKu1AA,5065
7
+ ui/frame_prod.ui,sha256=skrD61bwyrr8yggoNf-HbOZ_EoBV5610GKoOFOXnPwQ,8067
8
+ ui/login.ui,sha256=IAZVesprmd_suBi8Qheb_-2CuUvV9Uig2eKQdahYDuA,1705
9
+ ui/main_window_demo.ui,sha256=QyPzFACNrRT73epSQisl8Pqil33s5-ES962Ivb8Qebs,7941
10
+ ui/order_dialog.ui,sha256=B7P37OaDO8yLtM8t7cSqeWqVcL4-zc7Vs9C4kOEMi3Q,4336
11
+ ui/orders_frame.ui,sha256=9p7bfjVZyefZ3wWZKkQ35RNiGvDG2q9S-PnjI4XtLfE,5838
12
+ ui_to_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ ui_to_py/dialog_products.py,sha256=pLeajtQQbMMsgUXMk74JEO_EAtO_fmI3wZ4uTXFf82Y,7233
14
+ ui_to_py/frame_prod.py,sha256=ZR-USXgyItND3O3-YfGwauGpDKsmDTYPuIY3o2lo_FI,8345
15
+ ui_to_py/login.py,sha256=epqx6l7IeOBM0RASwJMUktwCvEADlkL62SEczzaVMgo,2617
16
+ ui_to_py/main_win.py,sha256=8m8PL5Nae_ZckJ9OEb5PYrscRWwN8iG7e4Uerf3KxYc,9760
17
+ ui_to_py/order_dialog.py,sha256=ycN9ZJkgFwNqUUbdp9InveAOHb7esIn5cfIjirCgnSw,6021
18
+ ui_to_py/orders_frame.py,sha256=UIg1GP39CWXO0u8TAujajbezfP3l6h_VMiCsi_j9Q_M,6016
19
+ windows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
+ windows/auth.py,sha256=XjFeEJ9vv7y9k0T7RB8-XHpj1aXHxaV2MDmfwudDq9Q,1116
21
+ windows/dialog_product.py,sha256=4maZHP_6VHpHjDzL3RXKYgYscqbIgJ14AHJgu22_MmM,3511
22
+ windows/main_win.py,sha256=8Rj0dKHNEgTdjVTZxXvXxb0fWdyVV4e2sI3bD4aaZeQ,11299
23
+ windows/order_card.py,sha256=odqULRrkxTGKyolCEXPif3t4wR_kZSp6_jqQZNpJcLo,815
24
+ windows/order_dialog.py,sha256=Kj_NJvlO8e7sFZD46ENmjpkncb5zoHs1PLPQqaiixAw,4932
25
+ windows/product_card.py,sha256=U2GC3N5x7u3lizonyb7Vc-Y3hVeAwfe1t8TCbi1LY4g,2113
26
+ db_connect_tools-0.1.0.dist-info/METADATA,sha256=6atYWaZNHVWtDCEOqb5pDEOUiLpJgz-qeiajyaUyZZ0,1697
27
+ db_connect_tools-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
28
+ db_connect_tools-0.1.0.dist-info/top_level.txt,sha256=BwbXG94ZSt6FWXjS-SBpsbuAK50FqJjur8uye7AY6E4,29
29
+ db_connect_tools-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,4 @@
1
+ database
2
+ ui
3
+ ui_to_py
4
+ windows
ui/__init__.py ADDED
File without changes
ui/dialog_products.ui ADDED
@@ -0,0 +1,172 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>Dialog</class>
4
+ <widget class="QDialog" name="Dialog">
5
+ <property name="geometry">
6
+ <rect>
7
+ <x>0</x>
8
+ <y>0</y>
9
+ <width>500</width>
10
+ <height>500</height>
11
+ </rect>
12
+ </property>
13
+ <property name="sizePolicy">
14
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
15
+ <horstretch>0</horstretch>
16
+ <verstretch>0</verstretch>
17
+ </sizepolicy>
18
+ </property>
19
+ <property name="minimumSize">
20
+ <size>
21
+ <width>500</width>
22
+ <height>500</height>
23
+ </size>
24
+ </property>
25
+ <property name="windowTitle">
26
+ <string>Работа с товарами</string>
27
+ </property>
28
+ <layout class="QVBoxLayout" name="verticalLayout">
29
+ <item>
30
+ <layout class="QFormLayout" name="formLayout">
31
+ <item row="0" column="0">
32
+ <widget class="QLabel" name="label">
33
+ <property name="text">
34
+ <string>Название:</string>
35
+ </property>
36
+ </widget>
37
+ </item>
38
+ <item row="1" column="0">
39
+ <widget class="QLabel" name="label_2">
40
+ <property name="text">
41
+ <string>Описание:</string>
42
+ </property>
43
+ </widget>
44
+ </item>
45
+ <item row="2" column="0">
46
+ <widget class="QLabel" name="label_3">
47
+ <property name="text">
48
+ <string>Категория:</string>
49
+ </property>
50
+ </widget>
51
+ </item>
52
+ <item row="3" column="0">
53
+ <widget class="QLabel" name="label_4">
54
+ <property name="text">
55
+ <string>Поставщик:</string>
56
+ </property>
57
+ </widget>
58
+ </item>
59
+ <item row="4" column="0">
60
+ <widget class="QLabel" name="label_5">
61
+ <property name="text">
62
+ <string>Производитель:</string>
63
+ </property>
64
+ </widget>
65
+ </item>
66
+ <item row="5" column="0">
67
+ <widget class="QLabel" name="label_6">
68
+ <property name="text">
69
+ <string>Цена:</string>
70
+ </property>
71
+ </widget>
72
+ </item>
73
+ <item row="6" column="0">
74
+ <widget class="QLabel" name="label_7">
75
+ <property name="text">
76
+ <string>Количество на складе:</string>
77
+ </property>
78
+ </widget>
79
+ </item>
80
+ <item row="7" column="0">
81
+ <widget class="QLabel" name="label_8">
82
+ <property name="text">
83
+ <string>Скидка:</string>
84
+ </property>
85
+ </widget>
86
+ </item>
87
+ <item row="8" column="0">
88
+ <widget class="QLabel" name="label_9">
89
+ <property name="text">
90
+ <string>Фото</string>
91
+ </property>
92
+ </widget>
93
+ </item>
94
+ <item row="0" column="1">
95
+ <widget class="QLineEdit" name="lineEdit_name"/>
96
+ </item>
97
+ <item row="1" column="1">
98
+ <widget class="QPlainTextEdit" name="plainTextEdit_descr"/>
99
+ </item>
100
+ <item row="8" column="1">
101
+ <widget class="QLineEdit" name="lineEdit_photo_path">
102
+ <property name="enabled">
103
+ <bool>false</bool>
104
+ </property>
105
+ </widget>
106
+ </item>
107
+ <item row="10" column="1">
108
+ <widget class="QPushButton" name="btn_save">
109
+ <property name="styleSheet">
110
+ <string notr="true">background-color: #00FA9A;
111
+ color: black;</string>
112
+ </property>
113
+ <property name="text">
114
+ <string>Сохранить</string>
115
+ </property>
116
+ </widget>
117
+ </item>
118
+ <item row="10" column="0">
119
+ <widget class="QPushButton" name="btn_back">
120
+ <property name="text">
121
+ <string>Назад</string>
122
+ </property>
123
+ </widget>
124
+ </item>
125
+ <item row="9" column="1">
126
+ <widget class="QPushButton" name="btn_choose_photo">
127
+ <property name="text">
128
+ <string>Загрузить фото</string>
129
+ </property>
130
+ </widget>
131
+ </item>
132
+ <item row="2" column="1">
133
+ <widget class="QComboBox" name="comboBox_cat"/>
134
+ </item>
135
+ <item row="3" column="1">
136
+ <widget class="QComboBox" name="comboBox_sup"/>
137
+ </item>
138
+ <item row="4" column="1">
139
+ <widget class="QComboBox" name="comboBox_man"/>
140
+ </item>
141
+ <item row="5" column="1">
142
+ <widget class="QDoubleSpinBox" name="doubleSpinBox_price">
143
+ <property name="decimals">
144
+ <number>2</number>
145
+ </property>
146
+ <property name="minimum">
147
+ <double>100.000000000000000</double>
148
+ </property>
149
+ <property name="maximum">
150
+ <double>100000.990000000005239</double>
151
+ </property>
152
+ <property name="singleStep">
153
+ <double>100.000000000000000</double>
154
+ </property>
155
+ <property name="value">
156
+ <double>1000.000000000000000</double>
157
+ </property>
158
+ </widget>
159
+ </item>
160
+ <item row="6" column="1">
161
+ <widget class="QSpinBox" name="spinBox_quantity"/>
162
+ </item>
163
+ <item row="7" column="1">
164
+ <widget class="QSpinBox" name="spinBox_disc"/>
165
+ </item>
166
+ </layout>
167
+ </item>
168
+ </layout>
169
+ </widget>
170
+ <resources/>
171
+ <connections/>
172
+ </ui>