query($sqlStr); header("Location: ?Keys=" . $keys . "&Page=" . $page); exit; } $keys = $_GET['Keys'] ?? ''; $keys = str_replace([' ', '+'], '', $keys); $keyscode = textEncode($keys); $page = $_GET['Page'] ?? ''; $filterCountry = $_GET['fliterCountry'] ?? ''; $filterQudao = $_GET['fliterQudao'] ?? ''; $filterDeal = $_GET['fliterDeal'] ?? ''; $filterBusiness = $_GET['fliterBusiness'] ?? ''; $filterContact = $_GET['fliterContact'] ?? ''; $filterStr = ""; $urlStr = ""; if (!empty($filterCountry)) { $filterStr .= " AND c.cs_country=" . intval($filterCountry); $urlStr .= "&fliterCountry=" . $filterCountry; } if (!empty($filterQudao)) { $filterStr .= " AND c.cs_from=" . intval($filterQudao); $urlStr .= "&fliterQudao=" . $filterQudao; } if (!empty($filterDeal)) { $filterStr .= " AND c.cs_deal=" . intval($filterDeal); $urlStr .= "&fliterDeal=" . $filterDeal; } if (!empty($filterBusiness)) { $filterStr .= " AND c.cs_type=" . intval($filterBusiness); $urlStr .= "&fliterBusiness=" . $filterBusiness; } if (!empty($filterContact)) { switch ($filterContact) { case "1": $filterStr .= " AND (cc.tel_1<>'' OR cc.tel_2<>'' OR cc.tel_3<>'')"; break; case "2": $filterStr .= " AND (cc.wechat_1<>'' OR cc.wechat_2<>'' OR cc.wechat_3<>'')"; break; case "3": $filterStr .= " AND (cc.whatsapp_1<>'' OR cc.whatsapp_2<>'' OR cc.whatsapp_3<>'')"; break; case "4": $filterStr .= " AND (cc.email_1<>'' OR cc.email_2<>'' OR cc.email_3<>'')"; break; case "5": $filterStr .= " AND (cc.linkedin_1<>'' OR cc.linkedin_2<>'' OR cc.linkedin_3<>'')"; break; case "6": $filterStr .= " AND (cc.facebook_1<>'' OR cc.facebook_2<>'' OR cc.facebook_3<>'')"; break; default: $filterStr .= " AND (cc.alibaba_1<>'' OR cc.alibaba_2<>'' OR cc.alibaba_3<>'')"; } $urlStr .= "&fliterContact=" . $filterContact; } $keys = urlencode($keys); $hrefstr = "?keys=" . $keys; ?> 管理区域

静默客户

序号
客户编号
渠道来源
区域
客户类型
跟进阶段
录入时间
操作
') as contact_names, GROUP_CONCAT(DISTINCT NULLIF(cc.tel_1, '') SEPARATOR '
') as tel_1, GROUP_CONCAT(DISTINCT NULLIF(cc.tel_2, '') SEPARATOR '
') as tel_2, GROUP_CONCAT(DISTINCT NULLIF(cc.tel_3, '') SEPARATOR '
') as tel_3, GROUP_CONCAT(DISTINCT NULLIF(cc.tel_1_format, '') SEPARATOR '
') as tel_1_format, GROUP_CONCAT(DISTINCT NULLIF(cc.tel_2_format, '') SEPARATOR '
') as tel_2_format, GROUP_CONCAT(DISTINCT NULLIF(cc.tel_3_format, '') SEPARATOR '
') as tel_3_format, GROUP_CONCAT(DISTINCT NULLIF(cc.email_1, '') SEPARATOR '
') as email_1, GROUP_CONCAT(DISTINCT NULLIF(cc.email_2, '') SEPARATOR '
') as email_2, GROUP_CONCAT(DISTINCT NULLIF(cc.email_3, '') SEPARATOR '
') as email_3, GROUP_CONCAT(DISTINCT NULLIF(cc.whatsapp_1, '') SEPARATOR '
') as whatsapp_1, GROUP_CONCAT(DISTINCT NULLIF(cc.whatsapp_2, '') SEPARATOR '
') as whatsapp_2, GROUP_CONCAT(DISTINCT NULLIF(cc.whatsapp_3, '') SEPARATOR '
') as whatsapp_3, GROUP_CONCAT(DISTINCT NULLIF(cc.whatsapp_1_format, '') SEPARATOR '
') as whatsapp_1_format, GROUP_CONCAT(DISTINCT NULLIF(cc.whatsapp_2_format, '') SEPARATOR '
') as whatsapp_2_format, GROUP_CONCAT(DISTINCT NULLIF(cc.whatsapp_3_format, '') SEPARATOR '
') as whatsapp_3_format, GROUP_CONCAT(DISTINCT NULLIF(cc.wechat_1, '') SEPARATOR '
') as wechat_1, GROUP_CONCAT(DISTINCT NULLIF(cc.wechat_2, '') SEPARATOR '
') as wechat_2, GROUP_CONCAT(DISTINCT NULLIF(cc.wechat_3, '') SEPARATOR '
') as wechat_3, GROUP_CONCAT(DISTINCT NULLIF(cc.linkedin_1, '') SEPARATOR '
') as linkedin_1, GROUP_CONCAT(DISTINCT NULLIF(cc.linkedin_2, '') SEPARATOR '
') as linkedin_2, GROUP_CONCAT(DISTINCT NULLIF(cc.linkedin_3, '') SEPARATOR '
') as linkedin_3, GROUP_CONCAT(DISTINCT NULLIF(cc.facebook_1, '') SEPARATOR '
') as facebook_1, GROUP_CONCAT(DISTINCT NULLIF(cc.facebook_2, '') SEPARATOR '
') as facebook_2, GROUP_CONCAT(DISTINCT NULLIF(cc.facebook_3, '') SEPARATOR '
') as facebook_3, GROUP_CONCAT(DISTINCT NULLIF(cc.alibaba_1, '') SEPARATOR '
') as alibaba_1, GROUP_CONCAT(DISTINCT NULLIF(cc.alibaba_2, '') SEPARATOR '
') as alibaba_2, GROUP_CONCAT(DISTINCT NULLIF(cc.alibaba_3, '') SEPARATOR '
') as alibaba_3 FROM customer c LEFT JOIN customer_contact cc ON c.id = cc.customer_id WHERE (c.is_silent=1 OR (c.cs_deal=0 AND c.cs_belong=" . intval($_SESSION['employee_id']) . "))"; // 添加搜索条件 if (!empty($keyscode)) { $sqlStr .= " AND (c.cs_code LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.contact_name LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.email_1 LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.email_2 LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.email_3 LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.wechat_1 LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.wechat_2 LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.wechat_3 LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.tel_1_format LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.tel_2_format LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.tel_3_format LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.whatsapp_1_format LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.whatsapp_2_format LIKE '%" . $conn->real_escape_string($keyscode) . "%' OR cc.whatsapp_3_format LIKE '%" . $conn->real_escape_string($keyscode) . "%')"; } // 添加其他筛选条件 $sqlStr .= $filterStr; // 分组和排序 $sqlStr .= " GROUP BY c.id ORDER BY MAX(c.colortag) DESC, c.id DESC"; $result = $conn->query($sqlStr); if ($result && $result->num_rows > 0) { $pageSize = 20; $page = empty($page) ? 1 : $page; $page = ($page === 'end') ? ceil($result->num_rows / $pageSize) : $page; $page = (!is_numeric($page) || $page < 1) ? 1 : (int)$page; $totalPages = ceil($result->num_rows / $pageSize); $page = ($page > $totalPages) ? $totalPages : $page; $offset = $pageSize * ($page - 1); $rows = []; while ($row = $result->fetch_assoc()) { $rows[] = $row; } $paginatedRows = array_slice($rows, $offset, $pageSize); $tempNum = $offset; foreach ($paginatedRows as $row) { $tempNum++; ?>
0): ?>
query("SELECT ch_name FROM qudao WHERE id=" . intval($row['cs_from'])); echo ($qudaoRow = $qudaoResult->fetch_assoc()) ? htmlspecialcharsFix($qudaoRow['ch_name']) : '未填写'; ?>
query("SELECT countryName FROM country WHERE id=" . intval($row['cs_country'])); echo ($countryRow = $countryResult->fetch_assoc()) ? htmlspecialcharsFix($countryRow['countryName']) : '未填写'; ?>
query("SELECT businessType FROM clienttype WHERE id=" . intval($row['cs_type'])); echo ($typeRow = $typeResult->fetch_assoc()) ? htmlspecialcharsFix($typeRow['businessType']) : '未填写'; ?>
成交"; } elseif ($row['cs_deal'] == 2) { echo "明确需求"; } elseif ($row['cs_deal'] == 1) { echo "背景调查"; } else { echo "无响应"; } ?>
联系方式
', $tels); ?>
' . htmlspecialcharsFix($row['email_1']) . ''; if (!empty($row['email_2'])) $emails[] = '' . htmlspecialcharsFix($row['email_2']) . ''; if (!empty($row['email_3'])) $emails[] = '' . htmlspecialcharsFix($row['email_3']) . ''; echo implode('
', $emails); ?>
', $whatsapps); ?>
', $wechats); ?>
', $linkedins); ?>
', $alibabas); ?>
备注
流转记录: query($sqlStr); if ($chainRow = $chainResult->fetch_assoc()) { $chainEmployees[] = htmlspecialcharsFix($chainRow['em_user']); } } echo implode(" > ", $chainEmployees); } ?>
当前暂无沉默客户
Sorry,没有找到""相关的信息,点击返回
1) { $pageName = "?Keys=" . $keys . $urlStr . "&"; $pagelen = 3; if ($page > 1) { echo "首页"; echo "上一页"; } if ($pagelen * 2 + 1 >= $totalPages) { $startPage = 1; $endPage = $totalPages; } else { if ($page <= $pagelen + 1) { $startPage = 1; $endPage = $pagelen * 2 + 1; } else { $startPage = $page - $pagelen; $endPage = $page + $pagelen; } if ($page + $pagelen > $totalPages) { $startPage = $totalPages - $pagelen * 2; $endPage = $totalPages; } } for ($i = $startPage; $i <= $endPage; $i++) { if ($i == $page) { echo "{$i}"; } else { echo "{$i}"; } } if ($page < $totalPages) { if ($totalPages - $page > $pagelen) { echo "...{$totalPages}"; } echo "下一页"; echo "尾页"; } echo ""; } ?>