|
|
|
@ -53,13 +53,26 @@ const pageSetting = {
|
|
|
|
|
// { key: 'ConfirmRates', title: '成交率', dataIndex: 'ConfirmRates_txt', width: '5em' },
|
|
|
|
|
// { key: 'SumML', title: '毛利', dataIndex: 'SumML_txt', width: '5em' },
|
|
|
|
|
],
|
|
|
|
|
childrenColumns: [
|
|
|
|
|
{ key: 'ConfirmOrder', title: '成交数', dataIndex: 'ConfirmOrder', width: '5em' },
|
|
|
|
|
{ key: 'ConfirmRates', title: '成交率', dataIndex: 'ConfirmRates_txt', width: '5em' },
|
|
|
|
|
],
|
|
|
|
|
searchInitial: { DateType: { key: 'applyDate', value: 'applyDate', label: '提交日期' } },
|
|
|
|
|
},
|
|
|
|
|
trade: {
|
|
|
|
|
xField: 'confirmDate',
|
|
|
|
|
yField: 'SumML',
|
|
|
|
|
yFieldAlias: 'SumML_txt',
|
|
|
|
|
tableColumns: [{ key: 'SumML', title: '毛利', dataIndex: 'SumML', width: '5em' }], // SumML_txt
|
|
|
|
|
tableColumns: [
|
|
|
|
|
{ key: 'SumML', title: '毛利', dataIndex: 'SumML', width: '5em' }, // SumML_txt
|
|
|
|
|
],
|
|
|
|
|
childrenColumns: [
|
|
|
|
|
{ key: 'SumOrder', title: '订单数', dataIndex: 'SumOrder', width: '5em' },
|
|
|
|
|
{ key: 'ConfirmOrder', title: '成交数', dataIndex: 'ConfirmOrder', width: '5em' },
|
|
|
|
|
{ key: 'ConfirmRates', title: '成交率', dataIndex: 'ConfirmRates_txt', width: '5em' },
|
|
|
|
|
{ key: 'SingleML', title: '单团毛利', dataIndex: 'SingleML', width: '5em' },
|
|
|
|
|
{ key: 'OrderValue', title: '单个订单价值', dataIndex: 'OrderValue', width: '5em' },
|
|
|
|
|
],
|
|
|
|
|
searchInitial: { DateType: { key: 'confirmDate', value: 'confirmDate', label: '确认日期' } },
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
@ -71,7 +84,7 @@ export default observer((props) => {
|
|
|
|
|
const { formValues, formValuesToSub } = searchFormStore;
|
|
|
|
|
const { originData } = DataPivotStore.detailData[page];
|
|
|
|
|
|
|
|
|
|
const { xField: defaultDateType, yField: defaultValKey, yFieldAlias, tableColumns, searchInitial } = pageSetting[page];
|
|
|
|
|
const { xField: defaultDateType, yField: defaultValKey, yFieldAlias, tableColumns, childrenColumns, searchInitial } = pageSetting[page];
|
|
|
|
|
const [curXfield, setCurXfield] = useState(defaultDateType);
|
|
|
|
|
|
|
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
|
@ -324,11 +337,12 @@ export default observer((props) => {
|
|
|
|
|
pagination: false,
|
|
|
|
|
columns: [
|
|
|
|
|
...pivotDateColumns[0].map((ele) => ({ key: ele, title: filterFieldsMapped[ele].label, dataIndex: ele, width: '6em', fixed: 'left' })),
|
|
|
|
|
...tableColumns,
|
|
|
|
|
...(isEmpty(pivotDateColumns[1]) ? [].concat(cloneDeep(tableColumns), childrenColumns) : tableColumns),
|
|
|
|
|
...pivotDateColumns[1].map((ele) => ({
|
|
|
|
|
key: ele,
|
|
|
|
|
title: filterFieldsMapped[ele].label,
|
|
|
|
|
align: 'left', className: 'p-s1',
|
|
|
|
|
align: 'left',
|
|
|
|
|
className: 'p-s1',
|
|
|
|
|
children: cloneDeep(pivotDateColumnsValues[1][0] || []).map((col) => ({
|
|
|
|
|
key: col,
|
|
|
|
|
title: `${col || '(空)'}: ${pivotTableColumnSummary[col]?.[defaultValKey]}`,
|
|
|
|
|