diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index 15645de9..dbcba6cc 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -119,9 +119,10 @@ export default class SalaryItem extends React.Component { break; case "customAdd": case "edit": - const { taxAgentStore: { showOperateBtn, showSalaryItemBtn } } = this.props; - const { loading } = this.state; - const title = key === "edit" ? getLabel(111, "修改自定义薪资项目") : getLabel(111, "新建自定义薪资项目"); + const { taxAgentStore: { PageAndOptAuth } } = this.props; + const { loading } = this.state, showOperateBtn = PageAndOptAuth.opts.includes("admin"); + const editTitle = !showOperateBtn ? getLabel(111, "查看自定义薪资项目") : getLabel(111, "修改自定义薪资项目"); + const title = key === "edit" ? editTitle : getLabel(111, "新建自定义薪资项目"); const buttons = key === "edit" ? [