From 7908f925ea33ed3ba2f0162c37b896da9987a243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 9 Nov 2023 16:27:33 +0800 Subject: [PATCH] release/2.9.42311.01 --- pc4mobx/hrmSalary/pages/reportView/index.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/reportView/index.js b/pc4mobx/hrmSalary/pages/reportView/index.js index 14be4f97..82f935e5 100644 --- a/pc4mobx/hrmSalary/pages/reportView/index.js +++ b/pc4mobx/hrmSalary/pages/reportView/index.js @@ -10,9 +10,10 @@ import { WeaLeftRightLayout, WeaLocaleProvider, WeaSelect, WeaTop } from "ecCom" import { message, Modal } from "antd"; import LeftTab from "./components/leftTab"; import ReportContent from "./components/reportContent"; -import StatisticalMicroSettingsSlide from "./components/statisticalMicroSettingsSlide"; -import TopBtns from "./components/topBtns"; +import StatisticalMicroSettingsSlide, { getSalaryMonthValue } from "./components/statisticalMicroSettingsSlide"; import { reportGetForm, reportStatisticsReportSave } from "../../apis/ruleconfig"; +import { convertToUrlString } from "../../util/url"; +import TopBtns from "./components/topBtns"; import "./index.less"; @@ -92,8 +93,13 @@ class Index extends Component { */ exportData = () => { const { report } = this.state; - const { id, dimensionId, isShare } = report; - window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?id=${id}&dimensionId=${dimensionId}&isShare=${isShare}`, "_blank"); + const { id, dimensionId, isShare, timeType, salaryEndMonth: end, salaryStartMonth: start } = report; + const [salaryStartMonth, salaryEndMonth] = getSalaryMonthValue(timeType); + const payload = { + id, dimensionId, isShare, + salaryStartMonth: (salaryStartMonth || start) + "-01", salaryEndMonth: (salaryEndMonth || end) + "-01" + }; + window.open(`${window.location.origin}/api/bs/hrmsalary/report/statistics/report/exportData?${convertToUrlString(payload)}`, "_blank"); }; render() {