diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js index 44eddfe0..62a32e2b 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js @@ -20,7 +20,8 @@ class InputPaymentAmount extends Component { return ( this.handleChangeBaseItem(record, val, type, "per")} + precision={parseFloat(record.validNum || 2)} + onChange={(val) => this.handleChangeBaseItem(record, val, type, "per")} /> ); } @@ -31,7 +32,8 @@ class InputPaymentAmount extends Component { return ( this.handleChangeBaseItem(record, val, type, "com")} + precision={parseFloat(record.validNum || 2)} + onChange={(val) => 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 ef41880a..7805ceea 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js @@ -24,70 +24,19 @@ class RegEditDetial extends Component { key: "social", label: "社保", dataSource: [], - columns: _.map(regColumns, item => { - if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") { - return { - ...item, - render: (text, record) => { - return ( - this.handleChange("social", item.dataIndex, v, record)} - /> - ); - } - }; - } - return { ...item }; - }) + columns: [] }, { key: "fund", label: "公积金", dataSource: [], - columns: _.map(regColumns, item => { - if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") { - return { - ...item, - render: (text, record) => { - return ( - this.handleChange("fund", item.dataIndex, v, record)} - /> - ); - } - }; - } - return { ...item }; - }) + columns: [] }, { key: "other", label: "企业年金及其他福利", dataSource: [], - columns: _.map(regColumns, item => { - if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") { - return { - ...item, - render: (text, record) => { - return ( - this.handleChange("other", item.dataIndex, v, record)} - /> - ); - } - }; - } - return { ...item }; - }) + columns: [] } ] }; @@ -215,10 +164,62 @@ class RegEditDetial extends Component { const fund = this.combinedData(accumulationFund, result); const other = this.combinedData(otherBenefits, result); this.setState({ - listMap: [{ ...socialData, dataSource: social }, { ...foundData, dataSource: fund }, { - ...otherData, - dataSource: other - }] + listMap: [ + { ...socialData, dataSource: social, columns: _.map(regColumns, item => { + if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") { + return { + ...item, + render: (text, record) => { + return ( + 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 ( + 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 ( + this.handleChange("other", item.dataIndex, v, record)} + /> + ); + } + }; + } + return { ...item }; + }) } + ] }); } });