diff --git a/pc4mobx/hrmSalary/apis/taxAgent.js b/pc4mobx/hrmSalary/apis/taxAgent.js index aa74fd63..390bcf7a 100644 --- a/pc4mobx/hrmSalary/apis/taxAgent.js +++ b/pc4mobx/hrmSalary/apis/taxAgent.js @@ -12,7 +12,7 @@ export const taxAgentRangeSync = (params) => { // 系统管理员权限 export const getPermission = (params) => { - return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/permission", "GET", params); + return WeaTools.callApi("/api/bs/hrmsalary/auth/permission", "GET", params); }; //获取个税扣缴义务人表单 diff --git a/pc4mobx/hrmSalary/config.js b/pc4mobx/hrmSalary/config.js new file mode 100644 index 00000000..6c9eaaa5 --- /dev/null +++ b/pc4mobx/hrmSalary/config.js @@ -0,0 +1,6 @@ +export const PAGE = { + "salaryArchive": ["/hrmSalary/salaryFile"], //薪资档案 + "salarySob": ["/hrmSalary/ledger"], //薪资账套 + "salaryAcct": ["/hrmSalary/calculate", "/hrmSalary/calcView"], //薪资核算 + "salaryBill": ["/hrmSalary/payroll", "/hrmSalary/payrollGrant", "/hrmSalary/payrollDetail"] //工资单 +}; diff --git a/pc4mobx/hrmSalary/layout.js b/pc4mobx/hrmSalary/layout.js index f1ad9a67..816934d6 100644 --- a/pc4mobx/hrmSalary/layout.js +++ b/pc4mobx/hrmSalary/layout.js @@ -8,12 +8,16 @@ * @description: */ import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; import { WeaLocaleProvider, WeaTools } from "ecCom"; +import Authority from "./pages/mySalary/authority"; import stores from "./stores"; const { ls } = WeaTools; const { getLabel } = WeaLocaleProvider; +@inject("taxAgentStore") +@observer class Layout extends Component { constructor(props) { super(props); @@ -44,9 +48,10 @@ class Layout extends Component { } render() { - return ( - {this.props.children} - ); + const { taxAgentStore: { PageAndOptAuth, loading } } = this.props; + return ( + {this.props.children} + ); } } diff --git a/pc4mobx/hrmSalary/pages/calculate/calculate.js b/pc4mobx/hrmSalary/pages/calculate/calculate.js index e6207394..5d7b516d 100644 --- a/pc4mobx/hrmSalary/pages/calculate/calculate.js +++ b/pc4mobx/hrmSalary/pages/calculate/calculate.js @@ -40,8 +40,9 @@ class Calculate extends Component { } renderCalculateOpts = () => { - const { taxAgentStore: { showOperateBtn } } = this.props; + const { taxAgentStore: { PageAndOptAuth } } = this.props; const { queryParams, isRefresh } = this.state; + const admin = PageAndOptAuth.opts.includes("admin"); let calculateOpts = [