number wan split

This commit is contained in:
Timi
2026-09-19 16:46:00 +08:00
parent 6c488a4731
commit 79d9efad73
12 changed files with 35 additions and 19 deletions
+7 -2
View File
@@ -96,7 +96,7 @@
<span>时间:</span>
<pass-time-label :timestamp="item.occurredAt" underline />
</div>
<div v-text="`余额:${item.balanceBefore ?? 0} → ${item.balanceAfter ?? 0}`" />
<div v-text="`余额:${formatPointValue(item.balanceBefore)} → ${formatPointValue(item.balanceAfter)}`" />
<div v-text="item.remark" />
</div>
</template>
@@ -153,6 +153,7 @@ import type { PointLedger, PointLedgerChangeType, PointLedgerPage } from "@/type
import { getCustomerPhotoURL } from "@/utils/customer";
import { buildPresetDateRange, parseDateTime } from "@/utils/date";
import { Message } from "@/utils/message";
import { formatWanInteger } from "@/utils/money";
import { gaoRoleCodes, permissionCodes } from "@/utils/permission";
type DateFilter = "all" | "today" | "last7" | "last30" | "custom";
@@ -386,7 +387,11 @@ function buildListOptions(): { storeId: string } {
function getLedgerDelta(item: PointLedger): string {
const value = item.pointDelta ?? 0;
return `${0 < value ? "+" : "-"}${Math.abs(value)} 分`;
return `${0 < value ? "+" : "-"}${formatWanInteger(Math.abs(value))} 分`;
}
function formatPointValue(value?: number): string {
return value === undefined || value === null ? "-" : formatWanInteger(value);
}
function getLedgerShortType(item: PointLedger): string {