优化首页筛选来源

This commit is contained in:
yml
2026-05-23 00:43:23 +08:00
parent 0394fcb2b8
commit 0b87754ab3
6 changed files with 1270 additions and 261 deletions
+14 -8
View File
@@ -33,9 +33,9 @@ async function loadOrders() {
/* 状态筛选 */
const statusTabs = [
{ key: "all", label: "全部" },
{ key: "pending", label: "待交接" },
{ key: "pending_handoff", label: "待交接" },
{ key: "renting", label: "租赁中" },
{ key: "returning", label: "待归还" },
{ key: "pending_return_confirm", label: "待归还" },
{ key: "completed", label: "已完成" },
];
@@ -47,24 +47,30 @@ const displayOrders = computed(() => {
/* 状态颜色映射 */
function statusColor(status: string) {
const map: Record<string, string> = {
pending: "#ff9800",
pending_handoff: "#ff9800",
renting: "#1477ff",
returning: "#e91e63",
overdue: "#e91e63",
pending_return_confirm: "#e91e63",
completed: "#4caf50",
cancelled: "#999",
dispute: "#f44336",
disputing: "#f44336",
abnormal: "#f44336",
closed: "#666",
};
return map[status] || "#999";
}
function statusLabel(status: string) {
const map: Record<string, string> = {
pending: "待交接",
pending_handoff: "待交接",
renting: "租赁中",
returning: "待归还",
overdue: "已逾期",
pending_return_confirm: "待归还",
completed: "已完成",
cancelled: "已取消",
dispute: "申诉中",
disputing: "申诉中",
abnormal: "异常",
closed: "已关闭",
};
return map[status] || status;
}