diff --git a/src/charts/Customer_care_regular.jsx b/src/charts/Customer_care_regular.jsx index 0a462cb..a3fec65 100644 --- a/src/charts/Customer_care_regular.jsx +++ b/src/charts/Customer_care_regular.jsx @@ -7,7 +7,7 @@ import { observer } from 'mobx-react'; import SearchForm from './../components/search/SearchForm'; import LineWithAvg from '../components/LineWithAvg'; import { toJS } from 'mobx'; -import { TableExportBtn, VSDataTag, RenderVSDataCell } from '../components/Data'; +import { TableExportBtn, RenderVSDataCell } from '../components/Data'; import useCustomerRelationsStore from '../zustand/CustomerRelations'; import { useShallow } from 'zustand/shallow'; diff --git a/src/utils/commons.js b/src/utils/commons.js index 4bc91ba..cb48e64 100644 --- a/src/utils/commons.js +++ b/src/utils/commons.js @@ -4,7 +4,7 @@ import { CaretUpOutlined, CaretDownOutlined } from "@ant-design/icons"; /** * 显示对比标签 * @deprecated - * 使用 VSTag 或 VSDataTag 组件 + * 使用组件: VSTag VSDataTag RenderVSDataCell */ export function show_vs_tag(vs, vs_diff, data1, data2) { let tag = "-"; diff --git a/src/views/AgentGroupCount.jsx b/src/views/AgentGroupCount.jsx index 999e297..2074f94 100644 --- a/src/views/AgentGroupCount.jsx +++ b/src/views/AgentGroupCount.jsx @@ -6,7 +6,7 @@ import { observer } from 'mobx-react'; import { toJS } from 'mobx'; import 'moment/locale/zh-cn'; import SearchForm from './../components/search/SearchForm'; -import { TableExportBtn, VSDataTag } from './../components/Data'; +import { TableExportBtn, RenderVSDataCell } from './../components/Data'; import useCustomerServicesStore from '../zustand/CustomerServices'; import { useShallow } from 'zustand/shallow'; import { fixTo2Decimals } from "@haina/utils-commons"; @@ -19,13 +19,6 @@ const TdCell = (tdprops) => { return ; }; -const DataRenderCell = ({ data1, data2, dataSuffix = '', showDiffData }) => { - if (showDiffData) { - return ; - } - return
{data1}{dataSuffix}
; -}; - const AgentGroupCount = () => { const { customerServicesStore, date_picker_store } = useContext(stores_Context); const [loading, searchValues, setSearchValues, searchValuesToSub] = useCustomerServicesStore(useShallow((state) => [state.loading, state.searchValues, state.setSearchValues, state.searchValuesToSub])); @@ -53,9 +46,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'GroupCount'), children: [ { - title: , // total1.GroupCount, + title: , // total1.GroupCount, dataIndex: 'GroupCount', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -65,9 +58,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'PersonNum'), children: [ { - title: , // total1.PersonNum, + title: , // total1.PersonNum, dataIndex: 'PersonNum', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -77,9 +70,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'GroupDays'), children: [ { - title: , // total1.GroupDays, + title: , // total1.GroupDays, dataIndex: 'GroupDays', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -89,9 +82,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'totalcost'), children: [ { - title: , // total1.totalcost, + title: , // total1.totalcost, dataIndex: 'totalcost', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -101,9 +94,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'FKBTS'), children: [ { - title: , // total1.FKBTS, + title: , // total1.FKBTS, dataIndex: 'FKBTS', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -113,9 +106,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'DDZTS'), children: [ { - title: , // total1.DDZTS, + title: , // total1.DDZTS, dataIndex: 'DDZTS', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -125,9 +118,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'DDZCases'), children: [ { - title: , // total1.DDZCases, + title: , // total1.DDZCases, dataIndex: 'DDZCases', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -137,9 +130,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'DDZRate'), children: [ { - title: , // total1.DDZRate, + title: , // total1.DDZRate, dataIndex: 'DDZRate', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -149,9 +142,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'ZWHP'), children: [ { - title: , // total1.ZWHP, + title: , // total1.ZWHP, dataIndex: 'ZWHP', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -161,9 +154,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'ZWHPCases'), children: [ { - title: , // total1.ZWHPCases, + title: , // total1.ZWHPCases, dataIndex: 'ZWHPCases', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -173,9 +166,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'ZWHPRate'), // parseInt(a.ZWHPRate) - parseInt(b.ZWHPRate), children: [ { - title: , // total1.ZWHPRate, + title: , // total1.ZWHPRate, dataIndex: 'ZWHPRate', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -185,9 +178,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'BMS'), children: [ { - title: , // total1.BMS, + title: , // total1.BMS, dataIndex: 'BMS', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -197,9 +190,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'BMRate'), // parseInt(a.BMRate) - parseInt(b.BMRate), children: [ { - title: , // total1.BMRate, + title: , // total1.BMRate, dataIndex: 'BMRate', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -209,9 +202,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'TS'), children: [ { - title: , // total1.TS, + title: , // total1.TS, dataIndex: 'TS', - render: (text, r) => , + render: (text, r) => , }, ], }, @@ -221,9 +214,9 @@ const AgentGroupCount = () => { sorter: (a, b) => sorter(a, b, 'TSRate'), // parseInt(a.TSRate) - parseInt(b.TSRate), children: [ { - title: , // total1.TSRate, + title: , // total1.TSRate, dataIndex: 'TSRate', - render: (text, r) => , + render: (text, r) => , }, ], }, diff --git a/src/views/Orders.jsx b/src/views/Orders.jsx index 49db59a..ed84861 100644 --- a/src/views/Orders.jsx +++ b/src/views/Orders.jsx @@ -9,17 +9,10 @@ import { NavLink } from "react-router-dom"; import * as comm from '@haina/utils-commons'; import DateGroupRadio from '../components/DateGroupRadio'; import SearchForm from './../components/search/SearchForm'; -import { TableExportBtn, VSDataTag } from './../components/Data'; +import { TableExportBtn, RenderVSDataCell } from './../components/Data'; import ParetoChart from "../components/Pareto"; import { toJS } from 'mobx'; -const DataRenderCell = ({ data1, data2, dataSuffix = '', showDiffData, ...props }) => { - if (showDiffData) { - return ; - } - return
{data1}{dataSuffix}
; -}; - class Orders extends Component { static contextType = stores_Context; @@ -92,7 +85,7 @@ class Orders extends Component { children: [ { title: ( - , + render: (text, r) => , }, ], }, @@ -111,7 +104,7 @@ class Orders extends Component { children: [ { title: ( - , + render: (text, r) => , }, ], }, @@ -130,7 +123,7 @@ class Orders extends Component { children: [ { title: ( - , + render: (text, r) => , }, ], }, @@ -149,7 +142,7 @@ class Orders extends Component { children: [ { title: ( - , + render: (text, r) => , }, ], }, @@ -168,7 +161,7 @@ class Orders extends Component { children: [ { title: ( - , + render: (text, r) => , }, ], }, @@ -188,7 +181,7 @@ class Orders extends Component { children: [ { title: ( - , + render: (text, r) => , }, ], },