From 84d4df6d3d84b82d99dc1507d78c5079b9ac4d62 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, 29 Nov 2023 18:29:55 +0800 Subject: [PATCH] =?UTF-8?q?feature/2.9.9.2312.01-=E7=A4=BE=E4=BF=9D?= =?UTF-8?q?=E6=A0=B8=E7=AE=97=E4=BB=A5=E5=8F=8A=E8=96=AA=E8=B5=84=E8=B4=A6?= =?UTF-8?q?=E5=A5=97=E6=9F=A5=E8=AF=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../calculate/calcOc/components/salaryCalcOcList.js | 4 +--- .../pages/ledgerPage/components/ledgerSlide.js | 2 +- .../components/supplementarySlide.js | 12 ++++++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js b/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js index 2d68ddd5..fb0f3166 100644 --- a/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js +++ b/pc4mobx/hrmSalary/pages/calculate/calcOc/components/salaryCalcOcList.js @@ -102,9 +102,7 @@ class SalaryCalcOcList extends Component { return _.map(cols, (item, index) => { const col = { title: item.text, dataIndex: item.column }; if (_.isNaN(parseInt(item.column))) { - return item.fixed ? { ...col, width: 150, fixed: item.fixed } : index < 2 ? { - ...col, width: 150, fixed: "left" - } : { ...col, width: 150 }; + return { ...col, width: 150, fixed: item.fixed || false }; } else { return { ...col, width: 180, children: this.convertColumns(item.children) }; } diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js index 8b2e350e..36bf1bec 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js @@ -112,7 +112,7 @@ class LedgerSlide extends Component { const { editId: salarySobId } = this.props; const payload = { empFields: _.map(empFields, it => { - if (Object.prototype.toString.call(it.id) === "[object Number]") delete it.id; + if (!it.salarySobId) delete it.id; return { ...it }; }), itemGroups: _.map(_.filter(itemGroups, it => it.name !== "未分类"), item => { diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js index ea06d727..84a23912 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js @@ -15,6 +15,7 @@ import { getPaymentGroup, getSupplementPaymentForm, siaccountSupplementarySave } import "./index.less"; import BusinessAccounting from "./businessAccounting"; import InputPaymentAmount from "./inputPaymentAmount"; +import { toDecimal_n } from "../../../../util"; const getLabel = WeaLocaleProvider.getLabel; @@ -90,8 +91,13 @@ class SupplementarySlide extends Component { _.map(inputPaymentAmount[item], child => { const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`], valueCom = child[`${child.insuranceId}_com`]; - _.assign(payload[`${item}PerString`], { [key]: valuePer ? valuePer.toString() : "0" }); - _.assign(payload[`${item}ComString`], { [key]: valueCom ? valueCom.toString() : "0" }); + console.log(child); + if (!_.isNil(valuePer) && valuePer !== "") { + _.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, 2) }); + } + if (!_.isNil(valueCom) && valuePer !== "") { + _.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) }); + } }); }); for (let i in payload) { @@ -127,6 +133,8 @@ class SupplementarySlide extends Component { ...this.convertBusinessAccounting(), ...this.convertInputPaymentAmount() }; + console.log(payload); + return; this.setState({ loading: true }); siaccountSupplementarySave(payload).then(({ status, errormsg }) => { this.setState({ loading: false });