Przeglądaj źródła

联系人修改

outaozhen 5 lat temu
rodzic
commit
37544fff08

+ 1 - 1
src/pages/Customer/Company/components/CompanyDetail/index.jsx

@@ -58,7 +58,7 @@ const Index = props => {
     <Spin spinning={state.loading}>
       <div className="sheet-box">
         <Row>
-          <Col span={12} className="sheet-box-left text-gray-400">
+          <Col span={12} className="sheet-box-left">
             <div className="mb-3">
               <Tooltip title="上一条记录">
                 <IconPark

+ 24 - 2
src/pages/Customer/Contact/index.jsx

@@ -1,4 +1,5 @@
 import ContactDetail from '@/pages/customer/Contact/components/ContactDetail'
+import CompanyDetail from '@/pages/Customer/Company/components/CompanyDetail'
 import Addcontact from '@/pages/customer/Contact/components/AddContact'
 import ProTable from '@ant-design/pro-table'
 import { Button, Card, message, Tag, Tooltip } from 'antd'
@@ -114,6 +115,20 @@ const Contact = props => {
     toggleDrawer()
   }
 
+  // 展示客户
+  const showDrawerComapny = id => {
+    setDrawerProps({
+      closable: true,
+      onClose: () => toggleDrawer(),
+      bodyStyle: {
+        height: '100vh',
+        overflowY: 'hidden'
+      },
+      children: <CompanyDetail dataId={id} orderIds={state.orderIds} />
+    })
+    toggleDrawer()
+  }
+
   const columns = [
     {
       title: '关键字',
@@ -143,7 +158,13 @@ const Contact = props => {
       key: 'companyName',
       width: 150,
       ellipsis: true,
-      render: companyName => <a>{companyName}</a>,
+      render: (companyName, record) => (
+        <span
+          onClick={() => showDrawerComapny(record.id)}
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
+          {companyName}
+        </span>
+      ),
       sorter: (a, b) => a.companyName.localeCompare(b.companyName),
       search: false
     },
@@ -165,7 +186,8 @@ const Contact = props => {
       title: '手机',
       dataIndex: 'telephone',
       key: 'telephone',
-      width: 75
+      width: 75,
+      search: false
     },
     {
       title: 'QQ',