|
|
@ -597,6 +597,10 @@ |
|
|
<input type="text" id="personalPhoneSearch" placeholder="搜索手机号" style="margin-left: 20px; padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;"> |
|
|
<input type="text" id="personalPhoneSearch" placeholder="搜索手机号" style="margin-left: 20px; padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;"> |
|
|
<button onclick="searchPersonalByPhone()" style="margin-left: 8px; padding: 4px 12px; background-color: #1890ff; color: white; border: none; border-radius: 4px; font-size: 14px;">搜索</button> |
|
|
<button onclick="searchPersonalByPhone()" style="margin-left: 8px; padding: 4px 12px; background-color: #1890ff; color: white; border: none; border-radius: 4px; font-size: 14px;">搜索</button> |
|
|
<button onclick="resetPersonalPhoneSearch()" style="margin-left: 8px; padding: 4px 12px; background-color: #666; color: white; border: none; border-radius: 4px; font-size: 14px;">重置</button> |
|
|
<button onclick="resetPersonalPhoneSearch()" style="margin-left: 8px; padding: 4px 12px; background-color: #666; color: white; border: none; border-radius: 4px; font-size: 14px;">重置</button> |
|
|
|
|
|
<span style="margin-left: 20px; font-size: 14px;">负责人:</span> |
|
|
|
|
|
<select id="personalManagerFilter" onchange="filterPersonalByManager()" style="padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;"> |
|
|
|
|
|
<option value="">全部</option> |
|
|
|
|
|
</select> |
|
|
<span style="margin-left: 20px; font-size: 14px;">创建时间:</span> |
|
|
<span style="margin-left: 20px; font-size: 14px;">创建时间:</span> |
|
|
<input type="date" id="personalStartDate" style="padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;"> |
|
|
<input type="date" id="personalStartDate" style="padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;"> |
|
|
<span style="margin: 0 8px; font-size: 14px;">至</span> |
|
|
<span style="margin: 0 8px; font-size: 14px;">至</span> |
|
|
@ -625,7 +629,7 @@ |
|
|
<th>创建时间</th> |
|
|
<th>创建时间</th> |
|
|
<th>跟进内容</th> |
|
|
<th>跟进内容</th> |
|
|
<th>响应时间</th> |
|
|
<th>响应时间</th> |
|
|
<th id="managerHeader" onclick="toggleManagerFilter()" style="cursor: pointer;">负责人</th> |
|
|
<th id="managerHeader">负责人</th> |
|
|
<th>操作</th> |
|
|
<th>操作</th> |
|
|
</tr> |
|
|
</tr> |
|
|
</thead> |
|
|
</thead> |
|
|
@ -647,6 +651,10 @@ |
|
|
<input type="text" id="publicPhoneSearch" placeholder="搜索手机号" style="margin-left: 20px; padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;"> |
|
|
<input type="text" id="publicPhoneSearch" placeholder="搜索手机号" style="margin-left: 20px; padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;"> |
|
|
<button onclick="searchPublicByPhone()" style="margin-left: 8px; padding: 4px 12px; background-color: #1890ff; color: white; border: none; border-radius: 4px; font-size: 14px;">搜索</button> |
|
|
<button onclick="searchPublicByPhone()" style="margin-left: 8px; padding: 4px 12px; background-color: #1890ff; color: white; border: none; border-radius: 4px; font-size: 14px;">搜索</button> |
|
|
<button onclick="resetPublicPhoneSearch()" style="margin-left: 8px; padding: 4px 12px; background-color: #666; color: white; border: none; border-radius: 4px; font-size: 14px;">重置</button> |
|
|
<button onclick="resetPublicPhoneSearch()" style="margin-left: 8px; padding: 4px 12px; background-color: #666; color: white; border: none; border-radius: 4px; font-size: 14px;">重置</button> |
|
|
|
|
|
<span style="margin-left: 20px; font-size: 14px;">负责人:</span> |
|
|
|
|
|
<select id="publicManagerFilter" onchange="filterPublicByManager()" style="padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;"> |
|
|
|
|
|
<option value="">全部</option> |
|
|
|
|
|
</select> |
|
|
<span style="margin-left: 20px; font-size: 14px;">创建时间:</span> |
|
|
<span style="margin-left: 20px; font-size: 14px;">创建时间:</span> |
|
|
<input type="date" id="publicStartDate" style="padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;"> |
|
|
<input type="date" id="publicStartDate" style="padding: 4px 8px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;"> |
|
|
<span style="margin: 0 8px; font-size: 14px;">至</span> |
|
|
<span style="margin: 0 8px; font-size: 14px;">至</span> |
|
|
@ -674,7 +682,7 @@ |
|
|
<th>创建时间</th> |
|
|
<th>创建时间</th> |
|
|
<th>跟进内容</th> |
|
|
<th>跟进内容</th> |
|
|
<th>响应时间</th> |
|
|
<th>响应时间</th> |
|
|
<th id="publicManagerHeader" onclick="toggleManagerFilter('public')" style="cursor: pointer;">负责人</th> |
|
|
<th id="publicManagerHeader">负责人</th> |
|
|
<th>操作</th> |
|
|
<th>操作</th> |
|
|
</tr> |
|
|
</tr> |
|
|
</thead> |
|
|
</thead> |
|
|
@ -950,7 +958,7 @@ |
|
|
|
|
|
|
|
|
// 只对管理员显示负责人信息 |
|
|
// 只对管理员显示负责人信息 |
|
|
if (userRole === '管理员') { |
|
|
if (userRole === '管理员') { |
|
|
managerCell = '<td onclick="showManagerDropdown(event, this, \'' + (user.managerName || '-') + '\')" style="cursor: pointer; position: relative;">' + (user.managerName || '-') + '</td>'; |
|
|
managerCell = '<td>' + (user.managerName || '-') + '</td>'; |
|
|
} else { |
|
|
} else { |
|
|
managerCell = '<td style="display: none;"></td>'; |
|
|
managerCell = '<td style="display: none;"></td>'; |
|
|
} |
|
|
} |
|
|
@ -1222,13 +1230,24 @@ |
|
|
}; |
|
|
}; |
|
|
dropdown.appendChild(clearOption); |
|
|
dropdown.appendChild(clearOption); |
|
|
|
|
|
|
|
|
// 获取单元格位置并显示菜单 |
|
|
// 固定显示在负责人表头下方 |
|
|
var rect = cell.getBoundingClientRect(); |
|
|
var managerHeader = document.getElementById('managerHeader') || document.getElementById('publicManagerHeader'); |
|
|
var scrollTop = window.pageYOffset || document.documentElement.scrollTop; |
|
|
if (managerHeader) { |
|
|
var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft; |
|
|
var rect = managerHeader.getBoundingClientRect(); |
|
|
|
|
|
var scrollTop = window.pageYOffset || document.documentElement.scrollTop; |
|
|
|
|
|
var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft; |
|
|
|
|
|
|
|
|
|
|
|
dropdown.style.left = (rect.left + scrollLeft) + 'px'; |
|
|
|
|
|
dropdown.style.top = (rect.top + rect.height + scrollTop) + 'px'; |
|
|
|
|
|
} else { |
|
|
|
|
|
// 备用方案:如果找不到表头,显示在单元格下方 |
|
|
|
|
|
var rect = cell.getBoundingClientRect(); |
|
|
|
|
|
var scrollTop = window.pageYOffset || document.documentElement.scrollTop; |
|
|
|
|
|
var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft; |
|
|
|
|
|
|
|
|
dropdown.style.left = (rect.left + scrollLeft) + 'px'; |
|
|
dropdown.style.left = (rect.left + scrollLeft) + 'px'; |
|
|
dropdown.style.top = (rect.top + rect.height + scrollTop) + 'px'; |
|
|
dropdown.style.top = (rect.top + rect.height + scrollTop) + 'px'; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 添加到页面 |
|
|
// 添加到页面 |
|
|
document.body.appendChild(dropdown); |
|
|
document.body.appendChild(dropdown); |
|
|
@ -1510,6 +1529,30 @@ |
|
|
updateFilterTags('public'); |
|
|
updateFilterTags('public'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 筛选个人数据负责人 |
|
|
|
|
|
function filterPersonalByManager() { |
|
|
|
|
|
var managerName = document.getElementById('personalManagerFilter').value; |
|
|
|
|
|
currentManagerFilter = managerName || null; |
|
|
|
|
|
personalPage = 1; // 重置为第一页 |
|
|
|
|
|
|
|
|
|
|
|
// 总是加载所有数据以便筛选 |
|
|
|
|
|
loadAllPersonalData(); |
|
|
|
|
|
|
|
|
|
|
|
// 更新筛选标签 |
|
|
|
|
|
updateFilterTags('personal'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 筛选公海池数据负责人 |
|
|
|
|
|
function filterPublicByManager() { |
|
|
|
|
|
var managerName = document.getElementById('publicManagerFilter').value; |
|
|
|
|
|
currentManagerFilter = managerName || null; |
|
|
|
|
|
publicPage = 1; // 重置为第一页 |
|
|
|
|
|
loadPublicData(); // 重新加载公海池数据 |
|
|
|
|
|
|
|
|
|
|
|
// 更新筛选标签 |
|
|
|
|
|
updateFilterTags('public'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
function loadPublicData() { |
|
|
function loadPublicData() { |
|
|
var userRole = userInfo.loginInfo.projectName; |
|
|
var userRole = userInfo.loginInfo.projectName; |
|
|
var usersManagements = userInfo.usersManagements; |
|
|
var usersManagements = userInfo.usersManagements; |
|
|
@ -2416,7 +2459,7 @@ |
|
|
|
|
|
|
|
|
// 只对管理员显示负责人信息 |
|
|
// 只对管理员显示负责人信息 |
|
|
if (userRole === '管理员') { |
|
|
if (userRole === '管理员') { |
|
|
managerCell = '<td onclick="showManagerDropdown(event, this, \'' + (user.managerName || '-') + '\')" style="cursor: pointer; position: relative;">' + (user.managerName || '-') + '</td>'; |
|
|
managerCell = '<td>' + (user.managerName || '-') + '</td>'; |
|
|
} else { |
|
|
} else { |
|
|
managerCell = '<td style="display: none;"></td>'; |
|
|
managerCell = '<td style="display: none;"></td>'; |
|
|
} |
|
|
} |
|
|
@ -2512,7 +2555,7 @@ |
|
|
|
|
|
|
|
|
// 只对管理员显示负责人信息 |
|
|
// 只对管理员显示负责人信息 |
|
|
if (userRole === '管理员') { |
|
|
if (userRole === '管理员') { |
|
|
managerCell = '<td onclick="showManagerDropdown(event, this, \'' + (user.managerName || '-') + '\')" style="cursor: pointer; position: relative;">' + (user.managerName || '-') + '</td>'; |
|
|
managerCell = '<td>' + (user.managerName || '-') + '</td>'; |
|
|
} else { |
|
|
} else { |
|
|
managerCell = '<td style="display: none;"></td>'; |
|
|
managerCell = '<td style="display: none;"></td>'; |
|
|
} |
|
|
} |
|
|
@ -3005,7 +3048,20 @@ |
|
|
var select = document.getElementById('managerSelect'); |
|
|
var select = document.getElementById('managerSelect'); |
|
|
select.innerHTML = '<option value="">请选择负责人</option>'; |
|
|
select.innerHTML = '<option value="">请选择负责人</option>'; |
|
|
|
|
|
|
|
|
|
|
|
// 清空并初始化负责人筛选下拉框 |
|
|
|
|
|
var personalManagerFilter = document.getElementById('personalManagerFilter'); |
|
|
|
|
|
var publicManagerFilter = document.getElementById('publicManagerFilter'); |
|
|
|
|
|
|
|
|
|
|
|
if (personalManagerFilter) { |
|
|
|
|
|
personalManagerFilter.innerHTML = '<option value="">全部</option>'; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (publicManagerFilter) { |
|
|
|
|
|
publicManagerFilter.innerHTML = '<option value="">全部</option>'; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
managersList.forEach(function(manager) { |
|
|
managersList.forEach(function(manager) { |
|
|
|
|
|
// 填充分配模态框的下拉框 |
|
|
var option = document.createElement('option'); |
|
|
var option = document.createElement('option'); |
|
|
option.value = manager.managerId; |
|
|
option.value = manager.managerId; |
|
|
option.textContent = manager.userName; |
|
|
option.textContent = manager.userName; |
|
|
@ -3016,6 +3072,22 @@ |
|
|
option.setAttribute('data-root', manager.root); |
|
|
option.setAttribute('data-root', manager.root); |
|
|
option.setAttribute('data-assistant', manager.assistant); |
|
|
option.setAttribute('data-assistant', manager.assistant); |
|
|
select.appendChild(option); |
|
|
select.appendChild(option); |
|
|
|
|
|
|
|
|
|
|
|
// 填充个人数据标签页的负责人筛选下拉框 |
|
|
|
|
|
if (personalManagerFilter) { |
|
|
|
|
|
var personalOption = document.createElement('option'); |
|
|
|
|
|
personalOption.value = manager.userName; |
|
|
|
|
|
personalOption.textContent = manager.userName; |
|
|
|
|
|
personalManagerFilter.appendChild(personalOption); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 填充公海池数据标签页的负责人筛选下拉框 |
|
|
|
|
|
if (publicManagerFilter) { |
|
|
|
|
|
var publicOption = document.createElement('option'); |
|
|
|
|
|
publicOption.value = manager.userName; |
|
|
|
|
|
publicOption.textContent = manager.userName; |
|
|
|
|
|
publicManagerFilter.appendChild(publicOption); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|