|
|
@ -1,6 +1,6 @@
|
|
|
|
import { Conditional } from '@/components/Conditional'
|
|
|
|
import { Conditional } from '@/components/Conditional'
|
|
|
|
import useAuthStore from '@/stores/AuthStore'
|
|
|
|
import useAuthStore from '@/stores/AuthStore'
|
|
|
|
import { PERM_MERGE_CONVERSATION } from '@/stores/AuthStore'
|
|
|
|
import { PERM_IMPORT_EMAIL } from '@/stores/AuthStore'
|
|
|
|
import useFormStore from '@/stores/FormStore'
|
|
|
|
import useFormStore from '@/stores/FormStore'
|
|
|
|
import { useOrderStore } from '@/stores/OrderStore'
|
|
|
|
import { useOrderStore } from '@/stores/OrderStore'
|
|
|
|
import { copy, isNotEmpty, isEmpty } from '@/utils/commons'
|
|
|
|
import { copy, isNotEmpty, isEmpty } from '@/utils/commons'
|
|
|
@ -24,11 +24,11 @@ function OrderGroupTable({ formValues }) {
|
|
|
|
|
|
|
|
|
|
|
|
const handleImportEmail = useCallback((order) => {
|
|
|
|
const handleImportEmail = useCallback((order) => {
|
|
|
|
importEmailMessage({ orderId: order.COLI_SN, orderNumber: order.COLI_ID })
|
|
|
|
importEmailMessage({ orderId: order.COLI_SN, orderNumber: order.COLI_ID })
|
|
|
|
.then((result) => {
|
|
|
|
.then((r) => {
|
|
|
|
console.info(result)
|
|
|
|
console.info(r)
|
|
|
|
notification.info({
|
|
|
|
notification.info({
|
|
|
|
message: 'Notification',
|
|
|
|
message: 'Notification',
|
|
|
|
description: '订单邮件消息导入成功',
|
|
|
|
description: '订单:' + order.COLI_ID + ' 导入' + r.result.length + '条邮件消息',
|
|
|
|
placement: 'top',
|
|
|
|
placement: 'top',
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -56,7 +56,7 @@ function OrderGroupTable({ formValues }) {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Space>
|
|
|
|
<Space>
|
|
|
|
<Conditional
|
|
|
|
<Conditional
|
|
|
|
condition={isPermitted(PERM_MERGE_CONVERSATION)}
|
|
|
|
condition={isPermitted(PERM_IMPORT_EMAIL)}
|
|
|
|
whenTrue={<Button type="default" shape="round" icon={<ImportOutlined />} size='small' onClick={() => handleImportEmail(record)} />}
|
|
|
|
whenTrue={<Button type="default" shape="round" icon={<ImportOutlined />} size='small' onClick={() => handleImportEmail(record)} />}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<Link to={`/order/chat/${record.COLI_SN}`} state={record}>
|
|
|
|
<Link to={`/order/chat/${record.COLI_SN}`} state={record}>
|
|
|
|