clue-list.html 6.6 KB
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>绿纤新客线索池</title>
  <style>
    *, *::before, *::after { box-sizing: border-box; }
    body {
      font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
      margin: 0;
      min-height: 100vh;
      background: linear-gradient(135deg, #e8f5e9 0%, #b2dfdb 100%);
    }
    .container {
      max-width: 480px;
      margin: 32px auto 0 auto;
      padding: 28px 12px 18px 12px;
      background: #fff;
      border-radius: 18px;
      box-shadow: 0 4px 24px 0 rgba(76, 175, 80, 0.10), 0 1.5px 6px 0 rgba(76, 175, 80, 0.08);
      border: 1.5px solid #c8e6c9;
      box-sizing: border-box;
    }
    h2 {
      text-align: center;
      color: #388e3c;
      margin-bottom: 18px;
      letter-spacing: 2px;
      font-size: 1.08em;
    }
    .card-list {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .card {
      background: #f7faf7;
      border-radius: 12px;
      box-shadow: 0 2px 8px #e0f2f1;
      border: 1px solid #c8e6c9;
      padding: 10px 8px 8px 8px;
      display: flex;
      flex-direction: column;
      font-size: 0.97em;
      position: relative;
    }
    .card-row {
      display: flex;
      flex-wrap: nowrap;
      margin-bottom: 4px;
      justify-content: space-between;
    }
    .card-col {
      flex: 1 1 0;
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .card-label {
      color: #388e3c;
      font-weight: bold;
      min-width: 38px;
      margin-right: 2px;
      font-size: 0.95em;
      white-space: nowrap;
    }
    .card-value {
      color: #333;
      font-size: 0.95em;
      word-break: keep-all;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .invite-btn {
      display: block;
      margin: 10px auto 0 auto;
      width: 60%;
      background: linear-gradient(90deg, #43a047 60%, #66bb6a 100%);
      color: #fff;
      border: none;
      border-radius: 18px;
      padding: 7px 0;
      font-size: 0.98em;
      font-weight: bold;
      text-align: center;
      cursor: pointer;
      transition: background 0.2s, color 0.2s;
      box-shadow: 0 2px 8px #c8e6c9;
      letter-spacing: 2px;
    }
    .invite-btn:hover {
      background: linear-gradient(90deg, #388e3c 60%, #43a047 100%);
      color: #fff;
    }
    @media (max-width: 520px) {
      .container {
        max-width: 100vw;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 18px 8px 14px 8px;
      }
      h2 { font-size: 1em; }
      .card { font-size: 0.93em; padding: 8px 2px 6px 2px; }
      .card-row { font-size: 0.92em; }
      .card-label { min-width: 32px; font-size: 0.92em; }
      .card-value { font-size: 0.92em; }
      .invite-btn { font-size: 0.95em; padding: 7px 0; width: 70%; }
    }
  </style>
</head>
<body>
  <div class="container">
    <h2>绿纤新客线索池</h2>
    <div class="form-group" style="margin-bottom:18px;">
      <input type="text" id="clueSearchInput" placeholder="搜索客户姓名或电话" style="width:100%;padding:10px 12px;border:1.5px solid #c8e6c9;border-radius:8px;font-size:1em;">
    </div>
    <div class="card-list" id="clueCardList">
      <!-- JS填充卡片 -->
    </div>
  </div>
  <script>
    // 示例数据,可替换为后端接口数据
    const clues = [
      { store: '468', date: '2025/3/29', staff: '张华', name: '邱小佳', phone: '17300803799', count: 1 },
      { store: '468', date: '2025/3/29', staff: '张华', name: '唐默默', phone: '13551320906', count: 1 },
      { store: '468', date: '2025/3/29', staff: '张华', name: '张燕', phone: '15882173189', count: 1 },
      { store: '468', date: '2025/3/29', staff: '张华', name: '杨琴', phone: '13708872561', count: 1 },
      { store: '468', date: '2025/3/29', staff: '张华', name: '黄晶静怡', phone: '13540123735', count: 1 },
      { store: '468', date: '2025/3/29', staff: '张华', name: '阳敏', phone: '13320681678', count: 1 },
      { store: '468', date: '2025/3/29', staff: '张华', name: '张丽敏', phone: '18884798406', count: 1 },
      { store: '468', date: '2025/3/29', staff: '张华', name: '蒋维芳', phone: '13507002158', count: 1 },
      { store: '468', date: '2025/3/29', staff: '张华', name: '刘彤', phone: '13808052104', count: 1 },
      { store: '468', date: '2025/3/29', staff: '张华', name: '黄莉君', phone: '13547061093', count: 1 }
      // ...可继续补充数据...
    ];
    const cardList = document.getElementById('clueCardList');
    const clueSearchInput = document.getElementById('clueSearchInput');

    function renderClues(filter = '') {
      cardList.innerHTML = '';
      const keyword = filter.trim();
      clues.filter(c => {
        if (!keyword) return true;
        return c.name.includes(keyword) || c.phone.includes(keyword);
      }).forEach(c => {
        const card = document.createElement('div');
        card.className = 'card';
        card.innerHTML = `
          <div class="card-row">
            <div class="card-col"><span class="card-label">门店</span><span class="card-value">${c.store}</span></div>
            <div class="card-col"><span class="card-label">日期</span><span class="card-value">${c.date}</span></div>
            <div class="card-col"><span class="card-label">拓客员工</span><span class="card-value">${c.staff}</span></div>
          </div>
          <div class="card-row">
            <div class="card-col"><span class="card-label">客户姓名</span><span class="card-value">${c.name}</span></div>
            <div class="card-col"><span class="card-label">客户电话</span><span class="card-value">${c.phone}</span></div>
            <div class="card-col"><span class="card-label">数量</span><span class="card-value">${c.count}</span></div>
          </div>
          <button class="invite-btn" onclick="invite('${encodeURIComponent(c.name)}','${encodeURIComponent(c.phone)}','${encodeURIComponent(c.staff)}','${encodeURIComponent(c.store)}','${encodeURIComponent(c.date)}')">邀约</button>
        `;
        cardList.appendChild(card);
      });
    }
    renderClues();
    clueSearchInput.addEventListener('input', function() {
      renderClues(this.value);
    });
    window.invite = function(name, phone, staff, store, date) {
      // 跳转到邀约页面并带参数
      const url = `invite.html?name=${name}&phone=${phone}&staff=${staff}&store=${store}&date=${date}`;
      window.location.href = url;
    }
  </script>
</body>
</html>