Merge branch 'feature/v2-社保福利档案调差退差-1208' into release

This commit is contained in:
黎永顺 2022-12-08 13:45:01 +08:00
commit e1b80cd21f
1 changed files with 4 additions and 3 deletions

View File

@ -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,