From 71719ffa0eeb4a28a1b736f87499bcda2847a848 Mon Sep 17 00:00:00 2001
From: wsj <593216709@qq.com>
Date: Wed, 28 Oct 2026 23:04:10 +0800
Subject: [PATCH] feat: claude 修改

---
 src/pages/customers/list/index.tsx |   46 ++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/src/pages/customers/list/index.tsx b/src/pages/customers/list/index.tsx
index c236f68..9c6112c 100644
--- a/src/pages/customers/list/index.tsx
+++ b/src/pages/customers/list/index.tsx
@@ -1,20 +1,46 @@
-import { useMemo } from 'react';
+import { useCallback, useMemo, useState } from 'react';
 import { ProTable } from '@ant-design/pro-components';
-import { customerColumns } from './columns';
-import { getCustomerList } from './server';
+import { createCustomerColumns } from './columns';
+import CustomerDetailDrawer from './components/CustomerDetailDrawer';
+import FollowUpRecordsDrawer from './components/FollowUpRecordsDrawer';
+import { getCustomerList } from './service';
 import type { CustomerListQuery, CustomerVO } from './types';
 
 const CustomerList = () => {
-  const columns = useMemo(() => customerColumns, []);
+  const [detailId, setDetailId] = useState<number | null>(null);
+  const [followUpCustomer, setFollowUpCustomer] = useState<{ id: number; name: string } | null>(
+    null,
+  );
+
+  const openDetail = useCallback((record: CustomerVO) => {
+    setDetailId(record.id);
+  }, []);
+
+  const openFollowUps = useCallback((record: CustomerVO) => {
+    setFollowUpCustomer({ id: record.id, name: record.name });
+  }, []);
+
+  const closeDetail = useCallback(() => {
+    setDetailId(null);
+  }, []);
+
+  const closeFollowUps = useCallback(() => {
+    setFollowUpCustomer(null);
+  }, []);
+
+  const columns = useMemo(
+    () => createCustomerColumns({ onDetail: openDetail, onFollowUp: openFollowUps }),
+    [openDetail, openFollowUps],
+  );
 
   return (
     <div className="customer-list-page">
       <ProTable<CustomerVO, CustomerListQuery>
         rowKey="id"
         columns={columns}
-        cardProps={{ className: 'table-card' }}
+        cardProps={{ bodyStyle: { padding: 20 } }}
         search={{ labelWidth: 'auto', defaultCollapsed: false }}
-        scroll={{ x: 1510 }}
+        scroll={{ x: 1660 }}
         options={false}
         pagination={{
           defaultPageSize: 10,
@@ -36,6 +62,14 @@
           };
         }}
       />
+
+      <CustomerDetailDrawer open={detailId !== null} customerId={detailId} onClose={closeDetail} />
+
+      <FollowUpRecordsDrawer
+        open={followUpCustomer !== null}
+        customer={followUpCustomer}
+        onClose={closeFollowUps}
+      />
     </div>
   );
 };

--
Gitblit v1.9.3