diff --git a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/layout.js b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/layout.js index e9a2398b..24bd120c 100644 --- a/pc4mobx/hrmSalary/pages/custom-pages/lingyue/layout.js +++ b/pc4mobx/hrmSalary/pages/custom-pages/lingyue/layout.js @@ -8,17 +8,20 @@ * @description: */ import React, { Component } from "react"; +import { inject, observer } from "mobx-react"; import { WeaDatePicker, WeaInputSearch, WeaLocaleProvider, WeaTop } from "ecCom"; import { Button } from "antd"; import "./index.less"; const getLabel = WeaLocaleProvider.getLabel; +@inject("taxAgentStore") +@observer class Layout extends Component { render() { - const { title, query, onChange, listRef, isQuery } = this.props; + const { title, query, onChange, listRef, isQuery, taxAgentStore: { salaryManager } } = this.props; const { salaryMonth, ffgsqc } = query; - const buttons = [ + let buttons = [ , , , content: getLabel(81272, "导出全部") } ]; + !salaryManager && (buttons = buttons.slice(2)); return ( } buttons={buttons} showDropIcon={true} + title={title} icon={} buttons={buttons} showDropIcon={salaryManager} iconBgcolor="#F14A2D" className="custom_salary_lingyue" dropMenuDatas={dropMenuDatas} onDropMenuClick={key => listRef.handleOperate(key)}>
{this.props.children}
diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js index ef5cfe2d..1e02f209 100644 --- a/pc4mobx/hrmSalary/stores/taxAgent.js +++ b/pc4mobx/hrmSalary/stores/taxAgent.js @@ -18,6 +18,7 @@ export class TaxAgentStore { @observable showSalaryItemBtn = false; // 薪资项目管理页面操作按钮显示权限 @observable statisticsReportBtn = false; // 薪酬统计报表页面操作按钮显示权限 @observable payrollPermission = false; // 薪资核算显示权限 + @observable salaryManager = false; // 薪酬总管理员 @observable loading = false; // 数据加载状态 @observable modalVisiable = false; // EditModal 模态框 @observable columns = []; @@ -41,6 +42,7 @@ export class TaxAgentStore { @action setSalaryItemBtn = bool => (this.showSalaryItemBtn = bool);//薪资项目权限 @action setStatisticsReportBtn = bool => (this.statisticsReportBtn = bool);//薪酬统计报表权限 @action setPayrollPermission = bool => (this.payrollPermission = bool);// 薪资核算页面权限 + @action setSalaryManager = bool => (this.salaryManager = bool);// 是否是薪酬总管理员 // 初始化操作 @action @@ -149,6 +151,8 @@ export class TaxAgentStore { this.setStatisticsReportBtn(!isOpenDevolution ? true : !!(isAdminEnable || isChief)); //薪资核算详情页面查看权限 this.setPayrollPermission((isOpenDevolution && isAdminEnable) || !isOpenDevolution); + //设置薪酬总管理员权限 + this.setSalaryManager(isChief); resolve({ status, data }); } else { reject();