|
@@ -1,7 +1,7 @@
|
|
|
import ContactDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
import ContactDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
|
import LocksDetail from '@/pages/Product/Lock/LockStore/components/LocksDetail'
|
|
import LocksDetail from '@/pages/Product/Lock/LockStore/components/LocksDetail'
|
|
|
import React, { useRef, useState } from 'react'
|
|
import React, { useRef, useState } from 'react'
|
|
|
-import { Tabs, message, Dropdown, Menu } from 'antd'
|
|
|
|
|
|
|
+import { Tabs, message, Dropdown, Menu, Typography } from 'antd'
|
|
|
import AddContact from '@/pages/Customer/Client/components/AddClient'
|
|
import AddContact from '@/pages/Customer/Client/components/AddClient'
|
|
|
import { apiAddClient, apiAddCustomerService, updateClient } from '@/services/customer'
|
|
import { apiAddClient, apiAddCustomerService, updateClient } from '@/services/customer'
|
|
|
import { formatValues } from '@/components/LazyCascader'
|
|
import { formatValues } from '@/components/LazyCascader'
|
|
@@ -30,6 +30,7 @@ const CompanyTabList = ({
|
|
|
const { toggleDrawer, setDrawerProps } = useModal()
|
|
const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
const { TabPane } = Tabs
|
|
const { TabPane } = Tabs
|
|
|
const tRef = useRef(null)
|
|
const tRef = useRef(null)
|
|
|
|
|
+ const { Text } = Typography
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
params: {},
|
|
params: {},
|
|
|
visible: false
|
|
visible: false
|
|
@@ -100,8 +101,7 @@ const CompanyTabList = ({
|
|
|
if (key !== defaultSelectedKey) {
|
|
if (key !== defaultSelectedKey) {
|
|
|
changePriority(key, id)
|
|
changePriority(key, id)
|
|
|
}
|
|
}
|
|
|
- }}
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ }}>
|
|
|
<Menu.Item key="1">1</Menu.Item>
|
|
<Menu.Item key="1">1</Menu.Item>
|
|
|
<Menu.Item key="2">2</Menu.Item>
|
|
<Menu.Item key="2">2</Menu.Item>
|
|
|
<Menu.Item key="3">3</Menu.Item>
|
|
<Menu.Item key="3">3</Menu.Item>
|
|
@@ -120,8 +120,7 @@ const CompanyTabList = ({
|
|
|
<Dropdown
|
|
<Dropdown
|
|
|
overlay={priorityMenu(text, record.id)}
|
|
overlay={priorityMenu(text, record.id)}
|
|
|
trigger="click"
|
|
trigger="click"
|
|
|
- className="hover:cursor-pointer"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="hover:cursor-pointer">
|
|
|
<span>
|
|
<span>
|
|
|
{text} <DownOutlined />
|
|
{text} <DownOutlined />
|
|
|
</span>
|
|
</span>
|
|
@@ -183,27 +182,56 @@ const CompanyTabList = ({
|
|
|
dataIndex: 'keyNum',
|
|
dataIndex: 'keyNum',
|
|
|
width: '20%',
|
|
width: '20%',
|
|
|
render: (clientName, record) => (
|
|
render: (clientName, record) => (
|
|
|
- <span
|
|
|
|
|
- onClick={() => showLongleDrawer(record.id)}
|
|
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
|
|
- >
|
|
|
|
|
- {clientName}
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <>
|
|
|
|
|
+ {record.preserveStatus === 3 ? (
|
|
|
|
|
+ <Text delete type="secondary">
|
|
|
|
|
+ <span
|
|
|
|
|
+ onClick={() => showLongleDrawer(record.id)}
|
|
|
|
|
+ className="cursor-pointer hover:text-hex-967bbd">
|
|
|
|
|
+ {clientName}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <span
|
|
|
|
|
+ onClick={() => showLongleDrawer(record.id)}
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-hex-967bbd">
|
|
|
|
|
+ {clientName}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ )}
|
|
|
|
|
+ </>
|
|
|
)
|
|
)
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '产品',
|
|
title: '产品',
|
|
|
width: '40%',
|
|
width: '40%',
|
|
|
dataIndex: 'product',
|
|
dataIndex: 'product',
|
|
|
- render: (_, record) => <ProductLabel data={record.product} />
|
|
|
|
|
|
|
+ render: (_, record) => (
|
|
|
|
|
+ <>
|
|
|
|
|
+ {record.preserveStatus === 3 ? (
|
|
|
|
|
+ <Text delete type="secondary">
|
|
|
|
|
+ {record.product}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <ProductLabel data={record.product} />
|
|
|
|
|
+ )}
|
|
|
|
|
+ </>
|
|
|
|
|
+ )
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '销售状态',
|
|
title: '销售状态',
|
|
|
width: '10%',
|
|
width: '10%',
|
|
|
dataIndex: 'sellStatus',
|
|
dataIndex: 'sellStatus',
|
|
|
- render: (_, { sellStatus }) => {
|
|
|
|
|
- return <>{longleSellStatusNum[sellStatus]?.text}</>
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ render: (_, record) => (
|
|
|
|
|
+ <>
|
|
|
|
|
+ {record.preserveStatus === 3 ? (
|
|
|
|
|
+ <Text delete type="secondary">
|
|
|
|
|
+ {longleSellStatusNum[record.sellStatus]?.text}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <>{longleSellStatusNum[record.sellStatus]?.text}</>
|
|
|
|
|
+ )}
|
|
|
|
|
+ </>
|
|
|
|
|
+ )
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '维护状态',
|
|
title: '维护状态',
|
|
@@ -211,14 +239,36 @@ const CompanyTabList = ({
|
|
|
key: 'preserveStatus',
|
|
key: 'preserveStatus',
|
|
|
width: '10%',
|
|
width: '10%',
|
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
|
- render: (_, { preserveStatus }) => {
|
|
|
|
|
- return <>{longlePreserveStatusNum[preserveStatus]?.text}</>
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ render: (_, record) => (
|
|
|
|
|
+ <>
|
|
|
|
|
+ {record.preserveStatus === 3 ? (
|
|
|
|
|
+ <Text delete type="secondary">
|
|
|
|
|
+ {longlePreserveStatusNum[record.preserveStatus]?.text}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <>{longlePreserveStatusNum[record.preserveStatus]?.text}</>
|
|
|
|
|
+ )}
|
|
|
|
|
+ </>
|
|
|
|
|
+ )
|
|
|
|
|
+ // render: (_, { preserveStatus }) => {
|
|
|
|
|
+ // return <>{longlePreserveStatusNum[preserveStatus]?.text}</>
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
title: '责任人',
|
|
title: '责任人',
|
|
|
width: '15%',
|
|
width: '15%',
|
|
|
- dataIndex: 'responsible'
|
|
|
|
|
|
|
+ dataIndex: 'responsible',
|
|
|
|
|
+ render: (_, record) => (
|
|
|
|
|
+ <>
|
|
|
|
|
+ {record.preserveStatus === 3 ? (
|
|
|
|
|
+ <Text delete type="secondary">
|
|
|
|
|
+ {record.responsible}
|
|
|
|
|
+ </Text>
|
|
|
|
|
+ ) : (
|
|
|
|
|
+ <>{record.responsible}</>
|
|
|
|
|
+ )}
|
|
|
|
|
+ </>
|
|
|
|
|
+ )
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
const columnBusiness = [
|
|
const columnBusiness = [
|
|
@@ -229,8 +279,7 @@ const CompanyTabList = ({
|
|
|
render: (text, record) => (
|
|
render: (text, record) => (
|
|
|
<span
|
|
<span
|
|
|
onClick={() => showDrawerBusiness(record.id)}
|
|
onClick={() => showDrawerBusiness(record.id)}
|
|
|
- className="text-primary cursor-pointer hover:text-[#967bbd]"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
{text}
|
|
{text}
|
|
|
</span>
|
|
</span>
|
|
|
)
|
|
)
|