detail.jsx 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import React, { useState, useEffect } from 'react';
  2. import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Radio, Tag, Tooltip, Tabs, notification } from 'antd';
  3. import moment from 'moment';
  4. import request from '../../../utils/request';
  5. import apis from '../../../services/apis';
  6. import { router } from 'umi';
  7. import SealList from './components/SealList'
  8. import Authorize from './components/Authorize'
  9. const { Option } = Select
  10. const { TabPane } = Tabs;
  11. const formItemLayout = {
  12. labelCol: {
  13. xs: { span: 24 },
  14. sm: { span: 2 },
  15. },
  16. wrapperCol: {
  17. xs: { span: 24 },
  18. sm: { span: 16 },
  19. },
  20. };
  21. function openNotificationWithIcon(type, message) {
  22. notification[type]({
  23. message,
  24. description:
  25. '',
  26. });
  27. }
  28. function EditHouse(props) {
  29. const [tab, setTab] = useState('sealList')
  30. const companyId = props.location.query.id;
  31. function tabsCallback(e) {
  32. setTab(e)
  33. }
  34. // building 回调
  35. function buildingOnSuccess(e) {
  36. setBuildingData(e)
  37. }
  38. return (
  39. <>
  40. <Tabs type="card" value={ tab } buttonStyle="solid" onChange={e => tabsCallback(e)}>
  41. <TabPane tab="印章列表" key="sealList" ></TabPane>
  42. <TabPane tab="自动签章授权" key="authorize" ></TabPane>
  43. </Tabs>
  44. <div style={{ marginTop: '20px' }}>
  45. { (tab === 'sealList' && <SealList companyId={companyId}/>)}
  46. { (tab === 'authorize' && <Authorize companyId={companyId}/>)}
  47. </div>
  48. </>
  49. )
  50. }
  51. const WrappedEditHouseForm = Form.create({ name: 'editHouse' })(EditHouse);
  52. export default WrappedEditHouseForm