```
feat(scheduler): 更新定时任务配置以支持中标与招标分别设置阈值 将原先单一的 threshold 配置项拆分为 winningThreshold 和 bidThreshold, 分别用于控制中标公示和招标公告的金额筛选条件。同时调整了默认值及描述信息, 使配置更清晰灵活。 此外,更新了定时任务状态展示逻辑,支持显示两个独立的阈值及其单位转换(万元/亿元)。 当阈值为 0 时显示“不筛选”,提高用户理解度。 配置文件 config.json 中相关字段已同步修改,并调整了时间范围字段 timeRange 的默认值。 ```
This commit is contained in:
331
public/app.js
331
public/app.js
@@ -90,7 +90,7 @@ function displayList(items, container) {
|
||||
<div class="meta">标段编号: ${item.bidNo}</div>
|
||||
<div class="meta">标段名称: ${item.bidName}</div>
|
||||
<div class="meta">发布日期: ${item.date}</div>
|
||||
<span class="budget">${item.budget.amount}${item.budget.unit}</span>
|
||||
<span class="budget">${item.winningBid.amount}${item.winningBid.unit}</span>
|
||||
${item.href ? `<br><a href="${item.href}" target="_blank">查看详情 →</a>` : ''}
|
||||
</div>
|
||||
`).join('')}
|
||||
@@ -189,7 +189,7 @@ function displayReport(report, container) {
|
||||
<div class="meta">标段编号: ${project.bidNo || '-'}</div>
|
||||
<div class="meta">标段名称: ${project.bidName || '-'}</div>
|
||||
<div class="meta">发布日期: ${project.date}</div>
|
||||
<span class="budget">${project.budget.amount}${project.budget.unit}</span>
|
||||
<span class="budget">${project.winningBid.amount}${project.winningBid.unit}</span>
|
||||
${project.url ? `<br><a href="${project.url}" target="_blank">查看详情 →</a>` : ''}
|
||||
</div>
|
||||
`).join('')}
|
||||
@@ -319,7 +319,7 @@ async function exportReport() {
|
||||
new Paragraph({
|
||||
children: [
|
||||
new TextRun({ text: '合同估算价: ', bold: true }),
|
||||
new TextRun({ text: `${project.budget.amount}${project.budget.unit}` })
|
||||
new TextRun({ text: `${project.winningBid.amount}${project.winningBid.unit}` })
|
||||
],
|
||||
spacing: { after: 50 }
|
||||
}),
|
||||
@@ -597,7 +597,8 @@ async function loadSchedulerConfig() {
|
||||
document.getElementById('schedulerEnabled').checked = config.scheduler.enabled || false;
|
||||
const cronTime = config.scheduler.cronTime || '0 9 * * *';
|
||||
document.getElementById('schedulerCronInput').value = cronTime;
|
||||
document.getElementById('schedulerThresholdInput').value = config.scheduler.threshold || 10000;
|
||||
document.getElementById('schedulerWinningThresholdInput').value = config.scheduler.winningThreshold !== undefined ? config.scheduler.winningThreshold : 10000;
|
||||
document.getElementById('schedulerBidThresholdInput').value = config.scheduler.bidThreshold !== undefined ? config.scheduler.bidThreshold : 0;
|
||||
document.getElementById('schedulerDescription').value = config.scheduler.description || '';
|
||||
|
||||
// 时间段配置
|
||||
@@ -705,8 +706,20 @@ async function updateSchedulerStatus() {
|
||||
// 更新执行计划
|
||||
if (status.config) {
|
||||
document.getElementById('schedulerCronTime').textContent = cronToFriendlyText(status.config.cronTime);
|
||||
const thresholdBillion = (status.config.threshold / 10000).toFixed(1);
|
||||
document.getElementById('schedulerThreshold').textContent = `${status.config.threshold}万元 (${thresholdBillion}亿)`;
|
||||
const winningThreshold = status.config.winningThreshold;
|
||||
if (winningThreshold === 0) {
|
||||
document.getElementById('schedulerWinningThreshold').textContent = '不筛选';
|
||||
} else {
|
||||
const winningBillion = (winningThreshold / 10000).toFixed(1);
|
||||
document.getElementById('schedulerWinningThreshold').textContent = `${winningThreshold}万元 (${winningBillion}亿)`;
|
||||
}
|
||||
const bidThreshold = status.config.bidThreshold;
|
||||
if (bidThreshold === 0) {
|
||||
document.getElementById('schedulerBidThreshold').textContent = '不筛选';
|
||||
} else {
|
||||
const bidBillion = (bidThreshold / 10000).toFixed(1);
|
||||
document.getElementById('schedulerBidThreshold').textContent = `${bidThreshold}万元 (${bidBillion}亿)`;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -719,7 +732,8 @@ async function saveSchedulerConfig() {
|
||||
const schedulerConfig = {
|
||||
enabled: document.getElementById('schedulerEnabled').checked,
|
||||
cronTime: document.getElementById('schedulerCronInput').value,
|
||||
threshold: parseInt(document.getElementById('schedulerThresholdInput').value),
|
||||
winningThreshold: parseInt(document.getElementById('schedulerWinningThresholdInput').value),
|
||||
bidThreshold: parseInt(document.getElementById('schedulerBidThresholdInput').value),
|
||||
description: document.getElementById('schedulerDescription').value,
|
||||
timeRange: document.getElementById('schedulerTimeRange').value
|
||||
};
|
||||
@@ -834,3 +848,306 @@ function showSchedulerStatus(message, type) {
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 招标公告列表功能 ==========
|
||||
let currentBidListPage = 1;
|
||||
|
||||
// 获取招标公告列表
|
||||
async function fetchBidList(pageNum) {
|
||||
const page = pageNum || parseInt(document.getElementById('bidListPage').value) || 1;
|
||||
const loading = document.getElementById('bidListLoading');
|
||||
const results = document.getElementById('bidListResults');
|
||||
const pagination = document.getElementById('bidListPagination');
|
||||
|
||||
currentBidListPage = page;
|
||||
document.getElementById('bidListPage').value = page;
|
||||
|
||||
loading.classList.add('active');
|
||||
results.innerHTML = '';
|
||||
pagination.style.display = 'none';
|
||||
|
||||
try {
|
||||
const response = await fetch(`${API_BASE}/bid-announce/list?page=${page}`);
|
||||
const data = await response.json();
|
||||
|
||||
if (data.success) {
|
||||
displayBidList(data.data, results);
|
||||
updateBidListPagination(page, data.data.length > 0);
|
||||
} else {
|
||||
results.innerHTML = `<div class="error">错误: ${data.error}</div>`;
|
||||
}
|
||||
} catch (error) {
|
||||
results.innerHTML = `<div class="error">请求失败: ${error.message}</div>`;
|
||||
} finally {
|
||||
loading.classList.remove('active');
|
||||
}
|
||||
}
|
||||
|
||||
function goToBidListPage(page) {
|
||||
if (page < 1) return;
|
||||
fetchBidList(page);
|
||||
}
|
||||
|
||||
function updateBidListPagination(page, hasData) {
|
||||
const pagination = document.getElementById('bidListPagination');
|
||||
const currentPageSpan = document.getElementById('bidCurrentPage');
|
||||
const prevBtn = document.getElementById('bidPrevPage');
|
||||
const firstBtn = document.getElementById('bidFirstPage');
|
||||
const nextBtn = document.getElementById('bidNextPage');
|
||||
|
||||
if (hasData) {
|
||||
pagination.style.display = 'flex';
|
||||
currentPageSpan.textContent = page;
|
||||
|
||||
prevBtn.disabled = page <= 1;
|
||||
firstBtn.disabled = page <= 1;
|
||||
nextBtn.disabled = !hasData;
|
||||
}
|
||||
}
|
||||
|
||||
function displayBidList(items, container) {
|
||||
if (items.length === 0) {
|
||||
container.innerHTML = '<p>没有找到招标公告</p>';
|
||||
return;
|
||||
}
|
||||
|
||||
const html = `
|
||||
<div class="simple-list">
|
||||
<h3 style="margin-bottom: 15px; color: #e67e22;">找到 ${items.length} 条招标公告</h3>
|
||||
${items.map((item, index) => `
|
||||
<div class="list-item" style="border-left-color: #e67e22;">
|
||||
<h3>${index + 1}. ${item.title}</h3>
|
||||
<div class="meta">发布日期: ${item.date}</div>
|
||||
${item.href ? `<a href="${item.href}" target="_blank" style="color: #e67e22;">查看详情 →</a>` : ''}
|
||||
</div>
|
||||
`).join('')}
|
||||
</div>
|
||||
`;
|
||||
|
||||
container.innerHTML = html;
|
||||
}
|
||||
|
||||
// ========== 综合报告功能 ==========
|
||||
let currentWinningReport = null;
|
||||
let currentBidReport = null;
|
||||
|
||||
// 初始化报告日期
|
||||
function initReportDates() {
|
||||
const today = new Date();
|
||||
const firstDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 1);
|
||||
|
||||
document.getElementById('startDate').value = firstDayOfMonth.toISOString().split('T')[0];
|
||||
document.getElementById('endDate').value = today.toISOString().split('T')[0];
|
||||
}
|
||||
|
||||
// 生成综合报告(同时包含中标和招标)
|
||||
async function generateCombinedReport() {
|
||||
const startDate = document.getElementById('startDate').value;
|
||||
const endDate = document.getElementById('endDate').value;
|
||||
const maxPages = parseInt(document.getElementById('maxPages').value) || 10;
|
||||
const winningThreshold = parseFloat(document.getElementById('reportThreshold').value) * 10000 || 0; // 转换为元
|
||||
const bidThreshold = parseFloat(document.getElementById('bidReportThreshold').value) * 10000 || 0;
|
||||
|
||||
if (!startDate && !endDate) {
|
||||
alert('请至少填写开始日期或结束日期');
|
||||
return;
|
||||
}
|
||||
|
||||
const loading = document.getElementById('reportLoading');
|
||||
const loadingText = document.getElementById('reportLoadingText');
|
||||
const results = document.getElementById('reportResults');
|
||||
const sendBtn = document.getElementById('sendEmailBtn');
|
||||
|
||||
loading.classList.add('active');
|
||||
results.innerHTML = '';
|
||||
sendBtn.style.display = 'none';
|
||||
|
||||
try {
|
||||
// 1. 先获取中标报告
|
||||
loadingText.textContent = '正在采集中标公示...';
|
||||
const winningResponse = await fetch(`${API_BASE}/report-daterange`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ startDate, endDate, threshold: winningThreshold, maxPages })
|
||||
});
|
||||
const winningData = await winningResponse.json();
|
||||
|
||||
// 2. 再获取招标报告
|
||||
loadingText.textContent = '正在采集招标公告...';
|
||||
const bidResponse = await fetch(`${API_BASE}/bid-announce/report`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ startDate, endDate, maxPages, threshold: bidThreshold })
|
||||
});
|
||||
const bidData = await bidResponse.json();
|
||||
|
||||
// 3. 显示综合报告
|
||||
if (winningData.success && bidData.success) {
|
||||
currentWinningReport = winningData.data;
|
||||
currentBidReport = bidData.data;
|
||||
displayCombinedReport(winningData.data, bidData.data, results);
|
||||
sendBtn.style.display = 'inline-block';
|
||||
} else {
|
||||
let errorMsg = '';
|
||||
if (!winningData.success) errorMsg += `中标报告错误: ${winningData.error}\n`;
|
||||
if (!bidData.success) errorMsg += `招标报告错误: ${bidData.error}`;
|
||||
results.innerHTML = `<div class="error">${errorMsg}</div>`;
|
||||
}
|
||||
} catch (error) {
|
||||
results.innerHTML = `<div class="error">请求失败: ${error.message}</div>`;
|
||||
} finally {
|
||||
loading.classList.remove('active');
|
||||
loadingText.textContent = '正在生成报告...';
|
||||
}
|
||||
}
|
||||
|
||||
// 显示综合报告
|
||||
function displayCombinedReport(winningReport, bidReport, container) {
|
||||
const html = `
|
||||
<!-- 中标公示部分 -->
|
||||
<div class="summary" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);">
|
||||
<h2>中标公示报告</h2>
|
||||
<div class="stat">
|
||||
<div class="stat-label">总项目数</div>
|
||||
<div class="stat-value">${winningReport.summary.total_count}</div>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<div class="stat-label">符合条件</div>
|
||||
<div class="stat-value">${winningReport.summary.filtered_count}</div>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<div class="stat-label">总金额</div>
|
||||
<div class="stat-value">${winningReport.summary.total_amount}</div>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<div class="stat-label">阈值</div>
|
||||
<div class="stat-value">${winningReport.summary.threshold}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
${winningReport.projects.length === 0 ? '<p style="color: #999; margin-bottom: 20px;">暂无符合条件的中标项目</p>' : `
|
||||
<h3 style="margin-bottom: 15px;">中标项目列表 (${winningReport.projects.length} 条)</h3>
|
||||
<div class="simple-list" style="margin-bottom: 30px;">
|
||||
${winningReport.projects.map((project, index) => `
|
||||
<div class="list-item">
|
||||
<h3>${index + 1}. ${project.title}</h3>
|
||||
<div class="meta">标段编号: ${project.bidNo || '-'}</div>
|
||||
<div class="meta">标段名称: ${project.bidName || '-'}</div>
|
||||
<div class="meta">发布日期: ${project.date}</div>
|
||||
<span class="budget">${project.winningBid.amount}${project.winningBid.unit}</span>
|
||||
${project.url ? `<br><a href="${project.url}" target="_blank">查看详情 →</a>` : ''}
|
||||
</div>
|
||||
`).join('')}
|
||||
</div>
|
||||
`}
|
||||
|
||||
<!-- 招标公告部分 -->
|
||||
<div class="summary" style="background: linear-gradient(135deg, #e67e22 0%, #d35400 100%); margin-top: 30px;">
|
||||
<h2>招标公告报告</h2>
|
||||
<div class="stat">
|
||||
<div class="stat-label">总公告数量</div>
|
||||
<div class="stat-value">${bidReport.summary.total_count} 条</div>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<div class="stat-label">有金额信息</div>
|
||||
<div class="stat-value">${bidReport.summary.has_amount_count || bidReport.summary.filtered_count} 条</div>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<div class="stat-label">金额阈值</div>
|
||||
<div class="stat-value">${bidReport.summary.threshold || '无'}</div>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<div class="stat-label">合同估算总额</div>
|
||||
<div class="stat-value">${bidReport.summary.total_amount}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
${bidReport.projects.length === 0 ? '<p style="color: #999;">暂无符合条件的招标项目</p>' : `
|
||||
<h3 style="margin-bottom: 15px; color: #e67e22;">招标项目详情 (${bidReport.projects.length} 条)</h3>
|
||||
<div class="simple-list">
|
||||
${bidReport.projects.map((item, index) => `
|
||||
<div class="list-item" style="border-left-color: #e67e22;">
|
||||
<h3>${index + 1}. ${item.title}</h3>
|
||||
<div class="meta">发布日期: ${item.date}</div>
|
||||
${item.bidCode ? `<div class="meta">标段编码: ${item.bidCode}</div>` : ''}
|
||||
${item.tenderee ? `<div class="meta">招标人: ${item.tenderee}</div>` : ''}
|
||||
${item.duration ? `<div class="meta">工期: ${item.duration} 日历天</div>` : ''}
|
||||
${item.estimatedAmount ? `
|
||||
<span class="budget" style="background: #e67e22;">合同估算价: ${item.estimatedAmount.amountWan} 万元</span>
|
||||
` : ''}
|
||||
<br><a href="${item.url}" target="_blank" style="color: #e67e22;">查看详情 →</a>
|
||||
</div>
|
||||
`).join('')}
|
||||
</div>
|
||||
`}
|
||||
`;
|
||||
|
||||
container.innerHTML = html;
|
||||
}
|
||||
|
||||
// 发送综合报告邮件
|
||||
async function sendCombinedReportByEmail() {
|
||||
if (!currentWinningReport && !currentBidReport) {
|
||||
alert('请先生成报告');
|
||||
return;
|
||||
}
|
||||
|
||||
// 从localStorage获取邮件配置
|
||||
const emailConfigStr = localStorage.getItem('emailConfig');
|
||||
if (!emailConfigStr) {
|
||||
alert('请先在"邮件配置"页面配置邮件服务器信息');
|
||||
return;
|
||||
}
|
||||
|
||||
let emailConfig;
|
||||
try {
|
||||
emailConfig = JSON.parse(emailConfigStr);
|
||||
} catch (e) {
|
||||
alert('邮件配置解析失败,请重新配置');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!emailConfig.smtpHost || !emailConfig.smtpUser || !emailConfig.smtpPass || !emailConfig.recipients) {
|
||||
alert('邮件配置不完整,请检查SMTP服务器、用户名、密码和收件人');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!confirm(`确定要将综合报告发送到以下邮箱吗?\n\n${emailConfig.recipients}`)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const sendBtn = document.getElementById('sendEmailBtn');
|
||||
const originalText = sendBtn.textContent;
|
||||
sendBtn.disabled = true;
|
||||
sendBtn.textContent = '正在发送...';
|
||||
|
||||
try {
|
||||
const response = await fetch(`${API_BASE}/send-combined-email`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
emailConfig,
|
||||
winningReport: currentWinningReport,
|
||||
bidReport: currentBidReport
|
||||
})
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
if (data.success) {
|
||||
alert('综合报告邮件发送成功!');
|
||||
} else {
|
||||
alert(`邮件发送失败: ${data.error}`);
|
||||
}
|
||||
} catch (error) {
|
||||
alert(`请求失败: ${error.message}`);
|
||||
} finally {
|
||||
sendBtn.disabled = false;
|
||||
sendBtn.textContent = originalText;
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载时初始化报告日期
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
initReportDates();
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>南京公共资源交易平台 - 合同估算价采集工具</title>
|
||||
<title>南京公共资源交易平台 - 中标价格采集工具</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
@@ -329,11 +329,12 @@
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>南京公共资源交易平台</h1>
|
||||
<p>房建市政招标公告 - 合同估算价采集工具</p>
|
||||
<p>交通水务中标结果公示 - 中标价格采集工具</p>
|
||||
</div>
|
||||
|
||||
<div class="tabs">
|
||||
<button class="tab active" onclick="switchTab('list')">公告列表</button>
|
||||
<button class="tab active" onclick="switchTab('list')">中标公示</button>
|
||||
<button class="tab" onclick="switchTab('bidAnnounce')">招标公告</button>
|
||||
<button class="tab" onclick="switchTab('report')">生成报告</button>
|
||||
<button class="tab" onclick="switchTab('scheduler')">定时任务</button>
|
||||
<button class="tab" onclick="switchTab('email')">邮件配置</button>
|
||||
@@ -363,49 +364,64 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 招标公告 -->
|
||||
<div id="bidAnnounce" class="tab-content">
|
||||
<h2 style="margin-bottom: 20px; color: #e67e22;">交通水务招标公告</h2>
|
||||
<p style="color: #666; margin-bottom: 20px;">浏览招标公告列表</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label>页码 (第1页为最新公告)</label>
|
||||
<input type="number" id="bidListPage" value="1" min="1" max="300">
|
||||
</div>
|
||||
<button class="btn" onclick="fetchBidList()" style="background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);">获取招标列表</button>
|
||||
|
||||
<div id="bidListLoading" class="loading">
|
||||
<div class="spinner"></div>
|
||||
<p>正在获取招标公告列表...</p>
|
||||
</div>
|
||||
|
||||
<div id="bidListResults" class="results"></div>
|
||||
|
||||
<div id="bidListPagination" class="pagination" style="display:none;">
|
||||
<button onclick="goToBidListPage(1)" id="bidFirstPage" style="border-color: #e67e22; color: #e67e22;">首页</button>
|
||||
<button onclick="goToBidListPage(currentBidListPage - 1)" id="bidPrevPage" style="border-color: #e67e22; color: #e67e22;">上一页</button>
|
||||
<span class="page-info">第 <span id="bidCurrentPage">1</span> 页</span>
|
||||
<button onclick="goToBidListPage(currentBidListPage + 1)" id="bidNextPage" style="border-color: #e67e22; color: #e67e22;">下一页</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 生成报告 -->
|
||||
<div id="report" class="tab-content">
|
||||
<div class="form-group">
|
||||
<div class="checkbox-wrapper" onclick="document.getElementById('useDateRange').click();">
|
||||
<input type="checkbox" id="useDateRange" onchange="toggleDateRange()" onclick="event.stopPropagation();">
|
||||
<label for="useDateRange">按时间范围采集</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="dateRangeFields" style="display:none;">
|
||||
<div class="form-group">
|
||||
<label>开始日期</label>
|
||||
<input type="date" id="startDate">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>结束日期</label>
|
||||
<input type="date" id="endDate">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>最大采集页数</label>
|
||||
<input type="number" id="maxPages" value="10" min="1" max="50">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="normalFields">
|
||||
<div class="form-group">
|
||||
<label>采集数量</label>
|
||||
<input type="number" id="reportLimit" value="50" min="1" max="200">
|
||||
</div>
|
||||
</div>
|
||||
<h2 style="margin-bottom: 20px; color: #667eea;">生成综合报告</h2>
|
||||
<p style="color: #666; margin-bottom: 20px;">同时采集中标公示和招标公告,生成综合报告</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label>金额阈值 (万元) - 只显示大于此金额的项目</label>
|
||||
<input type="number" id="reportThreshold" value="100000" min="0" step="100">
|
||||
<label>开始日期</label>
|
||||
<input type="date" id="startDate">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>结束日期</label>
|
||||
<input type="date" id="endDate">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>最大采集页数</label>
|
||||
<input type="number" id="maxPages" value="10" min="1" max="50">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>中标金额阈值 (万元) - 只显示大于此金额的中标项目,0表示不筛选</label>
|
||||
<input type="number" id="reportThreshold" value="10000" min="0" step="100">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>招标金额阈值 (万元) - 只显示大于此金额的招标项目,0表示不筛选</label>
|
||||
<input type="number" id="bidReportThreshold" value="0" min="0" step="100">
|
||||
</div>
|
||||
|
||||
<button class="btn" onclick="generateReport()">生成报告</button>
|
||||
<button class="btn export-btn" onclick="exportReport()" id="exportBtn" style="display:none;">导出Word</button>
|
||||
<button class="btn" onclick="sendReportByEmail()" id="sendEmailBtn" style="display:none; background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);">发送邮件</button>
|
||||
<button class="btn" onclick="generateCombinedReport()">生成综合报告</button>
|
||||
<button class="btn" onclick="sendCombinedReportByEmail()" id="sendEmailBtn" style="display:none; background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);">发送邮件</button>
|
||||
|
||||
<div id="reportLoading" class="loading">
|
||||
<div class="spinner"></div>
|
||||
<p>正在生成报告...</p>
|
||||
<p id="reportLoadingText">正在生成报告...</p>
|
||||
</div>
|
||||
|
||||
<div id="reportResults" class="results"></div>
|
||||
@@ -429,8 +445,12 @@
|
||||
<div style="font-size: 20px; font-weight: bold; margin-top: 5px;" id="schedulerCronTime">-</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="opacity: 0.9; font-size: 14px;">金额阈值</div>
|
||||
<div style="font-size: 20px; font-weight: bold; margin-top: 5px;" id="schedulerThreshold">-</div>
|
||||
<div style="opacity: 0.9; font-size: 14px;">中标阈值</div>
|
||||
<div style="font-size: 20px; font-weight: bold; margin-top: 5px;" id="schedulerWinningThreshold">-</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style="opacity: 0.9; font-size: 14px;">招标阈值</div>
|
||||
<div style="font-size: 20px; font-weight: bold; margin-top: 5px;" id="schedulerBidThreshold">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -493,13 +513,21 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>金额阈值 (万元)</label>
|
||||
<input type="number" id="schedulerThresholdInput" value="100000" min="0" step="1000">
|
||||
<label>中标金额阈值 (万元) - 只采集大于此金额的中标公示</label>
|
||||
<input type="number" id="schedulerWinningThresholdInput" value="100000" min="0" step="1000">
|
||||
<small style="color: #666; display: block; margin-top: 5px;">
|
||||
10亿 = 100000万元 | 5亿 = 50000万元 | 1亿 = 10000万元
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>招标金额阈值 (万元) - 只采集大于此金额的招标公告,0表示不筛选</label>
|
||||
<input type="number" id="schedulerBidThresholdInput" value="0" min="0" step="1000">
|
||||
<small style="color: #666; display: block; margin-top: 5px;">
|
||||
设为0时不筛选金额,只要有合同估算价的招标公告都会采集
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>任务描述 (可选)</label>
|
||||
<input type="text" id="schedulerDescription" placeholder="例如: 每天9点采集大于1亿的项目">
|
||||
@@ -514,10 +542,10 @@
|
||||
<div style="margin-top: 30px; padding: 20px; background: #fff3cd; border-radius: 8px; border-left: 4px solid #ffc107;">
|
||||
<h3 style="margin-top: 0; color: #856404;">使用说明</h3>
|
||||
<ul style="line-height: 1.8; color: #856404;">
|
||||
<li><strong>数据来源:</strong> 南京公共资源交易平台 - 房建市政招标公告</li>
|
||||
<li><strong>采集内容:</strong> 标段编号、项目名称、标段名称、合同估算价、发布日期</li>
|
||||
<li><strong>筛选条件:</strong> 只保留合同估算价大于设定阈值的项目</li>
|
||||
<li><strong>邮件发送:</strong> 自动将筛选结果生成HTML报告并发送到配置的邮箱</li>
|
||||
<li><strong>数据来源:</strong> 南京公共资源交易平台 - 交通水务中标公示 + 招标公告</li>
|
||||
<li><strong>中标采集:</strong> 标段编号、项目名称、标段名称、中标价格、中标日期(按中标阈值筛选)</li>
|
||||
<li><strong>招标采集:</strong> 项目名称、标段编码、招标人、合同估算价、工期(按招标阈值筛选,0表示不筛选)</li>
|
||||
<li><strong>邮件发送:</strong> 自动将中标+招标综合报告生成HTML邮件并发送到配置的邮箱</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user