AuditNot.jsx 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import React, { useEffect } from 'react'
  2. import { Form, Select, Button, Modal } from 'antd'
  3. const formItemLayout = {
  4. labelCol: {
  5. xs: { span: 24 },
  6. sm: { span: 6 },
  7. },
  8. wrapperCol: {
  9. xs: { span: 24 },
  10. sm: { span: 12 },
  11. },
  12. }
  13. const tailFormItemLayout = {
  14. wrapperCol: {
  15. xs: {
  16. span: 24,
  17. offset: 0,
  18. },
  19. sm: {
  20. span: 16,
  21. offset: 6,
  22. },
  23. },
  24. }
  25. export default Form.create()(props => {
  26. const handleSubmit = e => {
  27. e.preventDefault()
  28. props.form.validateFields((err, values) => {
  29. if (!err) {
  30. props.onSubmit(values)
  31. }
  32. })
  33. }
  34. useEffect(() => {
  35. // props.setFieldsValue()
  36. }, [])
  37. return (
  38. <Modal footer={null} maskClosable={false} onCancel={props.onCancel} visible={props.visible}>
  39. <Form {...formItemLayout} onSubmit={handleSubmit}>
  40. <Form.Item label="身份">
  41. {
  42. props.form.getFieldDecorator('roleId')(
  43. <Select>
  44. <Select.Option key="1" value="1">户主</Select.Option>
  45. <Select.Option key="2" value="2">租客</Select.Option>
  46. <Select.Option key="3" value="3">家属</Select.Option>
  47. </Select>
  48. )
  49. }
  50. </Form.Item>
  51. <Form.Item label="审核状态">
  52. {
  53. props.form.getFieldDecorator('verifyStatus')(
  54. <Select>
  55. <Select.Option key="1" value="1">审核通过</Select.Option>
  56. <Select.Option key="2" value="2">审核未通过</Select.Option>
  57. <Select.Option key="0" value="0">未审核</Select.Option>
  58. </Select>
  59. )
  60. }
  61. </Form.Item>
  62. <Form.Item {...tailFormItemLayout}>
  63. <Button type="primary" htmlType="submit">确定</Button>
  64. <Button onClick={props.onCancel} style={{ marginLeft: '48px' }}>取消</Button>
  65. </Form.Item>
  66. </Form>
  67. </Modal>
  68. )
  69. })