From 143490c6d1e1c47e2303631ff316c16010a30736 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Wed, 11 Jun 2025 10:01:38 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.19.1.2501.01-=E8=96=AA=E9=85=AC?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/declare/generateDeclarationDetail.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js index aad7ff01..8cd8c032 100644 --- a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js +++ b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js @@ -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 });