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