泛微薪资核算iframe表格

custom-新弘农业/V2-薪资核算表格添加序号列
黎永顺 2 years ago
parent 59497e306b
commit ba6bb91015

@ -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>;
})

Loading…
Cancel
Save