add point

This commit is contained in:
Timi
2026-08-11 22:25:30 +08:00
parent e612cfd382
commit 9f60a36c6c
21 changed files with 2928 additions and 36 deletions
+8
View File
@@ -138,6 +138,7 @@ import { useNavBarStore } from "@/store/navBarStore";
import type { EventItem } from "@/types/EventItem";
import type { EventRecordListItemView, EventRecordPage } from "@/types/EventRecord";
import { getCustomerPhotoURL } from "@/utils/customer";
import { getErrorMessage } from "@/utils/error";
import { permissionCodes } from "@/utils/permission";
type DateFilterType = "today" | "yesterday" | "beforeYesterday" | "lastWeek" | "all" | "custom";
@@ -390,6 +391,13 @@ async function removeRecord(id: string): Promise<void> {
pageResult.list = pageResult.list.filter(item => item.id !== id);
pageResult.total = Math.max(0, pageResult.total - 1);
Toast.success("登记记录已删除");
} catch (error) {
const message = getErrorMessage(error, "登记记录删除失败");
if (message.includes("积分余额不足") || message.includes("余额不足")) {
Toast.warning("积分余额不足,请先人工调整积分后再删除登记记录");
return;
}
Toast.error(message);
} finally {
isDeleting.value = false;
deletingId.value = "";