diff --git a/yuthon_report/static/src/components/yuthon_report/yuthon_contract_report.js b/yuthon_report/static/src/components/yuthon_report/yuthon_contract_report.js index aa481c75e..7446e761d 100644 --- a/yuthon_report/static/src/components/yuthon_report/yuthon_contract_report.js +++ b/yuthon_report/static/src/components/yuthon_report/yuthon_contract_report.js @@ -80,25 +80,22 @@ class ContractInfoReport extends Component { } async onChangeStartDate(date) { - console.log("实际开始日期变更:", date); - this.state.startDate = date || false; + if (Array.isArray(date)) { + this.state.startDate = date[0]; + this.state.endDate = date[1] + } } async onChangeEndDate(date) { - console.log("实际结束日期变更:", date); - this.state.endDate = date || false; + if (Array.isArray(date)) { + this.state.startDate = date[0]; + this.state.endDate = date[1] + } } // -------------------------- 核心业务逻辑 -------------------------- async onSearch() { - console.log("筛选参数:", this.state); - const startDate = this.state.startDate - ? formatDate(this.state.startDate, {format: "yyyy-MM-dd"}) - : false; - const endDate = this.state.endDate - ? formatDate(this.state.endDate, {format: "yyyy-MM-dd"}) - : false; - + console.log("筛选参数:", this.state) const params = { date_start: startDate, date_end: endDate,