diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js index 1668de36..079190f8 100644 --- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js +++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js @@ -8,6 +8,7 @@ import React, { Component } from "react"; import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom"; import { Button, message, Modal } from "antd"; import { getTaxAgentRangeForm } from "../../apis/taxAgent"; +import { commonEnumList } from "../../apis/ruleconfig"; import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee"; import "./index.less"; @@ -31,41 +32,77 @@ class PersonalScopeModal extends Component { if (isTaxgent) { this.getTaxAgentRangeForm(); } else { - const employeeStatus = [ - { key: "TRIAL", showname: "试用" }, - { key: "FORMAL", showname: "正式" }, - { key: "TEMPORARY", showname: "临时" }, - { key: "DELAY", showname: "试用延期" }, - { key: "FIRE", showname: "解雇" }, - { key: "DEPARTURE", showname: "离职" }, - { key: "RETIRED", showname: "退休" } - ]; - const targetTypeList = [ - { - key: "EMPLOYEE", - showname: "人员", - selected: false - }, - { - key: "SUBCOMPANY", - showname: "分部", - selected: false - }, - { - key: "DEPT", - showname: "部门", - selected: false - }, - { - key: "POSITION", - showname: "岗位", - selected: false - } - ]; - this.setState({ targetTypeList, employeeStatus }); + this.commonEnumList(); + // const employeeStatus = [ + // { key: "TRIAL", showname: "试用" }, + // { key: "FORMAL", showname: "正式" }, + // { key: "TEMPORARY", showname: "临时" }, + // { key: "DELAY", showname: "试用延期" }, + // { key: "FIRE", showname: "解雇" }, + // { key: "DEPARTURE", showname: "离职" }, + // { key: "RETIRED", showname: "退休" } + // ]; + // const targetTypeList = [ + // { + // key: "EMPLOYEE", + // showname: "人员", + // selected: false + // }, + // { + // key: "SUBCOMPANY", + // showname: "分部", + // selected: false + // }, + // { + // key: "DEPT", + // showname: "部门", + // selected: false + // }, + // { + // key: "POSITION", + // showname: "岗位", + // selected: false + // } + // ]; + // this.setState({ targetTypeList, employeeStatus }); } } + commonEnumList = () => { + commonEnumList({ enumClass: "com.engine.salary.enums.UserStatusEnum" }).then(({ status, data }) => { + if (status) { + const targetTypeList = [ + { + key: "EMPLOYEE", + showname: "人员", + selected: false + }, + { + key: "SUBCOMPANY", + showname: "分部", + selected: false + }, + { + key: "DEPT", + showname: "部门", + selected: false + }, + { + key: "POSITION", + showname: "岗位", + selected: false + } + ]; + this.setState({ + targetTypeList, + employeeStatus: _.map(_.filter(data, o => o.value !== 7), it => ({ + key: it.value.toString(), + showname: it.defaultLabel + })) + }); + } + }); + }; getTaxAgentRangeForm = () => { getTaxAgentRangeForm().then(({ status, data }) => { if (status) { @@ -91,7 +128,7 @@ class PersonalScopeModal extends Component { employeeStatus: status.split(","), includeType, targetParams: _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it })), - [saveKeyVal["key"]]: saveKeyVal["value"], + [saveKeyVal["key"]]: saveKeyVal["value"] }; this.setState({ loading: true }); APISaveFox["save"](payload).then(({ status, errormsg }) => { diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index c8bb5f25..8b7af5a4 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -330,7 +330,7 @@ class LedgerAssociatedPersonnel extends Component { this.personalScopeTableRef.getPersonalScopeList()} onCancel={() =>