custom-艾志工业-合并个税

This commit is contained in:
黎永顺 2024-06-14 15:46:35 +08:00
parent 73e6692d2b
commit e0c2cdf629
1 changed files with 4 additions and 2 deletions

View File

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