From 4984d04d4346a81b37965a20b545bc2e2bfd8852 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, 11 Apr 2024 09:48:37 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.12.1.2403.02-=E4=B8=AA=E7=A8=8E-?= =?UTF-8?q?=E5=A4=96=E7=B1=8D=E4=BA=BA=E5=91=98=E4=BF=A1=E6=81=AF=E6=8A=A5?= =?UTF-8?q?=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/declareDetail/components/leftTab.js | 3 ++- pc4mobx/hrmSalary/pages/declareDetail/index.js | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/leftTab.js b/pc4mobx/hrmSalary/pages/declareDetail/components/leftTab.js index 55c936cf..0703aa07 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/leftTab.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/leftTab.js @@ -27,12 +27,13 @@ class LeftTab extends Component { } getTaxReports = () => { - const { onChangeTab } = this.props; + const { onChangeTab, onCollapse } = this.props; API.getTaxReports({ id: getQueryString("id") }).then(({ status, data: dataSource }) => { if (status) this.setState({ dataSource, selectedKeys: !_.isEmpty(dataSource) ? _.head(dataSource).id + "" : "" }, () => { !_.isEmpty(this.state.dataSource) && onChangeTab(_.head(this.state.dataSource).reportType); + onCollapse(!_.isEmpty(this.state.dataSource) && this.state.dataSource.length > 1); }); }); }; diff --git a/pc4mobx/hrmSalary/pages/declareDetail/index.js b/pc4mobx/hrmSalary/pages/declareDetail/index.js index cc3d071d..bb9e83bb 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/index.js @@ -25,8 +25,7 @@ import { taxdeclarationRefreshData, taxdeclaratioUpdateCancel, taxdeclaratioUpdateDeclare, - taxPaymentVoucherStatusSync, - taxPaymentWithheldVoucherGet + taxPaymentVoucherStatusSync } from "../../apis/declare"; import { convertToUrlString, getQueryString } from "../../util/url"; import IncomeTaxDeclarationPersonnelSlide from "./components/incomeTaxDeclarationPersonnelSlide"; @@ -62,7 +61,7 @@ class Index extends Component { }, intelCalcSalaryStatus: false, //智能算薪 总开关是否开启 declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 }, - reportType: "" + reportType: "", showLeft: false }; this.timer = null; this.taxDeclareRef = null; @@ -347,7 +346,7 @@ class Index extends Component { render() { const { tabs, selectedKey, loading, declareInfo, intelCalcSalaryStatus, taxDecPersonSlide, - editTabVisible, reportType + editTabVisible, reportType, showLeft } = this.state; const [__, taxDeclarationId] = selectedKey.split("%%"); let btns = [ @@ -424,10 +423,12 @@ class Index extends Component { } return ( this.setState({ reportType }, () => isInit && this.init())}/>} - > + onChangeTab={(reportType, isInit = false) => this.setState({ reportType }, () => isInit && this.init())} + onCollapse={showLeft => this.setState({ showLeft })}/>} + onCollapse={showLeft => this.setState({ showLeft })}>
this[fun]()}/>