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,