}
content={
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
index 756e9389..f52dc468 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
@@ -284,7 +284,7 @@ export default class OtherDeduct extends React.Component {
previewImport,
importFile,
} = otherDeductStore;
- const { taxAgentOption } = taxAgentStore;
+ const { taxAgentOption, showOperateBtn } = taxAgentStore;
const {
slideVisiable,
setSlideVisiable,
@@ -502,7 +502,7 @@ export default class OtherDeduct extends React.Component {
showDropIcon={true} // 是否显示下拉按钮
dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
- buttons={btns}>
+ buttons={showOperateBtn ? btns : []}>
}
content={
diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js
index 2fc76f76..ed4d1c6f 100644
--- a/pc4mobx/hrmSalary/pages/mySalary/index.js
+++ b/pc4mobx/hrmSalary/pages/mySalary/index.js
@@ -81,8 +81,13 @@ export default class MySalary extends React.Component {
// 区间改变事件
handleSalaryRangePickerChange(range) {
const { mySalaryStore : {mySalaryBillList}} = this.props;
- this.range = range.map(item => moment(item).format("YYYY-MM"))
- mySalaryBillList(this.range, this.pageInfo)
+ const isNull= _.every(range, it=> !!it)
+ if(!_.isEmpty(range) && isNull){
+ this.range = range.map(item => moment(item).format("YYYY-MM"))
+ mySalaryBillList(this.range, this.pageInfo)
+ }else{
+ mySalaryBillList([], this.pageInfo)
+ }
}
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/index.js b/pc4mobx/hrmSalary/pages/salaryFile/index.js
index 5c5644cc..e653b3ed 100644
--- a/pc4mobx/hrmSalary/pages/salaryFile/index.js
+++ b/pc4mobx/hrmSalary/pages/salaryFile/index.js
@@ -1,4 +1,4 @@
-import React from "react";
+import React, { Fragment } from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
import { WeaTableNew } from "comsMobx";
@@ -47,7 +47,7 @@ const { MonthPicker } = DatePicker;
import "./index.less";
import CustomTable from "../../components/customTable";
-@inject("salaryFileStore")
+@inject("salaryFileStore", "taxAgentStore")
@observer
export default class SalaryFile extends React.Component {
constructor(props) {
@@ -174,20 +174,24 @@ export default class SalaryFile extends React.Component {
// 查看 Slide 头部操作按钮
renderEditSlideOperate() {
+ const { taxAgentStore: { showOperateBtn } } = this.props;
return (
-
- 调整个税扣缴义务人
-
- }
- onClick={() => {
- this.setState({ changeSalaryVisible: true });
- }}>
- 调薪
-
+ {
+ showOperateBtn &&
+
+ 调整个税扣缴义务人
+
+ }
+ onClick={() => {
+ this.setState({ changeSalaryVisible: true });
+ }}>
+ 调薪
+
+ }
);
}
@@ -351,36 +355,42 @@ export default class SalaryFile extends React.Component {
);
const renderRightOperation = () => {
+ const { taxAgentStore: { showOperateBtn } } = this.props;
return (
-
-
- 导入
-
-
{
- this.handleExportAll();
- }}>
- 导出全部
-
+ {
+ showOperateBtn &&
+
+
+
+ 导入
+
+ {
+ this.handleExportAll();
+ }}>
+ 导出全部
+
+
+ }
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
index 8b6c7935..4834cf53 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
@@ -53,7 +53,7 @@ const { MonthPicker } = DatePicker;
import TwoColContent from "../../../components/twoColContent";
import CopySchemaModal from "./copySchemaModal";
-@inject("programmeStore")
+@inject("programmeStore", "taxAgentStore")
@observer
export default class Programme extends React.Component {
constructor(props) {
@@ -257,7 +257,7 @@ export default class Programme extends React.Component {
}
render() {
- const { programmeStore } = this.props;
+ const { programmeStore, taxAgentStore: { showOperateBtn } } = this.props;
const {
loading,
hasRight,
@@ -456,18 +456,20 @@ export default class Programme extends React.Component {
topTab={topTab}
searchOperationItem={
- {
- if (selectedKey == "custom") {
- handleCustomNewClick();
- } else {
- handleNewClick();
- }
- }}>
- 新建
-
+ {/* 操作按钮权限 */}
+ {showOperateBtn &&
+ {
+ if (selectedKey == "custom") {
+ handleCustomNewClick();
+ } else {
+ handleNewClick();
+ }
+ }}>
+ 新建
+ }
{selectedKey == "custom" &&
} // 左侧图标
iconBgcolor="#F14A2D" // 左侧图标背景色
showDropIcon={true}>
- {" "}// 是否显示下拉按钮
diff --git a/pc4mobx/hrmSalary/single.js b/pc4mobx/hrmSalary/single.js
index 06f68823..396ff1e7 100644
--- a/pc4mobx/hrmSalary/single.js
+++ b/pc4mobx/hrmSalary/single.js
@@ -29,7 +29,8 @@ const Home = props => props.children;
class Root extends React.Component {
componentWillMount() {
- top.$(".ant-message").remove()
+ top.$(".ant-message").remove();
+ allStore.taxAgentStore.getPermission();
}
render() {
return (
diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js
index abe89476..b1c23142 100644
--- a/pc4mobx/hrmSalary/stores/taxAgent.js
+++ b/pc4mobx/hrmSalary/stores/taxAgent.js
@@ -16,6 +16,7 @@ export class TaxAgentStore {
@observable condition = []; // 存储后台得到的form数据
@observable hasRight = true; // 判断用户是有权限查看当前页面: 没有权限渲染无权限页面,有权限渲染数据
@observable showSearchAd = false; // 高级搜索面板显示
+ @observable showOperateBtn = false; // 页面操作按钮显示权限
@observable loading = false; // 数据加载状态
@observable modalVisiable = false; // EditModal 模态框
@observable columns = [];
@@ -31,6 +32,8 @@ export class TaxAgentStore {
@action setDataSource = dataSource => (this.dataSource = dataSource);
+ @action setShowOperateBtn = bool => (this.showOperateBtn = bool);
+
// 初始化操作
@action
doInit = params => {
@@ -118,6 +121,10 @@ export class TaxAgentStore {
return new Promise((resolve, reject) => {
API.getPermission(params).then(({ status, data }) => {
if (status) {
+ const { isAdminEnable, isOpenDevolution } = data;
+ this.setShowOperateBtn(
+ !isOpenDevolution ? true : isAdminEnable ? true : false
+ );
resolve({ status, data });
} else {
reject();