diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js index 67abafe6..f824f383 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js @@ -44,6 +44,7 @@ export default class NormalIndex extends Component { } }; this.timer = null; + this.timerDelete = null; } componentDidMount() { @@ -61,6 +62,9 @@ export default class NormalIndex extends Component { if (this.timer) { clearInterval(this.timer); } + if (this.timerDelete) { + clearInterval(this.timerDelete); + } } componentWillReceiveProps(nextProps) { @@ -270,14 +274,46 @@ export default class NormalIndex extends Component { title: "确认信息", content: "确认删除勾选的数据吗?", onOk: () => { + this.setState({ + progressVisible: true + }, () => { + this.timerDelete = setInterval(() => { + if (this.state.progress !== 100) { + this.setState({ + progress: this.state.progress + 10 + }); + } else { + clearInterval(this.timerDelete); + this.setState({ + progressVisible: false, + progress: 0 + }, () => { + message.success("删除成功"); + selectedKey === "1" + ? this.getNormalList({ + billMonth, + paymentOrganization, + current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length) + }) + : this.getSupplementaryList({ + billMonth, + current: calcPageNo(this.state.tableData.total, this.state.current, 10, includes.length), + paymentOrganization + }); + }); + } + }, 800); + }); + siaccountCommonDelete({ billMonth, includes, ids, paymentOrganization }).then(() => { + clearInterval(this.timerDelete); message.success("删除成功"); - this.setState({ selectedRowKeys: [] }); + this.setState({ selectedRowKeys: [], progressVisible: false, progress: 0 }); selectedKey === "1" ? this.getNormalList({ billMonth, @@ -290,6 +326,7 @@ export default class NormalIndex extends Component { paymentOrganization }); }); + }, onCancel: () => { } @@ -331,7 +368,7 @@ export default class NormalIndex extends Component { this.timer = setInterval(() => { if (this.state.progress !== 100) { this.setState({ - progress: this.state.progress + 20 + progress: this.state.progress + 10 }); } else { clearInterval(this.timer); @@ -352,7 +389,7 @@ export default class NormalIndex extends Component { current: this.state.current }); } - }, 800); + }, 1000); }); }); } @@ -489,6 +526,8 @@ export default class NormalIndex extends Component { + } { @@ -501,6 +540,7 @@ export default class NormalIndex extends Component { } {/*核算进度条*/} { this.setState({ progressVisible: false, progress: 0 });