feature/2.12.1.2403.02-社保档案保存修改
This commit is contained in:
parent
59a2dbb300
commit
1deceeb3e8
|
|
@ -180,7 +180,7 @@ class Index extends Component {
|
|||
welfareType, validate: welfareData[`${underTakeType}SchemeId`] ? !!welfareData[`${underTakeType}StartTime`] : true
|
||||
};
|
||||
};
|
||||
save = async () => {
|
||||
save = async (changeData = false) => {
|
||||
const socailPayload = this.covertPayload("SOCIAL_SECURITY", "social", getConditionDomkeys(this.props.socialBase.items), getConditionDomkeys(this.props.socialBase.comItems || [])),
|
||||
fundPayload = this.covertPayload("ACCUMULATION_FUND", "fund", getConditionDomkeys(this.props.fundBase.items), getConditionDomkeys(this.props.fundBase.comItems || [])),
|
||||
otherPayload = this.covertPayload("OTHER", "other", getConditionDomkeys(this.props.otherBase.items), getConditionDomkeys(this.props.otherBase.comItems || []));
|
||||
|
|
@ -198,13 +198,24 @@ class Index extends Component {
|
|||
}, {
|
||||
status: otherStatus,
|
||||
errormsg: otherErrorMsg = "!"
|
||||
}] = await Promise.all([API.save(socailPayload), API.save(fundPayload), API.save(otherPayload)]);
|
||||
}] = await Promise.all([
|
||||
API.save({ ...socailPayload, changeData }),
|
||||
API.save({ ...fundPayload, changeData }),
|
||||
API.save({ ...otherPayload, changeData })]);
|
||||
this.setState({ loading: false });
|
||||
if (socialStatus && fundStatus && otherStatus) {
|
||||
message.success(getLabel(30700, "操作成功!"));
|
||||
this.props.onClose(true);
|
||||
} else {
|
||||
message.error(socialErrorMsg + fundErrorMsg + otherErrorMsg);
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: <div>
|
||||
<div>{socialErrorMsg + fundErrorMsg + otherErrorMsg}</div>
|
||||
<div>{getLabel(111, "是否自动将方案的上下限调整为设置值?")}</div>
|
||||
</div>,
|
||||
onOk: () => this.save(true),
|
||||
onCancel: () => this.props.onClose()
|
||||
});
|
||||
}
|
||||
};
|
||||
updateFormData = (baseData) => this.setState({ formData: { ...this.state.formData, ...baseData } });
|
||||
|
|
@ -278,7 +289,7 @@ class Index extends Component {
|
|||
<div className="titleCol titleRightBox">
|
||||
{
|
||||
runStatuses !== "4,5" && showOperateBtn &&
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
<Button type="primary" onClick={() => this.save()} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
}
|
||||
</div>
|
||||
</div>;
|
||||
|
|
|
|||
Loading…
Reference in New Issue