From 9b6d5f23613ac03287538d13e76d2cca54be8350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B0=81=E7=BE=BD?= <2360164671@qq.com> Date: Mon, 2 Jan 2023 18:38:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E6=8A=A5=E9=94=80?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=90=8E=E7=9A=84=E5=88=B7=E6=96=B0=E6=9C=BA?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reimbursement/mine/MyReimbursement.tsx | 2 +- .../mine/ReimbursementCreate.tsx | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/pages/reimbursement/mine/MyReimbursement.tsx b/src/pages/reimbursement/mine/MyReimbursement.tsx index d5a0e91..8f47aee 100644 --- a/src/pages/reimbursement/mine/MyReimbursement.tsx +++ b/src/pages/reimbursement/mine/MyReimbursement.tsx @@ -249,7 +249,7 @@ class Subpage extends React.Component { 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) { diff --git a/src/pages/reimbursement/mine/ReimbursementCreate.tsx b/src/pages/reimbursement/mine/ReimbursementCreate.tsx index 6c48942..80e87e6 100644 --- a/src/pages/reimbursement/mine/ReimbursementCreate.tsx +++ b/src/pages/reimbursement/mine/ReimbursementCreate.tsx @@ -161,7 +161,7 @@ class ReimbursementCreate extends React.Component { 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 { }) } 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