/** * @author Xyz * 分公司管理 */ import React from 'react'; import { Form, Input, Button, message, Table, Alert, Modal, Tabs } from 'antd'; import { Container, SearchItem, Options, } from "./styles"; import PTable from '../../../components/Pro/PTable'; import {AddCompanyTip} from './components'; import DrawChildCompanyBasic from './DrawChildCompanyBasic';//分公司详情 import DrawChildCompanyIdentification from './DrawChildCompanyIdentification';//分公司详情 const FormItem = Form.Item; const { TabPane } = Tabs; @Form.create() export default class ChildCompanyManager extends React.Component { constructor(props, context) { super(props, context); this.state = { isBasicOpen: false, isIdentificationOpen: false, pageParm: { pageSize: '10',//缴交情况 pageNumber: "1", keyWord: "", }, forceUpdate: false, comId: "" } } /******************************生命周期******************************/ componentDidMount = () => { } /******************************ajax请求******************************/ /******************************相关事件******************************/ addCompany = () => { this.setState({isBasicOpen: true}); } //查看基础信息 item basicInfoOpen = (record) => { this.setState({ isBasicOpen: true, comId: record["comBranchId"] }); } //查看认证信息 indetificationOpen = (record) => { this.setState({ isIdentificationOpen: true, comId: record["comBranchId"] }); console.log("传入 draw id ", record["comBranchId"]); } closeBasicDrawer = () => { this.setState({isBasicOpen: false}); } closeIdentDrawer = () => { this.setState({isIdentificationOpen: false}); } //删除提示框 deleteConfirm = () => { Modal.confirm({ title: '删除后将无法查看子公司信息,是否确认删除?', okText: '确定', cancelText: '取消', onOk: () => { console.log('OK'); }, onCancel: () => { console.log('Cancel'); }, }); } search = () => { this.setState({forceUpdate: true}, () => { this.setState({forceUpdate: false}); }); } resetSearch = () => { const pageParm = { pageSize: '10',//缴交情况 pageNumber: "1", keyWord: "", } this.setState({pageParm}); } inputChange = (e) => { const pageParm = this.state.pageParm; pageParm.keyWord = e.target.value; this.setState({pageParm}); } /******************************render******************************/ renderTable = () => { const columns1 = [ { title: '子公司名称', dataIndex: 'comName', key: 'comName', }, { title: '统一社会信用代码', dataIndex: 'comCerNo', key: 'comCerNo', }, { title: '法定代表人', dataIndex: 'legalRepName', key: 'legalRepName', }, { title: '法人手机', dataIndex: 'legalRepPhone', key: 'legalRepPhone', }, { title: '注册地址', dataIndex: 'regAddress', key: 'regAddress', }, { title: '操作', key: 'action', render: (text, record) => ( 基础信息 认证信息 {/* 删除 */} ), } ]; return ( ); } render() { const {isBasicOpen, isIdentificationOpen, pageParm: {keyWord}} = this.state; return ( 关键字: {this.renderTable()} ); } }