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,