|
|
@@ -4,10 +4,10 @@ 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 ClientDetail from '@/pages/Customer/Client/components/ClientDetail'
|
|
|
import { Badge } from 'antd'
|
|
|
import { cardTypeMap } from '../consts'
|
|
|
-import { useModal } from '@/components/Modal'
|
|
|
+// import { useModal } from '@/components/Modal'
|
|
|
|
|
|
const dataTypeEunm = {
|
|
|
0: {
|
|
|
@@ -43,7 +43,7 @@ const renderBadge = (count, active = false) => {
|
|
|
}
|
|
|
|
|
|
/** 服务环比数据Tab切换表格 */
|
|
|
-const ServiceRatioPanels = ({ cyclical, dataPermission }) => {
|
|
|
+const ServiceRatioPanels = ({ staffIds, cyclical, dataPermission }) => {
|
|
|
const activeKeyMap = {
|
|
|
0: { key: 'clientName', title: '联系人' },
|
|
|
1: { key: 'customerName', title: '客户' },
|
|
|
@@ -81,7 +81,7 @@ const ServiceRatioPanels = ({ cyclical, dataPermission }) => {
|
|
|
return (
|
|
|
<ProTable
|
|
|
size="small"
|
|
|
- params={{ dataType: state.activeKey, cyclical, dataPermission }}
|
|
|
+ params={{ dataType: state.activeKey, cyclical, dataPermission, staffIds }}
|
|
|
rowKey={record => record.id}
|
|
|
scroll={{ y: 400 }}
|
|
|
border={true}
|
|
|
@@ -141,24 +141,24 @@ const ServiceRatioPanels = ({ cyclical, 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 RatioPanels = ({ dataType, staffIds, 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 = {
|
|
|
0: [
|
|
|
{
|
|
|
@@ -265,7 +265,11 @@ const RatioPanels = ({ dataType, retioCyclical, dataPermission }) => {
|
|
|
<CustomModal title={`卡片详情(${dataTypeEunm[dataType].title})`}>
|
|
|
<div className="pb-4">
|
|
|
{dataType === cardTypeMap.SERVICE ? (
|
|
|
- <ServiceRatioPanels cyclical={retioCyclical} dataPermission={dataPermission} />
|
|
|
+ <ServiceRatioPanels
|
|
|
+ cyclical={retioCyclical}
|
|
|
+ dataPermission={dataPermission}
|
|
|
+ staffIds={staffIds}
|
|
|
+ />
|
|
|
) : (
|
|
|
<div className="mx-4">
|
|
|
<ProTable
|
|
|
@@ -275,7 +279,7 @@ const RatioPanels = ({ dataType, retioCyclical, dataPermission }) => {
|
|
|
rowKey={record => record.id}
|
|
|
scroll={{ y: 400 }}
|
|
|
columns={columnsMap[dataType]}
|
|
|
- params={{ dataType, dataPermission, cyclical: retioCyclical }}
|
|
|
+ params={{ dataType, dataPermission, cyclical: retioCyclical, staffIds }}
|
|
|
request={async params => {
|
|
|
const { code = -1, data } = await queryRatioPanelsList(params)
|
|
|
return {
|