产品-社保福利的自定义以及福利档案的接口调整

This commit is contained in:
黎永顺 2023-07-27 09:55:51 +08:00
parent d73fd7bac8
commit 28471fe108
5 changed files with 21 additions and 9 deletions

View File

@ -45,7 +45,7 @@ export default class CustomForm extends React.Component {
item.options &&
<WeaSelect
detailtype={2}
disabled={disabledValue}
// disabled={disabledValue}
viewAttr={item.rules === "required" ? 3 : 2}
value={request[item.domkey[0]]}
options={item.options.map(o => ({ showname: o.showname, key: o.key }))}

View File

@ -251,7 +251,7 @@ export default class Archives extends React.Component {
});
return;
}
save("SOCIAL_SECURITY").then(() => {
save("SOCIAL_SECURITY", this.record.paymentOrganization).then(() => {
this.query();
});
} else if (selectedTab == 2) {
@ -264,7 +264,7 @@ export default class Archives extends React.Component {
});
return;
}
save("ACCUMULATION_FUND").then(() => {
save("ACCUMULATION_FUND", this.record.paymentOrganization).then(() => {
this.query();
});
} else if (selectedTab == 3) {
@ -277,7 +277,7 @@ export default class Archives extends React.Component {
});
return;
}
save("OTHER").then(() => {
save("OTHER", this.record.paymentOrganization).then(() => {
this.query();
});
}

View File

@ -98,6 +98,18 @@ class CustomBenefitsTable extends Component {
message.error(errormsg || "操作失败");
}
});
},
onCancel: () => {
this.setState({
dataSource: _.map(this.state.dataSource, item => {
if (item.id === id) {
return {
...item, isUse: item.isUse
};
}
return { ...item };
})
});
}
});
};

View File

@ -244,11 +244,11 @@ export class ArchivesStore {
// 保存表单
@action
save = (welfareType) => {
save = (welfareType, paymentOrganization) => {
let baseForm = "";
let paymentForm = "";
if (welfareType === "SOCIAL_SECURITY") {
baseForm = JSON.stringify(this.socialSecurityForm.data);
baseForm = JSON.stringify({ ...this.socialSecurityForm.data, paymentOrganization });
if (this.socialSecurityForm.data.socialSchemeId) {
const socialSecurityPaymentData = toJS(this.socialSecurityPaymentForm).data;
const socialSecurityPaymentItems = toJS(this.socialSecurityPaymentForm).items[0].items;
@ -259,7 +259,7 @@ export class ArchivesStore {
paymentForm = JSON.stringify(payload);
}
} else if (welfareType === "ACCUMULATION_FUND") {
baseForm = JSON.stringify(this.accumulationFundForm.data);
baseForm = JSON.stringify({ ...this.accumulationFundForm.data, paymentOrganization });
if (this.accumulationFundForm.data.fundSchemeId) {
const accumulationFundPaymentData = toJS(this.accumulationFundPaymentForm).data;
const accumulationFundPaymentItems = toJS(this.accumulationFundPaymentForm).items[0].items;
@ -270,7 +270,7 @@ export class ArchivesStore {
paymentForm = JSON.stringify(payload);
}
} else if (welfareType === "OTHER") {
baseForm = JSON.stringify(this.otherForm.data);
baseForm = JSON.stringify({ ...this.otherForm.data, paymentOrganization });
if (this.otherForm.data.otherSchemeId) {
const otherPaymentData = toJS(this.otherPaymentForm).data;
const otherPaymentItems = toJS(this.otherPaymentForm).items[0].items;

View File

@ -325,7 +325,7 @@ export class ProgrammeStore {
@action
updateCustomCategory = (params) => {
return new Promise((resolve, reject) => {
API.updateCustomCategory(_.pick(params, ["id", "insuranceName"])).then(res => {
API.updateCustomCategory(_.pick(params, ["id", "insuranceName", "paymentScope"])).then(res => {
if (res.status) {
message.success("编辑成功");
resolve();