File size: 3,134 Bytes
2ebd750
 
 
 
 
 
 
 
 
 
 
ada8f46
 
2ebd750
 
 
 
f81195b
 
2ebd750
 
ada8f46
d719a61
 
 
 
 
ada8f46
2ebd750
 
 
 
 
 
f81195b
 
 
2ebd750
 
 
 
 
 
ada8f46
f7213ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ada8f46
 
 
 
f81195b
ada8f46
2ebd750
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Система учета товаров</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="container">
        <h1>Система учета товаров</h1>
        
        <!-- Форма добавления товара -->
        <form id="productForm">
            <input type="text" id="productName" placeholder="Название товара" required>
            <input type="number" id="purchasePrice" placeholder="Приходная цена" required>
            <input type="number" id="salePrice" placeholder="Отпускная цена" required>
            <input type="number" id="quantity" placeholder="Остаток (пачек)" required>
            <input type="number" id="itemsPerPack" placeholder="Количество штук в пачке" required>
            <button type="submit">Добавить товар</button>
        </form>

        <!-- Поиск по товарам -->
        <div class="search-container">
            <input type="text" id="searchInput" placeholder="Поиск по названию товара">
        </div>

        <!-- Таблица товаров -->
        <table id="productTable">
            <thead>
                <tr>
                    <th>Название</th>
                    <th>Приходная цена</th>
                    <th>Отпускная цена</th>
                    <th>Остаток (пачек)</th>
                    <th>Штук в пачке</th>
                    <th>Действия</th>
                </tr>
            </thead>
            <tbody>
                <!-- Строки с товарами будут добавляться сюда -->
            </tbody>
        </table>

        <!-- Корзина -->
        <div class="cart">
            <h2>Корзина</h2>
            <table id="cartTable">
                <thead>
                    <tr>
                        <th>Название</th>
                        <th>Количество</th>
                        <th>Цена за единицу</th>
                        <th>Итого</th>
                        <th>Действия</th>
                    </tr>
                </thead>
                <tbody>
                    <!-- Товары в корзине будут добавляться сюда -->
                </tbody>
            </table>
            <button id="sellCartBtn" onclick="sellCart()">Продать товары из корзины</button>
        </div>

        <!-- Статистика продаж -->
        <div class="stats">
            <h2>Статистика продаж за месяц</h2>
            <p>Общее количество проданных товаров: <span id="totalSold">0</span></p>
            <p>Общая выручка: <span id="totalRevenue">0</span></p>
        </div>
    </div>
    <script src="script.js"></script>
</body>
</html>