From 76db5080669cdd030766f0486d8f7d1d6758753c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Tue, 11 Jun 2024 15:27:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E4=BC=98=E5=8C=96=20-=20?= =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E5=8F=B0=E8=B4=A6=E5=B0=8F?= =?UTF-8?q?=E6=95=B0=E4=BD=8D=E6=95=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/inputPaymentAmount.js | 6 +- .../components/regEditDetial.js | 117 +++++++++--------- 2 files changed, 63 insertions(+), 60 deletions(-) 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 }; + }) } + ] }); } });