Browse Source

修复公海池认领功能的前端错误

master
Trae AI 2 months ago
parent
commit
e33993ee17
  1. 14
      src/main/resources/static/sells.html
  2. 20
      src/main/resources/static/supply.html

14
src/main/resources/static/sells.html

@ -5066,10 +5066,16 @@
if (data.success) { if (data.success) {
alert('客户认领成功!'); alert('客户认领成功!');
// 刷新公海池列表 // 刷新公海池列表
if (currentTab === 'departmentSeaPool') { // 检查哪个公海池表格当前可见
showDepartmentSeaPool(); const departmentTable = document.getElementById('department-sea-pools-customers');
} else if (currentTab === 'organizationSeaPool') { const organizationTable = document.getElementById('organization-sea-pools-customers');
showOrganizationSeaPool();
if (departmentTable && departmentTable.style.display === 'table-row-group') {
// 如果部门公海池表格可见,直接更新表格
updateDepartmentSeaPoolTable();
} else if (organizationTable && organizationTable.style.display === 'table-row-group') {
// 如果组织公海池表格可见,直接更新表格
updateOrganizationSeaPoolTable();
} }
} else { } else {
alert('客户认领失败: ' + (data.message || '未知错误')); alert('客户认领失败: ' + (data.message || '未知错误'));

20
src/main/resources/static/supply.html

@ -5069,10 +5069,16 @@
if (data.success) { if (data.success) {
alert('客户认领成功!'); alert('客户认领成功!');
// 刷新公海池列表 // 刷新公海池列表
if (currentTab === 'departmentSeaPool') { // 检查哪个公海池表格当前可见
showDepartmentSeaPool(); const departmentTable = document.getElementById('department-sea-pools-customers');
} else if (currentTab === 'organizationSeaPool') { const organizationTable = document.getElementById('organization-sea-pools-customers');
showOrganizationSeaPool();
if (departmentTable && departmentTable.style.display === 'table-row-group') {
// 如果部门公海池表格可见,直接重新渲染
renderDepartmentSeaPool(departmentSeaPoolData);
} else if (organizationTable && organizationTable.style.display === 'table-row-group') {
// 如果组织公海池表格可见,直接重新渲染
renderOrganizationSeaPool(organizationSeaPoolData);
} }
} else { } else {
alert('客户认领失败: ' + (data.message || '未知错误')); alert('客户认领失败: ' + (data.message || '未知错误'));
@ -6183,6 +6189,9 @@
customerData[customer.id] = customer; customerData[customer.id] = customer;
}); });
// 更新全局部门公海池数据
departmentSeaPoolData = finalFilteredCustomers;
renderDepartmentSeaPool(finalFilteredCustomers); renderDepartmentSeaPool(finalFilteredCustomers);
}); });
@ -6212,6 +6221,9 @@
customerData[customer.id] = customer; customerData[customer.id] = customer;
}); });
// 更新全局组织公海池数据
organizationSeaPoolData = finalFilteredCustomers;
renderOrganizationSeaPool(finalFilteredCustomers); renderOrganizationSeaPool(finalFilteredCustomers);
}); });

Loading…
Cancel
Save