Merge remote-tracking branch 'origin/main' into dev/chat

dev/chat
Lei OT 1 year ago
commit 02cc765e9a

@ -1,50 +1,50 @@
-- 601 王露加(AH) Ann Wang
UPDATE WhatsApp_Session
SET opi_sn =601
WHERE opi_sn is null and whatsapp_phone_number IN ('600123021806', '919421671750', '61438817779', '393406100983', '12032531996', '60197799795', '447788271298', '6598239020', '4407788271298', '6584686731', '60123075151', '60194903126', '13238286927', '6596966465', '6598267067', '14048496022', '6598809877', '628111663399', '60166268901', '19376202088', '62811907069', '61402445619', '393343998897', '6589475894', '41768308393', '1919324583030', '6598410895', '6593838816', '610402445619', '6592707262', '610431280050', '62811265987', '447702101254', '4407702101254', '85295012200', '10438012756', '15127570944', '13038837142', '6594890344', '13053353222');
UPDATE WhatsApp_InboundMessage
SET opi_sn =601
WHERE froms IN ('600123021806', '919421671750', '61438817779', '393406100983', '12032531996', '60197799795', '447788271298', '6598239020', '4407788271298', '6584686731', '60123075151', '60194903126', '13238286927', '6596966465', '6598267067', '14048496022', '6598809877', '628111663399', '60166268901', '19376202088', '62811907069', '61402445619', '393343998897', '6589475894', '41768308393', '1919324583030', '6598410895', '6593838816', '610402445619', '6592707262', '610431280050', '62811265987', '447702101254', '4407702101254', '85295012200', '10438012756', '15127570944', '13038837142', '6594890344', '13053353222');
-- 487 杨新玲(AH) COCO
UPDATE WhatsApp_Session
SET opi_sn =487
WHERE opi_sn is null and whatsapp_phone_number IN (
'12103817205','17758484963','60149483183','6281510103434','628119782869','447752219225','12084122282','15083266574','14402632632','918178744977','12106891804','573206915405','12035084239','6591793713','6596303740','16507507777','13146235967','610402933421','19738008090','16025109980','14156139002','85569570025','23052514484','16135487944','18052166879','972522554653','270824611177','34651307209','41796154103','393421384738','19084563966','971568748804','84979380502','491785727904','4901785727904','6598227132','16179352409','4915122297678','15163772972','447539174554','447539174554','16025109980','19166276277','610415682199','447766318643','4407766318643','8201068091987','41796154103','918587901086','918587901086');
UPDATE WhatsApp_InboundMessage
SET opi_sn =487
WHERE froms IN (
'12103817205','17758484963','60149483183','6281510103434','628119782869','447752219225','12084122282','15083266574','14402632632','918178744977','12106891804','573206915405','12035084239','6591793713','6596303740','16507507777','13146235967','610402933421','19738008090','16025109980','14156139002','85569570025','23052514484','16135487944','18052166879','972522554653','270824611177','34651307209','41796154103','393421384738','19084563966','971568748804','84979380502','491785727904','4901785727904','6598227132','16179352409','4915122297678','15163772972','447539174554','447539174554','16025109980','19166276277','610415682199','447766318643','4407766318643','8201068091987','41796154103','918587901086','918587901086');
-- 603 秦雯萱(AH) Dora
UPDATE WhatsApp_Session
SET opi_sn =603
WHERE opi_sn is null and whatsapp_phone_number IN ('19013561781','6285811111175','62889692159816','60162185779','6287888722293','60126518499','60126183248','17789950848','610455289205','60123152286','6060126518499','15185983270','6594319127','19013561781','14104266170','16174120590','6597969282','6591714969','18476483195','6592976545','6590095741','66818890118','447545084704','6596921770','447917350605','4407917350605');
UPDATE WhatsApp_InboundMessage
SET opi_sn =603
WHERE froms IN ('19013561781','6285811111175','62889692159816','60162185779','6287888722293','60126518499','60126183248','17789950848','610455289205','60123152286','6060126518499','15185983270','6594319127','19013561781','14104266170','16174120590','6597969282','6591714969','18476483195','6592976545','6590095741','66818890118','447545084704','6596921770','447917350605','4407917350605');
-- 606 莫梦瑶 Glory
UPDATE WhatsApp_Session
SET opi_sn =606
WHERE opi_sn is null and whatsapp_phone_number IN ('6285762428379');
UPDATE WhatsApp_InboundMessage
SET opi_sn =606
WHERE froms IN ('6285762428379');
-- 586 秦宇尘 Jimmy
UPDATE WhatsApp_Session
SET opi_sn =606
WHERE opi_sn is null and whatsapp_phone_number IN ('17736215303');
UPDATE WhatsApp_InboundMessage
SET opi_sn =606
WHERE froms IN ('17736215303');
-- 601 王露加(AH) Ann Wang
UPDATE WhatsApp_Session
SET opi_sn =601
WHERE opi_sn is null and whatsapp_phone_number IN ('600123021806', '919421671750', '61438817779', '393406100983', '12032531996', '60197799795', '447788271298', '6598239020', '4407788271298', '6584686731', '60123075151', '60194903126', '13238286927', '6596966465', '6598267067', '14048496022', '6598809877', '628111663399', '60166268901', '19376202088', '62811907069', '61402445619', '393343998897', '6589475894', '41768308393', '1919324583030', '6598410895', '6593838816', '610402445619', '6592707262', '610431280050', '62811265987', '447702101254', '4407702101254', '85295012200', '10438012756', '15127570944', '13038837142', '6594890344', '13053353222');
UPDATE WhatsApp_InboundMessage
SET opi_sn =601
WHERE froms IN ('600123021806', '919421671750', '61438817779', '393406100983', '12032531996', '60197799795', '447788271298', '6598239020', '4407788271298', '6584686731', '60123075151', '60194903126', '13238286927', '6596966465', '6598267067', '14048496022', '6598809877', '628111663399', '60166268901', '19376202088', '62811907069', '61402445619', '393343998897', '6589475894', '41768308393', '1919324583030', '6598410895', '6593838816', '610402445619', '6592707262', '610431280050', '62811265987', '447702101254', '4407702101254', '85295012200', '10438012756', '15127570944', '13038837142', '6594890344', '13053353222');
-- 487 杨新玲(AH) COCO
UPDATE WhatsApp_Session
SET opi_sn =487
WHERE opi_sn is null and whatsapp_phone_number IN (
'12103817205','17758484963','60149483183','6281510103434','628119782869','447752219225','12084122282','15083266574','14402632632','918178744977','12106891804','573206915405','12035084239','6591793713','6596303740','16507507777','13146235967','610402933421','19738008090','16025109980','14156139002','85569570025','23052514484','16135487944','18052166879','972522554653','270824611177','34651307209','41796154103','393421384738','19084563966','971568748804','84979380502','491785727904','4901785727904','6598227132','16179352409','4915122297678','15163772972','447539174554','447539174554','16025109980','19166276277','610415682199','447766318643','4407766318643','8201068091987','41796154103','918587901086','918587901086');
UPDATE WhatsApp_InboundMessage
SET opi_sn =487
WHERE froms IN (
'12103817205','17758484963','60149483183','6281510103434','628119782869','447752219225','12084122282','15083266574','14402632632','918178744977','12106891804','573206915405','12035084239','6591793713','6596303740','16507507777','13146235967','610402933421','19738008090','16025109980','14156139002','85569570025','23052514484','16135487944','18052166879','972522554653','270824611177','34651307209','41796154103','393421384738','19084563966','971568748804','84979380502','491785727904','4901785727904','6598227132','16179352409','4915122297678','15163772972','447539174554','447539174554','16025109980','19166276277','610415682199','447766318643','4407766318643','8201068091987','41796154103','918587901086','918587901086');
-- 603 秦雯萱(AH) Dora
UPDATE WhatsApp_Session
SET opi_sn =603
WHERE opi_sn is null and whatsapp_phone_number IN ('19013561781','6285811111175','62889692159816','60162185779','6287888722293','60126518499','60126183248','17789950848','610455289205','60123152286','6060126518499','15185983270','6594319127','19013561781','14104266170','16174120590','6597969282','6591714969','18476483195','6592976545','6590095741','66818890118','447545084704','6596921770','447917350605','4407917350605');
UPDATE WhatsApp_InboundMessage
SET opi_sn =603
WHERE froms IN ('19013561781','6285811111175','62889692159816','60162185779','6287888722293','60126518499','60126183248','17789950848','610455289205','60123152286','6060126518499','15185983270','6594319127','19013561781','14104266170','16174120590','6597969282','6591714969','18476483195','6592976545','6590095741','66818890118','447545084704','6596921770','447917350605','4407917350605');
-- 606 莫梦瑶 Glory
UPDATE WhatsApp_Session
SET opi_sn =606
WHERE opi_sn is null and whatsapp_phone_number IN ('6285762428379');
UPDATE WhatsApp_InboundMessage
SET opi_sn =606
WHERE froms IN ('6285762428379');
-- 586 秦宇尘 Jimmy
UPDATE WhatsApp_Session
SET opi_sn =606
WHERE opi_sn is null and whatsapp_phone_number IN ('17736215303');
UPDATE WhatsApp_InboundMessage
SET opi_sn =606
WHERE froms IN ('17736215303');

@ -61,17 +61,22 @@ const useOrderStore = create((set, get) => ({
},
fetchOrderDetail: async (colisn) => {
const json = await fetchJSON(`${API_HOST}/getorderinfo`, { colisn })
if (json.errcode === 0 && json.result.length > 0) {
const orderResult = json.result[0]
set(() => ({
orderDetail: orderResult,
customerDetail: orderResult.contact.length > 0 ? orderResult.contact[0] : {},
lastQuotation: orderResult.quotes.length > 0 ? orderResult.quotes[0] : {},
quotationList: orderResult.quotes,
}))
}
fetchOrderDetail: (colisn) => {
return fetchJSON(`${API_HOST}/getorderinfo`, { colisn })
.then(json => {
if (json.errcode === 0 && json.result.length > 0) {
const orderResult = json.result[0]
set(() => ({
orderDetail: orderResult,
customerDetail: orderResult.contact.length > 0 ? orderResult.contact[0] : {},
lastQuotation: orderResult.quotes.length > 0 ? orderResult.quotes[0] : {},
quotationList: orderResult.quotes,
}))
} else {
throw new Error(json?.errmsg + ': ' + json.errcode)
}
})
},
setOrderPropValue: async (colisn, propName, value) => {

@ -1,6 +1,6 @@
import { LinkOutlined, MailOutlined, PhoneOutlined, UserOutlined, WhatsAppOutlined } from '@ant-design/icons'
import { App, Button, Card, Empty, Flex, Select, Typography } from 'antd'
import { useEffect } from 'react'
import { App, Button, Card, Empty, Flex, Select, Spin, Typography } from 'antd'
import { useEffect, useState } from 'react'
import { Conditional } from '@/components/Conditional'
import useConversationStore from '@/stores/ConversationStore'
@ -9,13 +9,26 @@ import QuotesHistory from './QuotesHistory'
const CustomerProfile = (() => {
const { notification } = App.useApp()
const [loading, setLoading] = useState(false)
const currentOrder = useConversationStore((state) => state.currentConversation?.coli_sn || '')
const { orderDetail, customerDetail, lastQuotation, quotationList,
fetchOrderDetail, setOrderPropValue
} = useOrderStore()
useEffect(() => {
if (currentOrder) fetchOrderDetail(currentOrder)
if (currentOrder) {
setLoading(true)
fetchOrderDetail(currentOrder)
.finally(() => setLoading(false))
.catch(reason => {
notification.error({
message: '查询出错',
description: reason.message,
placement: 'top',
duration: 60,
})
})
}
}, [currentOrder])
let regularText = ''
@ -24,6 +37,7 @@ const CustomerProfile = (() => {
if (currentOrder) {
return (
<div className=' divide-x-0 divide-y divide-dashed divide-gray-300 '>
<Spin spinning={loading}>
<Card className='p-2 '
bordered={false}
title={orderDetail.order_no}
@ -90,6 +104,7 @@ const CustomerProfile = (() => {
}/>
</Flex>
<p className='p-2 shadow-inner overflow-auto m-0 break-words whitespace-pre-wrap' dangerouslySetInnerHTML={{__html: orderDetail.order_detail}}></p>
</Spin>
</div>
)
} else {

@ -112,7 +112,8 @@ const AdvanceSearchForm = memo(function noName({ initialValues, onSubmit }) {
{ value: '4', label: '等待付订金' },
{ value: '5', label: '成行' },
{ value: '6', label: '丢失' },
{ value: '7', label: '取消' }
{ value: '7', label: '取消' },
{ value: '8', label: '未报价' }
]}
/>
</Form.Item>
@ -187,7 +188,10 @@ 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']} />}
<Conditional
condition={isNotEmpty(record.coli_guest_WhatsApp)}
whenTrue={<Tooltip title={record.coli_guest_WhatsApp}><WhatsAppOutlined className={['pl-1', record.last_received_time ? 'text-whatsapp' : 'text-neutral-500']} /></Tooltip>}
/>
{text + regularText}
<Badge
count={record.unread_msg}
@ -202,7 +206,7 @@ function OrderGroupTable({ formValues }) {
{
title: '订单状态',
dataIndex: 'COLI_State',
width: 150,
width: 120,
render: (text, record) => {
// 1<InfoCircleTwoTone />2<MessageTwoTone />345<PhoneTwoTone />6<MailTwoTone />
const needTo = '要催信' + (record.coli_ordertype - 2)
@ -221,16 +225,35 @@ function OrderGroupTable({ formValues }) {
}
},
{
title: '报价title',
title: '报价 Title',
dataIndex: 'lettertitle',
ellipsis: true,
hidden: false,
// render: (text, record) => {
// return (
// <Tooltip title={text}>{text}</Tooltip>
// )
// }
},
{
title: '出发日期',
dataIndex: 'COLI_OrderStartDate',
width: 120,
hidden: false
},
{
title: '客人最后一次回复时间',
dataIndex: 'last_received_time',
width: 180,
render: (text, record) => {
if (record.last_received_time) {
return new dayjs(record.last_received_time).format('YYYY-MM-DD HH:mm:ss')
}
}
},
{
title: '附加信息',
ellipsis: true,
dataIndex: 'COLI_Introduction',
},
]

Loading…
Cancel
Save