From aa1cef89b2822f5c1d4b6e0c6a75a3c065a98897 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 13:52:54 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.9.42310.02-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88=E9=A1=B5=E9=9D=A2=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../welfareEditArchiveSlide/index.js | 3 ++- .../components/welfareTableList/index.js | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js index b4bf9e84..ffeb9a2d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js @@ -40,10 +40,11 @@ class Index extends Component { getBaseForm = async (props) => { const { data: taxAgentList } = await getTaxAgentSelectList(); const { - archivesStore: { welfareProfileForm }, + archivesStore: { welfareProfileForm }, socialBase, fundBase, othersBase, employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData } = props; const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" }; + console.log(props); API.getBaseForm(payload).then(({ status, data }) => { if (status) { const { data: result } = data; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js index 74260961..0fed894a 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js @@ -102,6 +102,22 @@ class Index extends Component { othersItems: othersItems.data.items[0].items, othersBaseData: { OTHER: { ...othersItems.data.data, otherUnderTake: othersItems.data.data.underTake } } } + }, async () => { + const { socialBaseData, fundBaseData, othersBaseData } = this.state.welfareEditSlide; + const { SOCIAL_SECURITY: { socialSchemeId } } = socialBaseData, + { ACCUMULATION_FUND: { fundSchemeId } } = fundBaseData, + { OTHER: { otherSchemeId } } = othersBaseData; + const [socialBase, fundBase, othersBase] = await Promise.all([ + this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["social"], schemeId: socialSchemeId }), + this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["fund"], schemeId: fundSchemeId }), + this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["others"], schemeId: otherSchemeId }) + ]); + this.setState({ + welfareEditSlide: { + ...this.state.welfareEditSlide, + socialBase: socialBase.data, fundBase: fundBase.data, othersBase: othersBase.data + } + },()=>console.log(this.state.welfareEditSlide)); }); break; case "ADD-TO-PAY": @@ -130,6 +146,11 @@ class Index extends Component { const payload = { employeeId, paymentOrganization, welfareTypeEnum }; return API.getBaseForm(payload); }; + getPaymentForm = async (props) => { + const { employeeId, paymentOrganization, welfareTypeEnum } = props; + const payload = { employeeId, paymentOrganization, welfareTypeEnum }; + return API.getPaymentForm(payload); + }; getWelfareList = (props) => { const { pageInfo } = this.state; const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount, showOperateBtn } = props;