From fc07b6d46b47b831cc5d6a3e9c609327f1bfcb02 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, 8 Dec 2022 13:44:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E5=B7=AE=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standingBookDetail/components/adjustmentSlide.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js index b4ff4fe1..86c4e684 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/adjustmentSlide.js @@ -29,13 +29,14 @@ class AdjustmentSlide extends Component { } handleSave = () => { + const requireKeys = ["adjustTo", "adjustmentTotal", "categoryType", "companyTotal", "countryTotal", "target", "welfareType"]; let { dataSource, targetOptions } = this.adjustTableRef.state; - dataSource = _.filter(dataSource, it => !it.id); + dataSource = _.filter(dataSource, it => (!it.id || !it.status)); const billMonth = getQueryString("billMonth"); const paymentOrganization = getQueryString("paymentOrganization"); let bool = true; _.map(dataSource, item => { - bool = _.every(Object.keys(item), child => !!item[child]); + bool = _.every(requireKeys, child => !!item[child]); }); if (_.isEmpty(dataSource)) { Modal.warning({ @@ -51,7 +52,7 @@ class AdjustmentSlide extends Component { return; } const payload = _.map(dataSource, item => { - const { adjustToOptions, categoryTypeOptions, target, ...extraParams } = item; + const { adjustToOptions, categoryTypeOptions, target, targetOptions: targetOpts, ...extraParams } = item; return { ...extraParams, employeeId: target,