From d54f829f729d1b890a6ee5bb8510e4387fb2a208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Mon, 5 Dec 2022 13:54:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E5=B7=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standingBookDetail/components/normal.js | 46 +++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) 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 });