|
|
|
@ -1,17 +1,17 @@
|
|
|
|
|
import {
|
|
|
|
|
App, Badge, Button, DatePicker, Tabs, Flex, Form, Input,
|
|
|
|
|
Radio, Row, Col, Select, Space, Switch, Table, Tag, Collapse
|
|
|
|
|
Radio, Row, Col, Select, Space, Switch, Table, Tag, Tooltip
|
|
|
|
|
} from 'antd'
|
|
|
|
|
import { InfoCircleTwoTone, MessageTwoTone, PhoneTwoTone, MailTwoTone, WhatsAppOutlined } from '@ant-design/icons'
|
|
|
|
|
import { memo, useCallback, useEffect, useState } from 'react'
|
|
|
|
|
import { Link } from 'react-router-dom'
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
import { Conditional } from '@/components/Conditional'
|
|
|
|
|
import useOrderStore from '@/stores/OrderStore'
|
|
|
|
|
import useAuthStore from '@/stores/AuthStore'
|
|
|
|
|
import { copy } from '@/utils/commons'
|
|
|
|
|
import { copy, isNotEmpty } from '@/utils/commons'
|
|
|
|
|
import useFormStore from '@/stores/FormStore';
|
|
|
|
|
import { useShallow } from 'zustand/react/shallow';
|
|
|
|
|
import { WhatsAppOutlined } from '@ant-design/icons';
|
|
|
|
|
import { useShallow } from 'zustand/react/shallow'
|
|
|
|
|
|
|
|
|
|
const { RangePicker } = DatePicker
|
|
|
|
|
|
|
|
|
@ -168,9 +168,9 @@ function OrderGroupTable({ formValues }) {
|
|
|
|
|
if (record.buytime > 0) regularText = '(R' + record.buytime + ')'
|
|
|
|
|
return (
|
|
|
|
|
<Space>
|
|
|
|
|
{isNotEmpty(record.coli_guest_WhatsApp) && <WhatsAppOutlined className={['pl-1', record.last_received_time ? 'text-whatsapp' : 'text-neutral-500']} />}
|
|
|
|
|
<Link to={`/order/chat/${record.COLI_SN}`} state={record} title={record.coli_guest_WhatsApp}>
|
|
|
|
|
{text + regularText}
|
|
|
|
|
{record.coli_guest_WhatsApp && <WhatsAppOutlined className={['pl-1', record.last_received_time ? 'text-whatsapp' : 'text-neutral-500']} />}
|
|
|
|
|
</Link>
|
|
|
|
|
<Badge
|
|
|
|
|
count={record.unread_msg}
|
|
|
|
@ -187,11 +187,20 @@ function OrderGroupTable({ formValues }) {
|
|
|
|
|
dataIndex: 'COLI_State',
|
|
|
|
|
width: 150,
|
|
|
|
|
render: (text, record) => {
|
|
|
|
|
let extra = ''
|
|
|
|
|
if (record.RemindState === 1) extra = '(一催)'
|
|
|
|
|
if (record.RemindState === 2) extra = '(二催)'
|
|
|
|
|
if (record.RemindState === 3) extra = '(三催)'
|
|
|
|
|
return text + extra
|
|
|
|
|
// 1新订单<InfoCircleTwoTone />;2未读消息<MessageTwoTone />;3需一催;4需二催;5需三催<PhoneTwoTone />;6未处理邮件<MailTwoTone />
|
|
|
|
|
const needTo = '要催信' + (record.coli_ordertype - 2)
|
|
|
|
|
let statusIcon = ''
|
|
|
|
|
if (record.coli_ordertype === 1) statusIcon = <Tooltip title='新订单'><InfoCircleTwoTone /></Tooltip>
|
|
|
|
|
else if (record.coli_ordertype === 2) statusIcon = <Tooltip title='新消息'><MessageTwoTone /></Tooltip>
|
|
|
|
|
else if (record.coli_ordertype === 3 || record.coli_ordertype === 4 || record.coli_ordertype === 5) statusIcon = <Tooltip title={needTo}><PhoneTwoTone /></Tooltip>
|
|
|
|
|
else if (record.coli_ordertype === 6) statusIcon = <Tooltip title='老邮件'><MailTwoTone /></Tooltip>
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Space>
|
|
|
|
|
{text}
|
|
|
|
|
{statusIcon}
|
|
|
|
|
</Space>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|