custom/领悦
This commit is contained in:
parent
7de7d189ae
commit
f843a8cc32
|
|
@ -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 = [
|
||||
<Button type="primary" onClick={() => listRef.handleOperate("GENERATE")}>{getLabel(111, "生成数据")}</Button>,
|
||||
<Button type="ghost" onClick={() => listRef.handleOperate("BATCHDEL")}>{getLabel(111, "批量删除")}</Button>,
|
||||
<WeaDatePicker format="YYYY-MM" value={salaryMonth}
|
||||
|
|
@ -29,9 +32,10 @@ class Layout extends Component {
|
|||
const dropMenuDatas = [
|
||||
{ key: "EXPORTALL", icon: <i className="iconfont icon-daochu"/>, content: getLabel(81272, "导出全部") }
|
||||
];
|
||||
!salaryManager && (buttons = buttons.slice(2));
|
||||
return (
|
||||
<WeaTop
|
||||
title={title} icon={<i className="icon-coms-fa"/>} buttons={buttons} showDropIcon={true}
|
||||
title={title} icon={<i className="icon-coms-fa"/>} buttons={buttons} showDropIcon={salaryManager}
|
||||
iconBgcolor="#F14A2D" className="custom_salary_lingyue" dropMenuDatas={dropMenuDatas}
|
||||
onDropMenuClick={key => listRef.handleOperate(key)}>
|
||||
<div className="lingyue-body">{this.props.children}</div>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue