File size: 37,221 Bytes
3bd7a44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>入库管理系统</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        /* 自定义样式 */
        .fade-in {
            animation: fadeIn 0.3s ease-in-out;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .custom-scrollbar::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }
        
        .custom-scrollbar::-webkit-scrollbar-track {
            background: #f1f1f1;
        }
        
        .custom-scrollbar::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 3px;
        }
        
        .custom-scrollbar::-webkit-scrollbar-thumb:hover {
            background: #555;
        }
        
        .highlight-row {
            transition: all 0.2s ease;
        }
        
        .highlight-row:hover {
            background-color: #f0f9ff;
            transform: scale(1.01);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
    </style>
</head>
<body class="bg-gray-50">
    <div class="min-h-screen flex flex-col">
        <!-- 顶部导航栏 -->
        <header class="bg-blue-600 text-white shadow-md">
            <div class="container mx-auto px-4 py-3 flex justify-between items-center">
                <div class="flex items-center space-x-2">
                    <i class="fas fa-boxes text-2xl"></i>
                    <h1 class="text-xl font-bold">仓储管理系统</h1>
                </div>
                <div class="flex items-center space-x-4">
                    <div class="relative group">
                        <button class="flex items-center space-x-1">
                            <i class="fas fa-bell"></i>
                            <span class="hidden md:inline">通知</span>
                            <span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
                        </button>
                    </div>
                    <div class="relative group">
                        <button class="flex items-center space-x-1">
                            <i class="fas fa-user-circle text-xl"></i>
                            <span class="hidden md:inline">管理员</span>
                        </button>
                        <div class="absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 z-50 hidden group-hover:block">
                            <a href="#" class="block px-4 py-2 text-gray-800 hover:bg-blue-100">个人中心</a>
                            <a href="#" class="block px-4 py-2 text-gray-800 hover:bg-blue-100">系统设置</a>
                            <div class="border-t border-gray-200"></div>
                            <a href="#" class="block px-4 py-2 text-gray-800 hover:bg-blue-100">退出登录</a>
                        </div>
                    </div>
                </div>
            </div>
        </header>

        <!-- 主内容区 -->
        <div class="flex flex-1">
            <!-- 侧边栏 -->
            <aside class="w-64 bg-white shadow-md hidden md:block">
                <nav class="p-4">
                    <div class="mb-6">
                        <h2 class="text-gray-500 uppercase text-xs font-semibold tracking-wider">主菜单</h2>
                        <ul class="mt-2 space-y-1">
                            <li>
                                <a href="#" class="flex items-center px-3 py-2 text-gray-600 hover:bg-blue-50 rounded-md">
                                    <i class="fas fa-tachometer-alt mr-3"></i>
                                    <span>控制面板</span>
                                </a>
                            </li>
                            <li>
                                <a href="#" class="flex items-center px-3 py-2 bg-blue-50 text-blue-600 rounded-md">
                                    <i class="fas fa-arrow-down mr-3"></i>
                                    <span>入库管理</span>
                                </a>
                            </li>
                            <li>
                                <a href="#" class="flex items-center px-3 py-2 text-gray-600 hover:bg-blue-50 rounded-md">
                                    <i class="fas fa-arrow-up mr-3"></i>
                                    <span>出库管理</span>
                                </a>
                            </li>
                            <li>
                                <a href="#" class="flex items-center px-3 py-2 text-gray-600 hover:bg-blue-50 rounded-md">
                                    <i class="fas fa-boxes mr-3"></i>
                                    <span>库存查询</span>
                                </a>
                            </li>
                            <li>
                                <a href="#" class="flex items-center px-3 py-2 text-gray-600 hover:bg-blue-50 rounded-md">
                                    <i class="fas fa-file-alt mr-3"></i>
                                    <span>报表统计</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                    <div>
                        <h2 class="text-gray-500 uppercase text-xs font-semibold tracking-wider">系统设置</h2>
                        <ul class="mt-2 space-y-1">
                            <li>
                                <a href="#" class="flex items-center px-3 py-2 text-gray-600 hover:bg-blue-50 rounded-md">
                                    <i class="fas fa-users mr-3"></i>
                                    <span>用户管理</span>
                                </a>
                            </li>
                            <li>
                                <a href="#" class="flex items-center px-3 py-2 text-gray-600 hover:bg-blue-50 rounded-md">
                                    <i class="fas fa-cog mr-3"></i>
                                    <span>系统设置</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </nav>
            </aside>

            <!-- 主内容 -->
            <main class="flex-1 p-6">
                <div class="bg-white rounded-lg shadow-md p-6 fade-in">
                    <!-- 标题和操作按钮 -->
                    <div class="flex justify-between items-center mb-6">
                        <div>
                            <h2 class="text-2xl font-bold text-gray-800">入库管理</h2>
                            <p class="text-gray-600">管理商品入库操作</p>
                        </div>
                        <div class="flex space-x-2">
                            <button id="newEntryBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md flex items-center">
                                <i class="fas fa-plus mr-2"></i> 新建入库单
                            </button>
                            <button class="bg-gray-200 hover:bg-gray-300 text-gray-700 px-4 py-2 rounded-md flex items-center">
                                <i class="fas fa-print mr-2"></i> 打印
                            </button>
                            <button class="bg-gray-200 hover:bg-gray-300 text-gray-700 px-4 py-2 rounded-md flex items-center">
                                <i class="fas fa-file-export mr-2"></i> 导出
                            </button>
                        </div>
                    </div>

                    <!-- 搜索和筛选 -->
                    <div class="mb-6 bg-gray-50 p-4 rounded-lg">
                        <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">入库单号</label>
                                <input type="text" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">供应商</label>
                                <select class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
                                    <option value="">全部</option>
                                    <option value="1">供应商A</option>
                                    <option value="2">供应商B</option>
                                    <option value="3">供应商C</option>
                                </select>
                            </div>
                            <div>
                                <label class="block text-sm font-medium text-gray-700 mb-1">入库日期</label>
                                <input type="date" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
                            </div>
                            <div class="flex items-end">
                                <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md w-full">
                                    <i class="fas fa-search mr-2"></i> 搜索
                                </button>
                            </div>
                        </div>
                    </div>

                    <!-- 入库单列表 -->
                    <div class="overflow-x-auto custom-scrollbar">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">入库单号</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">供应商</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">入库日期</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">商品数量</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">总金额</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">操作人</th>
                                    <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">状态</th>
                                    <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">操作</th>
                                </tr>
                            </thead>
                            <tbody class="bg-white divide-y divide-gray-200">
                                <tr class="highlight-row">
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-blue-600">RK20230501001</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">供应商A</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-05-01</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">15</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">¥12,500.00</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">张三</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">已完成</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-blue-600 hover:text-blue-900 mr-3">查看</button>
                                        <button class="text-gray-600 hover:text-gray-900">打印</button>
                                    </td>
                                </tr>
                                <tr class="highlight-row">
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-blue-600">RK20230502001</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">供应商B</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-05-02</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">8</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">¥8,200.00</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">李四</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">已完成</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-blue-600 hover:text-blue-900 mr-3">查看</button>
                                        <button class="text-gray-600 hover:text-gray-900">打印</button>
                                    </td>
                                </tr>
                                <tr class="highlight-row">
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-blue-600">RK20230503001</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">供应商C</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-05-03</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">20</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">¥15,800.00</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">王五</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">处理中</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-blue-600 hover:text-blue-900 mr-3">编辑</button>
                                        <button class="text-red-600 hover:text-red-900">取消</button>
                                    </td>
                                </tr>
                                <tr class="highlight-row">
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-blue-600">RK20230504001</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">供应商A</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-05-04</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">¥9,600.00</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">张三</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">已完成</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-blue-600 hover:text-blue-900 mr-3">查看</button>
                                        <button class="text-gray-600 hover:text-gray-900">打印</button>
                                    </td>
                                </tr>
                                <tr class="highlight-row">
                                    <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-blue-600">RK20230505001</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">供应商D</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-05-05</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">¥4,500.00</td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">赵六</td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">已取消</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
                                        <button class="text-blue-600 hover:text-blue-900 mr-3">查看</button>
                                        <button class="text-gray-600 hover:text-gray-900">删除</button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>

                    <!-- 分页 -->
                    <div class="mt-6 flex items-center justify-between">
                        <div class="text-sm text-gray-500">
                            显示 <span class="font-medium">1</span><span class="font-medium">5</span> 条,共 <span class="font-medium">23</span> 条记录
                        </div>
                        <div class="flex space-x-1">
                            <button class="px-3 py-1 border border-gray-300 rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                上一页
                            </button>
                            <button class="px-3 py-1 border border-blue-500 rounded-md text-white bg-blue-500">
                                1
                            </button>
                            <button class="px-3 py-1 border border-gray-300 rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                2
                            </button>
                            <button class="px-3 py-1 border border-gray-300 rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                3
                            </button>
                            <span class="px-3 py-1">...</span>
                            <button class="px-3 py-1 border border-gray-300 rounded-md text-gray-700 bg-white hover:bg-gray-50">
                                下一页
                            </button>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <!-- 新建入库单模态框 -->
    <div id="newEntryModal" class="fixed inset-0 z-50 hidden overflow-y-auto">
        <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
            <div class="fixed inset-0 transition-opacity" aria-hidden="true">
                <div class="absolute inset-0 bg-gray-500 opacity-75"></div>
            </div>
            <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
            <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-4xl sm:w-full">
                <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
                    <div class="sm:flex sm:items-start">
                        <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10">
                            <i class="fas fa-boxes text-blue-600"></i>
                        </div>
                        <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full">
                            <h3 class="text-lg leading-6 font-medium text-gray-900">新建入库单</h3>
                            <div class="mt-2">
                                <form class="space-y-4">
                                    <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                                        <div>
                                            <label class="block text-sm font-medium text-gray-700 mb-1">入库单号</label>
                                            <input type="text" value="RK20230506001" class="w-full px-3 py-2 border border-gray-300 rounded-md bg-gray-100" readonly>
                                        </div>
                                        <div>
                                            <label class="block text-sm font-medium text-gray-700 mb-1">入库日期</label>
                                            <input type="date" class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        </div>
                                        <div>
                                            <label class="block text-sm font-medium text-gray-700 mb-1">供应商</label>
                                            <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                                <option value="">请选择供应商</option>
                                                <option value="1">供应商A</option>
                                                <option value="2">供应商B</option>
                                                <option value="3">供应商C</option>
                                                <option value="4">供应商D</option>
                                            </select>
                                        </div>
                                        <div>
                                            <label class="block text-sm font-medium text-gray-700 mb-1">仓库</label>
                                            <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                                <option value="">请选择仓库</option>
                                                <option value="1">主仓库</option>
                                                <option value="2">备件仓库</option>
                                                <option value="3">成品仓库</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div>
                                        <label class="block text-sm font-medium text-gray-700 mb-1">备注</label>
                                        <textarea rows="2" class="w-full px-3 py-2 border border-gray-300 rounded-md"></textarea>
                                    </div>
                                </form>
                                
                                <!-- 商品添加区域 -->
                                <div class="mt-6">
                                    <div class="flex justify-between items-center mb-3">
                                        <h4 class="text-md font-medium text-gray-900">入库商品</h4>
                                        <button id="addProductBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded-md text-sm flex items-center">
                                            <i class="fas fa-plus mr-1"></i> 添加商品
                                        </button>
                                    </div>
                                    
                                    <div class="overflow-x-auto custom-scrollbar">
                                        <table class="min-w-full divide-y divide-gray-200">
                                            <thead class="bg-gray-50">
                                                <tr>
                                                    <th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">商品编码</th>
                                                    <th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">商品名称</th>
                                                    <th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">规格型号</th>
                                                    <th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">单位</th>
                                                    <th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">数量</th>
                                                    <th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">单价</th>
                                                    <th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">金额</th>
                                                    <th scope="col" class="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">操作</th>
                                                </tr>
                                            </thead>
                                            <tbody class="bg-white divide-y divide-gray-200">
                                                <tr>
                                                    <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                                                        <input type="text" class="w-full px-2 py-1 border border-gray-300 rounded-md" placeholder="输入编码">
                                                    </td>
                                                    <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                                                        <input type="text" class="w-full px-2 py-1 border border-gray-300 rounded-md" placeholder="商品名称">
                                                    </td>
                                                    <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                                                        <input type="text" class="w-full px-2 py-1 border border-gray-300 rounded-md" placeholder="规格型号">
                                                    </td>
                                                    <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                                                        <select class="w-full px-2 py-1 border border-gray-300 rounded-md">
                                                            <option></option>
                                                            <option></option>
                                                            <option>千克</option>
                                                            <option></option>
                                                        </select>
                                                    </td>
                                                    <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                                                        <input type="number" class="w-full px-2 py-1 border border-gray-300 rounded-md" placeholder="数量">
                                                    </td>
                                                    <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                                                        <input type="number" class="w-full px-2 py-1 border border-gray-300 rounded-md" placeholder="单价">
                                                    </td>
                                                    <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                                                        ¥0.00
                                                    </td>
                                                    <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                                                        <button class="text-red-500 hover:text-red-700">
                                                            <i class="fas fa-trash"></i>
                                                        </button>
                                                    </td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                
                                <!-- 汇总信息 -->
                                <div class="mt-6 bg-gray-50 p-4 rounded-lg">
                                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                                        <div>
                                            <label class="block text-sm font-medium text-gray-700 mb-1">商品总数</label>
                                            <input type="text" value="0" class="w-full px-3 py-2 border border-gray-300 rounded-md bg-white" readonly>
                                        </div>
                                        <div>
                                            <label class="block text-sm font-medium text-gray-700 mb-1">总金额</label>
                                            <input type="text" value="¥0.00" class="w-full px-3 py-2 border border-gray-300 rounded-md bg-white" readonly>
                                        </div>
                                        <div>
                                            <label class="block text-sm font-medium text-gray-700 mb-1">操作人</label>
                                            <input type="text" value="管理员" class="w-full px-3 py-2 border border-gray-300 rounded-md bg-white" readonly>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
                    <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm">
                        提交入库
                    </button>
                    <button type="button" id="cancelModalBtn" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
                        取消
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 模态框控制
        document.getElementById('newEntryBtn').addEventListener('click', function() {
            document.getElementById('newEntryModal').classList.remove('hidden');
        });
        
        document.getElementById('cancelModalBtn').addEventListener('click', function() {
            document.getElementById('newEntryModal').classList.add('hidden');
        });
        
        // 添加商品行
        document.getElementById('addProductBtn').addEventListener('click', function() {
            const tbody = document.querySelector('#newEntryModal tbody');
            const newRow = document.createElement('tr');
            newRow.innerHTML = `
                <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                    <input type="text" class="w-full px-2 py-1 border border-gray-300 rounded-md" placeholder="输入编码">
                </td>
                <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                    <input type="text" class="w-full px-2 py-1 border border-gray-300 rounded-md" placeholder="商品名称">
                </td>
                <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                    <input type="text" class="w-full px-2 py-1 border border-gray-300 rounded-md" placeholder="规格型号">
                </td>
                <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                    <select class="w-full px-2 py-1 border border-gray-300 rounded-md">
                        <option></option>
                        <option></option>
                        <option>千克</option>
                        <option></option>
                    </select>
                </td>
                <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                    <input type="number" class="w-full px-2 py-1 border border-gray-300 rounded-md" placeholder="数量">
                </td>
                <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                    <input type="number" class="w-full px-2 py-1 border border-gray-300 rounded-md" placeholder="单价">
                </td>
                <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                    ¥0.00
                </td>
                <td class="px-3 py-2 whitespace-nowrap text-sm text-gray-500">
                    <button class="text-red-500 hover:text-red-700">
                        <i class="fas fa-trash"></i>
                    </button>
                </td>
            `;
            tbody.appendChild(newRow);
            
            // 添加删除行功能
            const deleteBtn = newRow.querySelector('button');
            deleteBtn.addEventListener('click', function() {
                tbody.removeChild(newRow);
            });
        });
        
        // 点击模态框外部关闭模态框
        window.addEventListener('click', function(event) {
            const modal = document.getElementById('newEntryModal');
            if (event.target === modal) {
                modal.classList.add('hidden');
            }
        });
        
        // 表格行点击效果
        document.querySelectorAll('.highlight-row').forEach(row => {
            row.addEventListener('click', function() {
                // 这里可以添加查看详情的逻辑
                console.log('查看入库单:', this.querySelector('td:first-child').textContent);
            });
        });
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Sephiroth1984/test1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>