diff --git a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js index 34eca562..881338d2 100644 --- a/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/employeedeclareDetail/index.js @@ -170,6 +170,8 @@ class Index extends Component { } = this.props; const { pageInfo, declareStatus, taxCycle, selectedKey, selectedRowKeys } = this.state; const { departmentIds, positionIds, ...formParams } = form.getFormParams(); + //判断税款所属期是否在两月以内 + const isGreaterThanLastTwoMonths = moment(taxCycle).isAfter(moment().subtract(2, "months")); const payload = { ...formParams, ...pageInfo, declareStatus, @@ -186,7 +188,7 @@ class Index extends Component { const { columns, list: dataSource, pageNum: current, pageSize, total } = result; this.baseInfoRef.getEmployeeDeclareInfo(); this.setState({ - azOperate: true, + azOperate: isGreaterThanLastTwoMonths, pageInfo: { ...pageInfo, current, pageSize, total } }, () => { const payload = { @@ -203,7 +205,7 @@ class Index extends Component { }) }; this.postMessageToChild(payload); - if (!showOperateBtn && !isTaxDeclareAdmin) { + if ((!showOperateBtn && !isTaxDeclareAdmin) || !isGreaterThanLastTwoMonths) { const style = document.createElement("style"); // 设置style内容,例如添加CSS规则 style.innerHTML = `