From 9eec50099d17822683c61fad6ed4545121ac510d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 2 Jan 2024 10:33:31 +0800 Subject: [PATCH] =?UTF-8?q?hotfix/2.9.9.2312.02-=E4=B8=AA=E7=A8=8E=20?= =?UTF-8?q?=E7=94=B3=E6=8A=A5=E8=A1=A8-=E5=8A=A8=E6=80=81=E5=A2=9E?= =?UTF-8?q?=E5=88=A0tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../incomeTaxDeclarationPersonnelSlide.js | 2 +- .../declareDetail/components/tabEditDialog.js | 2 +- .../declareDetail/components/taxDeclarationInfo.js | 4 ++-- pc4mobx/hrmSalary/pages/declareDetail/index.js | 14 ++++++++------ pc4mobx/hrmSalary/stores/declare.js | 2 ++ 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/incomeTaxDeclarationPersonnelSlide.js b/pc4mobx/hrmSalary/pages/declareDetail/components/incomeTaxDeclarationPersonnelSlide.js index 54fd02b1..3bb752e4 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/incomeTaxDeclarationPersonnelSlide.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/incomeTaxDeclarationPersonnelSlide.js @@ -31,9 +31,9 @@ class IncomeTaxDeclarationPersonnelSlide extends Component { } componentWillReceiveProps(nextProps, nextContext) { - const { declareStore: { initTaxDecForm } } = nextProps; if (nextProps.visible !== this.props.visible && nextProps.visible) this.getTaxDecForm(nextProps); if (nextProps.visible !== this.props.visible && !nextProps.visible) { + const { declareStore: { initTaxDecForm } } = nextProps; this.setState({ conditions: [], employeeDeclares: [], taxReportColumns: [], loading: false, detailInfo: {} diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/tabEditDialog.js b/pc4mobx/hrmSalary/pages/declareDetail/components/tabEditDialog.js index 2a10d21e..931b6565 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/tabEditDialog.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/tabEditDialog.js @@ -81,7 +81,7 @@ class TabEditDialog extends Component { const { declareStore: { tabDecForm } } = this.props; return ( {getLabel(826, "确定")} ]} diff --git a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js index 39790189..7551b976 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/components/taxDeclarationInfo.js @@ -72,9 +72,9 @@ class TaxDeclarationInfo extends Component { {declareInfo[item["key"]]} { - (item["key"] === "declareStatusDesc" && declareInfo["displayIcon"]) && + ((item["key"] === "declareStatusDesc" && declareInfo["displayIcon"]) || declareInfo["declareErrorMsg"]) && diff --git a/pc4mobx/hrmSalary/pages/declareDetail/index.js b/pc4mobx/hrmSalary/pages/declareDetail/index.js index e1467cb2..02c08064 100644 --- a/pc4mobx/hrmSalary/pages/declareDetail/index.js +++ b/pc4mobx/hrmSalary/pages/declareDetail/index.js @@ -72,7 +72,7 @@ class Index extends Component { window.removeEventListener("message", this.handleReceive, false); } - init = async () => { + init = async (isInit = true) => { const [tabsResult, infoResult, calcResult] = await Promise.all([this.getTaxDeclarationTab(), this.getDeclareInfo(), this.apiflowBillingConfigStatus()]); const { data: tabDataSource, status: tabStatus } = tabsResult; const { data: infoDataSource, status: infoStatus } = infoResult; @@ -82,7 +82,9 @@ class Index extends Component { viewcondition: `${it.incomeCategory}%%${it.taxDeclarationId}`, title: it.tabName, editable: true })) : this.state.tabs, - selectedKey: tabStatus ? `${_.take(tabDataSource)[0].incomeCategory}%%${_.take(tabDataSource)[0].taxDeclarationId}` : this.state.selectedKey, + selectedKey: (tabStatus && isInit) ? + `${_.first(tabDataSource).incomeCategory}%%${_.first(tabDataSource).taxDeclarationId}` : + `${_.last(tabDataSource).incomeCategory}%%${_.last(tabDataSource).taxDeclarationId}`, declareInfo: infoStatus ? infoDataSource : this.state.declareInfo, intelCalcSalaryStatus: calcStatus && calcSalaryStatus }); @@ -269,11 +271,11 @@ class Index extends Component { window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/detail/export?${convertToUrlString(payload)}`, "_blank"); }; handleTaxDescPerSlide = (params) => { - const { callback, ...module } = params; + const { callback, ...extra } = params; const { taxDecPersonSlide, selectedKey } = this.state; const [__, taxDeclarationId] = selectedKey.split("%%"); this.setState({ - taxDecPersonSlide: { ...taxDecPersonSlide, ...module, taxDeclarationId } + taxDecPersonSlide: { ...taxDecPersonSlide, ...extra, taxDeclarationId } }, () => callback && this.getDetailList()); }; exportGetDeclareTaxResultFeedback = () => { @@ -401,7 +403,7 @@ class Index extends Component {
this.setState({ selectedKey: v }, () => this.getDetailList())} /> {/*个税申报表-新增编辑框*/} @@ -415,7 +417,7 @@ class Index extends Component { /> {/*个税申报表-新增tab弹框*/} this.setState({ editTabVisible: false }, () => isRefresh && this.init())}/> + onCancel={(isRefresh) => this.setState({ editTabVisible: false }, () => isRefresh && this.init(false))}/>
diff --git a/pc4mobx/hrmSalary/stores/declare.js b/pc4mobx/hrmSalary/stores/declare.js index 37fbfa1b..f9c9f3dd 100644 --- a/pc4mobx/hrmSalary/stores/declare.js +++ b/pc4mobx/hrmSalary/stores/declare.js @@ -15,6 +15,8 @@ export class DeclareStore { @action initDeclareForm = () => this.declareForm = new WeaForm(); @action + initTaxDecForm = () => this.taxDecForm = new WeaForm(); + @action initTabDecForm = () => this.tabDecForm = new WeaForm();