diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js index cb6a387b..ef7f4489 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js @@ -149,6 +149,17 @@ export const dataCollectCondition = [ export const taxDetailSettingsConditions = { freeIncome: [{ items: [ + { + conditionType: "SELECT", + domkey: ["incomeCategory"], + fieldcol: 14, + label: "所得项目", + lanId: 111, + labelcol: 8, + value: "", + rules: "required|string", + viewAttr: 3 + }, { conditionType: "INPUT", domkey: ["freeItem"], @@ -190,6 +201,17 @@ export const taxDetailSettingsConditions = { }], healthInsurance: [{ items: [ + { + conditionType: "SELECT", + domkey: ["incomeCategory"], + fieldcol: 14, + label: "所得项目", + lanId: 111, + labelcol: 8, + value: "", + rules: "required|string", + viewAttr: 3 + }, { conditionType: "INPUT", domkey: ["identificationNumber"], @@ -265,6 +287,17 @@ export const taxDetailSettingsConditions = { }], endowmentInsurance: [{ items: [ + { + conditionType: "SELECT", + domkey: ["incomeCategory"], + fieldcol: 14, + label: "所得项目", + lanId: 111, + labelcol: 8, + value: "", + rules: "required|string", + viewAttr: 3 + }, { conditionType: "MONTHPICKER", domkey: ["deductionMonth"], @@ -347,6 +380,17 @@ export const taxDetailSettingsConditions = { }], grantDonation: [{ items: [ + { + conditionType: "SELECT", + domkey: ["incomeCategory"], + fieldcol: 14, + label: "所得项目", + lanId: 111, + labelcol: 8, + value: "", + rules: "required|string", + viewAttr: 3 + }, { conditionType: "INPUT", domkey: ["recipientName"], @@ -446,6 +490,17 @@ export const taxDetailSettingsConditions = { }], derateDeduction: [{ items: [ + { + conditionType: "SELECT", + domkey: ["incomeCategory"], + fieldcol: 14, + label: "所得项目", + lanId: 111, + labelcol: 8, + value: "", + rules: "required|string", + viewAttr: 3 + }, { conditionType: "INPUT", domkey: ["derateItem"], @@ -487,6 +542,17 @@ export const taxDetailSettingsConditions = { }], otherDerateDeduction: [{ items: [ + { + conditionType: "SELECT", + domkey: ["incomeCategory"], + fieldcol: 14, + label: "所得项目", + lanId: 111, + labelcol: 8, + value: "", + rules: "required|string", + viewAttr: 3 + }, { conditionType: "INPUTNUMBER", domkey: ["otherDeduction"], @@ -519,6 +585,17 @@ export const taxDetailSettingsConditions = { }], personalPension: [{ items: [ + { + conditionType: "SELECT", + domkey: ["incomeCategory"], + fieldcol: 14, + label: "所得项目", + lanId: 111, + labelcol: 8, + value: "", + rules: "required|string", + viewAttr: 3 + }, { conditionType: "SELECT", domkey: ["voucherTypeName"], @@ -559,8 +636,3 @@ export const taxDetailSettingsConditions = { col: 1 }] }; - - - - - diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js index 417597ec..3fd2e1e4 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/detailSettingsDialog.js @@ -16,6 +16,8 @@ import { taxDetailSettingsConditions } from "./columns"; import { Button, message } from "antd"; import { getDomkes, toDecimal_n } from "../../../util"; import { postFetch } from "../../../util/request"; +import { getIncomeCategoryList } from "../../../apis/ledger"; //获取薪资类型 +import cs from "classnames"; const getKey = WeaTools.getKey; const getLabel = WeaLocaleProvider.getLabel; @@ -30,19 +32,30 @@ class DetailSettingsDialog extends Component { }; } - componentWillReceiveProps(nextProps, nextContext) { + async componentWillReceiveProps(nextProps, nextContext) { if (nextProps.visible !== this.props.visible && nextProps.visible) { + const { data } = await getIncomeCategoryList(); this.setState({ conditions: _.map(taxDetailSettingsConditions[nextProps.dataType], item => ({ ...item, items: _.map(item.items, o => ({ ...o, options: getKey(o) === "voucherTypeName" ? - [{ key: "MONTH", showname: "月度" }, { key: "YEAR", showname: "年度" }] : [] + [{ key: "MONTH", showname: "月度" }, { key: "YEAR", showname: "年度" }] : + getKey(o) === "incomeCategory" ? _.map(data, it => ({ + key: it.value.toString(), + showname: