|
@@ -1,3 +1,4 @@
|
|
|
|
|
+import ContactDetail from '@/pages/customer/Contact/components/ContactDetail'
|
|
|
import React, { useEffect, useState, useRef } from 'react'
|
|
import React, { useEffect, useState, useRef } from 'react'
|
|
|
import { Tabs, message } from 'antd'
|
|
import { Tabs, message } from 'antd'
|
|
|
// import SvgIcon from '@/components/SvgIcon'
|
|
// import SvgIcon from '@/components/SvgIcon'
|
|
@@ -6,11 +7,30 @@ import { apiAddClient } from '@/services/contact'
|
|
|
import { formatValues } from '@/components/LazyCascader'
|
|
import { formatValues } from '@/components/LazyCascader'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
import ProTable from '@ant-design/pro-table'
|
|
import ProTable from '@ant-design/pro-table'
|
|
|
|
|
+import { useModal } from '@/components/Modal'
|
|
|
// import { queryContact } from '@/services/contact'
|
|
// import { queryContact } from '@/services/contact'
|
|
|
|
|
|
|
|
const CompanyTabList = ({ initData, customerId, client, software, departmentsMap }) => {
|
|
const CompanyTabList = ({ initData, customerId, client, software, departmentsMap }) => {
|
|
|
|
|
+ const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
const { TabPane } = Tabs
|
|
const { TabPane } = Tabs
|
|
|
const tRef = useRef(null)
|
|
const tRef = useRef(null)
|
|
|
|
|
+ const [state, setState] = useState({
|
|
|
|
|
+ id: '',
|
|
|
|
|
+ orderIds: []
|
|
|
|
|
+ })
|
|
|
|
|
+ // 展示drawer
|
|
|
|
|
+ const showDrawer = id => {
|
|
|
|
|
+ setDrawerProps({
|
|
|
|
|
+ closable: true,
|
|
|
|
|
+ onClose: () => toggleDrawer(),
|
|
|
|
|
+ bodyStyle: {
|
|
|
|
|
+ height: '100vh',
|
|
|
|
|
+ overflowY: 'hidden'
|
|
|
|
|
+ },
|
|
|
|
|
+ children: <ContactDetail dataId={id} orderIds={state.orderIds} />
|
|
|
|
|
+ })
|
|
|
|
|
+ toggleDrawer()
|
|
|
|
|
+ }
|
|
|
const columns = [
|
|
const columns = [
|
|
|
{
|
|
{
|
|
|
title: '所有部门',
|
|
title: '所有部门',
|
|
@@ -20,7 +40,14 @@ const CompanyTabList = ({ initData, customerId, client, software, departmentsMap
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '姓名',
|
|
title: '姓名',
|
|
|
- dataIndex: 'clientName'
|
|
|
|
|
|
|
+ dataIndex: 'clientName',
|
|
|
|
|
+ render: (clientName, record) => (
|
|
|
|
|
+ <span
|
|
|
|
|
+ onClick={() => showDrawer(record.id)}
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
|
|
+ {clientName}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ )
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '昵称',
|
|
title: '昵称',
|