add point
This commit is contained in:
@@ -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 = "";
|
||||
|
||||
Reference in New Issue
Block a user