泛微薪资核算iframe表格
This commit is contained in:
parent
59497e306b
commit
ba6bb91015
|
|
@ -32,19 +32,30 @@ const PreviewTable: FC = (props) => {
|
||||||
className={styles.tableWrapper}
|
className={styles.tableWrapper}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
|
pagination={false}
|
||||||
bordered
|
bordered
|
||||||
size="small"
|
size="small"
|
||||||
|
scroll={{ x: 1200, y: `calc(100vh - 109px)` }}
|
||||||
summary={() => {
|
summary={() => {
|
||||||
if (!showSumrow) return;
|
if (!showSumrow) return;
|
||||||
|
let totalColumns: any[] = [];
|
||||||
|
_.forEach(columns, it => {
|
||||||
|
if (!it.children) {
|
||||||
|
totalColumns.push(it);
|
||||||
|
} else {
|
||||||
|
totalColumns = [...totalColumns, ...it.children];
|
||||||
|
}
|
||||||
|
});
|
||||||
return (
|
return (
|
||||||
<Table.Summary fixed>
|
<Table.Summary fixed>
|
||||||
<Table.Summary.Row>
|
<Table.Summary.Row>
|
||||||
{
|
{
|
||||||
_.map(columns, (item, index) => {
|
_.map([{}, ...totalColumns], (item, index) => {
|
||||||
if (index === 0) {
|
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>
|
<Text type="danger">{!_.isNil(sumRow[item.dataIndex]) ? sumRow[item.dataIndex] : "-"}</Text>
|
||||||
</Table.Summary.Cell>;
|
</Table.Summary.Cell>;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue