From 90ef0e1360061bebaff6b793d54dce3de6e9258b 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, 12 Dec 2023 18:29:46 +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 | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js index 82fa8fc0..fef6d30f 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js @@ -136,14 +136,18 @@ class Index extends Component { if (formData[cur] || formData[cur] === 0) return { ...pre, [cur]: toDecimal_n(formData[cur], 2).toString() }; return { ...pre, [cur]: "0" }; }, {})) : "", - welfareType + welfareType, validate: welfareData[`${underTakeType}SchemeId`] ? !!welfareData[`${underTakeType}StartTime`] : true }; }; save = async () => { - this.setState({ loading: true }); const socailPayload = this.covertPayload("SOCIAL_SECURITY", "social", getConditionDomkeys(this.props.socialBase.items)), fundPayload = this.covertPayload("ACCUMULATION_FUND", "fund", getConditionDomkeys(this.props.fundBase.items)), otherPayload = this.covertPayload("OTHER", "other", getConditionDomkeys(this.props.otherBase.items)); + if (!(socailPayload.validate && fundPayload.validate && otherPayload.validate)) { + message.warning(getLabel(111, "请维护起始缴纳月!")); + return; + } + this.setState({ loading: true }); const [{ status: socialStatus, errormsg: socialErrorMsg = "!" @@ -168,6 +172,27 @@ class Index extends Component { const { archivesStore: { setHasBeenModify }, onChangeProgramme, employeeId, paymentOrganization } = this.props; setHasBeenModify(true); if (changeKey === "socialSchemeId" || changeKey === "fundSchemeId" || changeKey === "otherSchemeId") { + this.setState({ + conditions: _.map(this.state.conditions, o => { + if ( + (o.typename === "SOCIAL_SECURITY" && changeKey === "socialSchemeId") || + (o.typename === "ACCUMULATION_FUND" && changeKey === "fundSchemeId") || + (o.typename === "OTHER" && changeKey === "otherSchemeId") + ) { + return { + ...o, items: _.map(o.items, g => { + if (getKey(g).indexOf("StartTime") !== -1) { + return { + ...g, viewAttr: changeVal ? 3 : g.viewAttr + }; + } + return { ...g }; + }) + }; + } + return { ...o }; + }) + }); onChangeProgramme(changeKey.slice(0, changeKey.indexOf("SchemeId")), changeVal, { employeeId, paymentOrganization