import React, { useState, useEffect } from 'react';
import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar, Radio, Upload, message } from 'antd';
import ImageUpload from '../../../components/XForm/ImageUpload';
import moment from 'moment';
import request from '../../../utils/request';
import apis from '../../../services/apis';
import Styles from './style.less';
import { router } from 'umi';
const { Option } = Select;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { Meta } = Card;
const { TextArea } = Input;
const tailFormItemLayout = {
labelCol: {
xs: { span: 20 },
sm: { span: 3 },
},
wrapperCol: {
xs: { span: 20 },
sm: { span: 16 },
},
};
function body(props) {
const { getFieldDecorator } = props.form
// eslint-disable-next-line react-hooks/rules-of-hooks
const [dataSource, setDataSource] = useState({ picture: '' })
const { id } = props.location.query;
if (id !== '') {
// eslint-disable-next-line react-hooks/rules-of-hooks
useEffect(() => {
getById(id)
}, [])
}
// 获取详情信息
function getById(currentId) {
request({ ...apis.customer.recommendGetById, urlData: { id: currentId } }).then(res => {
res.reportDate = moment(res.reportDate)
props.form.setFieldsValue(res)
})
}
function submitDate(params) {
// props.form.setFieldsValue(res)
request({ ...apis.customer.auto, urlData: { id: params.customerId }, params: { verifyStatus: params.verifyStatus } }).then(() => {
// eslint-disable-next-line no-unused-expressions