feature/2.9.42310.02-社保福利档案页面重构

This commit is contained in:
黎永顺 2023-11-09 13:52:54 +08:00
parent 1eac37cd38
commit aa1cef89b2
2 changed files with 23 additions and 1 deletions

View File

@ -40,10 +40,11 @@ class Index extends Component {
getBaseForm = async (props) => {
const { data: taxAgentList } = await getTaxAgentSelectList();
const {
archivesStore: { welfareProfileForm },
archivesStore: { welfareProfileForm }, socialBase, fundBase, othersBase,
employeeId, paymentOrganization, socialBaseData, fundBaseData, othersBaseData
} = props;
const payload = { employeeId, paymentOrganization, welfareTypeEnum: "" };
console.log(props);
API.getBaseForm(payload).then(({ status, data }) => {
if (status) {
const { data: result } = data;

View File

@ -102,6 +102,22 @@ class Index extends Component {
othersItems: othersItems.data.items[0].items,
othersBaseData: { OTHER: { ...othersItems.data.data, otherUnderTake: othersItems.data.data.underTake } }
}
}, async () => {
const { socialBaseData, fundBaseData, othersBaseData } = this.state.welfareEditSlide;
const { SOCIAL_SECURITY: { socialSchemeId } } = socialBaseData,
{ ACCUMULATION_FUND: { fundSchemeId } } = fundBaseData,
{ OTHER: { otherSchemeId } } = othersBaseData;
const [socialBase, fundBase, othersBase] = await Promise.all([
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["social"], schemeId: socialSchemeId }),
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["fund"], schemeId: fundSchemeId }),
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum["others"], schemeId: otherSchemeId })
]);
this.setState({
welfareEditSlide: {
...this.state.welfareEditSlide,
socialBase: socialBase.data, fundBase: fundBase.data, othersBase: othersBase.data
}
},()=>console.log(this.state.welfareEditSlide));
});
break;
case "ADD-TO-PAY":
@ -130,6 +146,11 @@ class Index extends Component {
const payload = { employeeId, paymentOrganization, welfareTypeEnum };
return API.getBaseForm(payload);
};
getPaymentForm = async (props) => {
const { employeeId, paymentOrganization, welfareTypeEnum } = props;
const payload = { employeeId, paymentOrganization, welfareTypeEnum };
return API.getPaymentForm(payload);
};
getWelfareList = (props) => {
const { pageInfo } = this.state;
const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount, showOperateBtn } = props;