|
|
@@ -4,6 +4,7 @@ import ProTable from '@ant-design/pro-table'
|
|
|
import consts from '@/consts'
|
|
|
import { queryLock } from '@/services/lock'
|
|
|
import LocksDetail from '@/pages/Product/Lock/LockStore/components/LocksDetail'
|
|
|
+import ContactDetail from '@/pages/Customer/Client/components/ContactDetail'
|
|
|
import { useModal } from '@/components/Modal'
|
|
|
import { useTableScroll } from '@/hooks/useAutoTable'
|
|
|
|
|
|
@@ -62,6 +63,19 @@ const LockStore = () => {
|
|
|
})
|
|
|
toggleDrawer()
|
|
|
}
|
|
|
+ // 展示drawer
|
|
|
+ const showDrawerClient = id => {
|
|
|
+ setDrawerProps({
|
|
|
+ closable: true,
|
|
|
+ onClose: () => toggleDrawer(),
|
|
|
+ bodyStyle: {
|
|
|
+ height: '100vh',
|
|
|
+ overflowY: 'hidden'
|
|
|
+ },
|
|
|
+ children: <ContactDetail dataId={id} orderIds={state.orderIds} />
|
|
|
+ })
|
|
|
+ toggleDrawer()
|
|
|
+ }
|
|
|
const columns = [
|
|
|
{
|
|
|
title: '锁号',
|
|
|
@@ -121,7 +135,14 @@ const LockStore = () => {
|
|
|
title: '联系人',
|
|
|
dataIndex: 'client',
|
|
|
key: 'client',
|
|
|
- width: 150
|
|
|
+ width: 150,
|
|
|
+ render: (client, record) => (
|
|
|
+ <span
|
|
|
+ onClick={() => showDrawerClient(record.clientId)}
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
+ {client}
|
|
|
+ </span>
|
|
|
+ )
|
|
|
}
|
|
|
]
|
|
|
const { getScrollRef, redoHeight } = useTableScroll(columns, selectKeys)
|