prepare($sql); $stmt->bind_param("ii", $_SESSION['employee_id'], $id); $stmt->execute(); $result = $stmt->get_result(); if ($row = $result->fetch_assoc()) { $customer = [ 'cs_company' => textUncode($row['cs_company']), 'cs_address' => textUncode($row['cs_address']), 'cs_code' => textUncode($row['cs_code']), 'cs_deal' => textUncode($row['cs_deal']), 'cs_addtime' => $row['cs_addtime'], 'cs_belongclient' => $row['cs_belongclient'], 'cs_updatetime' => $row['cs_updatetime'], 'cs_from' => $row['cs_from'], 'cs_country' => $row['cs_country'], 'cs_type' => $row['cs_type'], 'cs_note' => htmlUnCode($row['cs_note']), 'cs_claimFrom' => $row['cs_claimFrom'], 'allowedit' => $row['allowedit'] ]; // Fetch all contact records for this customer $contactSql = "SELECT cc.* FROM customer_contact cc WHERE cc.customer_id = ?"; $contactStmt = $conn->prepare($contactSql); $contactStmt->bind_param("i", $id); $contactStmt->execute(); $contactResult = $contactStmt->get_result(); $contacts = []; while ($contactRow = $contactResult->fetch_assoc()) { $contact = [ 'id' => $contactRow['id'], 'contact_name' => textUncode($contactRow['contact_name']), 'created_at' => $contactRow['created_at'], 'updated_at' => $contactRow['updated_at'] ]; // Process each contact method type (up to 3 entries each) $methodTypes = ['tel', 'email', 'whatsapp', 'wechat', 'linkedin', 'facebook', 'alibaba']; foreach ($methodTypes as $type) { for ($i = 1; $i <= 3; $i++) { $fieldBase = $type . '_' . $i; $contact[$fieldBase] = textUncode($contactRow[$fieldBase]); if ($type == 'tel' || $type == 'whatsapp') { $contact[$fieldBase . '_format'] = textUncode($contactRow[$fieldBase . '_format']); } $contact[$fieldBase . '_bu'] = textUncode($contactRow[$fieldBase . '_bu']); } } $contacts[] = $contact; } } else { echo ""; exit; } } else { echo ""; header("Location: $hrefstr"); exit; } ?> 管理区域
客户编号 class="txt1" />
公司名称
地区
prepare("SELECT id, countryCode, countryName FROM country WHERE id = ?"); $stmt->bind_param("i", $customer['cs_country']); $stmt->execute(); $countryResult = $stmt->get_result(); if ($countryRow = $countryResult->fetch_assoc()) { $countryId = $countryRow['id']; echo htmlspecialcharsFix($countryRow['countryName']); } else { echo "请选择"; } ?>
    query("SELECT id, countryCode, countryName FROM country"); while ($row = $result->fetch_assoc()) { echo "
  • (+{$row['countryCode']}){$row['countryName']}
  • "; } ?>

    无匹配项

客户来源
联系人信息
$contact): ?>

联系人 #

联系人
'电话', 'wechat' => '微信', 'whatsapp' => 'WhatsApp', 'email' => '邮箱', 'linkedin' => '领英', 'facebook' => 'Facebook', 'alibaba' => '阿里巴巴' ]; foreach ($methodTypes as $type => $label) { for ($i = 1; $i <= 3; $i++) { $fieldName = $type . '_' . $i; if (!empty($contact[$fieldName])) { echo '
'; echo ''; echo ''; if ($type === 'tel' || $type === 'whatsapp') { echo ''; } echo ''; echo ''; echo '
'; } } } ?>

联系人 #1

联系人
地址
业务类型 query("SELECT id, businessType FROM clienttype"); while ($row = $result->fetch_assoc()) { $checked = ($row['id'] == $customer['cs_type']) ? ' checked="checked"' : ''; echo " "; } ?>
跟进阶段 '0', 'label' => '无响应'], ['id' => '1', 'label' => '背景调查'], ['id' => '2', 'label' => '明确需求'], ['id' => '3', 'label' => '已成交'] ]; foreach ($dealOptions as $option) { $checked = ($customer['cs_deal'] == $option['id']) ? ' checked="checked"' : ''; $disabled = ($customer['cs_deal'] == '3' && $option['id'] != '3') ? ' disabled="disabled"' : ''; echo ""; } ?>
其他 >
自定义标签
prepare("SELECT id, tagName FROM tagtable WHERE customerId = ?"); $stmt->bind_param("i", $id); $stmt->execute(); $result = $stmt->get_result(); while ($row = $result->fetch_assoc()) { echo "" . htmlspecialcharsFix($row['tagName']) . ""; } ?>
美特柏品牌客户, OEM定制客户, 小型B端客户, C端客户, 贸易公司档口客户 prepare("SELECT DISTINCT tagName FROM tagtable WHERE employeeId = ?"); $stmt->bind_param("i", $_SESSION['employee_id']); $stmt->execute(); $result = $stmt->get_result(); while ($row = $result->fetch_assoc()) { echo "" . htmlspecialcharsFix(textUncode($row['tagName'])) . ","; } ?>
备注