|
|
@ -5302,6 +5302,9 @@ |
|
|
// 为客户类型选择添加事件监听器 |
|
|
// 为客户类型选择添加事件监听器 |
|
|
document.getElementById('followupType').addEventListener('change', function() { |
|
|
document.getElementById('followupType').addEventListener('change', function() { |
|
|
var selectedType = this.value; |
|
|
var selectedType = this.value; |
|
|
|
|
|
var modalContent = document.querySelector('#followupModal > div'); |
|
|
|
|
|
var fields = modalContent.querySelectorAll('div'); |
|
|
|
|
|
|
|
|
if (selectedType === '其他类型') { |
|
|
if (selectedType === '其他类型') { |
|
|
// 设置跟进内容为非鸡蛋行业客户 |
|
|
// 设置跟进内容为非鸡蛋行业客户 |
|
|
document.getElementById('followupContent').value = '非鸡蛋行业客户'; |
|
|
document.getElementById('followupContent').value = '非鸡蛋行业客户'; |
|
|
@ -5313,6 +5316,27 @@ |
|
|
document.getElementById('followupRegionDisplay').style.color = '#999'; |
|
|
document.getElementById('followupRegionDisplay').style.color = '#999'; |
|
|
document.getElementById('followupDetailedAddress').value = ''; |
|
|
document.getElementById('followupDetailedAddress').value = ''; |
|
|
document.getElementById('followupCompany').value = ''; |
|
|
document.getElementById('followupCompany').value = ''; |
|
|
|
|
|
// 隐藏其他字段 |
|
|
|
|
|
fields.forEach(function(field) { |
|
|
|
|
|
var label = field.querySelector('label'); |
|
|
|
|
|
if (label) { |
|
|
|
|
|
var labelText = label.textContent; |
|
|
|
|
|
if (labelText.includes('客户等级') || labelText.includes('客户需求') || labelText.includes('客户地区') || labelText.includes('详细地址') || labelText.includes('客户公司')) { |
|
|
|
|
|
field.style.display = 'none'; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
// 显示所有字段 |
|
|
|
|
|
fields.forEach(function(field) { |
|
|
|
|
|
var label = field.querySelector('label'); |
|
|
|
|
|
if (label) { |
|
|
|
|
|
var labelText = label.textContent; |
|
|
|
|
|
if (labelText.includes('客户等级') || labelText.includes('客户需求') || labelText.includes('客户地区') || labelText.includes('详细地址') || labelText.includes('客户公司')) { |
|
|
|
|
|
field.style.display = 'block'; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
@ -5913,6 +5937,34 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function openFollowupModal(userId, userName, phone) { |
|
|
function openFollowupModal(userId, userName, phone) { |
|
|
|
|
|
// 重置所有表单字段 |
|
|
|
|
|
document.getElementById('followupUserId').value = ''; |
|
|
|
|
|
document.getElementById('followupUserName').value = ''; |
|
|
|
|
|
document.getElementById('followupPhone').value = ''; |
|
|
|
|
|
document.getElementById('followupType').value = ''; |
|
|
|
|
|
document.getElementById('followupLevel').value = ''; |
|
|
|
|
|
document.getElementById('followupDemand').value = ''; |
|
|
|
|
|
document.getElementById('followupRegion').value = ''; |
|
|
|
|
|
document.getElementById('followupRegionDisplay').textContent = '请选择客户地区'; |
|
|
|
|
|
document.getElementById('followupRegionDisplay').style.color = '#999'; |
|
|
|
|
|
document.getElementById('followupDetailedAddress').value = ''; |
|
|
|
|
|
document.getElementById('followupCompany').value = ''; |
|
|
|
|
|
document.getElementById('followupContent').value = ''; |
|
|
|
|
|
|
|
|
|
|
|
// 显示所有字段 |
|
|
|
|
|
var modalContent = document.querySelector('#followupModal > div'); |
|
|
|
|
|
var fields = modalContent.querySelectorAll('div'); |
|
|
|
|
|
fields.forEach(function(field) { |
|
|
|
|
|
var label = field.querySelector('label'); |
|
|
|
|
|
if (label) { |
|
|
|
|
|
var labelText = label.textContent; |
|
|
|
|
|
if (labelText.includes('客户等级') || labelText.includes('客户需求') || labelText.includes('客户地区') || labelText.includes('详细地址') || labelText.includes('客户公司')) { |
|
|
|
|
|
field.style.display = 'block'; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 填充基本信息 |
|
|
document.getElementById('followupUserId').value = userId; |
|
|
document.getElementById('followupUserId').value = userId; |
|
|
document.getElementById('followupUserName').value = userName; |
|
|
document.getElementById('followupUserName').value = userName; |
|
|
document.getElementById('followupPhone').value = phone; |
|
|
document.getElementById('followupPhone').value = phone; |
|
|
@ -6010,17 +6062,6 @@ |
|
|
|
|
|
|
|
|
// 跟进内容 |
|
|
// 跟进内容 |
|
|
document.getElementById('followupContent').value = user.followup || ''; |
|
|
document.getElementById('followupContent').value = user.followup || ''; |
|
|
} else { |
|
|
|
|
|
// 如果没有找到用户数据,清空表单 |
|
|
|
|
|
document.getElementById('followupType').value = ''; |
|
|
|
|
|
document.getElementById('followupLevel').value = ''; |
|
|
|
|
|
document.getElementById('followupDemand').value = ''; |
|
|
|
|
|
document.getElementById('followupRegion').value = ''; |
|
|
|
|
|
document.getElementById('followupRegionDisplay').textContent = '请选择客户地区'; |
|
|
|
|
|
document.getElementById('followupRegionDisplay').style.color = '#999'; |
|
|
|
|
|
document.getElementById('followupDetailedAddress').value = ''; |
|
|
|
|
|
document.getElementById('followupCompany').value = ''; |
|
|
|
|
|
document.getElementById('followupContent').value = ''; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
document.getElementById('followupModal').style.display = 'block'; |
|
|
document.getElementById('followupModal').style.display = 'block'; |
|
|
@ -6029,6 +6070,36 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function closeFollowupModal() { |
|
|
function closeFollowupModal() { |
|
|
|
|
|
// 重置表单字段 |
|
|
|
|
|
document.getElementById('followupUserId').value = ''; |
|
|
|
|
|
document.getElementById('followupUserName').value = ''; |
|
|
|
|
|
document.getElementById('followupPhone').value = ''; |
|
|
|
|
|
document.getElementById('followupType').value = ''; |
|
|
|
|
|
document.getElementById('followupLevel').value = ''; |
|
|
|
|
|
document.getElementById('followupDemand').value = ''; |
|
|
|
|
|
document.getElementById('followupRegion').value = ''; |
|
|
|
|
|
document.getElementById('followupRegionDisplay').textContent = '请选择客户地区'; |
|
|
|
|
|
document.getElementById('followupRegionDisplay').style.color = '#999'; |
|
|
|
|
|
document.getElementById('followupDetailedAddress').value = ''; |
|
|
|
|
|
document.getElementById('followupCompany').value = ''; |
|
|
|
|
|
document.getElementById('followupContent').value = ''; |
|
|
|
|
|
|
|
|
|
|
|
// 显示所有字段 - 使用基于ID的选择器 |
|
|
|
|
|
var modalContent = document.querySelector('#followupModal > div'); |
|
|
|
|
|
var allFields = modalContent.querySelectorAll('div'); |
|
|
|
|
|
|
|
|
|
|
|
allFields.forEach(function(field) { |
|
|
|
|
|
// 检查字段是否包含需要显示的标签 |
|
|
|
|
|
var label = field.querySelector('label'); |
|
|
|
|
|
if (label) { |
|
|
|
|
|
var labelText = label.textContent; |
|
|
|
|
|
if (labelText.includes('客户等级') || labelText.includes('客户需求') || labelText.includes('客户地区') || labelText.includes('详细地址') || labelText.includes('客户公司')) { |
|
|
|
|
|
field.style.display = 'block'; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 关闭弹窗 |
|
|
document.getElementById('followupModal').style.display = 'none'; |
|
|
document.getElementById('followupModal').style.display = 'none'; |
|
|
// 恢复背景滚动 |
|
|
// 恢复背景滚动 |
|
|
document.body.style.overflow = 'auto'; |
|
|
document.body.style.overflow = 'auto'; |
|
|
|