diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js index 9ad49279..464b2932 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js @@ -239,13 +239,14 @@ class Index extends Component { childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*"); }; handleChangeProgramme = (type, schemeId, payload) => { + const { archivesStore: { welfareProfileForm } } = this.props; this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum[type], schemeId }) .then(({ status, data }) => { if (status) { let { data: defVal, items, comData, comItems } = data; if (type !== "other") { - const replaceValue = type === "social" ? this.state.welfareEditSlide.socialBaseData["SOCIAL_SECURITY"].base : - this.state.welfareEditSlide.fundBaseData["ACCUMULATION_FUND"].base; + const replaceValue = type === "social" ? (welfareProfileForm.getFormParams().socialBase ? welfareProfileForm.getFormParams().socialBase : this.state.welfareEditSlide.socialBaseData["SOCIAL_SECURITY"].base) : + (welfareProfileForm.getFormParams().fundBase ? welfareProfileForm.getFormParams().fundBase : this.state.welfareEditSlide.fundBaseData["ACCUMULATION_FUND"].base); defVal = _.reduce(_.keys(defVal), (pre, cur) => { if (!parseFloat(defVal[cur]) && !!replaceValue) { return { ...pre, [cur]: replaceValue };