调差功能
This commit is contained in:
parent
3ac1e4ea6b
commit
d54f829f72
|
|
@ -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 {
|
|||
<Button type="primary" onClick={() => {
|
||||
this.handleCommonAccountClick();
|
||||
}}>核算</Button>
|
||||
<Button type="ghost" onClick={() => {
|
||||
}}>调差</Button>
|
||||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
|
|
@ -501,6 +540,7 @@ export default class NormalIndex extends Component {
|
|||
}
|
||||
{/*核算进度条*/}
|
||||
<ProgressModal
|
||||
title={selectedKey === "3" ? "正在删除请稍后" : "正在核算请稍后"}
|
||||
visible={this.state.progressVisible}
|
||||
onCancel={() => {
|
||||
this.setState({ progressVisible: false, progress: 0 });
|
||||
|
|
|
|||
Loading…
Reference in New Issue