/* * Author: 黎永顺 * name: 考勤引用数据查看 * Description: * Date: 2023/3/7 */ import React, { Component } from "react"; import { WeaFormItem, WeaInput, WeaInputSearch, WeaSlideModal } from "ecCom"; import { Button } from "antd"; import SlideModalTitle from "../../../../components/slideModalTitle"; import { viewAttendQuote } from "../../../../apis/attendance"; import UnifiedTable from "../../../../components/UnifiedTable"; import "./index.less"; class AttendanceDataViewSlide extends Component { constructor(props) { super(props); this.state = { loading: { query: false }, keyword: "", dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 } }; } componentWillReceiveProps(nextProps, nextContext) { if (nextProps.visible !== this.props.visible && nextProps.visible) this.viewAttendQuote({}, nextProps); } viewAttendQuote = (extraPayload = {}, props) => { const { loading, pageInfo, keyword } = this.state; const { attendQuoteId } = props; this.setState({ loading: { ...loading, query: true } }); viewAttendQuote({ ...pageInfo, attendQuoteId, keyword, ...extraPayload }).then(({ status, data }) => { this.setState({ loading: { ...loading, query: false } }); if (status) { const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo; this.setState({ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns }); } }).catch(() => this.setState({ loading: { ...loading, query: false } })); }; renderCustomOperate = () => { const { keyword } = this.state; const { showOperateBtn } = this.props; return ([