import React, { useState, useEffect } from 'react';
import { Modal, Form, Input, Button, Select, InputNumber } from 'antd';
const CreateForm = (props) => {
  const { Option, OptGroup } = Select;
  return (
    <Modal
      title="分配会员平台"
      width={640}
      visible={props.createModalVisible}
      bodyStyle={{ padding: '32px 40px 48px' }}
      footer={null}
      onCancel={() => {
        props.onCancel();
      }}
      centered={true}
      destroyOnClose
    >
      <Form
        layout="vertical"
        preserve={false}
        initialValues={props.values}
        onFinish={props.onFinish}
      >
        <Form.Item
          name="platformType"
          label="平台"
          defaultValue={props.values.status}
          rules={[{ required: true, message: '请选择平台', width: 50 }]}
        >
          <Select placeholder="请选择平台">
            <OptGroup>
              <Select.Option value="-1">全部</Select.Option>
              <Select.Option value="0">默认</Select.Option>
              <Select.Option value="1">微信</Select.Option>
              <Select.Option value="2">支付宝</Select.Option>
            </OptGroup>
          </Select>
        </Form.Item>
        <Form.Item>
          <Button type="primary" htmlType="submit">
            保存
          </Button>
        </Form.Item>
      </Form>
    </Modal>
  );
};

export default CreateForm;
