custom/网联清算有限公司(0401)
This commit is contained in:
parent
9efeb109e9
commit
59c17ee264
|
|
@ -90,18 +90,18 @@ class Index extends Component {
|
|||
...o, title: getLabel(542699, "员工基本信息"),
|
||||
viewAttr: (runStatuses === "4,5" || !showOperateBtn) ? 1 : o.viewAttr,
|
||||
items: _.map(o.items, g => {
|
||||
if (getKey(g) === "paymentOrganization") {
|
||||
return {
|
||||
...g, label: getLabel(g.lanId, g.label),
|
||||
options: _.map(taxAgentListData.data, j => ({ key: String(j.id), showname: j.name }))
|
||||
};
|
||||
}
|
||||
return { ...g, label: getLabel(g.lanId, g.label) };
|
||||
})
|
||||
};
|
||||
} else if (o.title === "taxAgent") {
|
||||
} else if (o.title === "declarationBase") {
|
||||
return {
|
||||
...o, title: getLabel(537996, "个税扣缴义务人"),
|
||||
items: _.map(o.items, g => {
|
||||
return {
|
||||
...g, label: getLabel(g.lanId, g.label),
|
||||
options: _.map(taxAgentListData.data, j => ({ key: String(j.id), showname: j.name }))
|
||||
};
|
||||
})
|
||||
...o, title: getLabel(111, "申报基数")
|
||||
};
|
||||
} else if (o.title === "social" || o.title === "fund" || o.title === "others") {
|
||||
const title = o.title === "social" ? getLabel(543194, "社保基础信息") : o.title === "fund" ? getLabel(543197, "公积金基础信息") : getLabel(543198, "其他福利基础信息");
|
||||
|
|
@ -146,9 +146,17 @@ class Index extends Component {
|
|||
if (k === "paymentOrganization") {
|
||||
welfareProfileForm.updateFields({ [k]: paymentOrganization.toString() });
|
||||
} else if (_.lowerCase(k).indexOf("social") !== -1 || k === "schemeAccount") {
|
||||
welfareProfileForm.updateFields({ [k]: formData["SOCIAL_SECURITY"][k] ? formData["SOCIAL_SECURITY"][k].toString() : "" });
|
||||
if (k === "socialBase") {
|
||||
welfareProfileForm.updateFields({ [k]: socialBaseData["SOCIAL_SECURITY"].base || "" });
|
||||
} else {
|
||||
welfareProfileForm.updateFields({ [k]: formData["SOCIAL_SECURITY"][k] ? formData["SOCIAL_SECURITY"][k].toString() : "" });
|
||||
}
|
||||
} else if (_.lowerCase(k).indexOf("fund") !== -1) {
|
||||
welfareProfileForm.updateFields({ [k]: formData["ACCUMULATION_FUND"][k] ? formData["ACCUMULATION_FUND"][k].toString() : "" });
|
||||
if (k === "fundBase") {
|
||||
welfareProfileForm.updateFields({ [k]: fundBaseData["ACCUMULATION_FUND"].base || "" });
|
||||
} else {
|
||||
welfareProfileForm.updateFields({ [k]: formData["ACCUMULATION_FUND"][k] ? formData["ACCUMULATION_FUND"][k].toString() : "" });
|
||||
}
|
||||
} else if (_.lowerCase(k).indexOf("other") !== -1) {
|
||||
welfareProfileForm.updateFields({ [k]: formData["OTHER"][k] ? formData["OTHER"][k].toString() : "" });
|
||||
} else {
|
||||
|
|
@ -167,7 +175,9 @@ class Index extends Component {
|
|||
baseForm: JSON.stringify({
|
||||
...formData[welfareType], ..._.reduce(_.keys(formData[welfareType]), (pre, cur) => {
|
||||
if (welfareData[cur] || !_.isNil(welfareData[cur])) return { ...pre, [cur]: welfareData[cur] };
|
||||
return { ...pre };
|
||||
return underTakeType !== "other" ? {
|
||||
...pre, base: toDecimal_n(welfareData[`${underTakeType}Base`], 2).toString()
|
||||
} : { ...pre };
|
||||
}, {}),
|
||||
underTake: welfareData[`${underTakeType}UnderTake`]
|
||||
}),
|
||||
|
|
@ -252,6 +262,16 @@ class Index extends Component {
|
|||
employeeId,
|
||||
paymentOrganization
|
||||
});
|
||||
} else if (changeKey === "socialBase" || changeKey === "fundBase") {
|
||||
if (!changeVal) return;
|
||||
const { data = {}, comData = {} } = this.props[changeKey];
|
||||
const changeData = _.reduce(_.keys(data), (pre, cur) => {
|
||||
return { ...pre, [cur]: toDecimal_n(changeVal, 2) || "" };
|
||||
}, {});
|
||||
const changeComData = _.reduce(_.keys(comData), (pre, cur) => {
|
||||
return { ...pre, [`${cur}_com`]: toDecimal_n(changeVal, 2) || "" };
|
||||
}, {});
|
||||
this.setState({ formData: { ...this.state.formData, ...changeData, ...changeComData } });
|
||||
}
|
||||
};
|
||||
handleExtraChange = (key, value) => this.setState({ formData: { ...this.state.formData, [key]: value } });
|
||||
|
|
@ -348,4 +368,4 @@ class Index extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
export default Index;
|
||||
|
|
@ -242,7 +242,23 @@ class Index extends Component {
|
|||
this.getPaymentForm({ ...payload, welfareTypeEnum: welfareTypeEnum[type], schemeId })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { data: defVal, items, comData, comItems } = data;
|
||||
let { data: defVal, items, comData, comItems } = data;
|
||||
if (type !== "other") {
|
||||
const replaceValue = type === "social" ? this.state.welfareEditSlide.socialBaseData["SOCIAL_SECURITY"].base :
|
||||
this.state.welfareEditSlide.fundBaseData["ACCUMULATION_FUND"].base;
|
||||
defVal = _.reduce(_.keys(defVal), (pre, cur) => {
|
||||
if (!parseFloat(defVal[cur]) && !!replaceValue) {
|
||||
return { ...pre, [cur]: replaceValue };
|
||||
}
|
||||
return { ...pre };
|
||||
}, { ...defVal });
|
||||
comData = _.reduce(_.keys(comData), (pre, cur) => {
|
||||
if (!parseFloat(comData[cur]) && !!replaceValue) {
|
||||
return { ...pre, [cur]: replaceValue };
|
||||
}
|
||||
return { ...pre };
|
||||
}, { ...defVal });
|
||||
}
|
||||
this.setState({
|
||||
welfareEditSlide: { ...this.state.welfareEditSlide, [`${type}Base`]: data }
|
||||
}, () => {
|
||||
|
|
@ -293,6 +309,7 @@ class Index extends Component {
|
|||
</Spin>
|
||||
{/* 编辑查看员工福利档案*/}
|
||||
<WelfareEditArchiveSlide {...welfareEditSlide} ref={dom => this.archiveSlideRef = dom}
|
||||
onSuccess={() => this.getWelfareList(this.props)}
|
||||
onClose={(isFresh) => this.setState({
|
||||
welfareEditSlide: { ...welfareEditSlide, visible: false }
|
||||
}, () => isFresh && this.getWelfareList(this.props))}
|
||||
|
|
@ -303,4 +320,4 @@ class Index extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
export default Index;
|
||||
|
|
@ -463,25 +463,49 @@ export const welfareConditions = [
|
|||
labelcol: 10,
|
||||
value: "",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
colSpan: 3,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["paymentOrganization"],
|
||||
fieldcol: 14,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 10,
|
||||
value: "",
|
||||
options: [],
|
||||
viewAttr: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
defaultshow: true,
|
||||
title: "taxAgent",
|
||||
col: 1,
|
||||
title: "declarationBase",
|
||||
col: 2,
|
||||
items: [
|
||||
{
|
||||
colSpan: 3,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["paymentOrganization"],
|
||||
fieldcol: 16,
|
||||
label: "个税扣缴义务人",
|
||||
lanId: 537996,
|
||||
labelcol: 8,
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["socialBase"],
|
||||
fieldcol: 14,
|
||||
label: "社保申报基数",
|
||||
lanId: 111,
|
||||
labelcol: 10,
|
||||
value: "",
|
||||
options: [],
|
||||
viewAttr: 1
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
colSpan: 3,
|
||||
conditionType: "INPUTNUMBER",
|
||||
domkey: ["fundBase"],
|
||||
fieldcol: 14,
|
||||
label: "公积金申报基数",
|
||||
lanId: 111,
|
||||
labelcol: 10,
|
||||
value: "",
|
||||
precision: 2,
|
||||
viewAttr: 2
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -832,4 +856,4 @@ const BenefitBaseComponent = (props) => {
|
|||
})
|
||||
}
|
||||
</React.Fragment>;
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue