From 7c330c26757d0c917158d779999ee97eebe37f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Fri, 17 Mar 2023 14:36:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95=E5=8F=91=E6=94=BE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js index eff26fba..6c0a5a3f 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollDetail/index.js @@ -22,10 +22,13 @@ export default class PayrollDetail extends React.Component { }; } + componentWillMount() { + this.getPayrollDetailList(); + } + componentDidMount() { this.getPayrollInfo(); this.getPayrollDetailSa(); - this.getPayrollDetailList(); window.addEventListener("message", this.handleReceiveMessage, false); } @@ -62,6 +65,7 @@ export default class PayrollDetail extends React.Component { showSum: status && sysData === "1", salaryBillSendSum }), "*"); + this.getPayrollDetailList({ child: type }); } }; getPayrollInfo = () => { @@ -107,7 +111,7 @@ export default class PayrollDetail extends React.Component { pageInfo: { ...pageInfo, current, pageSize, total } }, () => { const { pageInfo, dataSource, columns, salaryBillSendSum, showSum } = this.state; - child === "PAGEINFO" && + (child === "PAGEINFO" || child === "init") && childFrameObj.contentWindow.postMessage(JSON.stringify({ dataSource, columns,