diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js index 13bbcc4e..9d9f8ad5 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerBaseSetting.js @@ -11,6 +11,7 @@ import { inject, observer } from "mobx-react"; import { baseSettingFormItem } from "../config"; import { getLedgerBasicForm } from "../../../apis/ledger"; import { getAddMonthYearMonth, getCurrentYearMonth, getSubtractMonthYearMonth } from "../../../util/date"; +import { commonEnumList } from "../../../apis/ruleconfig"; import moment from "moment"; import "./index.less"; @@ -39,6 +40,7 @@ class LedgerBaseSetting extends Component { componentDidMount() { this.getTaxAgentSelectListAsAdmin(); + this.commonEenumList(); if (this.props.visible && this.props.editId) { this.getLedgerBasicForm(this.props.editId); } @@ -111,6 +113,27 @@ class LedgerBaseSetting extends Component { } }); }; + commonEenumList= ()=>{ + const payload = { + enumClass: "com.engine.salary.enums.salarysob.IncomeCategoryEnum" + }; + commonEnumList(payload).then(({ status, data }) => { + if (status) { + const { baseForm } = this.state; + this.setState({ + baseForm: _.map(baseForm, it => { + if (it.key === "taxableItems") { + return { + ...it, + options: _.map(data, it => ({ key: it.value.toString(), showname: it.defaultLabel })) + }; + } + return { ...it }; + }) + }); + } + }); + } handleChangeField = (key, value) => { const { onSaveParams } = this.props; const { settingBaseInfo } = this.state; diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/config.js b/pc4mobx/hrmSalary/pages/ledgerPage/config.js index b130f4f6..1a9f3717 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/config.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/config.js @@ -62,16 +62,16 @@ export const baseSettingFormItem = [ label: "薪资类型", type: "SELECT", options: [ - { - key: "1", - selected: true, - showname: "正常工资薪金所得" - }, - { - key: "4", - selected: false, - showname: "劳务报酬所得" - } + // { + // key: "1", + // selected: true, + // showname: "正常工资薪金所得" + // }, + // { + // key: "4", + // selected: false, + // showname: "劳务报酬所得" + // } ] }, {