|
|
@@ -4,11 +4,11 @@ import CustomModal from '@/components/Modal/src/components/CustomModal'
|
|
|
import { queryRatioPanelsList, queryServiceRatioPanelsList } from '@/services/dashboard'
|
|
|
import consts from '@/consts'
|
|
|
import { servicelogEnum } from '@/pages/Customer/Company/components/CompanyDetail/LowerList'
|
|
|
-// import ClientDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
|
-// import CompanyDetail from '@/pages/Customer/Company/components/CompanyDetail'
|
|
|
+import ClientDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
|
+import CompanyDetail from '@/pages/Customer/Company/components/CompanyDetail'
|
|
|
import { Badge } from 'antd'
|
|
|
import { cardTypeMap } from '../consts'
|
|
|
-// import { useModal } from '@/components/Modal'
|
|
|
+import { useModal } from '@/components/Modal'
|
|
|
|
|
|
const dataTypeEunm = {
|
|
|
0: {
|
|
|
@@ -45,7 +45,7 @@ const renderBadge = (count, active = false) => {
|
|
|
|
|
|
/** 服务环比数据Tab切换表格 */
|
|
|
const ServiceRatioPanels = ({ staffIds, cyclical, dataPermission }) => {
|
|
|
- // const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
+ const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
const activeKeyMap = {
|
|
|
0: { key: 'clientName', title: '客户', id: 'clientId' },
|
|
|
1: { key: 'customerName', title: '单位', id: 'customerId' },
|
|
|
@@ -56,39 +56,38 @@ const ServiceRatioPanels = ({ staffIds, cyclical, dataPermission }) => {
|
|
|
activeKey: '0',
|
|
|
total: 0
|
|
|
})
|
|
|
- // const showDrawer = id => {
|
|
|
- // let children = null
|
|
|
- // if (state.activeKey === '0') {
|
|
|
- // children = <ClientDetail dataId={id} orderIds={state.orderIds} />
|
|
|
- // }
|
|
|
- // if (state.activeKey === '1') {
|
|
|
- // children = <CompanyDetail dataId={id} orderIds={state.orderIds} />
|
|
|
- // }
|
|
|
- // setDrawerProps({
|
|
|
- // zIndex: '1200',
|
|
|
- // closable: true,
|
|
|
- // onClose: () => toggleDrawer(),
|
|
|
- // bodyStyle: {
|
|
|
- // height: '100vh',
|
|
|
- // overflowY: 'hidden'
|
|
|
- // },
|
|
|
- // children
|
|
|
- // })
|
|
|
- // toggleDrawer()
|
|
|
- // }
|
|
|
+ const showDrawer = id => {
|
|
|
+ let children = null
|
|
|
+ if (state.activeKey === '0') {
|
|
|
+ children = <ClientDetail dataId={id} orderIds={state.orderIds} />
|
|
|
+ }
|
|
|
+ if (state.activeKey === '1') {
|
|
|
+ children = <CompanyDetail dataId={id} orderIds={state.orderIds} />
|
|
|
+ }
|
|
|
+ setDrawerProps({
|
|
|
+ zIndex: 1040,
|
|
|
+ closable: true,
|
|
|
+ onClose: () => toggleDrawer(),
|
|
|
+ bodyStyle: {
|
|
|
+ height: '100vh',
|
|
|
+ overflowY: 'hidden'
|
|
|
+ },
|
|
|
+ children
|
|
|
+ })
|
|
|
+ toggleDrawer()
|
|
|
+ }
|
|
|
const columns = [
|
|
|
{
|
|
|
dataIndex: activeKeyMap[state.activeKey].key,
|
|
|
title: `${activeKeyMap[state.activeKey].title}名称`,
|
|
|
- ellipsis: true,
|
|
|
- width: '15%'
|
|
|
- // render: (text, record) => (
|
|
|
- // <span
|
|
|
- // onClick={() => showDrawer(record[activeKeyMap[state.activeKey].id])}
|
|
|
- // className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
- // {text}
|
|
|
- // </span>
|
|
|
- // )
|
|
|
+ width: '15%',
|
|
|
+ render: (text, record) => (
|
|
|
+ <span
|
|
|
+ onClick={() => showDrawer(record[activeKeyMap[state.activeKey].id])}
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
+ {text}
|
|
|
+ </span>
|
|
|
+ )
|
|
|
},
|
|
|
{
|
|
|
dataIndex: 'status',
|
|
|
@@ -105,6 +104,7 @@ const ServiceRatioPanels = ({ staffIds, cyclical, dataPermission }) => {
|
|
|
{
|
|
|
dataIndex: 'mark',
|
|
|
width: '38%',
|
|
|
+ ellipsis: true,
|
|
|
title: '服务内容'
|
|
|
},
|
|
|
{
|
|
|
@@ -178,50 +178,50 @@ const ServiceRatioPanels = ({ staffIds, cyclical, dataPermission }) => {
|
|
|
}
|
|
|
|
|
|
const RatioPanels = ({ dataType, staffIds, retioCyclical, dataPermission }) => {
|
|
|
- // const { toggleDrawer, setDrawerProps } = useModal()
|
|
|
- // const state = {
|
|
|
- // 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 { toggleDrawer, setDrawerProps } = useModal()
|
|
|
+ const state = {
|
|
|
+ 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 showDrawerComapny = id => {
|
|
|
- // setDrawerProps({
|
|
|
- // zIndex: '1200',
|
|
|
- // closable: true,
|
|
|
- // onClose: () => toggleDrawer(),
|
|
|
- // bodyStyle: {
|
|
|
- // height: '100vh',
|
|
|
- // overflowY: 'hidden'
|
|
|
- // },
|
|
|
- // children: <CompanyDetail dataId={id} orderIds={state.orderIds} />
|
|
|
- // })
|
|
|
- // toggleDrawer()
|
|
|
- // }
|
|
|
+ const showDrawerComapny = id => {
|
|
|
+ setDrawerProps({
|
|
|
+ zIndex: '1200',
|
|
|
+ closable: true,
|
|
|
+ onClose: () => toggleDrawer(),
|
|
|
+ bodyStyle: {
|
|
|
+ height: '100vh',
|
|
|
+ overflowY: 'hidden'
|
|
|
+ },
|
|
|
+ children: <CompanyDetail dataId={id} orderIds={state.orderIds} />
|
|
|
+ })
|
|
|
+ toggleDrawer()
|
|
|
+ }
|
|
|
const columnsMap = {
|
|
|
0: [
|
|
|
{
|
|
|
dataIndex: 'clientName',
|
|
|
title: '客户名称',
|
|
|
- width: '10%'
|
|
|
- // render: (clientName, record) => (
|
|
|
- // <span
|
|
|
- // onClick={() => showDrawer(record.id)}
|
|
|
- // className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
- // {clientName}
|
|
|
- // </span>
|
|
|
- // )
|
|
|
+ width: '10%',
|
|
|
+ render: (clientName, record) => (
|
|
|
+ <span
|
|
|
+ onClick={() => showDrawer(record.id)}
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
+ {clientName}
|
|
|
+ </span>
|
|
|
+ )
|
|
|
},
|
|
|
{
|
|
|
dataIndex: 'companyName',
|
|
|
@@ -264,14 +264,14 @@ const RatioPanels = ({ dataType, staffIds, retioCyclical, dataPermission }) => {
|
|
|
{
|
|
|
dataIndex: 'companyName',
|
|
|
title: '单位名称',
|
|
|
- width: '16%'
|
|
|
- // render: (companyName, record) => (
|
|
|
- // <span
|
|
|
- // onClick={() => showDrawerComapny(record.id)}
|
|
|
- // className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
- // {companyName}
|
|
|
- // </span>
|
|
|
- // )
|
|
|
+ width: '16%',
|
|
|
+ render: (companyName, record) => (
|
|
|
+ <span
|
|
|
+ onClick={() => showDrawerComapny(record.id)}
|
|
|
+ className="text-primary cursor-pointer hover:text-[#967bbd]">
|
|
|
+ {companyName}
|
|
|
+ </span>
|
|
|
+ )
|
|
|
},
|
|
|
{
|
|
|
dataIndex: 'districtName',
|