import React, { useState, useEffect } from 'react';
import { Modal, Form, Input, Button, Select } from 'antd';
const CreateForm = (props) => {
  const { Option, OptGroup } = Select;
  return (
    <Modal
      title={props.values.orderId + '售后处理'}
      width={640}
      visible={props.updateModalVisible}
      bodyStyle={{ padding: '32px 40px 48px' }}
      footer={null}
      onCancel={() => {
        props.onCancel();
      }}
      destroyOnClose
    >
      <Form
        layout="vertical"
        preserve={false}
        initialValues={props.values}
        onFinish={props.onFinish}
      >
        <Form.Item name="id" hidden={true}>
          <Input />
        </Form.Item>
        <Form.Item name="status" label="处理类型" rules={[{ required: true }]}>
          <Select showArrow placeholder="请选择处理类型" style={{ width: '100%' }}>
            <Option key={1}>拒绝</Option>
            <Option key={3}>开始处理</Option>
            <Option key={4}>同意退款</Option>
          </Select>
        </Form.Item>
        <Form.Item name="desc" label="处理备注" rules={[{ required: true }]}>
          <Input placeholder="请输入处理原因" />
        </Form.Item>
        <Form.Item>
          <Button type="primary" htmlType="submit">
            保存
          </Button>
        </Form.Item>
      </Form>
    </Modal>
  );
};

export default CreateForm;
