custom-银盛科技服务集团有限公司
This commit is contained in:
parent
88da074114
commit
d59e72d789
|
|
@ -82,3 +82,7 @@ export const getSalaryCycleAndAttendCycle = (params) => {
|
|||
export const exportAttendQuote = params => {
|
||||
return postExportFetch("/api/bs/hrmsalary/attendQuote/batch/export", params);
|
||||
};
|
||||
// 银盛二开-考勤引用数据操作权限
|
||||
export const getYSKqyyPermission = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/ysKqyyPermission", "GET", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ class AttendanceDataComp extends Component {
|
|||
<div className="linkWapper">
|
||||
<a href="javascript: void(0);"
|
||||
onClick={() => this.handleViewAttendanceData(record)}>查看</a>
|
||||
{showOperateBtn &&
|
||||
{showOperateBtn.canOperate &&
|
||||
<React.Fragment>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
|
||||
|
|
@ -331,7 +331,7 @@ class AttendanceDataComp extends Component {
|
|||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
!showOperateBtn &&
|
||||
!showOperateBtn.canOperate &&
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class AttendanceDataViewSlide extends Component {
|
|||
}, () => this.viewAttendQuote({}, this.props));
|
||||
}
|
||||
};
|
||||
const btns = [
|
||||
let btns = [
|
||||
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
|
||||
<WeaInputSearch
|
||||
value={keyword} placeholder={getLabel(543380, "请输入姓名/部门/工号/手机号")}
|
||||
|
|
@ -86,6 +86,7 @@ class AttendanceDataViewSlide extends Component {
|
|||
onSearch={() => this.viewAttendQuote({ current: 1 }, this.props)}
|
||||
/>
|
||||
];
|
||||
!showOperateBtn.canExport && (btns = btns.slice(-1));
|
||||
return (
|
||||
<WeaSlideModal {...extra} className="attendanceSlideWrapper"
|
||||
top={0} height={100} width={800} measureT="%" measureX="px" measureY="%" direction="right"
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class FieldMangComp extends Component {
|
|||
case "enableStatus":
|
||||
return (
|
||||
<WeaCheckbox
|
||||
value={text} display="switch" disabled={!showOperateBtn}
|
||||
value={text} display="switch" disabled={!showOperateBtn.canOperate}
|
||||
onChange={value => this.handleAttendanceFieldSwitch(record, value)}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import React, { Component } from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { Button, DatePicker } from "antd";
|
||||
import { WeaFormItem, WeaInputSearch, WeaLoadingGlobal, WeaLocaleProvider, WeaNewScroll, WeaReqTop } from "ecCom";
|
||||
import { exportAttendQuote } from "../../../apis/attendance";
|
||||
import { exportAttendQuote, getYSKqyyPermission } from "../../../apis/attendance";
|
||||
import AttendanceDataComp from "./components/attendanceDataComp";
|
||||
import FieldMangComp from "./components/fieldMangComp";
|
||||
import LogDialog from "../../../components/logViewModal";
|
||||
|
|
@ -25,10 +25,16 @@ class Index extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
fieldName: "", selectedKey: "DATA", salaryMonth: [], selectedRowKeys: [],
|
||||
logDialogVisible: false, filterConditions: "[]"
|
||||
logDialogVisible: false, filterConditions: "[]", PageAndOptAuth: { canOperate: false, canExport: false }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
getYSKqyyPermission().then(({ status, data }) => {
|
||||
if (status) this.setState({ PageAndOptAuth: { ...this.state.PageAndOptAuth, ...data } });
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description: 考勤数据删选条件
|
||||
|
|
@ -82,9 +88,9 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, salaryMonth, fieldName, logDialogVisible, filterConditions, selectedRowKeys } = this.state;
|
||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const showOperateBtn = PageAndOptAuth.isChief || PageAndOptAuth.isAdminEnable;
|
||||
const {
|
||||
selectedKey, salaryMonth, fieldName, logDialogVisible, filterConditions, selectedRowKeys, PageAndOptAuth
|
||||
} = this.state;
|
||||
const topTab = [
|
||||
{ title: "考勤数据", key: "DATA" },
|
||||
{ title: "字段管理", key: "FIELD" }
|
||||
|
|
@ -100,7 +106,9 @@ class Index extends Component {
|
|||
value={fieldName} onChange={fieldName => this.setState({ fieldName })}
|
||||
onSearch={() => this.fieldMangRef.getAttendanceFieldList({ fieldName, current: 1 })}/>
|
||||
];
|
||||
!showOperateBtn && (buttons = buttons.slice(-1));
|
||||
selectedKey === "DATA" && !PageAndOptAuth.canOperate && (buttons = buttons.filter(o => o.props.children !== getLabel(111, "引用") && o.props.children !== getLabel(111, "导入")));
|
||||
selectedKey === "DATA" && !PageAndOptAuth.canExport && (buttons = buttons.filter(o => o.props.children !== getLabel(111, "导出")));
|
||||
selectedKey === "FIELD" && !PageAndOptAuth.canOperate && (buttons = buttons.filter(o => o.props.children !== getLabel(111, "新建")));
|
||||
return (
|
||||
<div className="attendanceRefWrapper">
|
||||
<WeaReqTop
|
||||
|
|
@ -124,7 +132,7 @@ class Index extends Component {
|
|||
selectedKey === "DATA" ?
|
||||
<AttendanceDataComp
|
||||
ref={dom => this.attendanceTableRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
showOperateBtn={PageAndOptAuth}
|
||||
salaryYearMonth={salaryMonth}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
onRowSelection={selectedRowKeys => this.setState({ selectedRowKeys })}
|
||||
|
|
@ -132,7 +140,7 @@ class Index extends Component {
|
|||
/> :
|
||||
<FieldMangComp
|
||||
ref={dom => this.fieldMangRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
showOperateBtn={PageAndOptAuth}
|
||||
fieldName={fieldName}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue