perf: GH例会数据: 规则调整: 老客户: 仅To C 客户

feature/hotel-cruise
Lei OT 1 year ago
parent 1a2ee6b637
commit e4a63f38f6

@ -41,7 +41,8 @@ const rowItem = (filterData) => {
const { data: dataByWebCode, summaryMix: summaryByWebCode } = pivotBy(filterData, [['WebCode'], [], []]);
const toB = dataByWebCode.filter((ele) => ele.WebCode.toLocaleLowerCase().indexOf('to b') !== -1).reduce((r, c) => r + c.SumOrder, 0);
const { data: dataByIsOld, summaryMix: summaryByIsOld } = pivotBy(filterData, [['IsOld', 'isCusCommend'], [], []]);
const filterIsOldC = filterData.filter((ele) => ele.WebCode.toLocaleLowerCase().indexOf('to b') === -1);
const { data: dataByIsOld, summaryMix: summaryByIsOld } = pivotBy(filterIsOldC, [['IsOld', 'isCusCommend'], [], []]);
const isOld1 = dataByIsOld.filter((ele) => ele.rowLabel.indexOf('1') !== -1).reduce((r, c) => r + c.SumOrder, 0);
const total = LineClass_Origin + LineClass_PPC + toB + isOld1;

@ -32,7 +32,7 @@ export default observer((props) => {
{ key: 'LineClass_Origin', title: '网站', dataIndex: 'LineClass_Origin' },
{ key: 'LineClass_PPC', title: 'PPC', dataIndex: 'LineClass_PPC' },
{ key: 'toB', title: 'To B', dataIndex: 'toB' },
{ key: 'isOld1', title: '老客户', dataIndex: 'isOld1' },
{ key: 'isOld1', title: 'C老客户', dataIndex: 'isOld1' },
{ key: 'total', title: '合计', dataIndex: 'total' },
{ key: 'rowYear', title: '截至年订单数', dataIndex: 'rowYear' },
// { key: 'groupsLabel2', title: '', dataIndex: 'groupsLabel2' },

Loading…
Cancel
Save