更新了报销提交后的刷新机制

main
白封羽 2023-01-02 18:38:11 +08:00
parent c81d5e9020
commit 9b6d5f2361
2 changed files with 18 additions and 3 deletions

View File

@ -249,7 +249,7 @@ class Subpage extends React.Component<any, any> {
current = (current === undefined ? 0 : current)
pageSize = (pageSize === undefined ? 5 : pageSize)
let params: any = {
current: current,
pageNum: current - 1,
pageSize: pageSize,
}
if (filter.status !== undefined && filter.status !== null && filter.status.length !== 0) {

View File

@ -161,7 +161,7 @@ class ReimbursementCreate extends React.Component<any, any> {
axiosInstance.post("common/reimbursement", params).then(response => {
openNotification("提交成功")
this.setState({open: false})
this.cancel()
this.props.tableAction.current?.reload()
}).catch(error => {
console.log(error)
@ -169,7 +169,22 @@ class ReimbursementCreate extends React.Component<any, any> {
})
}
cancel = () => {
this.setState({open: false})
this.formRef.current?.resetFields()
this.setState({
loading: false,
open: false,
invoices: [],
selectedDepartment: {id: this.departments[0].departmentId, name: this.departments[0].departmentName},
back: false,
duration: 0,
departureInvoice: null,
destinationInvoice: null,
otherInvoices: [],
departureName: "",
destinationName: "",
note: "",
departmentId: -1,
})
}
changeDuration = (value: number | null) => {
return