release/2.19.1.2503.01-业务线个税
黎永顺 1 year ago
parent b992c06a21
commit 2f50be171a

@ -20,6 +20,7 @@ interface OwnProps {
}
type Props = OwnProps;
type fixedProps = boolean | "top" | "bottom";
const { Text } = Typography;
const index: FunctionComponent<Props> = (props) => {
@ -32,6 +33,7 @@ const index: FunctionComponent<Props> = (props) => {
const [isDetailTable, setIsDetailTable] = useState<boolean>(false);
const [sumRowlistUrl, setSumRowlistUrl] = useState<string>("");
const [payload, setPayload] = useState<string>("");
const [fixed, setFixed] = useState<fixedProps>(true);
useEffect(() => {
window.parent.postMessage({ type: "init" }, "*");
@ -45,13 +47,15 @@ const index: FunctionComponent<Props> = (props) => {
if (!_.isEmpty(data)) {
const {
columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {},
showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail
showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail,
fixed = true
} = data;
setSumRowlistUrl(sumRowlistUrl);
setShowTotalCell(showTotalCell);
setIsDetailTable(calcDetail);
setI18n(i18nRes);
setPayload(payload);
setFixed(fixed);
setPageInfo(pageInfo);
setDataSource(dataSource);
setSelectedRowKeys(selectedRowKeys);
@ -140,7 +144,7 @@ const index: FunctionComponent<Props> = (props) => {
}}
summary={() => (
!showTotalCell ? <></> :
<Table.Summary fixed>
<Table.Summary fixed={fixed}>
<Table.Summary.Row>
<Table.Summary.Cell index={0} align="center"><Text type="danger">{i18n["总计"]}</Text></Table.Summary.Cell>
<CaclFixedTotal columns={columns} dataSourceUrl={sumRowlistUrl} payload={payload}/>

Loading…
Cancel
Save