Merge branch 'hotfix/2.14.2.2406.02' into custom/金华交投
This commit is contained in:
commit
db0763b567
|
|
@ -101,7 +101,8 @@ class AddCompensationPersonnelDialog extends Component {
|
|||
type: "custom",
|
||||
key: "custom",
|
||||
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({
|
||||
record: { ...record, [`${record.insuranceId}_per`]: v },
|
||||
index, key: "per", value: v
|
||||
|
|
@ -122,7 +123,8 @@ class AddCompensationPersonnelDialog extends Component {
|
|||
type: "custom",
|
||||
key: "custom",
|
||||
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({
|
||||
record: { ...record, [`${record.insuranceId}_com`]: v },
|
||||
index, key: "com", value: v
|
||||
|
|
@ -166,10 +168,10 @@ class AddCompensationPersonnelDialog extends Component {
|
|||
let perJson = {}, comJson = {};
|
||||
_.forEach(list, o => {
|
||||
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)) {
|
||||
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) };
|
||||
|
|
|
|||
|
|
@ -62,27 +62,28 @@ class RegEditDetial extends Component {
|
|||
otherComJson: {}
|
||||
};
|
||||
_.forEach(socialData.dataSource, item => {
|
||||
console.log(item)
|
||||
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) {
|
||||
payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||
payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||
}
|
||||
});
|
||||
_.forEach(foundData.dataSource, item => {
|
||||
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) {
|
||||
payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
|
||||
payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
|
||||
}
|
||||
});
|
||||
_.forEach(otherData.dataSource, item => {
|
||||
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) {
|
||||
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 => {
|
||||
|
|
@ -163,6 +164,7 @@ class RegEditDetial extends Component {
|
|||
const social = this.combinedData(socialSecurity, result);
|
||||
const fund = this.combinedData(accumulationFund, result);
|
||||
const other = this.combinedData(otherBenefits, result);
|
||||
console.log(social)
|
||||
this.setState({
|
||||
listMap: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -92,10 +92,10 @@ class SupplementarySlide extends Component {
|
|||
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
|
||||
valueCom = child[`${child.insuranceId}_com`];
|
||||
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) {
|
||||
_.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) || "0" });
|
||||
_.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, parseFloat(child.comValidNum || 2)) || "0" });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue