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) => {