泛微薪资核算iframe表格

This commit is contained in:
黎永顺 2023-04-25 09:59:07 +08:00
parent 59497e306b
commit ba6bb91015
1 changed files with 14 additions and 3 deletions

View File

@ -32,19 +32,30 @@ const PreviewTable: FC = (props) => {
className={styles.tableWrapper}
columns={columns}
dataSource={dataSource}
pagination={false}
bordered
size="small"
scroll={{ x: 1200, y: `calc(100vh - 109px)` }}
summary={() => {
if (!showSumrow) return;
let totalColumns: any[] = [];
_.forEach(columns, it => {
if (!it.children) {
totalColumns.push(it);
} else {
totalColumns = [...totalColumns, ...it.children];
}
});
return (
<Table.Summary fixed>
<Table.Summary.Row>
{
_.map(columns, (item, index) => {
_.map([{}, ...totalColumns], (item, index) => {
if (index === 0) {
return <Table.Summary.Cell index={0} key={index}><Text type="danger"></Text></Table.Summary.Cell>;
return <Table.Summary.Cell index={0} key={index} align="center"><Text
type="danger"></Text></Table.Summary.Cell>;
}
return <Table.Summary.Cell index={index} key={index}>
return <Table.Summary.Cell index={index} key={index} align="center">
<Text type="danger">{!_.isNil(sumRow[item.dataIndex]) ? sumRow[item.dataIndex] : "-"}</Text>
</Table.Summary.Cell>;
})