feature/2.9.42310.02-社保福利档案页面重构
This commit is contained in:
parent
1eac37cd38
commit
aa1cef89b2
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue