this.handleEdit(record)}>{(showOperateBtn && selectedKey !== "stop") ? "编辑" : "查看"}
+ onClick={() => this.handleEdit(record)}>{((isDepAuth || showOperateBtn) && selectedKey !== "stop") ? "编辑" : "查看"}
{
- showOperateBtn && selectedKey === "pending" &&
+ (isDepAuth || showOperateBtn) && selectedKey === "pending" &&
this.stayAddToPay([record.baseInfo])}>增员
}
{
- showOperateBtn && selectedKey === "suspend" &&
+ (isDepAuth || showOperateBtn) && selectedKey === "suspend" &&
this.stayDelToStop([record.baseInfo])}>减员
}
{
- showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" &&
+ (isDepAuth || showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete === "1" &&
this.deleteSocialArchive([record.baseInfo])}>删除档案
}
{
- showOperateBtn && selectedKey === "stop" && salaryArchiveDelete !== "1" &&
+ (isDepAuth || showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete !== "1" &&
this.cancelStopPayment([record.baseInfo])}>取消停缴
}
{
- showOperateBtn && selectedKey === "pending" &&
+ (isDepAuth || showOperateBtn) && selectedKey === "pending" &&
}
{
- showOperateBtn && selectedKey === "suspend" &&
+ (isDepAuth || showOperateBtn) && selectedKey === "suspend" &&
}
{
- showOperateBtn && selectedKey === "stop" && salaryArchiveDelete === "1" &&
+ (isDepAuth || showOperateBtn) && selectedKey === "stop" && salaryArchiveDelete === "1" &&
this.handleEditSlideSave()}>保存] : []
}
subItemChange={selectedTab => this.setState({ selectedTab })}
diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js
index 2f555120..4d6175e8 100644
--- a/pc4mobx/hrmSalary/stores/taxAgent.js
+++ b/pc4mobx/hrmSalary/stores/taxAgent.js
@@ -19,6 +19,7 @@ export class TaxAgentStore {
@observable showSalaryItemBtn = false; // 薪资项目管理页面操作按钮显示权限
@observable statisticsReportBtn = false; // 薪酬统计报表页面操作按钮显示权限
@observable payrollPermission = false; // 薪资核算显示权限
+ @observable isDepAuth = false; // 艾志薪资档案以及社保福利档案权限
@observable loading = false; // 数据加载状态
@observable modalVisiable = false; // EditModal 模态框
@observable columns = [];
@@ -42,6 +43,7 @@ export class TaxAgentStore {
@action setSalaryItemBtn = bool => (this.showSalaryItemBtn = bool);//薪资项目权限
@action setStatisticsReportBtn = bool => (this.statisticsReportBtn = bool);//薪酬统计报表权限
@action setPayrollPermission = bool => (this.payrollPermission = bool);// 薪资核算页面权限
+ @action setIsDepAuth = bool => (this.isDepAuth = bool);// 艾志薪资档案以及社保福利档案权限
// 初始化操作
@action
@@ -141,7 +143,7 @@ export class TaxAgentStore {
return new Promise((resolve, reject) => {
API.getPermission(params).then(({ status, data }) => {
if (status) {
- const { isAdminEnable, isChief, isOpenDevolution } = data;
+ const { isAdminEnable, isChief, isOpenDevolution, isDepAuth } = data;
this.setShowOperateBtn(
!isOpenDevolution ? true : isAdminEnable ? true : false
);
@@ -150,6 +152,8 @@ export class TaxAgentStore {
this.setStatisticsReportBtn(!isOpenDevolution ? true : !!(isAdminEnable || isChief));
//薪资核算详情页面查看权限
this.setPayrollPermission(isAdminEnable && isOpenDevolution || !isOpenDevolution);
+ //艾志薪资档案以及社保福利档案权限
+ this.setIsDepAuth(isDepAuth);
resolve({ status, data });
} else {
reject();