|
@@ -4,8 +4,10 @@ import CustomModal from '@/components/Modal/src/components/CustomModal'
|
|
|
import { queryRatioPanelsList, queryServiceRatioPanelsList } from '@/services/dashboard'
|
|
import { queryRatioPanelsList, queryServiceRatioPanelsList } from '@/services/dashboard'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
import { servicelogEnum } from '@/pages/Customer/Company/components/CompanyDetail/LowerList'
|
|
import { servicelogEnum } from '@/pages/Customer/Company/components/CompanyDetail/LowerList'
|
|
|
|
|
+import ClientDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
|
import { Badge } from 'antd'
|
|
import { Badge } from 'antd'
|
|
|
import { cardTypeMap } from '../consts'
|
|
import { cardTypeMap } from '../consts'
|
|
|
|
|
+import { useModal } from '@/components/Modal'
|
|
|
|
|
|
|
|
const dataTypeEunm = {
|
|
const dataTypeEunm = {
|
|
|
0: {
|
|
0: {
|
|
@@ -51,7 +53,6 @@ const ServiceRatioPanels = ({ cyclical, dataPermission }) => {
|
|
|
activeKey: '0',
|
|
activeKey: '0',
|
|
|
total: 0
|
|
total: 0
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
const columns = [
|
|
const columns = [
|
|
|
{
|
|
{
|
|
|
dataIndex: activeKeyMap[state.activeKey].key,
|
|
dataIndex: activeKeyMap[state.activeKey].key,
|
|
@@ -141,12 +142,36 @@ const ServiceRatioPanels = ({ cyclical, dataPermission }) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const RatioPanels = ({ dataType, retioCyclical, dataPermission }) => {
|
|
const RatioPanels = ({ dataType, retioCyclical, dataPermission }) => {
|
|
|
|
|
+ const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
|
|
+ const [state, setState] = useState({
|
|
|
|
|
+ orderIds: []
|
|
|
|
|
+ })
|
|
|
|
|
+ const showDrawer = id => {
|
|
|
|
|
+ setDrawerProps({
|
|
|
|
|
+ zIndex: '1200',
|
|
|
|
|
+ closable: true,
|
|
|
|
|
+ onClose: () => toggleDrawer(),
|
|
|
|
|
+ bodyStyle: {
|
|
|
|
|
+ height: '100vh',
|
|
|
|
|
+ overflowY: 'hidden'
|
|
|
|
|
+ },
|
|
|
|
|
+ children: <ClientDetail dataId={id} orderIds={state.orderIds} />
|
|
|
|
|
+ })
|
|
|
|
|
+ toggleDrawer()
|
|
|
|
|
+ }
|
|
|
const columnsMap = {
|
|
const columnsMap = {
|
|
|
0: [
|
|
0: [
|
|
|
{
|
|
{
|
|
|
dataIndex: 'clientName',
|
|
dataIndex: 'clientName',
|
|
|
title: '联系人名称',
|
|
title: '联系人名称',
|
|
|
- width: '13%'
|
|
|
|
|
|
|
+ width: '13%',
|
|
|
|
|
+ render: (clientName, record) => (
|
|
|
|
|
+ <span
|
|
|
|
|
+ onClick={() => showDrawer(record.id)}
|
|
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
|
|
+ {clientName}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ )
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
dataIndex: 'companyName',
|
|
dataIndex: 'companyName',
|