Spaces:
Running
Running
| <html lang="zh-CN"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>ClientFlow Pro - 客户管理系统</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/sidebar.js"></script> | |
| <script src="components/footer.js"></script> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen"> | |
| <custom-navbar></custom-navbar> | |
| <div class="flex"> | |
| <custom-sidebar></custom-sidebar> | |
| <main class="flex-1 p-6 ml-64"> | |
| <!-- 页面标题和操作栏 --> | |
| <div class="flex justify-between items-center mb-8"> | |
| <div> | |
| <h1 class="text-3xl font-bold text-gray-800">客户管理</h1> | |
| <p class="text-gray-600 mt-2">高效管理您的客户信息,提升业务效率</p> | |
| </div> | |
| <button id="addCustomerBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-3 rounded-lg flex items-center space-x-2 transition-all duration-300 shadow-lg hover:shadow-xl btn-hover"> | |
| <i data-feather="plus"></i> | |
| <span>新增客户</span> | |
| </button> | |
| </div> | |
| <!-- 搜索和筛选区域 --> | |
| <div class="bg-white rounded-xl shadow-sm p-6 mb-6"> | |
| <div class="grid grid-cols-1 md:grid-cols-4 gap-4"> | |
| <div class="relative"> | |
| <i data-feather="search" class="absolute left-3 top-3 text-gray-400 w-4 h-4"></i> | |
| <input type="text" placeholder="搜索客户..." class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| </div> | |
| <select class="border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| <option value="">所有客户等级</option> | |
| <option value="vip">VIP客户</option> | |
| <option value="normal">普通客户</option> | |
| <option value="potential">潜在客户</option> | |
| </select> | |
| <select class="border border-gray-300 rounded-lg px-4 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| <option value="">所有状态</option> | |
| <option value="active">活跃</option> | |
| <option value="inactive">不活跃</option> | |
| <option value="suspended">暂停</option> | |
| </select> | |
| <button class="bg-gray-100 hover:bg-gray-200 text-gray-700 px-4 py-2 rounded-lg transition-colors duration-300 flex items-center justify-center space-x-2 btn-hover"> | |
| <i data-feather="filter"></i> | |
| <span>筛选</span> | |
| </button> | |
| </div> | |
| </div> | |
| <!-- 客户列表 --> | |
| <div class="bg-white rounded-xl shadow-sm overflow-hidden"> | |
| <div class="overflow-x-auto"> | |
| <table class="w-full"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">客户信息</th> | |
| <th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">联系方式</th> | |
| <th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">等级</th> | |
| <th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">状态</th> | |
| <th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">最近交易</th> | |
| <th class="px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">操作</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200" id="customerTableBody"> | |
| <!-- 客户数据将通过JavaScript动态加载 --> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- 分页控件 --> | |
| <div class="flex justify-between items-center mt-6"> | |
| <div class="text-sm text-gray-600"> | |
| 显示 <span id="startRow">1</span> - <span id="endRow">10</span> 条,共 <span id="totalRows">50</span> 条记录 | |
| </div> | |
| <div class="flex space-x-2"> | |
| <button class="px-4 py-2 border border-gray-300 rounded-lg text-gray-600 hover:bg-gray-50 btn-hover">上一页</button> | |
| <button class="px-4 py-2 bg-blue-600 text-white rounded-lg btn-hover">1</button> | |
| <button class="px-4 py-2 border border-gray-300 rounded-lg text-gray-600 hover:bg-gray-50 btn-hover">2</button> | |
| <button class="px-4 py-2 border border-gray-300 rounded-lg text-gray-600 hover:bg-gray-50 btn-hover">下一页</button> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <!-- 新增/编辑客户模态框 --> | |
| <div id="customerModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"> | |
| <div class="bg-white rounded-2xl p-8 w-full max-w-2xl mx-4"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h3 class="text-2xl font-bold text-gray-800" id="modalTitle">新增客户</h3> | |
| <button id="closeModal" class="text-gray-400 hover:text-gray-600"> | |
| <i data-feather="x"></i> | |
| </button> | |
| </div> | |
| <form id="customerForm" class="space-y-6"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-2">客户名称</label> | |
| <input type="text" name="name" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-2">联系人</label> | |
| <input type="text" name="contact" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-2">电话</label> | |
| <input type="tel" name="phone" required class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-2">邮箱</label> | |
| <input type="email" name="email" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-2">地址</label> | |
| <input type="text" name="address" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-2">客户等级</label> | |
| <select name="level" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"> | |
| <option value="vip">VIP客户</option> | |
| <option value="normal">普通客户</option> | |
| <option value="potential">潜在客户</option> | |
| </select> | |
| </div> | |
| </div> | |
| <div class="flex justify-end space-x-4 pt-6"> | |
| <button type="button" id="cancelBtn" class="px-6 py-3 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors duration-300 btn-hover">取消</button> | |
| <button type="submit" class="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors duration-300 btn-hover">保存</button> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| <custom-footer></custom-footer> | |
| <script src="script.js"></script> | |
| <script> | |
| // 初始化客户管理器 | |
| const customerManager = new CustomerManager(); | |
| // 初始化图标 | |
| feather.replace(); | |
| // 页面加载完成后执行 | |
| document.addEventListener('DOMContentLoaded', function() { | |
| console.log('ClientFlow Pro 客户管理系统已启动'); | |
| }); | |
| </script> | |
| <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> | |
| </body> | |
| </html> |