import React from "react"; import CustomTab from "../../components/customTab"; import { Button } from "antd"; import "./index.less"; import { inject, observer } from "mobx-react"; import { getQueryString } from "../../util/url"; import CustomPaginationTable from "../../components/customPaginationTable"; @inject("declareStore") @observer export default class GenerateDeclarationDetail extends React.Component { constructor(props) { super(props); this.id = getQueryString("id"); this.pageInfo = { current: 1, pageSize: 10 }; } componentWillMount() { const { declareStore: { getDetailList, getDeclareInfo } } = this.props; getDetailList(this.id); getDeclareInfo(this.id); } // 导出 handleExport() { const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${this.id}`; window.open(url, "_self"); } getColumns() { const { declareStore: { datailColumns } } = this.props; let columns = [...datailColumns]; return columns.map(item => { item = { ...item }; item.width = "150px"; if (item.dataIndex == "employeeName") { item.fixed = "left"; } return item; }); } handlePageChange() { const { declareStore: { getDetailList, getDeclareInfo } } = this.props; getDetailList(this.id, this.pageInfo); } render() { const { declareStore: { detailDataSource, detailTableStore, declareInfo, datailColumns, detailPageInfo } } = this.props; const renderRightOperation = () => { return (