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 1/4] =?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 }; + }) } + ] }); } }); From 1ddcab4f3846d0f8a35e0a1904a6e22291a1c033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 12 Jun 2024 17:38:34 +0800 Subject: [PATCH 2/4] hotfix/2.14.2.2406.02 --- .../components/inputPaymentAmount.js | 4 +-- .../components/regEditDetial.js | 34 +++++++++++++------ .../components/supplementarySlide.js | 4 ++- 3 files changed, 28 insertions(+), 14 deletions(-) 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); From c80a1c73fea70f7e294381cd62bc85d78f41e1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Wed, 12 Jun 2024 18:56:02 +0800 Subject: [PATCH 3/4] hotfix/2.14.2.2406.02 --- .../components/addCompensationPersonnelDialog.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/addCompensationPersonnelDialog.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/addCompensationPersonnelDialog.js index 34b7edb4..33ee9267 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/addCompensationPersonnelDialog.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/addCompensationPersonnelDialog.js @@ -101,7 +101,8 @@ class AddCompensationPersonnelDialog extends Component { type: "custom", key: "custom", render: (text, record, index, onEdit) => ( - 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) => ( - 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) }; From 24f9d7e57fe74adb28b639a2e2c174c85e1de7c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 13 Jun 2024 09:06:22 +0800 Subject: [PATCH 4/4] hotfix/2.14.2.2406.02 --- .../standingBookDetail/components/regEditDetial.js | 14 ++++++++------ .../components/supplementarySlide.js | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js index 383747aa..b1271972 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js @@ -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: [ { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js index 7ed7e26d..3719461f 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js @@ -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" }); } }); });