From 9d59d72124a301224de65ddcd898cf408302f601 Mon Sep 17 00:00:00 2001
From: malei <>
Date: Sat, 1 Aug 2026 21:56:07 +0800
Subject: [PATCH] feat: anchor customer view on store master
---
src/views/CustomersView.vue | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/src/views/CustomersView.vue b/src/views/CustomersView.vue
index ff959d1..ba9dc79 100644
--- a/src/views/CustomersView.vue
+++ b/src/views/CustomersView.vue
@@ -13,7 +13,7 @@
查询
-
+
@@ -23,7 +23,9 @@
-
+
+ {{ formatSource(row.source) }}
+
详情
@@ -38,7 +40,9 @@
{{ current.displayName }}
{{ current.phoneMasked }}
- {{ current.source }}
+ {{ formatOriginSource(current.originSource) }}
+ {{ current.firstContactAt || '—' }}
+ {{ current.lastContactAt || '—' }}
{{ current.lastVisitAt || '—' }}
{{ current.leadStatus || '—' }}
@@ -60,6 +64,7 @@ import { useRouter } from 'vue-router'
import { getServiceCustomers } from '@/api'
type CustomerRow = {
+ storeCustomerId: number
userId?: number | null
displayName?: string
phoneMasked?: string
@@ -69,6 +74,9 @@ type CustomerRow = {
leadStatus?: string
hasPendingLead?: boolean
source?: string
+ originSource?: string
+ firstContactAt?: string
+ lastContactAt?: string
}
const router = useRouter()
@@ -116,6 +124,21 @@ function goLead() {
router.push({ path: '/leads', query: { due: 'today' } })
}
+function formatSource(value?: string) {
+ if (value === 'appointment+lead') return '预约 + 报告留资'
+ if (value === 'appointment') return '预约'
+ if (value === 'lead') return '报告留资'
+ return '—'
+}
+
+function formatOriginSource(value?: string) {
+ if (value === 'customer_booking') return '宠主自助预约'
+ if (value === 'assisted_booking') return '门店代客预约'
+ if (value === 'report_lead') return '报告留资'
+ if (value === 'appointment') return '历史预约'
+ return '—'
+}
+
onMounted(load)