Router.register('/shipments/summary', async () => { setTimeout(async () => { const queryBtn = document.getElementById('summary-query-btn'); const startDateInput = document.getElementById('start-date'); const endDateInput = document.getElementById('end-date'); const resultDiv = document.getElementById('summary-result'); // 设置默认日期为当前月份 const now = new Date(); const firstDay = new Date(now.getFullYear(), now.getMonth(), 1); const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0); if (startDateInput) { startDateInput.value = firstDay.toISOString().split('T')[0]; } if (endDateInput) { endDateInput.value = lastDay.toISOString().split('T')[0]; } const performQuery = async () => { const startDate = startDateInput?.value; const endDate = endDateInput?.value; if (!startDate || !endDate) { resultDiv.innerHTML = '
| 发货日期 | 数量 | 收货方 | 录入时间 |
|---|