From dbb5071bf5e748275cd0300445d29cbf5d7421c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?=
<15778543+xufeiyang6017@user.noreply.gitee.com>
Date: Wed, 21 Jan 2026 10:51:29 +0800
Subject: [PATCH 1/3] Add dropdown menu functionality for manager cells on
click
---
web/src/main/resources/static/index.html | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/web/src/main/resources/static/index.html b/web/src/main/resources/static/index.html
index aff98c1..7b9c138 100644
--- a/web/src/main/resources/static/index.html
+++ b/web/src/main/resources/static/index.html
@@ -949,7 +949,7 @@
// 只对管理员显示负责人信息
if (userRole === '管理员') {
- managerCell = '
' + (user.managerName || '-') + ' | ';
+ managerCell = '' + (user.managerName || '-') + ' | ';
} else {
managerCell = ' | ';
}
@@ -2190,7 +2190,7 @@
// 只对管理员显示负责人信息
if (userRole === '管理员') {
- managerCell = '' + (user.managerName || '-') + ' | ';
+ managerCell = '' + (user.managerName || '-') + ' | ';
} else {
managerCell = ' | ';
}
@@ -2286,7 +2286,7 @@
// 只对管理员显示负责人信息
if (userRole === '管理员') {
- managerCell = '' + (user.managerName || '-') + ' | ';
+ managerCell = '' + (user.managerName || '-') + ' | ';
} else {
managerCell = ' | ';
}
From 0a139f92eda59ba54f6b669e9ac4e42806ef5012 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=90=E9=A3=9E=E6=B4=8B?=
<15778543+xufeiyang6017@user.noreply.gitee.com>
Date: Wed, 21 Jan 2026 10:54:58 +0800
Subject: [PATCH 2/3] Fix manager dropdown positioning to display correctly
below cells
---
web/src/main/resources/static/index.html | 108 +++++++++++++++++++++++
1 file changed, 108 insertions(+)
diff --git a/web/src/main/resources/static/index.html b/web/src/main/resources/static/index.html
index 7b9c138..14a088e 100644
--- a/web/src/main/resources/static/index.html
+++ b/web/src/main/resources/static/index.html
@@ -1132,6 +1132,114 @@
});
}
+ function showManagerDropdown(event, cell, managerName) {
+ // 防止事件冒泡
+ event.stopPropagation();
+
+ // 移除已存在的下拉菜单
+ var existingDropdown = document.getElementById('managerDropdown');
+ if (existingDropdown) {
+ existingDropdown.remove();
+ }
+
+ // 创建下拉菜单
+ var dropdown = document.createElement('div');
+ dropdown.id = 'managerDropdown';
+ dropdown.style.cssText = `
+ position: absolute;
+ background-color: white;
+ border: 1px solid #d9d9d9;
+ border-radius: 4px;
+ box-shadow: 0 4px 12px rgba(0,0,0,0.15);
+ z-index: 1001;
+ padding: 8px 0;
+ min-width: 150px;
+ max-height: 200px;
+ overflow-y: auto;
+ `;
+
+ // 添加查看详情选项
+ var detailOption = document.createElement('div');
+ detailOption.textContent = '查看详情';
+ detailOption.style.cssText = `
+ padding: 8px 16px;
+ cursor: pointer;
+ font-size: 14px;
+ `;
+ detailOption.onmouseover = function() {
+ this.style.backgroundColor = '#f5f5f5';
+ };
+ detailOption.onmouseout = function() {
+ this.style.backgroundColor = 'white';
+ };
+ detailOption.onclick = function() {
+ // 这里可以添加查看负责人详情的逻辑
+ showAlert('查看负责人:' + managerName + ' 的详情');
+ dropdown.remove();
+ };
+ dropdown.appendChild(detailOption);
+
+ // 添加筛选此负责人选项
+ var filterOption = document.createElement('div');
+ filterOption.textContent = '筛选此负责人';
+ filterOption.style.cssText = `
+ padding: 8px 16px;
+ cursor: pointer;
+ font-size: 14px;
+ `;
+ filterOption.onmouseover = function() {
+ this.style.backgroundColor = '#f5f5f5';
+ };
+ filterOption.onmouseout = function() {
+ this.style.backgroundColor = 'white';
+ };
+ filterOption.onclick = function() {
+ currentManagerFilter = managerName;
+ applyManagerFilter();
+ dropdown.remove();
+ };
+ dropdown.appendChild(filterOption);
+
+ // 添加清除筛选选项
+ var clearOption = document.createElement('div');
+ clearOption.textContent = '清除筛选';
+ clearOption.style.cssText = `
+ padding: 8px 16px;
+ cursor: pointer;
+ font-size: 14px;
+ `;
+ clearOption.onmouseover = function() {
+ this.style.backgroundColor = '#f5f5f5';
+ };
+ clearOption.onmouseout = function() {
+ this.style.backgroundColor = 'white';
+ };
+ clearOption.onclick = function() {
+ currentManagerFilter = null;
+ applyManagerFilter();
+ dropdown.remove();
+ };
+ dropdown.appendChild(clearOption);
+
+ // 获取单元格位置并显示菜单
+ 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.top = (rect.top + rect.height + scrollTop) + 'px';
+
+ // 添加到页面
+ document.body.appendChild(dropdown);
+
+ // 点击页面其他地方关闭菜单
+ document.addEventListener('click', function closeDropdown(event) {
+ if (!dropdown.contains(event.target) && event.target !== cell) {
+ dropdown.remove();
+ }
+ });
+ }
+
function applyManagerFilter() {
if (currentFilterTable === 'personal') {
// 个人表格筛选
From 3769aa0ac1fa64ef68ea8feec5630e0188d09040 Mon Sep 17 00:00:00 2001
From: Default User
Date: Wed, 21 Jan 2026 11:00:40 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=A2=E6=88=B7?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AD=89=E7=BA=A7=E6=98=A0=E5=B0=84=E5=92=8C?=
=?UTF-8?q?=E5=85=AC=E6=B5=B7=E6=B1=A0=E6=95=B0=E6=8D=AE=E6=94=AF=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/main/resources/static/index.html | 195 ++++++++++++++++++++++-
1 file changed, 192 insertions(+), 3 deletions(-)
diff --git a/web/src/main/resources/static/index.html b/web/src/main/resources/static/index.html
index 14a088e..209e62b 100644
--- a/web/src/main/resources/static/index.html
+++ b/web/src/main/resources/static/index.html
@@ -700,6 +700,7 @@
var managersList = [];
var allPersonalData = [];
+ var allPublicData = [];
var isLoadingAllData = false;
var currentManagerFilter = null;
var currentFilterTable = 'personal';
@@ -976,7 +977,7 @@
'' + (user.followup || '-') + ' | ' +
'' + responseTime + ' | ' +
managerCell +
- ' ' + jianDaoYunButton + ' | ' +
+ ' ' + jianDaoYunButton + ' | ' +
'';
personalBody.innerHTML += row;
@@ -1550,6 +1551,10 @@
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
var data = JSON.parse(xhr.responseText);
+ // 保存公海池数据到全局变量
+ if (data.users) {
+ allPublicData = data.users;
+ }
displayPublicData(data);
renderPublicPagination(data.page, data.pages);
}
@@ -1947,6 +1952,104 @@
`;
+ // 详情弹窗HTML
+ var detailModalHTML = `
+
+
+
客户详情
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `;
+
// 分配弹窗HTML
var assignModalHTML = `
@@ -2026,6 +2129,7 @@
document.body.insertAdjacentHTML('beforeend', followupModalHTML);
document.body.insertAdjacentHTML('beforeend', returnModalHTML);
document.body.insertAdjacentHTML('beforeend', jianDaoYunModalHTML);
+ document.body.insertAdjacentHTML('beforeend', detailModalHTML);
document.body.insertAdjacentHTML('beforeend', assignModalHTML);
document.body.insertAdjacentHTML('beforeend', alertModalHTML);
document.body.insertAdjacentHTML('beforeend', typeHelpModalHTML);
@@ -2050,6 +2154,8 @@
closeAssignModal();
} else if (modalId === 'typeHelpModal') {
closeTypeHelpModal();
+ } else if (modalId === 'detailModal') {
+ closeDetailModal();
}
}
});
@@ -2063,6 +2169,7 @@
addModalOutsideClose('alertModal');
addModalOutsideClose('assignModal');
addModalOutsideClose('typeHelpModal');
+ addModalOutsideClose('detailModal');
function showTypeHelp() {
document.getElementById('typeHelpModal').style.display = 'block';
@@ -2187,6 +2294,17 @@
return typeMap[type] || type;
}
+ function mapUserLevel(level) {
+ var levelMap = {
+ 'important': 'A-重要客户',
+ 'ordinary': 'B-普通客户',
+ 'low_value': 'C-低价值客户',
+ 'logistics': 'D-物流自提客户',
+ 'unclassified': '-'
+ };
+ return levelMap[level] || level;
+ }
+
function calculateResponseTime(createdAt, followupAt) {
if (!createdAt || !followupAt) return '-';
var createTime = new Date(createdAt);
@@ -2325,7 +2443,7 @@
'
' + (user.followup || '-') + ' | ' +
'' + responseTime + ' | ' +
managerCell +
- ' ' + jianDaoYunButton + ' | ' +
+ ' ' + jianDaoYunButton + ' | ' +
'';
personalBody.innerHTML += row;
@@ -2408,7 +2526,7 @@
'' + (user.followup || '-') + ' | ' +
'' + responseTime + ' | ' +
managerCell +
- ' | ' +
+ ' | ' +
'';
publicBody.innerHTML += row;
@@ -2605,6 +2723,77 @@
document.body.style.overflow = 'auto';
}
+ function openDetailModal(userId) {
+ // 根据userId查找用户数据
+ var user = null;
+
+ // 首先在个人数据中查找
+ if (allPersonalData.length > 0) {
+ for (var i = 0; i < allPersonalData.length; i++) {
+ if (allPersonalData[i].userId === userId) {
+ user = allPersonalData[i];
+ break;
+ }
+ }
+ }
+
+ // 如果在个人数据中找不到,尝试在公海池数据中查找
+ if (!user && allPublicData.length > 0) {
+ for (var i = 0; i < allPublicData.length; i++) {
+ if (allPublicData[i].userId === userId) {
+ user = allPublicData[i];
+ break;
+ }
+ }
+ }
+
+ if (!user) {
+ // 如果在所有数据源中都找不到
+ showAlert('未找到该客户数据');
+ return;
+ }
+
+ // 填充客户详情数据
+ document.getElementById('detailUserId').textContent = user.userId || '-';
+ document.getElementById('detailUserName').textContent = user.nickName || '-';
+ document.getElementById('detailPhone').textContent = user.phoneNumber || '-';
+ document.getElementById('detailType').textContent = mapUserType(user.type) || '-';
+ document.getElementById('detailCreatedAt').textContent = formatDateTime(user.created_at) || '-';
+ document.getElementById('detailFollowup').textContent = user.followup || '-';
+
+ var responseTime = calculateResponseTime(user.created_at, user.followup_at);
+ document.getElementById('detailResponseTime').textContent = responseTime;
+
+ document.getElementById('detailManagerName').textContent = user.managerName || '-';
+
+ // 显示简道云状态
+ var syncStatus = '';
+ if (user.sync_statuss === 0 || user.sync_statuss === 1) {
+ syncStatus = '已写入简道云';
+ } else {
+ syncStatus = '未写入简道云';
+ }
+ document.getElementById('detailSyncStatus').textContent = syncStatus;
+
+ // 显示其他可能的字段
+ document.getElementById('detailLevel').textContent = mapUserLevel(user.level) || '-';
+ document.getElementById('detailRegion').textContent = user.region || '-';
+ document.getElementById('detailDetailedAddress').textContent = user.detailedaddress || '-';
+ document.getElementById('detailCompany').textContent = user.company || '-';
+ document.getElementById('detailDemand').textContent = user.demand || '-';
+
+ // 显示弹窗
+ document.getElementById('detailModal').style.display = 'block';
+ // 防止背景滚动
+ document.body.style.overflow = 'hidden';
+ }
+
+ function closeDetailModal() {
+ document.getElementById('detailModal').style.display = 'none';
+ // 恢复背景滚动
+ document.body.style.overflow = 'auto';
+ }
+
function saveJianDaoYun() {
var userId = document.getElementById('jianDaoYunUserId').value;
var usersManagements = userInfo.usersManagements;