From 05d33d518f91bbcad9801df23d269b746600ac08 Mon Sep 17 00:00:00 2001 From: v6ole Date: Sun, 12 Jul 2026 21:03:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=A2=E6=88=B7=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=96=B0=E5=A2=9E=E6=8B=9C=E8=AE=BF/?= =?UTF-8?q?=E8=AE=A1=E5=88=92/=E5=95=86=E6=9C=BA/=E8=A6=81=E5=AE=A2?= =?UTF-8?q?=E5=9B=9B=E4=B8=AA=E5=85=B3=E8=81=94=E6=95=B0=E6=8D=AETab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 点击客户名 → 800px 弹窗,顶部显示基本信息,下方 el-tabs 切换: - 拜访记录 / 工作计划 / 商机跟单 / 要客拜访 - 各 Tab 并行加载对应 customer_id 筛选数据 Co-Authored-By: Claude --- frontend/src/views/desktop/CustomerManage.vue | 121 +++++++++++++++--- 1 file changed, 101 insertions(+), 20 deletions(-) diff --git a/frontend/src/views/desktop/CustomerManage.vue b/frontend/src/views/desktop/CustomerManage.vue index 4db2c65..f5569d8 100644 --- a/frontend/src/views/desktop/CustomerManage.vue +++ b/frontend/src/views/desktop/CustomerManage.vue @@ -36,6 +36,12 @@ const feeCustomUnit = ref('') const detailVisible = ref(false) const detailCustomer = ref(null) +const detailActiveTab = ref('visits') +const detailVisits = ref([]) +const detailPlans = ref([]) +const detailMini = ref([]) +const detailKeyVisits = ref([]) +const detailLoading = ref(false) const managers = ref([]) const selectedIds = ref([]) @@ -205,7 +211,30 @@ function mgrTextColor(name: string) { } async function openDetail(customer: any) { - try { const res = await customersApi.get(customer.id); detailCustomer.value = res.data; detailVisible.value = true } catch (_) {} + try { + const res = await customersApi.get(customer.id) + detailCustomer.value = res.data + detailActiveTab.value = 'visits' + detailVisible.value = true + loadDetailData(customer.id) + } catch (_) {} +} + +async function loadDetailData(customerId: string) { + detailLoading.value = true + try { + const [visits, plans, mini, keyVisits] = await Promise.all([ + api.get('/visits/', { params: { customer_id: customerId } }), + api.get('/work-plans/', { params: { customer_id: customerId } }), + api.get('/mini-business/', { params: { customer_id: customerId } }), + api.get('/key-visits/', { params: { customer_id: customerId } }), + ]) + detailVisits.value = Array.isArray(visits.data) ? visits.data : (visits.data.items || []) + detailPlans.value = Array.isArray(plans.data) ? plans.data : (plans.data.items || []) + detailMini.value = Array.isArray(mini.data) ? mini.data : (mini.data.items || []) + detailKeyVisits.value = Array.isArray(keyVisits.data) ? keyVisits.data : (keyVisits.data.items || []) + } catch (_) {} + finally { detailLoading.value = false } } async function handleDelete(customer: any) { @@ -403,25 +432,73 @@ async function handleImport() { - - + + +
+ 行业:{{ detailCustomer.industry || '-' }} + | + 地址:{{ detailCustomer.address || '-' }} + | + 费用:{{ detailCustomer.monthly_fee || '-' }} + | + 客户经理:{{ detailCustomer.primary_manager_name || '-' }} +
+
+ 在用业务:{{ detailCustomer.in_use_services }} +
+
+ 联系人:{{ detailCustomer.contacts.map((c:any) => c.name + (c.phone ? ' '+c.phone : '')).join('、') }} +
+ + + + +
+ + + + + + +
暂无拜访记录
+
+
+ +
+ + + + + + +
暂无工作计划
+
+
+ +
+ + + + + + + +
暂无商机记录
+
+
+ +
+ + + + + + +
暂不要客记录
+
+
+
+