+ |
+
+ ${order.id}
+ ${order.date}
+ ${tagsHtml}
+ |
+
+ ${order.user}
+ 信誉分: ${order.userScore || 'N/A'}
+ |
+ ${itemSummary} |
+ ¥ ${order.total.toLocaleString()} |
+
+ ${order.score} / 100
+
+ |
+ ${statusBadge} |
+
+
+ |
+
+ `;
+ });
+ tbody.innerHTML = htmlBuffer;
+
+ document.getElementById('check-all').checked = false;
+ },
+
+ updateDashboard() {
+ const pending = this.data.orders.filter(o => o.status === 'pending');
+ const highRisk = this.data.orders.filter(o => o.risk === 'high' && o.status === 'pending');
+ const totalAmt = pending.reduce((sum, o) => sum + o.total, 0);
+
+ document.getElementById('dash-pending').innerText = pending.length;
+ document.getElementById('dash-risk').innerText = highRisk.length;
+ document.getElementById('dash-risk-rate').innerText = ((highRisk.length / (pending.length || 1)) * 100).toFixed(1) + '%';
+ document.getElementById('dash-amount').innerText = totalAmt.toLocaleString();
+ },
+
+ // --- 详情抽屉逻辑 ---
+ openDrawer(id) {
+ this.data.currentId = id;
+ const order = this.data.orders.find(o => o.id === id);
+ if(!order) return;
+
+ document.getElementById('d-id').innerText = `#${order.id}`;
+ const content = document.getElementById('d-content');
+
+ let itemsHtml = order.items.map(item => `
+