|
|
@ -747,7 +747,6 @@ |
|
|
let suppliesData = []; |
|
|
let suppliesData = []; |
|
|
let usersData = []; |
|
|
let usersData = []; |
|
|
let chartData = []; |
|
|
let chartData = []; |
|
|
let isLoading = false; // 防重复点击标志 |
|
|
|
|
|
|
|
|
|
|
|
// 缓存相关变量 |
|
|
// 缓存相关变量 |
|
|
let suppliesCache = {}; // 货源数据缓存 |
|
|
let suppliesCache = {}; // 货源数据缓存 |
|
|
@ -1271,12 +1270,6 @@ |
|
|
|
|
|
|
|
|
// 设置筛选条件 |
|
|
// 设置筛选条件 |
|
|
function setFilter(filter) { |
|
|
function setFilter(filter) { |
|
|
// 防重复点击检查 |
|
|
|
|
|
if (isLoading) { |
|
|
|
|
|
console.log('数据正在加载中,请勿重复点击'); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
currentFilter = filter; |
|
|
currentFilter = filter; |
|
|
|
|
|
|
|
|
// 重置当前卖家ID,确保切换时间筛选时显示所有货源 |
|
|
// 重置当前卖家ID,确保切换时间筛选时显示所有货源 |
|
|
@ -1296,12 +1289,6 @@ |
|
|
|
|
|
|
|
|
// 应用自定义时间筛选 |
|
|
// 应用自定义时间筛选 |
|
|
function applyCustomFilter() { |
|
|
function applyCustomFilter() { |
|
|
// 防重复点击检查 |
|
|
|
|
|
if (isLoading) { |
|
|
|
|
|
console.log('数据正在加载中,请勿重复点击'); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const startDate = startDateInput.value; |
|
|
const startDate = startDateInput.value; |
|
|
const endDate = endDateInput.value; |
|
|
const endDate = endDateInput.value; |
|
|
|
|
|
|
|
|
@ -1414,15 +1401,7 @@ |
|
|
|
|
|
|
|
|
// 加载统计数据 |
|
|
// 加载统计数据 |
|
|
async function loadStats(filter, startDate = '', endDate = '') { |
|
|
async function loadStats(filter, startDate = '', endDate = '') { |
|
|
// 防重复点击检查 |
|
|
|
|
|
if (isLoading) { |
|
|
|
|
|
console.log('数据正在加载中,请勿重复点击'); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
isLoading = true; |
|
|
|
|
|
|
|
|
|
|
|
// 构建API请求URL,包含自定义日期参数 |
|
|
// 构建API请求URL,包含自定义日期参数 |
|
|
let url = `/api/admin/stats/supplies?filter=${filter}`; |
|
|
let url = `/api/admin/stats/supplies?filter=${filter}`; |
|
|
if (filter === 'custom') { |
|
|
if (filter === 'custom') { |
|
|
@ -1490,8 +1469,6 @@ |
|
|
showAllSupplies(); |
|
|
showAllSupplies(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} finally { |
|
|
|
|
|
isLoading = false; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|