|
|
|
@ -1,49 +1,46 @@
|
|
|
|
|
import { createContext, useContext, useEffect, useState } from 'react';
|
|
|
|
|
import { Popover, Flex, Button, List, Popconfirm } from 'antd';
|
|
|
|
|
// import { useConversationState } from '@/stores/ConversationContext';
|
|
|
|
|
import { useState } from 'react'
|
|
|
|
|
import { Popover, Flex, Button, List, Popconfirm } from 'antd'
|
|
|
|
|
|
|
|
|
|
const QuotesHistory = ((props) => {
|
|
|
|
|
// const { customerOrderProfile: orderInfo } = useConversationState();
|
|
|
|
|
const { quotes, ...order } = {} // orderInfo;
|
|
|
|
|
|
|
|
|
|
const [open, setOpen] = useState(false);
|
|
|
|
|
const [open, setOpen] = useState(false)
|
|
|
|
|
|
|
|
|
|
const handleOpenChange = (newOpen) => {
|
|
|
|
|
setOpen(newOpen);
|
|
|
|
|
};
|
|
|
|
|
setOpen(newOpen)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const onSend = () => {
|
|
|
|
|
setOpen(false);
|
|
|
|
|
setOpen(false)
|
|
|
|
|
// todo: send
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Popover
|
|
|
|
|
// content={<a onClick={hide}>Close</a>}
|
|
|
|
|
content={
|
|
|
|
|
<List
|
|
|
|
|
className='w-96 h-4/6 overflow-y-auto text-slate-900'
|
|
|
|
|
itemLayout='horizontal'
|
|
|
|
|
dataSource={quotes}
|
|
|
|
|
pagination={{
|
|
|
|
|
pageSize: 5,
|
|
|
|
|
showLessItems: true,
|
|
|
|
|
showTotal: (total) => { return `总数:${total}` }
|
|
|
|
|
}}
|
|
|
|
|
dataSource={props.dataSource}
|
|
|
|
|
renderItem={(item, index) => (
|
|
|
|
|
<List.Item className='' key={item.letterid} >
|
|
|
|
|
<List.Item.Meta
|
|
|
|
|
className=' text-neutral-800'
|
|
|
|
|
title={item.lettertitle}
|
|
|
|
|
className='text-neutral-800'
|
|
|
|
|
title={<a target='_blank' href={item.letterurl}>{item.lettertitle}</a>}
|
|
|
|
|
description={
|
|
|
|
|
<Flex justify='space-between'>
|
|
|
|
|
<Button onClick={onSend} size={'small'} type='link' key={'send'}>
|
|
|
|
|
详细报价
|
|
|
|
|
</Button>
|
|
|
|
|
<span>{item.letterdate}</span>
|
|
|
|
|
<Flex gap={8}>
|
|
|
|
|
<Popconfirm title='删除报价信' description='确认要删除报价信吗?' onConfirm={() => {}} onCancel={onSend} okText='Yes' cancelText='No'>
|
|
|
|
|
<Button size={'small'} type='link' danger key={'send'}>
|
|
|
|
|
删除
|
|
|
|
|
</Button>
|
|
|
|
|
</Popconfirm>
|
|
|
|
|
<Button onClick={onSend} size={'small'} type='link' key={'send'}>
|
|
|
|
|
复制
|
|
|
|
|
</Button>
|
|
|
|
|
</Flex>
|
|
|
|
|
<Button onClick={() => {
|
|
|
|
|
navigator.clipboard.writeText(item.letterurl)
|
|
|
|
|
setOpen(false)
|
|
|
|
|
}} size={'small'} type='link' key={'send'}>
|
|
|
|
|
复制
|
|
|
|
|
</Button>
|
|
|
|
|
</Flex>
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
@ -59,6 +56,7 @@ const QuotesHistory = ((props) => {
|
|
|
|
|
<Button size={'small'}>报价历史</Button>
|
|
|
|
|
</Popover>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
export default QuotesHistory;
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export default QuotesHistory
|
|
|
|
|