|
|
|
@ -41,7 +41,7 @@ const MailBox = ({ mailboxDir, onMailItemClick, onSelect, ...props }) => {
|
|
|
|
|
]
|
|
|
|
|
const [form] = Form.useForm()
|
|
|
|
|
const [selectedItems, setSelectedItems] = useState([])
|
|
|
|
|
const { mailList, loading, error, refresh } = useEmailList(mailboxDir)
|
|
|
|
|
const { mailList, loading, error, refresh, markAsRead, markAsProcessed } = useEmailList(mailboxDir)
|
|
|
|
|
|
|
|
|
|
const [pagination, setPagination] = useState({
|
|
|
|
|
current: 1,
|
|
|
|
@ -145,7 +145,7 @@ const MailBox = ({ mailboxDir, onMailItemClick, onSelect, ...props }) => {
|
|
|
|
|
selectedItems.length > 0 &&
|
|
|
|
|
selectedItems.length < pagination.pagedList.length
|
|
|
|
|
}
|
|
|
|
|
checked={pagination.pagedList.every((item) =>
|
|
|
|
|
checked={pagination.pagedList.length === 0 ? false : pagination.pagedList.every((item) =>
|
|
|
|
|
selectedItems.some((selected) => selected.MAI_SN === item.MAI_SN)
|
|
|
|
|
)}
|
|
|
|
|
onChange={(e) => {
|
|
|
|
@ -162,10 +162,19 @@ const MailBox = ({ mailboxDir, onMailItemClick, onSelect, ...props }) => {
|
|
|
|
|
></Checkbox>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
<Tooltip title='标记已读'>
|
|
|
|
|
<Button shape='circle' type='text' size='small' icon={<ReadOutlined />} />
|
|
|
|
|
<Button shape='circle' type='text' size='small' icon={<ReadOutlined />}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
console.info('markAsRead: ', selectedItems.map((item) => item.MAI_SN))
|
|
|
|
|
markAsRead(selectedItems.map((item) => item.MAI_SN))
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
<Tooltip title='已处理'>
|
|
|
|
|
<Button shape='circle' type='text' size='small' icon={<MailCheckIcon />} />
|
|
|
|
|
<Button shape='circle' type='text' size='small' icon={<MailCheckIcon />}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
console.info('markAsProcessed: ', selectedItems.map((item) => item.MAI_SN))
|
|
|
|
|
markAsProcessed(selectedItems.map((item) => item.MAI_SN))
|
|
|
|
|
}} />
|
|
|
|
|
</Tooltip>
|
|
|
|
|
<Tooltip title='刷新'>
|
|
|
|
|
<Button shape='circle' type='text' size='small' icon={<ReloadOutlined />} onClick={refresh} />
|
|
|
|
@ -191,12 +200,12 @@ const MailBox = ({ mailboxDir, onMailItemClick, onSelect, ...props }) => {
|
|
|
|
|
// onFinish={handleSubmit}
|
|
|
|
|
>
|
|
|
|
|
<Row justify='start' gutter={16}>
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
<Col span={10}>
|
|
|
|
|
<Form.Item label='订单号' name='orderNumber'>
|
|
|
|
|
<Input placeholder='订单号' allowClear />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={10}>
|
|
|
|
|
<Col span={12}>
|
|
|
|
|
<Form.Item label='日期' name='confirmDateRange'>
|
|
|
|
|
<RangePicker allowClear={true} inputReadOnly={true} presets={DATE_RANGE_PRESETS} />
|
|
|
|
|
</Form.Item>
|
|
|
|
|