feature/2.19.1.2501.01-薪酬批量操作

This commit is contained in:
lys 2025-06-11 10:01:38 +08:00
parent 326e4bffa5
commit 143490c6d1
1 changed files with 12 additions and 4 deletions

View File

@ -55,18 +55,18 @@ export default class GenerateDeclarationDetail extends React.Component {
API.getDetailList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
pageInfo: { current, pageSize, total }, dataSource
}, () => this.postMessageToChild({
pageInfo: this.state.pageInfo, dataSource, showRowSelection: false, unitTableType: "attendanceView",
pageInfo: this.state.pageInfo, dataSource, showRowSelection: false, unitTableType: "declare",
columns: [
..._.map(_.filter(columns, it => it.dataIndex !== "jobNum"), (o, i) => ({
...o, ellipsis: true, width: (o.dataIndex === "cardType" || o.dataIndex === "cardNum") ? 180 : 100,
...o, width: (o.dataIndex === "cardType" || o.dataIndex === "cardNum") ? 180 : 100,
fixed: i === 0 ? "left" : false
})),
{
title: getLabel(111, "操作"), dataIndex: "operate", fixed: "right", width: 100,
title: getLabel(111, "操作"), dataIndex: "operate", fixed: "right",
operateType: [{ key: "EDIT", label: getLabel(111, "编辑") }]
}
]
@ -74,6 +74,14 @@ export default class GenerateDeclarationDetail extends React.Component {
}
});
};
postMessageToChild = (payload = {}) => {
const i18n = {
"操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"),
"条": getLabel(18256, "条")
};
const childFrameObj = document.getElementById("declareTable");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
getDeclareInfo = () => {
API.getDeclareInfo({ taxDeclarationId: getQueryString("id") }).then(({ status, data: declareInfo }) => {
if (status) this.setState({ declareInfo });