diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js index 62a32e2b..d9a91166 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js @@ -20,7 +20,7 @@ class InputPaymentAmount extends Component { return ( this.handleChangeBaseItem(record, val, type, "per")} /> ); @@ -32,7 +32,7 @@ class InputPaymentAmount extends Component { return ( this.handleChangeBaseItem(record, val, type, "com")} /> ); diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js index 7805ceea..383747aa 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js @@ -165,7 +165,8 @@ class RegEditDetial extends Component { const other = this.combinedData(otherBenefits, result); this.setState({ listMap: [ - { ...socialData, dataSource: social, columns: _.map(regColumns, item => { + { + ...socialData, dataSource: social, columns: _.map(regColumns, item => { if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") { return { ...item, @@ -173,7 +174,7 @@ class RegEditDetial extends Component { return ( this.handleChange("social", item.dataIndex, v, record)} /> @@ -182,8 +183,10 @@ class RegEditDetial extends Component { }; } return { ...item }; - }) }, - { ...foundData, dataSource: fund, columns: _.map(regColumns, item => { + }) + }, + { + ...foundData, dataSource: fund, columns: _.map(regColumns, item => { if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") { return { ...item, @@ -191,7 +194,7 @@ class RegEditDetial extends Component { return ( this.handleChange("fund", item.dataIndex, v, record)} /> @@ -200,8 +203,10 @@ class RegEditDetial extends Component { }; } return { ...item }; - }) }, - { ...otherData, dataSource: other, columns: _.map(regColumns, item => { + }) + }, + { + ...otherData, dataSource: other, columns: _.map(regColumns, item => { if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") { return { ...item, @@ -209,7 +214,7 @@ class RegEditDetial extends Component { return ( this.handleChange("other", item.dataIndex, v, record)} /> @@ -218,7 +223,8 @@ class RegEditDetial extends Component { }; } return { ...item }; - }) } + }) + } ] }); } @@ -231,9 +237,15 @@ class RegEditDetial extends Component { let obj = { benefits: item }; _.forEach(data, it => { 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") { - obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue }); + obj = _.assign(obj, { + ...it, companyPaymentAmount: it.insuranceValue, + companyPaymentAmountValidNum: it.validNum + }); } }); return obj; diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js index 8881cc39..7ed7e26d 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js @@ -444,7 +444,9 @@ export const convertData = (dataSource) => { [perKey]: "", [comKey]: "", 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);