2023-08-17 08:33:21 +08:00
|
|
|
/*
|
|
|
|
|
* Author: 黎永顺
|
|
|
|
|
* name: 个税申报-字段对应查看列表
|
|
|
|
|
* Description:
|
|
|
|
|
* Date: 2023/8/16
|
|
|
|
|
*/
|
|
|
|
|
import React, { Component } from "react";
|
|
|
|
|
import { WeaTable } from "ecCom";
|
|
|
|
|
|
|
|
|
|
class LedgerFieldsTable extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
|
|
|
|
dataSource: []
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentWillReceiveProps(nextProps, nextContext) {
|
|
|
|
|
if (nextProps.dataSource !== this.props.dataSource && !_.isEmpty(nextProps.dataSource)) {
|
|
|
|
|
this.setState({
|
2023-08-18 08:57:20 +08:00
|
|
|
dataSource: _.take(nextProps.dataSource)[0].taxReportRules || _.take(nextProps.dataSource)[0].addUpRules
|
2023-08-17 08:33:21 +08:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const { columns } = this.props;
|
|
|
|
|
const { dataSource } = this.state;
|
|
|
|
|
return (
|
|
|
|
|
<WeaTable dataSource={dataSource} columns={columns} pagination={false} bordered/>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default LedgerFieldsTable;
|