月度营收分析页面
This commit is contained in:
parent
fe7a7a82f6
commit
9b689aff3d
@ -310,7 +310,6 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
// 处理百分号
|
||||
item.RevenueAmount.increaseRate = item.RevenueAmount?.increaseRate ? item.RevenueAmount?.increaseRate + '%' : ""
|
||||
item.ACCRevenueAmount.increaseRate = item.ACCRevenueAmount?.increaseRate ? item.ACCRevenueAmount?.increaseRate + '%' : ""
|
||||
|
||||
// 处理数字的千分号
|
||||
item.RevenueAmount.curData = item.RevenueAmount.curData.toLocaleString() || 0
|
||||
item.RevenueAmount.compareData = item.RevenueAmount.compareData.toLocaleString() || 0
|
||||
@ -323,7 +322,6 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
// 处理百分号
|
||||
subItem.RevenueAmount.increaseRate = subItem.RevenueAmount?.increaseRate ? subItem.RevenueAmount?.increaseRate + '%' : ""
|
||||
subItem.ACCRevenueAmount.increaseRate = subItem.ACCRevenueAmount?.increaseRate ? subItem.ACCRevenueAmount?.increaseRate + '%' : ""
|
||||
|
||||
// 处理数字的千分号
|
||||
subItem.RevenueAmount.curData = subItem.RevenueAmount.curData.toLocaleString() || 0
|
||||
subItem.RevenueAmount.compareData = subItem.RevenueAmount.compareData.toLocaleString() || 0
|
||||
@ -331,6 +329,7 @@ const monthlyRevenueAnalysis: React.FC<{ currentUser: CurrentUser }> = (props) =
|
||||
subItem.ACCRevenueAmount.curData = subItem.ACCRevenueAmount.curData.toLocaleString() || 0
|
||||
subItem.ACCRevenueAmount.compareData = subItem.ACCRevenueAmount.compareData.toLocaleString() || 0
|
||||
subItem.ACCRevenueAmount.increaseData = subItem.ACCRevenueAmount.increaseData.toLocaleString() || 0
|
||||
subItem.children = null
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@ -10,6 +10,7 @@ type AnyCol = {
|
||||
renderText?: (text: any, record: any, index: number) => any;
|
||||
hideInTable?: boolean;
|
||||
valueType?: 'index' | string;
|
||||
align?: 'left' | 'center' | 'right';
|
||||
};
|
||||
|
||||
/** ========== 新增:拍平树形数据 ========== */
|
||||
@ -258,8 +259,14 @@ export async function exportXlsxFromProColumnsExcelJS(
|
||||
const rec = batch[i];
|
||||
const row = ws.getRow(currentRowIndex + i);
|
||||
leafCols.forEach((col, j) => {
|
||||
const cell = row.getCell(j + 1);
|
||||
// 这里 rowIndex 仍然传全局行号 start + i,序号列会自动正确
|
||||
row.getCell(j + 1).value = getCellValue(col, rec, start + i);
|
||||
cell.value = getCellValue(col, rec, start + i);
|
||||
|
||||
// 设置单元格对齐方式
|
||||
if (col.align) {
|
||||
cell.alignment = { horizontal: col.align, vertical: 'middle' };
|
||||
}
|
||||
});
|
||||
// 适度让出主线程:ExcelJS 是纯 JS,通常也很稳;如需进一步优化可用 setTimeout 分批
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user