release/2.19.1.2503.01-业务线个税
黎永顺 8 months ago
parent fe86dd2cd6
commit f9f95f25df

@ -61,7 +61,7 @@ const calcFixedTotal: FunctionComponent<Props> = (props) => {
return <Table.Summary.Cell index={index + 1} key={index + 1} align={_.head(columns)?.align || "left"}>
{
loading ? <Spin spinning={loading} size="small"></Spin> :
<Text type="danger">{sumRow[item.dataIndex] || "-"}</Text>
<Text type="danger">{!_.isNil(sumRow[item.dataIndex]) ? sumRow[item.dataIndex] : "-"}</Text>
}
</Table.Summary.Cell>;
})

@ -50,7 +50,7 @@ const index: FunctionComponent<Props> = (props) => {
const {
columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {},
showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail,
fixed = true, tableScrollHeight, sumRow
fixed = true, tableScrollHeight, sumRow, optWidth
} = data;
setSumRowlistUrl(sumRowlistUrl);
setShowTotalCell(showTotalCell);
@ -64,7 +64,7 @@ const index: FunctionComponent<Props> = (props) => {
setSelectedRowKeys(selectedRowKeys);
setTableScrollHeight(tableScrollHeight);
setColumns([...convertColumns(_.map(columns, o => ({ ...o, i18n: i18nRes }))), {
title: i18nRes["操作"], dataIndex: "operate", fixed: "right", width: 220,
title: i18nRes["操作"], dataIndex: "operate", fixed: "right", width: optWidth || 120,
render: (__, record) => (<Space>
<Button type="link" onClick={() => handleEdit(record?.id)}>{i18nRes["编辑"]}</Button>
<Button type="link"

@ -295,6 +295,22 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject,
);
}
}];
} else if (type === "variableSalary") {
return [..._.map(initialState, g => {
return { ...g, ellipsis: true, fixed: false, width: 150 };
}), {
dataIndex: "operate", title: i18n?.["操作"], width: 185, fixed: "right",
render: (__: string, record: any) => {
return (
<Space>
<Button type="link"
onClick={() => postMessageToParent("VIEW", record)}>{i18n?.["查看详情"]}</Button>
<Button type="link"
onClick={() => postMessageToParent("DEL", record)}>{i18n?.["删除"]}</Button>
</Space>
);
}
}];
}
return initialState;
}, [initialState, type, i18n, extraParams]);

Loading…
Cancel
Save