diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js index fff7a3d1..8c605118 100644 --- a/pc4mobx/hrmSalary/index.js +++ b/pc4mobx/hrmSalary/index.js @@ -52,6 +52,7 @@ import ExternalPersonManage from "./pages/externalPersonManage"; import AdjustSalaryManage from "./pages/adjustSalaryManage"; import TopologyMap from "./pages/topologyMap"; import SupplementaryCalc from "./pages/supplementaryCalc"; +import Layout from "./layout"; import stores from "./stores"; import "./style/index"; @@ -114,7 +115,7 @@ const DataAcquisition = (props) => props.children; // supplementaryCalc 补算 const Routes = ( - + @@ -124,8 +125,8 @@ const Routes = ( - - + + @@ -152,7 +153,7 @@ const Routes = ( - + diff --git a/pc4mobx/hrmSalary/layout.js b/pc4mobx/hrmSalary/layout.js new file mode 100644 index 00000000..f1ad9a67 --- /dev/null +++ b/pc4mobx/hrmSalary/layout.js @@ -0,0 +1,53 @@ +/* + * 薪酬管理- + * layout组件 + * @Author: 黎永顺 + * @Date: 2024/8/15 + * @Wechat: + * @Email: 971387674@qq.com + * @description: +*/ +import React, { Component } from "react"; +import { WeaLocaleProvider, WeaTools } from "ecCom"; +import stores from "./stores"; + +const { ls } = WeaTools; +const { getLabel } = WeaLocaleProvider; + +class Layout extends Component { + constructor(props) { + super(props); + this.state = {}; + } + + componentWillReceiveProps(nextProps, nextContext) { + if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) { + if (window.location.hash.indexOf("payroll") !== -1) { + window.localStorage.removeItem("template-basedata"); + window.localStorage.removeItem("salary-showset"); + } + } + } + + componentDidMount() { + if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) { + const src = "/spa/hrmSalary/hrmSalaryCalculateDetail/css/iconfont/iconfont.css"; + const link = document.createElement("link"); + link.setAttribute("rel", "stylesheet"); + link.setAttribute("type", "text/css"); + link.setAttribute("href", src); + let header = document.getElementById("container"); + header.appendChild(link); + top.$(".ant-message").remove(); + window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission(); + } + } + + render() { + return ( + {this.props.children} + ); + } +} + +export default Layout;