Merge branch 'master' into feature/2.9.42310.01-薪资项目拓扑图

release/2.19.1.2503.01-业务线个税
黎永顺 1 year ago
commit db6bbd8bfa

@ -136,7 +136,7 @@ const index: FunctionComponent<Props> = (props) => {
});
};
const rowSelection = {
columnWidth: 60, hideSelectAll: isDetailTable,
columnWidth: 60, columnTitle: isDetailTable ? "序号" : "",
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable ?
<span>{index + 1}</span> : originNode),
selectedRowKeys: selectedRowKeys,

@ -34,6 +34,42 @@ const ReportTable: FC = (props) => {
return {
...child, ellipsis: true,
render: (text: string, record: any) => {
if(child.dataIndex?.endsWith("increase")){
let lowerLimitIndex = child.dataIndex.replace("increase", "lowerLimit");
let upperLimitIndex = child.dataIndex.replace("increase", "upperLimit");
let rowData = record[child.dataIndex].split(",").join("");
if (isNaN(parseFloat(rowData))) {
return record[child.dataIndex]
}
if (!isNaN(parseFloat(record[lowerLimitIndex])) && parseFloat(rowData) < parseFloat(record[lowerLimitIndex])) {
return <Button type="link" block onClick={() => {
window.parent.postMessage(
{
type: "turn",
payload: { id: "PIVOTCHART", params: { record } }
},
"*"
);
}}>
<Text type="success">{rowData}</Text>
</Button>
}
if (!isNaN(parseFloat(record[upperLimitIndex])) && parseFloat(rowData) > parseFloat(record[upperLimitIndex])) {
return <Button type="link" block onClick={() => {
window.parent.postMessage(
{
type: "turn",
payload: { id: "PIVOTCHART", params: { record } }
},
"*"
);
}}>
<Text type="danger">{rowData}</Text>
</Button>
} else {
return `${rowData}`
}
}
return <Button type="link" block onClick={() => {
window.parent.postMessage(
{
@ -75,7 +111,7 @@ const ReportTable: FC = (props) => {
{
_.map(totalColumns, (item, index) => {
return <Table.Summary.Cell index={index} key={index} align="center">
<Text type="danger">{!_.isNil(sumRow[item.dataIndex]) ? sumRow[item.dataIndex] : "-"}</Text>
<Text>{!_.isNil(sumRow[item.dataIndex]) ? sumRow[item.dataIndex] : "-"}</Text>
</Table.Summary.Cell>;
})
}

Loading…
Cancel
Save