release/2.19.1.2501.01-个税
This commit is contained in:
parent
f355f70960
commit
a594d4653a
|
|
@ -35,7 +35,7 @@ class InterfaceFlowStatistics extends Component {
|
|||
},
|
||||
columns: [], dataSource: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false, visible: false
|
||||
loading: false, detailDialog: { visible: false, taxAgentId: "" }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ class InterfaceFlowStatistics extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { statisticsInfo, pageInfo, loading, dataSource, columns, visible } = this.state;
|
||||
const { statisticsInfo, pageInfo, loading, dataSource, columns, detailDialog } = this.state;
|
||||
const { staticData } = statisticsInfo;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
|
|
@ -148,15 +148,20 @@ class InterfaceFlowStatistics extends Component {
|
|||
...columns,
|
||||
{
|
||||
title: getLabel(30585, "操作"), dataIndex: "operate",
|
||||
render: () => (<a href="javascript:void(0);" rel="noreferrer"
|
||||
onClick={() => this.setState({ visible: true })}>{getLabel(111, "月统计详情")}</a>)
|
||||
render: (__, record) => (<a href="javascript:void(0);" rel="noreferrer"
|
||||
onClick={() => this.setState({
|
||||
detailDialog: {
|
||||
visible: true, taxAgentId: record.taxAgentId
|
||||
}
|
||||
})}>{getLabel(111, "月统计详情")}</a>)
|
||||
}
|
||||
]}
|
||||
scroll={{ y: `calc(100vh - 190px)` }}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
<MonthStaticsDetailDialog visible={visible} onCancel={() => this.setState({ visible: false })}/>
|
||||
<MonthStaticsDetailDialog {...detailDialog}
|
||||
onCancel={() => this.setState({ detailDialog: { visible: false, taxAgentId: "" } })}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ class MonthStaticsDetailDialog extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataSource: [], columns: [], pageInfo: { current: 0, pageSize: 10, total: 0 },
|
||||
dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getStatisticsDetailList();
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getStatisticsDetailList(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
this.setState({
|
||||
dataSource: [], columns: [], pageInfo: { current: 0, pageSize: 10, total: 0 },
|
||||
|
|
@ -33,14 +33,14 @@ class MonthStaticsDetailDialog extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
getStatisticsDetailList = () => {
|
||||
const { pageInfo } = this.state;
|
||||
const payload = { ...pageInfo };
|
||||
getStatisticsDetailList = (props) => {
|
||||
const { pageInfo } = this.state, { taxAgentId } = props || this.props;
|
||||
const payload = { ...pageInfo, taxAgentId };
|
||||
this.setState({ loading: true });
|
||||
getStatisticsDetailList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, pageInfo: { list: dataSource, pageNum: current, pageSize, total } } = data;
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
pageInfo: { current, pageSize, total }, dataSource, columns
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue