import React, { useState, useEffect } from 'react';
import { Modal } from 'antd';
import ProTable from '@ant-design/pro-table';
import ProDescriptions from '@ant-design/pro-descriptions';
import api from './service';

let defaultData = {};
const OrderflowDetail = (props) => {
  const { ModalVisible, onCancel } = props;
  return (
    <Modal
      title={'订单详情'}
      width={1000}
      visible={props.ModalVisible}
      bodyStyle={{ padding: '32px 40px 48px' }}
      footer={null}
      destroyOnClose
      onCancel={() => onCancel()}
      maskClosable={false}
    >
      <ProTable
        rowKey="id"
        request={async () => {
          defaultData = await api.GetPageListLogs({ id: props.values.id });
          return {
            data: defaultData,
            success: true,
          };
        }}
        columns={[
          {
            title: '日志结果',
            key: 'desc',
            dataIndex: 'desc',
          },
        ]}
        toolBarRender={false}
        search={false}
      />
    </Modal>
  );
};

export default OrderflowDetail;
