From 4f1ac9ef0eabce07b63fd8e15ac0d5d0731c1858 Mon Sep 17 00:00:00 2001 From: Timi Date: Fri, 11 Sep 2026 10:36:30 +0800 Subject: [PATCH] add CustomerInviteRelation.vue --- src/pages/customer/CustomerEdit.vue | 41 +- src/pages/customer/CustomerInviteRank.vue | 150 ++-- src/pages/customer/CustomerInviteRelation.vue | 302 +++++++++ .../component/CustomerInviteRelationChart.vue | 639 ++++++++++++++++++ src/pages/tabs/SettingTab.vue | 8 +- src/router/routes/customerRoutes.ts | 15 + src/router/routes/managementRoutes.ts | 2 +- src/types/Customer.ts | 3 + src/types/NavBarAction.ts | 2 +- 9 files changed, 1066 insertions(+), 96 deletions(-) create mode 100644 src/pages/customer/CustomerInviteRelation.vue create mode 100644 src/pages/customer/component/CustomerInviteRelationChart.vue diff --git a/src/pages/customer/CustomerEdit.vue b/src/pages/customer/CustomerEdit.vue index 403e6b2..e2f8b46 100644 --- a/src/pages/customer/CustomerEdit.vue +++ b/src/pages/customer/CustomerEdit.vue @@ -99,22 +99,29 @@
- -
- + 选择客户 + /> +
+ 选择客户 +
+
@@ -739,6 +746,12 @@ function buildAttachmentList(): Attachment[] { .referrer { gap: .75rem; display: flex; + flex-direction: column; + + .selector { + gap: .75rem; + display: flex; + } .actions { gap: .5rem; diff --git a/src/pages/customer/CustomerInviteRank.vue b/src/pages/customer/CustomerInviteRank.vue index 2c23c2e..2ca0b8c 100644 --- a/src/pages/customer/CustomerInviteRank.vue +++ b/src/pages/customer/CustomerInviteRank.vue @@ -1,49 +1,53 @@ + + diff --git a/src/pages/customer/component/CustomerInviteRelationChart.vue b/src/pages/customer/component/CustomerInviteRelationChart.vue new file mode 100644 index 0000000..61343b3 --- /dev/null +++ b/src/pages/customer/component/CustomerInviteRelationChart.vue @@ -0,0 +1,639 @@ + + + + + diff --git a/src/pages/tabs/SettingTab.vue b/src/pages/tabs/SettingTab.vue index 8c86a3b..577b00d 100644 --- a/src/pages/tabs/SettingTab.vue +++ b/src/pages/tabs/SettingTab.vue @@ -131,9 +131,9 @@ const menuGroupList = computed(() => [ visible: userStore.hasPermissions(permissionCodes.customer.read) }, { - icon: "order-list", - path: "/management/customer-invite-rank", - title: "客户邀请排行", + icon: "git-merge", + path: "/management/customer-invite-relation", + title: "客户邀请关系", visible: userStore.hasPermissions(permissionCodes.customer.read) }, { @@ -234,7 +234,7 @@ const menuGroupList = computed(() => [ path: "/management/qr-code", title: "生成客户二维码", visible: userStore.hasPermissions(permissionCodes.qrCode.create) - }, + } ] }, { diff --git a/src/router/routes/customerRoutes.ts b/src/router/routes/customerRoutes.ts index 48f7b5e..d02ed58 100644 --- a/src/router/routes/customerRoutes.ts +++ b/src/router/routes/customerRoutes.ts @@ -3,6 +3,7 @@ import QuickSignInPage from "@/pages/home/QuickSignInPage.vue"; import EventRecordEdit from "@/pages/event/EventRecordEdit.vue"; import CustomerList from "@/pages/customer/CustomerList.vue"; import CustomerInviteRank from "@/pages/customer/CustomerInviteRank.vue"; +import CustomerInviteRelation from "@/pages/customer/CustomerInviteRelation.vue"; import CustomerDetail from "@/pages/customer/CustomerDetail.vue"; import CustomerInviteeList from "@/pages/customer/CustomerInviteeList.vue"; import CustomerEdit from "@/pages/customer/CustomerEdit.vue"; @@ -64,6 +65,20 @@ const customerRoutes: RouteRecordRaw[] = [ darkBodyBackground: "#10161f" } }, + { + path: "/management/customer-invite-relation", + name: "CustomerInviteRelation", + component: CustomerInviteRelation, + meta: { + depth: 3, + navBarVisible: true, + navBarCanBack: true, + navBarTitle: "客户邀请关系", + tabBarVisible: false, + bodyBackground: "#F5F5F8", + darkBodyBackground: "#10161f" + } + }, { path: "/management/customers/create", name: "CustomerCreate", diff --git a/src/router/routes/managementRoutes.ts b/src/router/routes/managementRoutes.ts index edc279d..6fa5377 100644 --- a/src/router/routes/managementRoutes.ts +++ b/src/router/routes/managementRoutes.ts @@ -200,7 +200,7 @@ export const managementSettingRoutes: RouteRecordRaw[] = [ navBarCanBack: true, navBarTitle: "开源软件协议", tabBarVisible: false, - bodyBackground: "#F5F5F8", + bodyBackground: "#FFF", darkBodyBackground: "#10161f" } }, diff --git a/src/types/Customer.ts b/src/types/Customer.ts index e7a05f7..8b13858 100644 --- a/src/types/Customer.ts +++ b/src/types/Customer.ts @@ -13,6 +13,9 @@ export type Customer = { storeId?: string; code?: string; name?: string; + namePinyinFull?: string; + namePinyinInitial?: string; + namePinyinMixed?: string; gender?: CustomerGender; age?: number; birthdate?: string; diff --git a/src/types/NavBarAction.ts b/src/types/NavBarAction.ts index e62ad47..212b0ec 100644 --- a/src/types/NavBarAction.ts +++ b/src/types/NavBarAction.ts @@ -4,7 +4,7 @@ import type { ButtonProps } from "tdesign-mobile-vue"; * 顶部导航右侧菜单项。 */ export type NavBarAction = { - action: () => void | Promise; + action: () => void | Promise; disabled?: boolean; icon?: string; key: string;