From 1b1ac94c15d2c560e35798032f4c4e90a63f8ea8 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 7 Jan 2025 17:35:31 +0800 Subject: [PATCH] =?UTF-8?q?custom-=E6=97=AD=E5=8C=96=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/custom-pages/xhc/departmentReport.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/custom-pages/xhc/departmentReport.js b/pc4mobx/hrmSalary/pages/custom-pages/xhc/departmentReport.js index 74f3eba4..22d8bd53 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/xhc/departmentReport.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/xhc/departmentReport.js @@ -98,13 +98,16 @@ class DepartmentReport extends Component { salaryMonth: (field, textAreaProps, form, formParams) => { return (
this.setState({ - queryData: { - ...queryData, - fromDate: moment(start).startOf("month").format("YYYY-MM-DD"), - toDate: moment(end).startOf("month").format("YYYY-MM-DD") - } - }, () => this.getxhcDepartmentReport())}/> + onChange={([start, end]) => { + if (!start || !end) return; + this.setState({ + queryData: { + ...queryData, + fromDate: moment(start).startOf("month").format("YYYY-MM-DD"), + toDate: moment(end).startOf("month").format("YYYY-MM-DD") + } + }, () => this.getxhcDepartmentReport()); + }}/>
); }, subCompanyIds: (field, textAreaProps, form, formParams) => {