|
|
@ -1,7 +1,7 @@
|
|
|
|
import React, { FC, useEffect, useState } from "react";
|
|
|
|
import React, { FC, useEffect, useState } from "react";
|
|
|
|
import { Button, Dropdown, Menu, Space, Spin, Table, Typography } from "antd";
|
|
|
|
import { Button, Dropdown, Menu, Space, Spin, Table, Typography } from "antd";
|
|
|
|
import { DownOutlined } from "@ant-design/icons";
|
|
|
|
import { DownOutlined } from "@ant-design/icons";
|
|
|
|
import { exceptStr, paginationFun } from "@/utils/common";
|
|
|
|
import { convertColumns, exceptStr, paginationFun } from "@/utils/common";
|
|
|
|
import styles from "@/pages/atdTable/components/index.less";
|
|
|
|
import styles from "@/pages/atdTable/components/index.less";
|
|
|
|
import { defaultPage, IPage } from "@/common/types";
|
|
|
|
import { defaultPage, IPage } from "@/common/types";
|
|
|
|
import cs from "classnames";
|
|
|
|
import cs from "classnames";
|
|
|
@ -158,7 +158,7 @@ const payrollFilesTable: FC = (props) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return { ...item };
|
|
|
|
return _.omitBy({ ...item }, item => !item);
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
setShowSumrow(showSum);
|
|
|
|
setShowSumrow(showSum);
|
|
|
|
setSumRow(_.isEmpty(countResult) ? { [new Date().getTime()]: new Date().getTime() } : countResult);
|
|
|
|
setSumRow(_.isEmpty(countResult) ? { [new Date().getTime()]: new Date().getTime() } : countResult);
|
|
|
@ -202,13 +202,14 @@ const payrollFilesTable: FC = (props) => {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
return <Table
|
|
|
|
return <Table
|
|
|
|
rowKey="id"
|
|
|
|
rowKey="id"
|
|
|
|
className={cs({
|
|
|
|
className={cs({
|
|
|
|
[styles.tableWrapper]: true,
|
|
|
|
[styles.tableWrapper]: true,
|
|
|
|
[styles.tableTotalWrapper]: true
|
|
|
|
[styles.tableTotalWrapper]: true
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
columns={columns}
|
|
|
|
columns={!_.isEmpty(columns) && convertColumns(columns, _.findIndex(columns, ["dataIndex", "operate"]), Object.keys(columns).length)}
|
|
|
|
dataSource={dataSource}
|
|
|
|
dataSource={dataSource}
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
rowSelection={rowSelection}
|
|
|
|
rowSelection={rowSelection}
|
|
|
@ -232,7 +233,7 @@ const payrollFilesTable: FC = (props) => {
|
|
|
|
<Table.Summary.Row>
|
|
|
|
<Table.Summary.Row>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sumRow.loading ? <Spin tip="加载中"/> :
|
|
|
|
sumRow.loading ? <Spin tip="加载中"/> :
|
|
|
|
_.map([{},...totalColumns], (item, index) => {
|
|
|
|
_.map([{}, ...totalColumns], (item, index) => {
|
|
|
|
if (index === 0) {
|
|
|
|
if (index === 0) {
|
|
|
|
return <Table.Summary.Cell index={0} key={index} align="center"><Text
|
|
|
|
return <Table.Summary.Cell index={0} key={index} align="center"><Text
|
|
|
|
type="danger">总计</Text></Table.Summary.Cell>;
|
|
|
|
type="danger">总计</Text></Table.Summary.Cell>;
|
|
|
|