diff --git a/pc4mobx/hrmSalary/apis/standingBook.js b/pc4mobx/hrmSalary/apis/standingBook.js index 592597ac..a1bcbc1b 100644 --- a/pc4mobx/hrmSalary/apis/standingBook.js +++ b/pc4mobx/hrmSalary/apis/standingBook.js @@ -213,3 +213,8 @@ export const addSocialAcctEmp = (params) => { export const deleteSocialAcctEmp = (params) => { return postFetch("/api/bs/hrmsalary/siaccount/deleteSocialAcctEmp", params); }; +// 中航富士达-页面权限 +export const getPermission4FsdSocialDetail = (params) => { + return postFetch("/api/bs/hrmsalary/auth/permission4FsdSocialDetail", params); +}; + diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js index ddd2d190..4eb7d019 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/index.js @@ -12,6 +12,8 @@ import OverViewIndex from "./components/overView"; import AbnormalListIndex from "./components/abnormalList"; import Regression from "./components/regression"; import MakeupDifference from "./components/makeupDifference"; +import Authority from "../../mySalary/authority"; +import { getPermission4FsdSocialDetail } from "../../../apis/standingBook"; const { getLabel } = WeaLocaleProvider; @@ -24,16 +26,27 @@ class StandingBookDetail extends Component { selectedKey: "1", tabList: [], remarks: "", - billMonth: "" + billMonth: "", + store: { loading: false, hasRight: false } }; this.type = ""; this.paymentOrganization = ""; } componentDidMount() { - this.getTabList(); + this.getPermission4FsdSocialDetail(); } + getPermission4FsdSocialDetail = () => { + const fsdSbjndw = this.props.location.query.fsdSbjndw, + paymentOrganization = this.props.location.query.paymentOrganization; + this.setState({ store: { ...this.state.store, loading: true } }); + getPermission4FsdSocialDetail({ fsdSbjndw, paymentOrganization }).then(({ status, data }) => { + this.setState({ store: { loading: false, hasRight: status && data === "true" } }, () => { + this.state.store.hasRight && this.getTabList(); + }); + }).catch(() => this.setState({ store: { ...this.state.store, loading: false } })); + }; getTabList = () => { const { getTabList } = this.props.standingBookStore; const billMonth = this.props.location.query.billMonth; @@ -53,8 +66,8 @@ class StandingBookDetail extends Component { }; render() { - const { selectedKey, tabList, remarks, billMonth } = this.state; - return ( + const { selectedKey, tabList, remarks, billMonth, store } = this.state; + return (
} @@ -82,7 +95,7 @@ class StandingBookDetail extends Component { }
- ); +
); } }