|
|
|
@ -4,6 +4,7 @@ import { Flex, Button, Tooltip, List, Form, Row, Col, Drawer, Dropdown, Input, C
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
import { useEmailList } from '@/hooks/useEmail';
|
|
|
|
|
import { isEmpty } from '@/utils/commons';
|
|
|
|
|
import { MailboxDirIcon } from './MailboxDirIcon'
|
|
|
|
|
|
|
|
|
|
const { RangePicker } = DatePicker
|
|
|
|
|
const MailBox = ({ mailboxDir, onMailItemClick, ...props}) => {
|
|
|
|
@ -33,15 +34,16 @@ const MailBox = ({ mailboxDir, onMailItemClick, ...props}) => {
|
|
|
|
|
value: [dayjs().startOf('y'), dayjs().endOf('y')],
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
const [openOrder, setOpenOrder] = useState(false)
|
|
|
|
|
const [form] = Form.useForm()
|
|
|
|
|
|
|
|
|
|
const { mailList, isLoading, error } = useEmailList(mailboxDir);
|
|
|
|
|
|
|
|
|
|
console.info('mailboxDir: ', mailboxDir)
|
|
|
|
|
console.info('props.breadcrumb: ', props.breadcrumb)
|
|
|
|
|
console.info('props.mailboxDir: ', mailboxDir)
|
|
|
|
|
|
|
|
|
|
const mailItemRender = (item) => {
|
|
|
|
|
const orderNumber = isEmpty(item.MAI_COLI_ID) ? '' : (item.MAI_COLI_ID + ' - ')
|
|
|
|
|
const isOrderNode = mailboxDir.COLI_SN > 0
|
|
|
|
|
const orderNumber = (isEmpty(item.MAI_COLI_ID) || isOrderNode) ? '' : (item.MAI_COLI_ID + ' - ')
|
|
|
|
|
const countryName = isEmpty(item.CountryCN) ? '' : ('[' + (item.CountryCN === null ? 'USA' : item.CountryCN) + '] ')
|
|
|
|
|
const mailStateClass = item.MOI_ReadState === 0 ? 'font-bold' : ''
|
|
|
|
|
return (
|
|
|
|
@ -167,23 +169,17 @@ const MailBox = ({ mailboxDir, onMailItemClick, ...props}) => {
|
|
|
|
|
header={
|
|
|
|
|
<Flex align='center' justify="space-between">
|
|
|
|
|
<Breadcrumb
|
|
|
|
|
items={[
|
|
|
|
|
{
|
|
|
|
|
title: (
|
|
|
|
|
<>
|
|
|
|
|
<StarOutlined />
|
|
|
|
|
<span>{mailboxDir.parentTitle}</span>
|
|
|
|
|
</>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: (
|
|
|
|
|
<>
|
|
|
|
|
<span>{mailboxDir.title}</span>
|
|
|
|
|
</>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
items={
|
|
|
|
|
props.breadcrumb.map(bc => {
|
|
|
|
|
return {
|
|
|
|
|
title: (
|
|
|
|
|
<>
|
|
|
|
|
<MailboxDirIcon type={bc?.iconIndex} />
|
|
|
|
|
<span>{bc.title}</span>
|
|
|
|
|
</>
|
|
|
|
|
),
|
|
|
|
|
}
|
|
|
|
|
})}
|
|
|
|
|
/>
|
|
|
|
|
<Flex align="center" justify="space-between">
|
|
|
|
|
<span>51-100 of 562</span>
|
|
|
|
|