|
|
|
@ -1,14 +1,15 @@
|
|
|
|
|
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, isEmpty } from '@/utils/commons'
|
|
|
|
|
import useFormStore from '@/stores/FormStore';
|
|
|
|
|
import { useShallow } from 'zustand/react/shallow';
|
|
|
|
|
|
|
|
|
@ -165,8 +166,10 @@ function OrderGroupTable({ formValues }) {
|
|
|
|
|
render: (text, record) => {
|
|
|
|
|
let regularText = ''
|
|
|
|
|
if (record.buytime > 0) regularText = '(R' + record.buytime + ')'
|
|
|
|
|
const whatsAppIcon = isEmpty(record.coli_guest_WhatsApp) ? null : <WhatsAppOutlined />
|
|
|
|
|
return (
|
|
|
|
|
<Space>
|
|
|
|
|
{whatsAppIcon}
|
|
|
|
|
<Link to={`/order/chat/${record.COLI_SN}`} state={record} title={record.coli_guest_WhatsApp}>{text + regularText}</Link>
|
|
|
|
|
<Badge
|
|
|
|
|
count={record.unread_msg}
|
|
|
|
@ -183,11 +186,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>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|