add point account list

This commit is contained in:
Timi
2026-08-22 16:42:32 +08:00
parent e237b71f13
commit 1a333508cd
12 changed files with 523 additions and 342 deletions
+3 -43
View File
@@ -38,36 +38,18 @@
@scrolltolower="fetch"
>
<t-cell-group class="items" theme="card">
<t-cell
<customer-cell
class="item"
v-for="(item, index) in pageResult.list"
:key="item.id || item.code || index"
:customer="item"
arrow
@click="router.push(`/management/customers/${item.id}`)"
>
<template #left-icon>
<t-image
v-if="getCustomerPhotoURL(item, 64)"
class="avatar"
:src="getCustomerPhotoURL(item, 64)"
:alt="item.name"
fit="cover"
/>
<div v-else class="avatar fallback" v-text="(item.name || item.code || '客').slice(0, 1)" />
</template>
<template #title>
<div class="header">
<div class="left">
<div class="text-bold" v-text="item.name" />
<gender-icon :value="item.gender" size="1.125rem" />
</div>
<span class="gray" v-text="item.code || ''" />
</div>
</template>
<template #description>
<telephone-link :value="item.telephone" />
</template>
</t-cell>
</customer-cell>
</t-cell-group>
<div v-if="!pageResult.list.length" class="load-state" v-text="isLoading ? '正在加载客户' : '暂无客户数据'" />
<div v-if="pageResult.list.length" class="load-state" v-text="isLoading ? '正在加载更多' : isNoMore ? '已经到底了' : '上拉加载更多'" />
@@ -85,14 +67,12 @@
import { Message } from "@/utils/message";
import { type Page, type PageResult, Time, Toolkit, useUserStore } from "timi-web";
import CustomerAPI from "@/api/CustomerAPI";
import GenderIcon from "@/components/GenderIcon.vue";
import TagSelector from "@/components/TagSelector.vue";
import { useCurrentStoreStore } from "@/store/currentStoreStore";
import { useNavBarStore } from "@/store/navBarStore";
import type { Customer } from "@/types/Customer";
import type { NavBarAction } from "@/types/NavBarAction";
import type { Tag } from "@/types/Tag";
import { getCustomerPhotoURL } from "@/utils/customer";
import { corePermissionCodes, gaoRoleCodes, permissionCodes } from "@/utils/permission";
defineOptions({
@@ -304,26 +284,6 @@ async function doExport(): Promise<void> {
.item {
padding: 10px;
.avatar {
width: 3.5rem;
height: 3.5rem;
border-radius: .5rem;
}
.header {
gap: .5rem;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.left {
gap: .5rem;
display: flex;
align-items: center;
}
}
}
}
}