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 });