From b66076295432cdb0e89a8a9582b2670c72ad637a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Fri, 5 Dec 2025 11:51:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yuthon_report/yuthon_contract_report.js | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) 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,