Merge branch 'release/2.14.4.2406.02' into release/2.14.4.2406.02-个税
This commit is contained in:
commit
12a7871ef0
|
|
@ -101,7 +101,8 @@ class AddCompensationPersonnelDialog extends Component {
|
||||||
type: "custom",
|
type: "custom",
|
||||||
key: "custom",
|
key: "custom",
|
||||||
render: (text, record, index, onEdit) => (
|
render: (text, record, index, onEdit) => (
|
||||||
<WeaInputNumber precision={2} value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
<WeaInputNumber precision={parseFloat(record.perValidNum || 2)}
|
||||||
|
value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
||||||
onChange={v => onEdit({
|
onChange={v => onEdit({
|
||||||
record: { ...record, [`${record.insuranceId}_per`]: v },
|
record: { ...record, [`${record.insuranceId}_per`]: v },
|
||||||
index, key: "per", value: v
|
index, key: "per", value: v
|
||||||
|
|
@ -122,7 +123,8 @@ class AddCompensationPersonnelDialog extends Component {
|
||||||
type: "custom",
|
type: "custom",
|
||||||
key: "custom",
|
key: "custom",
|
||||||
render: (text, record, index, onEdit) => (
|
render: (text, record, index, onEdit) => (
|
||||||
<WeaInputNumber precision={2} value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
<WeaInputNumber precision={parseFloat(record.comValidNum || 2)}
|
||||||
|
value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
||||||
onChange={v => onEdit({
|
onChange={v => onEdit({
|
||||||
record: { ...record, [`${record.insuranceId}_com`]: v },
|
record: { ...record, [`${record.insuranceId}_com`]: v },
|
||||||
index, key: "com", value: v
|
index, key: "com", value: v
|
||||||
|
|
@ -166,10 +168,10 @@ class AddCompensationPersonnelDialog extends Component {
|
||||||
let perJson = {}, comJson = {};
|
let perJson = {}, comJson = {};
|
||||||
_.forEach(list, o => {
|
_.forEach(list, o => {
|
||||||
if (!_.isNil(o.per)) {
|
if (!_.isNil(o.per)) {
|
||||||
perJson = _.assign(perJson, { [o.insuranceId]: toDecimal_n(o.per, 2) });
|
perJson = _.assign(perJson, { [o.insuranceId]: toDecimal_n(o.per, o.perValidNum || 2) });
|
||||||
}
|
}
|
||||||
if (!_.isNil(o.com)) {
|
if (!_.isNil(o.com)) {
|
||||||
comJson = _.assign(comJson, { [o.insuranceId]: toDecimal_n(o.com, 2) });
|
comJson = _.assign(comJson, { [o.insuranceId]: toDecimal_n(o.com, o.comValidNum ||2) });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return { [`${type}PerJson`]: JSON.stringify(perJson), [`${type}ComJson`]: JSON.stringify(comJson) };
|
return { [`${type}PerJson`]: JSON.stringify(perJson), [`${type}ComJson`]: JSON.stringify(comJson) };
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@ class InputPaymentAmount extends Component {
|
||||||
return (
|
return (
|
||||||
<WeaInputNumber
|
<WeaInputNumber
|
||||||
value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
value={record[`${record.insuranceId}_per`]} disabled={record.perDisabled}
|
||||||
precision={2} onChange={(val) => this.handleChangeBaseItem(record, val, type, "per")}
|
precision={parseFloat(record.perValidNum || 2)}
|
||||||
|
onChange={(val) => this.handleChangeBaseItem(record, val, type, "per")}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -31,7 +32,8 @@ class InputPaymentAmount extends Component {
|
||||||
return (
|
return (
|
||||||
<WeaInputNumber
|
<WeaInputNumber
|
||||||
value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
value={record[`${record.insuranceId}_com`]} disabled={record.comDisabled}
|
||||||
precision={2} onChange={(val) => this.handleChangeBaseItem(record, val, type, "com")}
|
precision={parseFloat(record.comValidNum || 2)}
|
||||||
|
onChange={(val) => this.handleChangeBaseItem(record, val, type, "com")}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,70 +24,19 @@ class RegEditDetial extends Component {
|
||||||
key: "social",
|
key: "social",
|
||||||
label: "社保",
|
label: "社保",
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: _.map(regColumns, item => {
|
columns: []
|
||||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
render: (text, record) => {
|
|
||||||
return (
|
|
||||||
<WeaInputNumber
|
|
||||||
disabled={_.isNil(text)}
|
|
||||||
precision={2}
|
|
||||||
value={text}
|
|
||||||
onChange={v => this.handleChange("social", item.dataIndex, v, record)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return { ...item };
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "fund",
|
key: "fund",
|
||||||
label: "公积金",
|
label: "公积金",
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: _.map(regColumns, item => {
|
columns: []
|
||||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
render: (text, record) => {
|
|
||||||
return (
|
|
||||||
<WeaInputNumber
|
|
||||||
disabled={_.isNil(text)}
|
|
||||||
precision={2}
|
|
||||||
value={text}
|
|
||||||
onChange={v => this.handleChange("fund", item.dataIndex, v, record)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return { ...item };
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "other",
|
key: "other",
|
||||||
label: "企业年金及其他福利",
|
label: "企业年金及其他福利",
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
columns: _.map(regColumns, item => {
|
columns: []
|
||||||
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
render: (text, record) => {
|
|
||||||
return (
|
|
||||||
<WeaInputNumber
|
|
||||||
precision={2}
|
|
||||||
disabled={_.isNil(text)}
|
|
||||||
value={text}
|
|
||||||
onChange={v => this.handleChange("other", item.dataIndex, v, record)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return { ...item };
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
@ -113,27 +62,28 @@ class RegEditDetial extends Component {
|
||||||
otherComJson: {}
|
otherComJson: {}
|
||||||
};
|
};
|
||||||
_.forEach(socialData.dataSource, item => {
|
_.forEach(socialData.dataSource, item => {
|
||||||
|
console.log(item)
|
||||||
if (item.personalPaymentAmount) {
|
if (item.personalPaymentAmount) {
|
||||||
payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
|
||||||
}
|
}
|
||||||
if (item.companyPaymentAmount) {
|
if (item.companyPaymentAmount) {
|
||||||
payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
_.forEach(foundData.dataSource, item => {
|
_.forEach(foundData.dataSource, item => {
|
||||||
if (item.personalPaymentAmount) {
|
if (item.personalPaymentAmount) {
|
||||||
payload["fundPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
payload["fundPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
|
||||||
}
|
}
|
||||||
if (item.companyPaymentAmount) {
|
if (item.companyPaymentAmount) {
|
||||||
payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
_.forEach(otherData.dataSource, item => {
|
_.forEach(otherData.dataSource, item => {
|
||||||
if (item.personalPaymentAmount) {
|
if (item.personalPaymentAmount) {
|
||||||
payload["otherPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
|
payload["otherPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
|
||||||
}
|
}
|
||||||
if (item.companyPaymentAmount) {
|
if (item.companyPaymentAmount) {
|
||||||
payload["otherComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
payload["otherComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
_.forEach(Object.keys(payload), item => {
|
_.forEach(Object.keys(payload), item => {
|
||||||
|
|
@ -214,11 +164,70 @@ class RegEditDetial extends Component {
|
||||||
const social = this.combinedData(socialSecurity, result);
|
const social = this.combinedData(socialSecurity, result);
|
||||||
const fund = this.combinedData(accumulationFund, result);
|
const fund = this.combinedData(accumulationFund, result);
|
||||||
const other = this.combinedData(otherBenefits, result);
|
const other = this.combinedData(otherBenefits, result);
|
||||||
|
console.log(social)
|
||||||
this.setState({
|
this.setState({
|
||||||
listMap: [{ ...socialData, dataSource: social }, { ...foundData, dataSource: fund }, {
|
listMap: [
|
||||||
...otherData,
|
{
|
||||||
dataSource: other
|
...socialData, dataSource: social, columns: _.map(regColumns, item => {
|
||||||
}]
|
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
render: (text, record) => {
|
||||||
|
return (
|
||||||
|
<WeaInputNumber
|
||||||
|
disabled={_.isNil(text)}
|
||||||
|
precision={parseFloat(record[`${item.dataIndex}ValidNum`] || 2)}
|
||||||
|
value={text}
|
||||||
|
onChange={v => this.handleChange("social", item.dataIndex, v, record)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...item };
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
...foundData, dataSource: fund, columns: _.map(regColumns, item => {
|
||||||
|
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
render: (text, record) => {
|
||||||
|
return (
|
||||||
|
<WeaInputNumber
|
||||||
|
disabled={_.isNil(text)}
|
||||||
|
precision={parseFloat(record[`${item.dataIndex}ValidNum`] || 2)}
|
||||||
|
value={text}
|
||||||
|
onChange={v => this.handleChange("fund", item.dataIndex, v, record)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...item };
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
...otherData, dataSource: other, columns: _.map(regColumns, item => {
|
||||||
|
if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
render: (text, record) => {
|
||||||
|
return (
|
||||||
|
<WeaInputNumber
|
||||||
|
disabled={_.isNil(text)}
|
||||||
|
precision={parseFloat(record[`${item.dataIndex}ValidNum`] || 2)}
|
||||||
|
value={text}
|
||||||
|
onChange={v => this.handleChange("other", item.dataIndex, v, record)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { ...item };
|
||||||
|
})
|
||||||
|
}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -230,9 +239,15 @@ class RegEditDetial extends Component {
|
||||||
let obj = { benefits: item };
|
let obj = { benefits: item };
|
||||||
_.forEach(data, it => {
|
_.forEach(data, it => {
|
||||||
if (item === it.insuranceName && it.paymentScopeSign === "per") {
|
if (item === it.insuranceName && it.paymentScopeSign === "per") {
|
||||||
obj = _.assign(obj, { ...it, personalPaymentAmount: it.insuranceValue });
|
obj = _.assign(obj, {
|
||||||
|
...it, personalPaymentAmount: it.insuranceValue,
|
||||||
|
personalPaymentAmountValidNum: it.validNum
|
||||||
|
});
|
||||||
} else if (item === it.insuranceName && it.paymentScopeSign === "com") {
|
} else if (item === it.insuranceName && it.paymentScopeSign === "com") {
|
||||||
obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue });
|
obj = _.assign(obj, {
|
||||||
|
...it, companyPaymentAmount: it.insuranceValue,
|
||||||
|
companyPaymentAmountValidNum: it.validNum
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return obj;
|
return obj;
|
||||||
|
|
|
||||||
|
|
@ -92,10 +92,10 @@ class SupplementarySlide extends Component {
|
||||||
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
|
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
|
||||||
valueCom = child[`${child.insuranceId}_com`];
|
valueCom = child[`${child.insuranceId}_com`];
|
||||||
if (!child.perDisabled) {
|
if (!child.perDisabled) {
|
||||||
_.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, 2) || "0" });
|
_.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, parseFloat(child.perValidNum || 2)) || "0" });
|
||||||
}
|
}
|
||||||
if (!child.comDisabled) {
|
if (!child.comDisabled) {
|
||||||
_.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) || "0" });
|
_.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, parseFloat(child.comValidNum || 2)) || "0" });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -444,7 +444,9 @@ export const convertData = (dataSource) => {
|
||||||
[perKey]: "",
|
[perKey]: "",
|
||||||
[comKey]: "",
|
[comKey]: "",
|
||||||
perDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "per"),
|
perDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "per"),
|
||||||
comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com")
|
perValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "per")) ? _.filter(itemList, i => i.paymentScopeSign === "per")[0].validNum : 2,
|
||||||
|
comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com"),
|
||||||
|
comValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "com")) ? _.filter(itemList, i => i.paymentScopeSign === "com")[0].validNum : 2,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return endList.push(data);
|
return endList.push(data);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue