diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js index 723b56b3..76913307 100644 --- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js +++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js @@ -24,6 +24,7 @@ import { import ImportModal from "../../../components/importModal"; import { importEmployColumns } from "../../taxAgent/columns"; import ExternalPersonModal from "../../../components/externalPersonModal"; +import { sysinfo } from "../../../apis/ruleconfig"; const APIFox = { listInclude: getLedgerPersonRangeInclude, @@ -55,10 +56,26 @@ class LedgerAssociatedPersonnel extends Component { visible: false, title: "关联人员", includeType: "" - } + }, + extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭 }; } + componentDidMount() { + this.getSysinfo(); + } + + /* + * Author: 黎永顺 + * Description: 非系统人员开关查询 + * Params: + * Date: 2023/7/14 + */ + getSysinfo = () => { + sysinfo().then(({ status, data }) => { + if (status) this.setState({ extEmpsWitch: data.extEmpsWitch }); + }); + }; /* * Author: 黎永顺 * Description:外部人员保存 @@ -202,7 +219,7 @@ class LedgerAssociatedPersonnel extends Component { importParams, previewDataSource, externalPersonModalVisible, - loading + loading, extEmpsWitch } = this.state; const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props; const topTab = [ @@ -257,7 +274,7 @@ class LedgerAssociatedPersonnel extends Component { return (
{ + sysinfo().then(({ status, data }) => { + if (status) this.setState({ extEmpsWitch: data.extEmpsWitch }); + }); + }; + handleReceive = ({ data }) => { const { payrollFilesStore: { tableStore }, taxAgentStore: { showOperateBtn } } = this.props; const columns = _.map(_.filter(toJS(tableStore.columns), (item) => item.display === "true"), (it, idx) => ({ @@ -703,7 +718,8 @@ class Index extends Component { showSearchAd, slideParams, changeSalaryVisible, - paysetParams + paysetParams, + extEmpsWitch } = this.state; const { payrollFilesStore: { tableStore } } = this.props; const renderSearch = () => { @@ -762,7 +778,7 @@ class Index extends Component { dropMenuDatas={rightMenu} > { - onChangeTab && onChangeTab(includeType); - } - ); + componentDidMount() { + this.getSysinfo(); } + /* + * Author: 黎永顺 + * Description: 非系统人员开关查询 + * Params: + * Date: 2023/7/14 + */ + getSysinfo = () => { + sysinfo().then(({ status, data }) => { + if (status) this.setState({ extEmpsWitch: data.extEmpsWitch }); + }); + }; + onSelectChange = selectedRowKeys => { this.setState({ selectedRowKeys }); }; @@ -125,7 +130,7 @@ export default class SlideTaxagentUser extends React.Component { externalPersonModalVisible, importParams, previewDataSource, - showSearchAd + showSearchAd, extEmpsWitch } = this.state; const { submitLoading, @@ -193,11 +198,18 @@ export default class SlideTaxagentUser extends React.Component { return (