import React, { Component } from "react";
import { connect } from "dva";

import NotSubmitted from './NotSubmitted';
import Submitted from './Submitted';
import NoCert from './NoCert';
import { gup } from '../../../utils/utils';
import '../declaration.less';
import * as ajax from '../../../services/api';
import { Tabs, Modal } from "antd";
import declare from '../../../utils/hoc/declare';
const { TabPane } = Tabs;
@connect(state => ({
  profile: state.profile
}))
@declare
export default class SignUp extends Component {
  constructor(props, context) {
    super(props, context);
    this.state={
      noOpenAccountPerCount: 0,
      openAccountPerCount: 0,
      tab: '3'
      // tab: '1'
    };
  }

  componentWillMount(){
    const tab = gup('tab');
    if(tab) {
      this.setState({
        tab
      });
    }
  }
  componentDidMount() {
    // this.__checkCompany();
    // this.__getAmount();
  }
 
  render() {
    if(this.props.showModal) {
      return '';
    }
    return (
      <div  style={{paddingTop:'10px'}}>
       <Tabs
          tabBarStyle={{ marginLeft: 24, marginRight: 24 }}
          defaultActiveKey={this.state.tab}
        >
          {/* <TabPane tab={`未持证人员`} key="1">
            <NoCert></NoCert>
          </TabPane> */}
          {/* <TabPane tab={`待提交`} key="2">
            <NotSubmitted></NotSubmitted>
          </TabPane> */}
          <TabPane forceRender
            // tab={`已提交`}
            tab={`保安资格证报名`}
            key="3"
          >
            <Submitted></Submitted>
          </TabPane>
        </Tabs>
      </div>
    );
  }
}
