|
@@ -9,6 +9,7 @@ import ContactDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
|
import SoftwareDetail from '@/pages/Product/Lock/LockStore/components/SoftwareDetail'
|
|
import SoftwareDetail from '@/pages/Product/Lock/LockStore/components/SoftwareDetail'
|
|
|
import { useModal } from '@/components/Modal'
|
|
import { useModal } from '@/components/Modal'
|
|
|
import { useTableScroll } from '@/hooks/useAutoTable'
|
|
import { useTableScroll } from '@/hooks/useAutoTable'
|
|
|
|
|
+import CompanyDetail from '@/pages/Customer/Company/components/CompanyDetail'
|
|
|
|
|
|
|
|
// 渲染产品标签
|
|
// 渲染产品标签
|
|
|
export const ProductLabel = ({ data }) => {
|
|
export const ProductLabel = ({ data }) => {
|
|
@@ -20,7 +21,7 @@ export const ProductLabel = ({ data }) => {
|
|
|
return (
|
|
return (
|
|
|
<div>
|
|
<div>
|
|
|
{newData.map((item, index) => (
|
|
{newData.map((item, index) => (
|
|
|
- <span key={index} className="mb-5px block">
|
|
|
|
|
|
|
+ <span key={index} className="mr-5px">
|
|
|
<Tag color="#886ab5">{item}</Tag>
|
|
<Tag color="#886ab5">{item}</Tag>
|
|
|
</span>
|
|
</span>
|
|
|
))}
|
|
))}
|
|
@@ -61,7 +62,7 @@ const LockStore = () => {
|
|
|
height: '100vh',
|
|
height: '100vh',
|
|
|
overflowY: 'hidden'
|
|
overflowY: 'hidden'
|
|
|
},
|
|
},
|
|
|
- children: <LocksDetail id={id} />
|
|
|
|
|
|
|
+ children: <LocksDetail id={id} orderIds={state.orderIds} />
|
|
|
})
|
|
})
|
|
|
toggleDrawer()
|
|
toggleDrawer()
|
|
|
}
|
|
}
|
|
@@ -74,7 +75,7 @@ const LockStore = () => {
|
|
|
height: '100vh',
|
|
height: '100vh',
|
|
|
overflowY: 'hidden'
|
|
overflowY: 'hidden'
|
|
|
},
|
|
},
|
|
|
- children: <ContactDetail dataId={id} orderIds={state.orderIds} />
|
|
|
|
|
|
|
+ children: <ContactDetail dataId={id} />
|
|
|
})
|
|
})
|
|
|
toggleDrawer()
|
|
toggleDrawer()
|
|
|
}
|
|
}
|
|
@@ -87,10 +88,25 @@ const LockStore = () => {
|
|
|
height: '100vh',
|
|
height: '100vh',
|
|
|
overflowY: 'hidden'
|
|
overflowY: 'hidden'
|
|
|
},
|
|
},
|
|
|
- children: <SoftwareDetail dataId={id} orderIds={state.orderIds} />
|
|
|
|
|
|
|
+ children: <SoftwareDetail dataId={id} />
|
|
|
})
|
|
})
|
|
|
toggleDrawer()
|
|
toggleDrawer()
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 展示客户详情抽屉
|
|
|
|
|
+ const showCompanyDrawer = id => {
|
|
|
|
|
+ setDrawerProps({
|
|
|
|
|
+ closable: true,
|
|
|
|
|
+ onClose: () => toggleDrawer(),
|
|
|
|
|
+ bodyStyle: {
|
|
|
|
|
+ height: '100vh',
|
|
|
|
|
+ overflowY: 'hidden'
|
|
|
|
|
+ },
|
|
|
|
|
+ children: <CompanyDetail dataId={id} />
|
|
|
|
|
+ })
|
|
|
|
|
+ toggleDrawer()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const columns = [
|
|
const columns = [
|
|
|
{
|
|
{
|
|
|
title: '锁号',
|
|
title: '锁号',
|
|
@@ -109,62 +125,72 @@ const LockStore = () => {
|
|
|
title: '产品',
|
|
title: '产品',
|
|
|
dataIndex: 'product',
|
|
dataIndex: 'product',
|
|
|
key: 'product',
|
|
key: 'product',
|
|
|
- width: 350,
|
|
|
|
|
|
|
+ width: 200,
|
|
|
render: text => {
|
|
render: text => {
|
|
|
- // const productArr = text.split('+')
|
|
|
|
|
return <ProductLabel data={text} />
|
|
return <ProductLabel data={text} />
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: '办事处',
|
|
|
|
|
- dataIndex: 'category',
|
|
|
|
|
- key: 'category',
|
|
|
|
|
- width: 150
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
title: '出库时间',
|
|
title: '出库时间',
|
|
|
dataIndex: 'makeDay',
|
|
dataIndex: 'makeDay',
|
|
|
key: 'makeDay',
|
|
key: 'makeDay',
|
|
|
width: 150
|
|
width: 150
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: '销售/借出/赠送时间',
|
|
|
|
|
- dataIndex: 'allotedTime',
|
|
|
|
|
- key: 'allotedTime',
|
|
|
|
|
- width: 160
|
|
|
|
|
|
|
+ title: '状态',
|
|
|
|
|
+ dataIndex: 'status',
|
|
|
|
|
+ key: 'status',
|
|
|
|
|
+ width: 150,
|
|
|
|
|
+ render: status => <>{longleStatusNum[status]}</>
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '责任人',
|
|
title: '责任人',
|
|
|
dataIndex: 'responsible',
|
|
dataIndex: 'responsible',
|
|
|
key: 'responsible',
|
|
key: 'responsible',
|
|
|
width: 150,
|
|
width: 150,
|
|
|
- render: (responsible, record) => (
|
|
|
|
|
|
|
+ render: (text, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => showDrawerResponsible(record.clientId)}
|
|
onClick={() => showDrawerResponsible(record.clientId)}
|
|
|
className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
- {responsible}
|
|
|
|
|
|
|
+ {text}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: '状态',
|
|
|
|
|
- dataIndex: 'status',
|
|
|
|
|
- key: 'status',
|
|
|
|
|
- width: 150,
|
|
|
|
|
- render: status => <>{longleStatusNum[status]}</>
|
|
|
|
|
|
|
+ title: '客户',
|
|
|
|
|
+ dataIndex: 'customerName',
|
|
|
|
|
+ render: (text, record) => (
|
|
|
|
|
+ <span
|
|
|
|
|
+ onClick={() => showCompanyDrawer(record.customerId)}
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
|
|
+ {text}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ )
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '联系人',
|
|
title: '联系人',
|
|
|
dataIndex: 'client',
|
|
dataIndex: 'client',
|
|
|
key: 'client',
|
|
key: 'client',
|
|
|
width: 150,
|
|
width: 150,
|
|
|
- render: (client, record) => (
|
|
|
|
|
|
|
+ render: (text, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => showDrawerClient(record.clientId)}
|
|
onClick={() => showDrawerClient(record.clientId)}
|
|
|
className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
- {client}
|
|
|
|
|
|
|
+ {text}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '销售/借出/赠送时间',
|
|
|
|
|
+ dataIndex: 'allotedTime',
|
|
|
|
|
+ key: 'allotedTime',
|
|
|
|
|
+ width: 160
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '办事处',
|
|
|
|
|
+ dataIndex: 'category',
|
|
|
|
|
+ key: 'category',
|
|
|
|
|
+ width: 150
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
const { getScrollRef, redoHeight } = useTableScroll(columns, selectKeys)
|
|
const { getScrollRef, redoHeight } = useTableScroll(columns, selectKeys)
|