|
|
|
|
@ -7,7 +7,7 @@ import SearchForm from '../components/search/SearchForm';
|
|
|
|
|
import useHostCaseStore from '../zustand/HostCase';
|
|
|
|
|
import { useShallow } from 'zustand/shallow';
|
|
|
|
|
import { exportDoc } from '../components/TemplateLetter2025/Index';
|
|
|
|
|
import { VSDataTag } from './../components/Data';
|
|
|
|
|
import { RenderVSDataCell } from './../components/Data';
|
|
|
|
|
import ExportDocxBtn from '../components/TemplateLetter2025/ExportDocxBtn';
|
|
|
|
|
|
|
|
|
|
const sorter = (a, b, key) => parseInt(a[key]) - parseInt(b[key]);
|
|
|
|
|
@ -27,52 +27,46 @@ const HostCaseReport = ({ ...props }) => {
|
|
|
|
|
await getCaseReport(formVal);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const DataRenderCell = ({ data1, data2, dataSuffix = '', showDiffData }) => {
|
|
|
|
|
if (showDiffData) {
|
|
|
|
|
return <VSDataTag data1={data1} data2={data2} dataSuffix={dataSuffix} />;
|
|
|
|
|
}
|
|
|
|
|
return <div>{data1}{dataSuffix}</div>;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const summaryCols = [
|
|
|
|
|
{ title: '接团数', dataIndex: 'group_count', width: '6rem',
|
|
|
|
|
sorter: (a, b) => sorter(a,b, 'group_count'),
|
|
|
|
|
render: (text, r) => <DataRenderCell data1={r.group_count} data2={r.diff?.group_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
render: (text, r) => <RenderVSDataCell data1={r.group_count} data2={r.diff?.group_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
},
|
|
|
|
|
// { title: 'feedback团数', dataIndex: 'feedbak_group', width: '6rem' },
|
|
|
|
|
{ title: '东道主团数', dataIndex: 'group_count_dongdaozhu', width1: '8rem',
|
|
|
|
|
sorter: (a, b) => sorter(a,b, 'group_count_dongdaozhu'),
|
|
|
|
|
render: (text, r) => <DataRenderCell data1={r.group_count_dongdaozhu} data2={r.diff?.group_count_dongdaozhu} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
render: (text, r) => <RenderVSDataCell data1={r.group_count_dongdaozhu} data2={r.diff?.group_count_dongdaozhu} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
},
|
|
|
|
|
{ title: '东道主个数', dataIndex: 'case_count_dongdaozhu', width1: '8rem',
|
|
|
|
|
sorter: (a, b) => sorter(a,b, 'case_count_dongdaozhu'),
|
|
|
|
|
render: (text, r) => <DataRenderCell data1={r.case_count_dongdaozhu} data2={r.diff?.case_count_dongdaozhu} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
render: (text, r) => <RenderVSDataCell data1={r.case_count_dongdaozhu} data2={r.diff?.case_count_dongdaozhu} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
},
|
|
|
|
|
{ title: '东道主实施比例', dataIndex: 'dongdaozhu_rate',
|
|
|
|
|
render: (text, r) => <DataRenderCell data1={parseFloat(r.dongdaozhu_rate)} data2={parseFloat(r.diff?.dongdaozhu_rate)} dataSuffix='%' showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
render: (text, r) => <RenderVSDataCell data1={parseFloat(r.dongdaozhu_rate)} data2={parseFloat(r.diff?.dongdaozhu_rate)} dataSuffix='%' showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '各类型个数',
|
|
|
|
|
children: [
|
|
|
|
|
{ title: 'Live There', dataIndex: 'live_there_count',
|
|
|
|
|
sorter: (a, b) => sorter(a, b, 'live_there_count'),
|
|
|
|
|
render: (text, r) => <DataRenderCell data1={r.live_there_count} data2={r.diff?.live_there_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
render: (text, r) => <RenderVSDataCell data1={r.live_there_count} data2={r.diff?.live_there_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
},
|
|
|
|
|
{ title: '动机圆梦', dataIndex: 'dream_fulfillment_count',
|
|
|
|
|
sorter: (a, b) => sorter(a, b, 'dream_fulfillment_count'),
|
|
|
|
|
render: (text, r) => <DataRenderCell data1={r.dream_fulfillment_count} data2={r.diff?.dream_fulfillment_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
render: (text, r) => <RenderVSDataCell data1={r.dream_fulfillment_count} data2={r.diff?.dream_fulfillment_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
},
|
|
|
|
|
{ title: '仪式感创造', dataIndex: 'ceremony_creation_count',
|
|
|
|
|
sorter: (a, b) => sorter(a, b, 'ceremony_creation_count'),
|
|
|
|
|
render: (text, r) => <DataRenderCell data1={r.ceremony_creation_count} data2={r.diff?.ceremony_creation_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
render: (text, r) => <RenderVSDataCell data1={r.ceremony_creation_count} data2={r.diff?.ceremony_creation_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
},
|
|
|
|
|
{ title: '遗憾弥补', dataIndex: 'regret_compensation_count',
|
|
|
|
|
sorter: (a, b) => sorter(a, b, 'regret_compensation_count'),
|
|
|
|
|
render: (text, r) => <DataRenderCell data1={r.regret_compensation_count} data2={r.diff?.regret_compensation_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
render: (text, r) => <RenderVSDataCell data1={r.regret_compensation_count} data2={r.diff?.regret_compensation_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
},
|
|
|
|
|
{ title: '力挽狂澜', dataIndex: 'rescue_mission_count',
|
|
|
|
|
sorter: (a, b) => sorter(a, b, 'rescue_mission_count'),
|
|
|
|
|
render: (text, r) => <DataRenderCell data1={r.rescue_mission_count} data2={r.diff?.rescue_mission_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
render: (text, r) => <RenderVSDataCell data1={r.rescue_mission_count} data2={r.diff?.rescue_mission_count} showDiffData={searchValuesToSub.DateDiff1} />,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
@ -98,7 +92,7 @@ const HostCaseReport = ({ ...props }) => {
|
|
|
|
|
},
|
|
|
|
|
shows: ['years', 'agency','DepartmentList', 'guide_lgc'],
|
|
|
|
|
fieldProps: {
|
|
|
|
|
DepartmentList: { show_all: false },
|
|
|
|
|
DepartmentList: { show_all: false, mode: 'multiple' },
|
|
|
|
|
dates: { hide_vs: true },
|
|
|
|
|
years: { hide_vs: false },
|
|
|
|
|
agency: { rules: [{ required: true, message: '请选择地接社' }] },
|
|
|
|
|
|